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/tests/testdata/run/with_package_json/no_deno_json | |
| 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/tests/testdata/run/with_package_json/no_deno_json')
3 files changed, 3 insertions, 0 deletions
diff --git a/cli/tests/testdata/run/with_package_json/no_deno_json/no_package_json_imports.out b/cli/tests/testdata/run/with_package_json/no_deno_json/no_package_json_imports.out new file mode 100644 index 000000000..7ed6ff82d --- /dev/null +++ b/cli/tests/testdata/run/with_package_json/no_deno_json/no_package_json_imports.out @@ -0,0 +1 @@ +5 diff --git a/cli/tests/testdata/run/with_package_json/no_deno_json/no_package_json_imports.ts b/cli/tests/testdata/run/with_package_json/no_deno_json/no_package_json_imports.ts new file mode 100644 index 000000000..0f3785f91 --- /dev/null +++ b/cli/tests/testdata/run/with_package_json/no_deno_json/no_package_json_imports.ts @@ -0,0 +1 @@ +console.log(5); diff --git a/cli/tests/testdata/run/with_package_json/no_deno_json/sub_dir/main.js b/cli/tests/testdata/run/with_package_json/no_deno_json/sub_dir/main.js index 297653211..492a8fa40 100644 --- a/cli/tests/testdata/run/with_package_json/no_deno_json/sub_dir/main.js +++ b/cli/tests/testdata/run/with_package_json/no_deno_json/sub_dir/main.js @@ -1,2 +1,3 @@ +import "chalk"; console.log(Deno.cwd()); console.log(Deno.statSync("../node_modules")); |
