diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-07-03 20:54:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-04 00:54:33 +0000 |
commit | 147411e64b22fe74cb258125acab83f9182c9f81 (patch) | |
tree | a1f63dcbf0404c20534986b10f02b649df5a3ad5 /cli/tools/vendor/build.rs | |
parent | dd6d19e12051fac2ea5639f621501f4710a1b8e1 (diff) |
feat: npm workspace and better Deno workspace support (#24334)
Adds much better support for the unstable Deno workspaces as well as
support for npm workspaces. npm workspaces is still lacking in that we
only install packages into the root node_modules folder. We'll make it
smarter over time in order for it to figure out when to add node_modules
folders within packages.
This includes a breaking change in config file resolution where we stop
searching for config files on the first found package.json unless it's
in a workspace. For the previous behaviour, the root deno.json needs to
be updated to be a workspace by adding `"workspace":
["./path-to-pkg-json-folder-goes-here"]`. See details in
https://github.com/denoland/deno_config/pull/66
Closes #24340
Closes #24159
Closes #24161
Closes #22020
Closes #18546
Closes #16106
Closes #24160
Diffstat (limited to 'cli/tools/vendor/build.rs')
-rw-r--r-- | cli/tools/vendor/build.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cli/tools/vendor/build.rs b/cli/tools/vendor/build.rs index 5aef63192..a4424e3f3 100644 --- a/cli/tools/vendor/build.rs +++ b/cli/tools/vendor/build.rs @@ -81,8 +81,8 @@ pub async fn build< build_graph, parsed_source_cache, output_dir, - maybe_original_import_map: original_import_map, - maybe_jsx_import_source: jsx_import_source, + maybe_original_import_map, + maybe_jsx_import_source, resolver, environment, } = input; @@ -90,12 +90,12 @@ pub async fn build< let output_dir_specifier = ModuleSpecifier::from_directory_path(output_dir).unwrap(); - if let Some(original_im) = &original_import_map { + if let Some(original_im) = &maybe_original_import_map { validate_original_import_map(original_im, &output_dir_specifier)?; } // add the jsx import source to the entry points to ensure it is always vendored - if let Some(jsx_import_source) = jsx_import_source { + if let Some(jsx_import_source) = maybe_jsx_import_source { if let Some(specifier_text) = jsx_import_source.maybe_specifier_text() { if let Ok(specifier) = resolver.resolve( &specifier_text, @@ -171,8 +171,8 @@ pub async fn build< graph: &graph, modules: &all_modules, mappings: &mappings, - original_import_map, - jsx_import_source, + maybe_original_import_map, + maybe_jsx_import_source, resolver, parsed_source_cache, })?; |