From c44e2bb0a6cac1528a0fbc873f96f929da951a04 Mon Sep 17 00:00:00 2001 From: kazuya kawaguchi Date: Fri, 20 Oct 2023 13:54:03 +0900 Subject: [PATCH] fix: use alias via import-map --- playground/deno/deno.jsonc | 3 +++ playground/deno/deno.lock | 3 --- playground/deno/main.ts | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/playground/deno/deno.jsonc b/playground/deno/deno.jsonc index bcd1551..8924b00 100644 --- a/playground/deno/deno.jsonc +++ b/playground/deno/deno.jsonc @@ -1,4 +1,7 @@ { + "imports": { + "@intlify/utils": "https://esm.sh/@intlify/utils@0.10.0" + }, "tasks": { "dev": "deno run --watch main.ts", "test": "deno test --allow-read=$(which deno) --allow-run --allow-net ./deno.spec.ts" diff --git a/playground/deno/deno.lock b/playground/deno/deno.lock index 41ad105..81cd7c3 100644 --- a/playground/deno/deno.lock +++ b/playground/deno/deno.lock @@ -1,8 +1,5 @@ { "version": "3", - "redirects": { - "https://esm.sh/@intlify/utils": "https://esm.sh/@intlify/utils@0.10.0" - }, "remote": { "https://deno.land/std@0.204.0/assert/_constants.ts": "8a9da298c26750b28b326b297316cdde860bc237533b07e1337c021379e6b2a9", "https://deno.land/std@0.204.0/assert/_diff.ts": "58e1461cc61d8eb1eacbf2a010932bf6a05b79344b02ca38095f9b805795dc48", diff --git a/playground/deno/main.ts b/playground/deno/main.ts index 227b0ff..c4d90eb 100644 --- a/playground/deno/main.ts +++ b/playground/deno/main.ts @@ -1,11 +1,11 @@ // @ts-ignore: this is example -import { getHeaderLanguages } from 'https://esm.sh/@intlify/utils' +import { getHeaderLanguages } from "@intlify/utils"; -const port = 8125 +const port = 8125; Deno.serve({ port, }, (req: Request) => { - const languages = getHeaderLanguages(req) - return new Response(`detect accpect-language: ${languages}`) -}) -console.log(`server listening on ${port}`) + const languages = getHeaderLanguages(req); + return new Response(`detect accpect-language: ${languages}`); +}); +console.log(`server listening on ${port}`);