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(vendor): support using an existing import map #14836

Merged
merged 29 commits into from
Jun 14, 2022
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2df1622
feat: `deno vendor` should modify an existing import map
dsherret Jun 3, 2022
f675efb
Merge branch 'main' into deno_vendor_existing_import_map
dsherret Jun 5, 2022
0e033f2
Merge branch 'main' into deno_vendor_existing_import_map
dsherret Jun 6, 2022
813def5
Merge branch 'main' into deno_vendor_existing_import_map
dsherret Jun 7, 2022
ddf2cbf
Working existing tests.
dsherret Jun 7, 2022
5ee8f13
Check the output.
dsherret Jun 7, 2022
407fc4c
Merge branch 'main' into deno_vendor_existing_import_map
dsherret Jun 8, 2022
96cad32
Add some tests.
dsherret Jun 8, 2022
381b220
More tests.
dsherret Jun 8, 2022
990e2ac
Error improvements
dsherret Jun 8, 2022
e364adb
More tests.
dsherret Jun 8, 2022
0965c0a
Push more code down into build
dsherret Jun 8, 2022
c109d8b
Updates based on self review.
dsherret Jun 8, 2022
9606c5f
Remove fs import in vendor_tests.
dsherret Jun 8, 2022
691a8c5
Was creating empty scopes sometimes.
dsherret Jun 9, 2022
bd6cc5c
Always put absolute specifiers in the "imports"
dsherret Jun 9, 2022
cbb97b2
Committing work for now.
dsherret Jun 9, 2022
8ddae5e
Merge branch 'main' into vendor_existing_import_map_attempt_2
dsherret Jun 9, 2022
5725abc
More edge cases.
dsherret Jun 9, 2022
90da424
Remove unnecessary code with recent changes.
dsherret Jun 9, 2022
0559b3a
Switch back to the old way of doing things.
dsherret Jun 9, 2022
f38c709
Improve error message when using an import map in the output directory.
dsherret Jun 9, 2022
eeb9701
Fix CI maybe.
dsherret Jun 10, 2022
9f439b1
Update configuration file when vendoring.
dsherret Jun 10, 2022
df5bc74
Temp commit to get more info about failing test on CI hopefully
dsherret Jun 10, 2022
917d14e
Debugging on CI - Please panic.
dsherret Jun 10, 2022
d8790a8
Temp CI Debugging - Add base_url to panic info.
dsherret Jun 10, 2022
9e60595
Maybe fix.
dsherret Jun 10, 2022
68efb07
Merge branch 'main' into deno_vendor_existing_import_map
dsherret Jun 14, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ env_logger = "=0.9.0"
eszip = "=0.20.0"
fancy-regex = "=0.9.0"
http = "=0.2.6"
import_map = "=0.9.0"
import_map = "=0.11.0"
indexmap = "1.8.1"
jsonc-parser = { version = "=0.19.0", features = ["serde"] }
libc = "=0.2.126"
Expand Down
6 changes: 3 additions & 3 deletions cli/lsp/completions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ fn get_base_import_map_completions(
import_map: &ImportMap,
) -> Vec<lsp::CompletionItem> {
import_map
.imports_keys()
.iter()
.imports()
.keys()
.map(|key| {
// for some strange reason, keys that start with `/` get stored in the
// import map as `file:///`, and so when we pull the keys out, we need to
Expand Down Expand Up @@ -253,7 +253,7 @@ fn get_import_map_completions(
if !text.is_empty() {
if let Some(import_map) = maybe_import_map {
let mut items = Vec::new();
for key in import_map.imports_keys() {
for key in import_map.imports().keys() {
// for some reason, the import_map stores keys that begin with `/` as
// `file:///` in its index, so we have to reverse that here
let key = if key.starts_with("file://") {
Expand Down
2 changes: 1 addition & 1 deletion cli/proc_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ pub fn import_map_from_text(
.map(|d| format!(" - {}", d))
.collect::<Vec<_>>()
.join("\n")
)
);
}
Ok(result.import_map)
}
Expand Down
Loading