-
Notifications
You must be signed in to change notification settings - Fork 41
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
SpecifierMappings and JSR import map not working #437
Comments
Looked into this a little more. The existing test cases only checked a full URL and a relative import. Tried creating a test case and confirmed the same issue is present.
|
Digging into this some more, it looks like the issue is that the mapping it's making it into https://github.com/denoland/dnt/blob/0.41.3/rs-lib/src/specifiers.rs#L67
https://github.com/denoland/dnt/blob/0.41.3/rs-lib/src/graph.rs#L120 For some reason it appears https://github.com/denoland/dnt/blob/0.41.3/rs-lib/src/graph.rs#L71-L95 Unfortunately, this is where it crosses into the Since there is few places touching https://github.com/denoland/dnt/blob/0.41.3/rs-lib/src/loader/mod.rs#L83-L116 Not sure if this is relevant, but this verbose mapping almost seemed like it would work: "https://jsr.io/@david/code-block-writer/13.0.3/mod.ts": {
name: "code-block-writer",
version: "=13.0.3",
} But it panics elsewhere:
|
As best as I can tell, this should be the correct mapping:
To map an import like this to an npm package:
But it does not work:
Similarly it does not work with:
I also tried many other variants in
mappings
, but no luck:jsr:@hqtsm/dataview@^1.0.0
Samejsr:@hqtsm/dataview@1.0.0
Same@hqtsm/dataview
: Errors out saying it couldn't find file:///...For some reason it seems it does not find the imports to replace, like it must be doing when it rewrites to use the
deps
directory.Am I doing something wrong? I found some seemingly related issues and pull requests, but it's unclear if it's the same issue, or what the status on it is:
The text was updated successfully, but these errors were encountered: