denoland / denoland/import_map

Import Maps don't support package address targets with query parameters

Open
#41 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
34
Forks
14
PR merge metrics
No merged PRs in 30d

Description

Reproduce:
* Deno v1.23.3
* import_map.json:
```
{
"imports": {
"@mui/": "https://esm.sh/@mui/material@5.9.1/?alias=react:preact/compat,react/jsx-runtime:preact/compat/jsx-runtime&deps=preact@10.8.1"
}
}
```

Deno then reports back with:

> Package address targets must end with "/".

I couldn't find a current code snippet, but for version 1.9.1 I found [this check](https://deno.land/x/deno@v1.9.1/cli/import_map.rs#L216), which doesn't account for esm.sh alias feature, because it just checks the last character of the value string.

If you have any further questions, please let me know

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the report with Deno v1.23.3 and the import_map.json example, then compare the current implementation with the referenced cli/import_map.rs check from Deno v1.9.1. Confirm the expected behavior for package address targets containing query parameters and add or update coverage so the reproduction no longer reports the trailing-slash error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.