summaryrefslogtreecommitdiff
path: root/cli/npm
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-05-19 18:39:27 -0400
committerGitHub <noreply@github.com>2023-05-19 22:39:27 +0000
commitcc406c8360b4ba559d7f13e14d2a32e1ab761b0d (patch)
treea2cfae5c7f082261aa504b2f00fe6f53f4626dfe /cli/npm
parent7f5290b6946fececec5ec3acd85e67cd16960b8e (diff)
feat(vendor): support for npm specifiers (#19186)
We never properly added support for this. This fixes vendoring when it has npm or node specifiers. Vendoring occurs by adding a `"nodeModulesDir": true` property to deno.json then it uses a local node_modules directory. This can be opted out by setting `"nodeModulesDir": false` or running with `--node-modules-dir=false`. Closes #18090 Closes #17210 Closes #17619 Closes #16778
Diffstat (limited to 'cli/npm')
-rw-r--r--cli/npm/mod.rs1
-rw-r--r--cli/npm/resolvers/mod.rs3
2 files changed, 3 insertions, 1 deletions
diff --git a/cli/npm/mod.rs b/cli/npm/mod.rs
index 488f8eae6..5f875c743 100644
--- a/cli/npm/mod.rs
+++ b/cli/npm/mod.rs
@@ -14,4 +14,5 @@ pub use registry::CliNpmRegistryApi;
pub use resolution::NpmResolution;
pub use resolvers::create_npm_fs_resolver;
pub use resolvers::CliNpmResolver;
+pub use resolvers::NpmPackageFsResolver;
pub use resolvers::NpmProcessState;
diff --git a/cli/npm/resolvers/mod.rs b/cli/npm/resolvers/mod.rs
index a41727dda..0f123c382 100644
--- a/cli/npm/resolvers/mod.rs
+++ b/cli/npm/resolvers/mod.rs
@@ -36,11 +36,12 @@ use crate::args::Lockfile;
use crate::util::fs::canonicalize_path_maybe_not_exists_with_fs;
use crate::util::progress_bar::ProgressBar;
-use self::common::NpmPackageFsResolver;
use self::local::LocalNpmPackageResolver;
use super::resolution::NpmResolution;
use super::NpmCache;
+pub use self::common::NpmPackageFsResolver;
+
/// State provided to the process via an environment variable.
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct NpmProcessState {