summaryrefslogtreecommitdiff
path: root/tests/integration/npm_tests.rs
diff options
context:
space:
mode:
authorNathan Whitaker <17734409+nathanwhit@users.noreply.github.com>2024-05-23 12:31:05 -0700
committerGitHub <noreply@github.com>2024-05-23 12:31:05 -0700
commit5de30c53239ac74843725d981afc0bb8c45bdf16 (patch)
tree5e806923d8806d6648a9d991eeb3bb05d1df8b4f /tests/integration/npm_tests.rs
parent20dad295e2e0961932b05d34b29b07ee97eb0815 (diff)
fix(cli): Support deno.lock with only package.json present + fix DENO_FUTURE install interactions with lockfile (#23918)
Fixes #23571. Previously, we required a `deno.json` to be present (or the `--lock` flag) in order for us to resolve a `deno.lock` file. This meant that if you were using deno in an npm-first project deno wouldn't use a lockfile. Additionally, while I was fixing that, I discovered there were a couple bugs keeping the future `install` command from using a lockfile. With this PR, `install` will actually resolve the lockfile (or create one if not present), and update it if it's not up-to-date. This also speeds up `deno install`, as we can use the lockfile to skip work during npm resolution.
Diffstat (limited to 'tests/integration/npm_tests.rs')
-rw-r--r--tests/integration/npm_tests.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/integration/npm_tests.rs b/tests/integration/npm_tests.rs
index 4c4868c65..ab00c7b56 100644
--- a/tests/integration/npm_tests.rs
+++ b/tests/integration/npm_tests.rs
@@ -2982,7 +2982,8 @@ fn cjs_export_analysis_import_cjs_directly_relative_import() {
}
itest!(imports_package_json {
- args: "run --node-modules-dir=false npm/imports_package_json/main.js",
+ args:
+ "run --no-lock --node-modules-dir=false npm/imports_package_json/main.js",
output: "npm/imports_package_json/main.out",
envs: env_vars_for_npm_tests(),
http_server: true,
@@ -2990,7 +2991,7 @@ itest!(imports_package_json {
itest!(imports_package_json_import_not_defined {
args:
- "run --node-modules-dir=false npm/imports_package_json/import_not_defined.js",
+ "run --no-lock --node-modules-dir=false npm/imports_package_json/import_not_defined.js",
output: "npm/imports_package_json/import_not_defined.out",
envs: env_vars_for_npm_tests(),
exit_code: 1,
@@ -2999,7 +3000,7 @@ itest!(imports_package_json_import_not_defined {
itest!(imports_package_json_sub_path_import_not_defined {
args:
- "run --node-modules-dir=false npm/imports_package_json/sub_path_import_not_defined.js",
+ "run --no-lock --node-modules-dir=false npm/imports_package_json/sub_path_import_not_defined.js",
output: "npm/imports_package_json/sub_path_import_not_defined.out",
envs: env_vars_for_npm_tests(),
exit_code: 1,
@@ -3007,7 +3008,7 @@ itest!(imports_package_json_sub_path_import_not_defined {
});
itest!(different_nested_dep_node_modules_dir_false {
- args: "run --quiet --node-modules-dir=false npm/different_nested_dep/main.js",
+ args: "run --quiet --no-lock --node-modules-dir=false npm/different_nested_dep/main.js",
output: "npm/different_nested_dep/main.out",
envs: env_vars_for_npm_tests(),
exit_code: 0,
@@ -3015,7 +3016,7 @@ itest!(different_nested_dep_node_modules_dir_false {
});
itest!(different_nested_dep_node_modules_dir_true {
- args: "run --quiet --node-modules-dir=true main.js",
+ args: "run --no-lock --quiet --node-modules-dir=true main.js",
output: "npm/different_nested_dep/main.out",
copy_temp_dir: Some("npm/different_nested_dep/"),
cwd: Some("npm/different_nested_dep/"),