diff options
| author | David Sherret <dsherret@users.noreply.github.com> | 2023-02-24 19:35:43 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-24 19:35:43 -0500 |
| commit | 033b70af19300a4e34dcf19ab0031245bfc19625 (patch) | |
| tree | ebcd8e9ebd85a974c9845af0291ab3bdb9765704 /cli/npm/resolution | |
| parent | 5683daf1aa1c01f5f4d01879d6ce054b0922faf6 (diff) | |
fix(npm): lazily install package.json dependencies only when necessary (#17931)
This lazily does an "npm install" when any package name matches what's
found in the package.json or when running a script from package.json
with deno task.
Part of #17916
Closes #17928
Diffstat (limited to 'cli/npm/resolution')
| -rw-r--r-- | cli/npm/resolution/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/npm/resolution/mod.rs b/cli/npm/resolution/mod.rs index 53284d712..f43f3c5cb 100644 --- a/cli/npm/resolution/mod.rs +++ b/cli/npm/resolution/mod.rs @@ -404,8 +404,9 @@ impl NpmResolution { } /// Resolves a package requirement for deno graph. This should only be - /// called by deno_graph's NpmResolver. - pub fn resolve_package_req_for_deno_graph( + /// called by deno_graph's NpmResolver or for resolving packages in + /// a package.json + pub fn resolve_package_req_as_pending( &self, pkg_req: &NpmPackageReq, ) -> Result<NpmPackageNv, AnyError> { |
