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

"Add import" quick action does not use import map or npm specifier #849

Closed
Endy3032 opened this issue May 14, 2023 · 0 comments · Fixed by denoland/deno#19692
Closed

"Add import" quick action does not use import map or npm specifier #849

Endy3032 opened this issue May 14, 2023 · 0 comments · Fixed by denoland/deno#19692

Comments

@Endy3032
Copy link

deno.land or cached url import

Describe the bug

deno.json

{
  "imports": {
    "std:path": "https://deno.land/std@0.186.0/path/mod.ts"
  }
}

mod.ts

const a = join(Deno.cwd(), "src")

VSCode gives several options & versions from https://deno.land/std
The same applies to local files that are in the import map too

Expected behaviour

Suggests std:path from the import map

npm specifier

Describe the bug

deno.json

{
  "imports": {
    "discordeno": "npm:@discordeno/bot"
  }
}

mod.ts

const a: DiscordEmbed = {}

VSCode gives a long relative path to deno's npm cache (../[...]/Library/Caches/deno/[...]/[filename].js)

Expected behaviour

Suggests discordeno (or npm:@discordeno/bot if its not in the import map)

Screenshots

image
image

Versions

VSCode 1.78.2
Deno 1.33.2
Extension 3.18.0

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

Successfully merging a pull request may close this issue.

1 participant