Skip to content
New issue

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

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

Already on GitHub? Sign in 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/[email protected]/fmt/ -> 0.125.0
Successfully updated:
https://deno.land/[email protected]/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/[email protected]/",
    "preact": "https://esm.sh/[email protected]",
    "preact/": "https://esm.sh/[email protected]/",
    "preact-render-to-string": "https://esm.sh/[email protected][email protected]",
    "@twind": "./utils/twind.ts",
    "twind": "https://esm.sh/[email protected]",
    "twind/": "https://esm.sh/[email protected]/",
    "@trpc/server": "https://esm.sh/v82/@trpc/[email protected]",
    "@trpc/server/": "https://esm.sh/v82/@trpc/[email protected]/",
    "@trpc/client": "https://esm.sh/v82/@trpc/[email protected]?deps=@trpc/[email protected]",
    "trpc-swr": "https://esm.sh/v82/[email protected]?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/[email protected]/main.ts import_map.json
import_map.json
[1/1] Using latest: https://deno.land/x/[email protected]/
Already latest version:
https://deno.land/x/[email protected]/ == 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 !

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

No branches or pull requests

3 participants