From 033b70af19300a4e34dcf19ab0031245bfc19625 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 24 Feb 2023 19:35:43 -0500 Subject: 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 --- cli/npm/resolution/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cli/npm/resolution') 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 { -- cgit v1.2.3