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

feat: ability to resolve import map #41

Merged
merged 6 commits into from
Feb 23, 2024

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Feb 22, 2024

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

@@ -672,16 +673,25 @@ impl ConfigFile {
}
}

pub fn to_import_map_path(&self) -> Option<String> {
Copy link
Member Author

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)?))
}
}
Copy link
Member Author

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"] }
Copy link
Member Author

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.

@dsherret dsherret requested a review from bartlomieju February 23, 2024 01:28
Copy link
Member

@bartlomieju bartlomieju left a 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

@dsherret dsherret merged commit adc2129 into denoland:main Feb 23, 2024
3 checks passed
@dsherret dsherret deleted the feat_deno_config_expand_imports branch February 23, 2024 18:59
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 this pull request may close these issues.

2 participants