-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: ability to resolve import map #41
feat: ability to resolve import map #41
Conversation
@@ -672,16 +673,25 @@ impl ConfigFile { | |||
} | |||
} | |||
|
|||
pub fn to_import_map_path(&self) -> Option<String> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These were not very helpful because they exist directly off of json
.
.map(Some) | ||
} else { | ||
Ok(Some(self.specifier.join(value)?)) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -19,7 +19,9 @@ percent-encoding = "2.3.0" | |||
serde = { version = "1.0.149", features = ["derive"] } | |||
serde_json = "1.0.85" | |||
url = { version = "2.3.1" } | |||
import_map = { version = "0.19.0", features = ["ext"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving this down here will make it easier to use in the CLI and also provide this functionality more easily to stuff like dnt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I agree this is much better
We shouldn't have a bunch of different ways of doing this, so let's move this down here. It will also be useful in stuff like dnt.
See CLI PR here: denoland/deno#22553
Part of denoland/deno#22270