Skip to content

Commit

Permalink
feat: store import sites on dependencies (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
nayeemrmn authored Apr 4, 2023
1 parent f3dc60f commit ec025c0
Show file tree
Hide file tree
Showing 4 changed files with 344 additions and 35 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ data-url = "0.2.0"
deno_ast = { version = "0.25.0", features = ["dep_graph", "module_specifier"] }
deno_semver = "0.2.0"
futures = "0.3.26"
indexmap = "1.9.2"
indexmap = { version = "1.9.2", features = ["serde"] }
monch = "0.4.1"
once_cell = "1.16.0"
parking_lot = "0.12.0"
regex = "1.5.4"
Expand Down
6 changes: 6 additions & 0 deletions src/analyzer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ pub enum ImportAssertions {
Known(HashMap<String, ImportAssertion>),
}

impl Default for ImportAssertions {
fn default() -> Self {
Self::None
}
}

impl ImportAssertions {
// can't use this type directly because we need to make it serialize & deserialize
pub fn from_swc(value: deno_ast::swc::dep_graph::ImportAssertions) -> Self {
Expand Down
Loading

0 comments on commit ec025c0

Please sign in to comment.