Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

support import_maps.json #64

Open
beckend opened this issue Feb 13, 2022 · 4 comments
Open

support import_maps.json #64

beckend opened this issue Feb 13, 2022 · 4 comments

Comments

@beckend
Copy link

beckend commented Feb 13, 2022

https://deno.land/manual/linking_to_external_code/import_maps

@hayd
Copy link
Owner

hayd commented Feb 13, 2022

duplicate of #7 .

I will try and look at this later in the week. I am actually a little surprised it doesn't "just work"!

@hayd
Copy link
Owner

hayd commented Feb 13, 2022

I just tested this (from the example):

$ udd import_map.json
import_map.json
[1/1] Update successful: https://deno.land/std@0.124.0/fmt/ -> 0.125.0
Successfully updated:
https://deno.land/std@0.124.0/fmt/ 0.124.0 -> 0.125.0

What further is needed?

(This behavior ought to be tested in CI... and documented in the README.)

@boredland
Copy link

boredland commented Jul 2, 2022

I just tried this and for me it seems to just look up the first dependency. Can you confirm that it works with multiple? I've got some clearly outdated ones in my import map:

{
  "imports": {
    "$fresh/": "https://deno.land/x/fresh@1.0.0/",
    "preact": "https://esm.sh/preact@10.8.1",
    "preact/": "https://esm.sh/preact@10.8.1/",
    "preact-render-to-string": "https://esm.sh/preact-render-to-string@5.2.0?deps=preact@10.8.1",
    "@twind": "./utils/twind.ts",
    "twind": "https://esm.sh/twind@0.16.17",
    "twind/": "https://esm.sh/twind@0.16.17/",
    "@trpc/server": "https://esm.sh/v82/@trpc/server@10.0.0-alpha.22",
    "@trpc/server/": "https://esm.sh/v82/@trpc/server@10.0.0-alpha.22/",
    "@trpc/client": "https://esm.sh/v82/@trpc/client@10.0.0-alpha.22?deps=@trpc/server@10.0.0-alpha.22",
    "trpc-swr": "https://esm.sh/v82/trpc-swr@0.1.0?alias=swr:https%3A%2F%2Fesm.sh%2Fswr%401.3.0%3Fdeps%3Dreact%4018,@trpc/server:https%3A%2F%2Fesm.sh%2F%40trpc%2Fserver%4010.0.0-alpha.22,@trpc/client:https%3A%2F%2Fesm.sh%2F%40trpc%2Fclient%4010.0.0-alpha.22"
  }
}
Warning deno task is unstable and may drastically change in the future
Task udd deno run -A --unstable https://deno.land/x/udd@0.5.0/main.ts import_map.json
import_map.json
[1/1] Using latest: https://deno.land/x/fresh@1.0.0/
Already latest version:
https://deno.land/x/fresh@1.0.0/ == 1.0.0

--> it may just be an issue around updating alpha releases tho.

@hayd
Copy link
Owner

hayd commented Jul 25, 2022

@boredland I think the actual error there is that esm.sh urls are not being read correctly/at all !

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants