summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-08-30 17:58:24 -0400
committerGitHub <noreply@github.com>2024-08-30 21:58:24 +0000
commitf891e73bbfc4a8f4f24039dd046c8d3de80e2c56 (patch)
treed3ca7e1163550cc7fee6d523269d6a3636218da0 /tests
parent55137c9db4ed7226a6a68256c3cb9fdad7ad7c83 (diff)
refactor: remove DENO_FUTURE (#25314)
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/compile_tests.rs8
-rw-r--r--tests/integration/lsp_tests.rs29
-rw-r--r--tests/integration/node_unit_tests.rs1
-rw-r--r--tests/integration/npm_tests.rs124
-rw-r--r--tests/integration/run_tests.rs2
-rw-r--r--tests/specs/compile/npmrc_auto_install/deno.json2
-rw-r--r--tests/specs/npm/adding_npm_dep_in_dynamic_import/deno.json2
-rw-r--r--tests/specs/npm/bin_entries_prefer_closer/deno.json2
-rw-r--r--tests/specs/npm/check_prefers_non_types_node_pkg/__test__.jsonc4
-rw-r--r--tests/specs/npm/check_types_in_types_pkg/__test__.jsonc4
-rw-r--r--tests/specs/npm/conditional_exports_node_modules_dir/__test__.jsonc2
-rw-r--r--tests/specs/npm/future_node_modules_dir_setting/__test__.jsonc4
-rw-r--r--tests/specs/npm/lifecycle_scripts/__test__.jsonc4
-rw-r--r--tests/specs/npm/lifecycle_scripts/deno.json2
-rw-r--r--tests/specs/npm/local_dir_no_duplicate_resolution/deno.json2
-rw-r--r--tests/specs/npm/lossy_utf8_script_from_cjs/__test__.jsonc2
-rw-r--r--tests/specs/npm/npmrc/__test__.jsonc2
-rw-r--r--tests/specs/npm/npmrc_tarball_other_server/__test__.jsonc4
-rw-r--r--tests/specs/npm/workspace_basic/__test__.jsonc6
-rw-r--r--tests/specs/npm/workspace_sub_deno_json/non_member/deno.json2
-rw-r--r--tests/specs/npm/workspace_wildcards/__test__.jsonc2
-rw-r--r--tests/specs/publish/package_json/deno.json2
-rw-r--r--tests/specs/task/bin_package/deno.json2
-rw-r--r--tests/specs/task/node_modules_dir_false/deno.json2
24 files changed, 74 insertions, 142 deletions
diff --git a/tests/integration/compile_tests.rs b/tests/integration/compile_tests.rs
index 60451e005..54a82b913 100644
--- a/tests/integration/compile_tests.rs
+++ b/tests/integration/compile_tests.rs
@@ -989,7 +989,7 @@ fn run_npm_bin_compile_test(opts: RunNpmBinCompileOptions) {
args.extend(opts.compile_args.iter().map(|s| s.to_string()));
if opts.node_modules_local {
- args.push("--node-modules=local-auto".to_string());
+ args.push("--node-modules-dir=auto".to_string());
}
if let Some(bin_name) = opts.input_name {
@@ -1052,7 +1052,7 @@ fn compile_node_modules_symlink_outside() {
// compile folder
let output = context
.new_command()
- .args("compile --allow-read --node-modules=local-auto --output bin main.ts")
+ .args("compile --allow-read --node-modules-dir=auto --output bin main.ts")
.run();
output.assert_exit_code(0);
output.assert_matches_file(
@@ -1075,7 +1075,7 @@ fn compile_node_modules_symlink_outside() {
// compile
let output = context
.new_command()
- .args("compile --allow-read --node-modules=local-auto --output bin main.ts")
+ .args("compile --allow-read --node-modules-dir=auto --output bin main.ts")
.run();
output.assert_exit_code(0);
output.assert_matches_file(
@@ -1105,7 +1105,7 @@ console.log(getValue());"#,
// compile folder
let output = context
.new_command()
- .args("compile --allow-read --node-modules=local-auto --output bin main.ts")
+ .args("compile --allow-read --node-modules-dir=auto --output bin main.ts")
.run();
output.assert_exit_code(0);
output.assert_matches_text(
diff --git a/tests/integration/lsp_tests.rs b/tests/integration/lsp_tests.rs
index f20fbcc9c..c3f2f9daa 100644
--- a/tests/integration/lsp_tests.rs
+++ b/tests/integration/lsp_tests.rs
@@ -9035,7 +9035,7 @@ fn lsp_completions_node_specifier_node_modules_dir() {
temp_dir.write(
temp_dir.path().join("deno.json"),
json!({
- "nodeModulesDir": true,
+ "nodeModulesDir": "auto",
})
.to_string(),
);
@@ -9442,7 +9442,7 @@ fn lsp_npmrc() {
temp_dir.write(
temp_dir.path().join("deno.json"),
json!({
- "nodeModules": "local-auto",
+ "nodeModulesDir": "auto",
})
.to_string(),
);
@@ -12372,7 +12372,7 @@ fn lsp_node_modules_dir() {
temp_dir.write(
"deno.json",
json!({
- "nodeModules": "global-auto",
+ "nodeModulesDir": "none",
})
.to_string(),
);
@@ -12413,7 +12413,7 @@ fn lsp_node_modules_dir() {
temp_dir.write(
temp_dir.path().join("deno.json"),
- "{ \"nodeModules\": \"local-auto\", \"lock\": false }\n",
+ "{ \"nodeModulesDir\": \"auto\", \"lock\": false }\n",
);
let refresh_config = |client: &mut LspClient| {
client.change_configuration(json!({ "deno": {
@@ -12449,7 +12449,7 @@ fn lsp_node_modules_dir() {
// now add a lockfile and cache
temp_dir.write(
temp_dir.path().join("deno.json"),
- "{ \"nodeModules\": \"local-auto\" }\n",
+ "{ \"nodeModulesDir\": \"auto\" }\n",
);
refresh_config(&mut client);
cache(&mut client);
@@ -13056,21 +13056,21 @@ fn lsp_deno_json_scopes_node_modules_dir() {
temp_dir.write(
"project1/deno.json",
json!({
- "nodeModules": "local-auto",
+ "nodeModulesDir": "auto",
})
.to_string(),
);
temp_dir.write(
"project2/deno.json",
json!({
- "nodeModules": "local-auto",
+ "nodeModulesDir": "auto",
})
.to_string(),
);
temp_dir.write(
"project2/project3/deno.json",
json!({
- "nodeModules": "local-auto",
+ "nodeModulesDir": "auto",
})
.to_string(),
);
@@ -14247,7 +14247,7 @@ fn lsp_deno_json_workspace_node_modules_dir() {
"project1/deno.json",
json!({
"workspace": ["project2"],
- "nodeModules": "local-auto",
+ "nodeModulesDir": "auto",
})
.to_string(),
);
@@ -14383,7 +14383,7 @@ fn lsp_npm_workspace() {
temp_dir.write(
"deno.json",
json!({
- "nodeModules": "local-auto",
+ "nodeModulesDir": "auto",
})
.to_string(),
);
@@ -14625,11 +14625,8 @@ fn lsp_jupyter_byonm_diagnostics() {
}
#[test]
-fn lsp_deno_future_env_byonm() {
- let context = TestContextBuilder::for_npm()
- .env("DENO_FUTURE", "1")
- .use_temp_cwd()
- .build();
+fn lsp_byonm() {
+ let context = TestContextBuilder::for_npm().use_temp_cwd().build();
let temp_dir = context.temp_dir();
temp_dir.path().join("package.json").write_json(&json!({
"dependencies": {
@@ -15187,7 +15184,6 @@ fn lsp_cjs_internal_types_default_export() {
.use_http_server()
.use_temp_cwd()
.add_npm_env_vars()
- .env("DENO_FUTURE", "1")
.build();
let temp_dir = context.temp_dir();
temp_dir.write("deno.json", r#"{}"#);
@@ -15236,7 +15232,6 @@ fn lsp_cjs_import_dual() {
.use_http_server()
.use_temp_cwd()
.add_npm_env_vars()
- .env("DENO_FUTURE", "1")
.build();
let temp_dir = context.temp_dir();
temp_dir.write("deno.json", r#"{}"#);
diff --git a/tests/integration/node_unit_tests.rs b/tests/integration/node_unit_tests.rs
index b44cd629a..dfe15a11c 100644
--- a/tests/integration/node_unit_tests.rs
+++ b/tests/integration/node_unit_tests.rs
@@ -107,7 +107,6 @@ fn node_unit_test(test: String) {
let mut deno = util::deno_cmd()
.current_dir(util::root_path())
- .env("DENO_FUTURE", "1")
.arg("test")
.arg("--config")
.arg(deno_config_path())
diff --git a/tests/integration/npm_tests.rs b/tests/integration/npm_tests.rs
index b6591c332..db63d4533 100644
--- a/tests/integration/npm_tests.rs
+++ b/tests/integration/npm_tests.rs
@@ -140,7 +140,7 @@ itest!(mixed_case_package_name_global_dir {
itest!(mixed_case_package_name_local_dir {
args:
- "run --node-modules=local-auto -A $TESTDATA/npm/mixed_case_package_name/local.ts",
+ "run --node-modules-dir=auto -A $TESTDATA/npm/mixed_case_package_name/local.ts",
output: "npm/mixed_case_package_name/local.out",
exit_code: 0,
envs: env_vars_for_npm_tests(),
@@ -374,7 +374,7 @@ itest!(permissions_outside_package {
});
itest!(run_existing_npm_package {
- args: "run --allow-read --node-modules=local-auto npm:@denotest/bin",
+ args: "run --allow-read --node-modules-dir=auto npm:@denotest/bin",
output: "npm/run_existing_npm_package/main.out",
envs: env_vars_for_npm_tests(),
http_server: true,
@@ -385,7 +385,7 @@ itest!(run_existing_npm_package {
itest!(run_existing_npm_package_with_subpath {
args:
- "run --allow-read --node-modules=local-auto npm:@denotest/bin/cli-esm dev --help",
+ "run --allow-read --node-modules-dir=auto npm:@denotest/bin/cli-esm dev --help",
output: "npm/run_existing_npm_package_with_subpath/main.out",
envs: env_vars_for_npm_tests(),
http_server: true,
@@ -813,7 +813,7 @@ itest!(builtin_module_module {
itest!(node_modules_dir_require_added_node_modules_folder {
args:
- "run --node-modules=local-auto -A --quiet $TESTDATA/npm/require_added_nm_folder/main.js",
+ "run --node-modules-dir=auto -A --quiet $TESTDATA/npm/require_added_nm_folder/main.js",
output: "npm/require_added_nm_folder/main.out",
envs: env_vars_for_npm_tests(),
http_server: true,
@@ -831,7 +831,7 @@ itest!(node_modules_dir_require_main_entry {
});
itest!(node_modules_dir_with_deps {
- args: "run --allow-read --allow-env --node-modules=local-auto $TESTDATA/npm/cjs_with_deps/main.js",
+ args: "run --allow-read --allow-env --node-modules-dir=auto $TESTDATA/npm/cjs_with_deps/main.js",
output: "npm/cjs_with_deps/main_node_modules.out",
envs: env_vars_for_npm_tests(),
http_server: true,
@@ -839,7 +839,7 @@ itest!(node_modules_dir_with_deps {
});
itest!(node_modules_dir_yargs {
- args: "run --allow-read --allow-env --node-modules=local-auto $TESTDATA/npm/cjs_yargs/main.js",
+ args: "run --allow-read --allow-env --node-modules-dir=auto $TESTDATA/npm/cjs_yargs/main.js",
output: "npm/cjs_yargs/main.out",
envs: env_vars_for_npm_tests(),
http_server: true,
@@ -855,7 +855,7 @@ fn node_modules_dir_cache() {
let deno = util::deno_cmd_with_deno_dir(&deno_dir)
.current_dir(deno_dir.path())
.arg("cache")
- .arg("--node-modules=local-auto")
+ .arg("--node-modules-dir=auto")
.arg("--quiet")
.arg(util::testdata_path().join("npm/dual_cjs_esm/main.ts"))
.envs(env_vars_for_npm_tests())
@@ -888,7 +888,7 @@ fn node_modules_dir_cache() {
let deno = util::deno_cmd_with_deno_dir(&deno_dir)
.current_dir(deno_dir.path())
.arg("run")
- .arg("--node-modules=local-auto")
+ .arg("--node-modules-dir=auto")
.arg("--quiet")
.arg("-A")
.arg(util::testdata_path().join("npm/dual_cjs_esm/main.ts"))
@@ -1496,7 +1496,7 @@ fn peer_deps_with_copied_folders_and_lockfile() {
// now run with local node modules
let output = context
.new_command()
- .args("run -A --node-modules=local-auto main.ts")
+ .args("run -A --node-modules-dir=auto main.ts")
.run();
output.assert_exit_code(0);
output.assert_matches_file(
@@ -1514,7 +1514,7 @@ fn peer_deps_with_copied_folders_and_lockfile() {
// now again run with local node modules
let output = context
.new_command()
- .args("run -A --node-modules=local-auto main.ts")
+ .args("run -A --node-modules-dir=auto main.ts")
.run();
output.assert_exit_code(0);
output.assert_matches_text("1\n2\n");
@@ -1522,7 +1522,7 @@ fn peer_deps_with_copied_folders_and_lockfile() {
// now ensure it works with reloading
let output = context
.new_command()
- .args("run -A --reload --node-modules=local-auto main.ts")
+ .args("run -A --reload --node-modules-dir=auto main.ts")
.run();
output.assert_exit_code(0);
output.assert_matches_file(
@@ -1532,7 +1532,7 @@ fn peer_deps_with_copied_folders_and_lockfile() {
// now ensure it works with reloading and no lockfile
let output = context
.new_command()
- .args("run -A --reload --node-modules=local-auto --no-lock main.ts")
+ .args("run -A --reload --node-modules-dir=auto --no-lock main.ts")
.run();
output.assert_exit_code(0);
output.assert_matches_file(
@@ -1880,7 +1880,7 @@ fn binary_package_with_optional_dependencies() {
let output = context
.new_command()
- .args("run -A --node-modules=local-auto main.js")
+ .args("run -A --node-modules-dir=auto main.js")
.run();
#[cfg(target_os = "windows")]
@@ -1971,7 +1971,7 @@ fn node_modules_dir_config_file() {
let node_modules_dir = temp_dir.path().join("node_modules");
let rm_node_modules = || std::fs::remove_dir_all(&node_modules_dir).unwrap();
- temp_dir.write("deno.json", r#"{ "nodeModules": "local-auto" }"#);
+ temp_dir.write("deno.json", r#"{ "nodeModulesDir": "auto" }"#);
temp_dir.write("main.ts", "import 'npm:@denotest/esm-basic';");
let deno_cache_cmd = test_context.new_command().args("cache --quiet main.ts");
@@ -1985,7 +1985,7 @@ fn node_modules_dir_config_file() {
assert!(node_modules_dir.exists());
rm_node_modules();
- temp_dir.write("deno.json", r#"{ "nodeModules": "global-auto" }"#);
+ temp_dir.write("deno.json", r#"{ "nodeModulesDir": "none" }"#);
deno_cache_cmd.run();
assert!(!node_modules_dir.exists());
@@ -1996,7 +1996,7 @@ fn node_modules_dir_config_file() {
test_context
.new_command()
- .args("cache --quiet --node-modules=local-auto main.ts")
+ .args("cache --quiet --node-modules-dir=auto main.ts")
.run();
assert!(node_modules_dir.exists());
@@ -2004,7 +2004,7 @@ fn node_modules_dir_config_file() {
rm_node_modules();
test_context
.new_command()
- .args("cache --quiet --node-modules=global-auto --vendor main.ts")
+ .args("cache --quiet --node-modules-dir=none --vendor main.ts")
.run();
assert!(!node_modules_dir.exists());
}
@@ -2021,7 +2021,7 @@ fn top_level_install_package_json_explicit_opt_in() {
// when the node_modules_dir is explicitly opted into, we should always
// ensure a top level package.json install occurs
- temp_dir.write("deno.json", "{ \"nodeModules\": \"local-auto\" }");
+ temp_dir.write("deno.json", "{ \"nodeModulesDir\": \"auto\" }");
temp_dir.write(
"package.json",
"{ \"dependencies\": { \"@denotest/esm-basic\": \"1.0\" }}",
@@ -2110,7 +2110,7 @@ itest!(check_package_file_dts_dmts_dcts {
});
itest!(require_resolve_url_paths {
- args: "run -A --quiet --node-modules=local-auto url_paths.ts",
+ args: "run -A --quiet --node-modules-dir=auto url_paths.ts",
output: "npm/require_resolve_url/url_paths.out",
envs: env_vars_for_npm_tests(),
http_server: true,
@@ -2121,10 +2121,7 @@ itest!(require_resolve_url_paths {
#[test]
fn byonm_cjs_esm_packages() {
- let test_context = TestContextBuilder::for_npm()
- .env("DENO_UNSTABLE_BYONM", "1")
- .use_temp_cwd()
- .build();
+ let test_context = TestContextBuilder::for_npm().use_temp_cwd().build();
let dir = test_context.temp_dir();
test_context.run_npm("init -y");
@@ -2206,10 +2203,7 @@ console.log(getKind());
#[test]
fn future_byonm_cjs_esm_packages() {
- let test_context = TestContextBuilder::for_npm()
- .env("DENO_FUTURE", "1")
- .use_temp_cwd()
- .build();
+ let test_context = TestContextBuilder::for_npm().use_temp_cwd().build();
let dir = test_context.temp_dir();
test_context.run_npm("init -y");
@@ -2290,59 +2284,13 @@ console.log(getKind());
}
#[test]
-fn byonm_import_map() {
+fn node_modules_dir_manual_import_map() {
let test_context = TestContextBuilder::for_npm().use_temp_cwd().build();
let dir = test_context.temp_dir();
dir.write(
"deno.json",
r#"{
- "imports": {
- "basic": "npm:@denotest/esm-basic"
- },
- "unstable": [ "byonm" ]
-}"#,
- );
- dir.write(
- "package.json",
- r#"{
- "name": "my-project",
- "version": "1.0.0",
- "type": "module",
- "dependencies": {
- "@denotest/esm-basic": "^1.0"
- }
-}"#,
- );
- test_context.run_npm("install");
-
- dir.write(
- "main.ts",
- r#"
-// import map should resolve
-import { getValue } from "basic";
-// and resolving via node resolution
-import { setValue } from "@denotest/esm-basic";
-
-setValue(5);
-console.log(getValue());
-"#,
- );
- let output = test_context.new_command().args("run main.ts").run();
- output.assert_matches_text("5\n");
- let output = test_context.new_command().args("check main.ts").run();
- output.assert_matches_text("Check file:///[WILDCARD]/main.ts\n");
-}
-
-#[test]
-fn future_byonm_import_map() {
- let test_context = TestContextBuilder::for_npm()
- .env("DENO_FUTURE", "1")
- .use_temp_cwd()
- .build();
- let dir = test_context.temp_dir();
- dir.write(
- "deno.json",
- r#"{
+ "nodeModulesDir": "manual",
"imports": {
"basic": "npm:@denotest/esm-basic"
}
@@ -2381,10 +2329,7 @@ console.log(getValue());
#[test]
fn byonm_package_specifier_not_installed_and_invalid_subpath() {
- let test_context = TestContextBuilder::for_npm()
- .env("DENO_UNSTABLE_BYONM", "1")
- .use_temp_cwd()
- .build();
+ let test_context = TestContextBuilder::for_npm().use_temp_cwd().build();
let dir = test_context.temp_dir();
dir.path().join("package.json").write_json(&json!({
"dependencies": {
@@ -2525,10 +2470,7 @@ console.log(getValue());
#[test]
fn future_byonm_npm_workspaces() {
- let test_context = TestContextBuilder::for_npm()
- .env("DENO_FUTURE", "1")
- .use_temp_cwd()
- .build();
+ let test_context = TestContextBuilder::for_npm().use_temp_cwd().build();
let dir = test_context.temp_dir();
dir.write(
@@ -2781,7 +2723,7 @@ fn cjs_export_analysis_import_cjs_directly_relative_import() {
itest!(imports_package_json {
args:
- "run --no-lock --node-modules=global-auto npm/imports_package_json/main.js",
+ "run --no-lock --node-modules-dir=none npm/imports_package_json/main.js",
output: "npm/imports_package_json/main.out",
envs: env_vars_for_npm_tests(),
http_server: true,
@@ -2789,7 +2731,7 @@ itest!(imports_package_json {
itest!(imports_package_json_import_not_defined {
args:
- "run --no-lock --node-modules=global-auto npm/imports_package_json/import_not_defined.js",
+ "run --no-lock --node-modules-dir=none 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,
@@ -2798,7 +2740,7 @@ itest!(imports_package_json_import_not_defined {
itest!(imports_package_json_sub_path_import_not_defined {
args:
- "run --no-lock --node-modules=global-auto npm/imports_package_json/sub_path_import_not_defined.js",
+ "run --no-lock --node-modules-dir=none 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,
@@ -2806,7 +2748,7 @@ itest!(imports_package_json_sub_path_import_not_defined {
});
itest!(different_nested_dep_node_modules_dir_false {
- args: "run --quiet --no-lock --node-modules=global-auto npm/different_nested_dep/main.js",
+ args: "run --quiet --no-lock --node-modules-dir=none npm/different_nested_dep/main.js",
output: "npm/different_nested_dep/main.out",
envs: env_vars_for_npm_tests(),
exit_code: 0,
@@ -2814,7 +2756,7 @@ itest!(different_nested_dep_node_modules_dir_false {
});
itest!(different_nested_dep_node_modules_dir_true {
- args: "run --no-lock --quiet --node-modules=local-auto main.js",
+ args: "run --no-lock --quiet --node-modules-dir=auto main.js",
output: "npm/different_nested_dep/main.out",
copy_temp_dir: Some("npm/different_nested_dep/"),
cwd: Some("npm/different_nested_dep/"),
@@ -2848,11 +2790,7 @@ fn different_nested_dep_byonm_future() {
test_context.run_npm("install");
- let output = test_context
- .new_command()
- .args("run main.js")
- .env("DENO_FUTURE", "1")
- .run();
+ let output = test_context.new_command().args("run main.js").run();
output.assert_matches_file("npm/different_nested_dep/main.out");
}
diff --git a/tests/integration/run_tests.rs b/tests/integration/run_tests.rs
index 4d3374173..e85033ffa 100644
--- a/tests/integration/run_tests.rs
+++ b/tests/integration/run_tests.rs
@@ -1106,7 +1106,7 @@ fn lock_deno_json_package_json_deps_workspace() {
// deno.json
let deno_json = temp_dir.join("deno.json");
deno_json.write_json(&json!({
- "nodeModules": "local-auto"
+ "nodeModulesDir": "auto"
}));
// package.json
diff --git a/tests/specs/compile/npmrc_auto_install/deno.json b/tests/specs/compile/npmrc_auto_install/deno.json
index b2edaa035..fbd70ec48 100644
--- a/tests/specs/compile/npmrc_auto_install/deno.json
+++ b/tests/specs/compile/npmrc_auto_install/deno.json
@@ -1,3 +1,3 @@
{
- "nodeModules": "local-auto"
+ "nodeModulesDir": "auto"
}
diff --git a/tests/specs/npm/adding_npm_dep_in_dynamic_import/deno.json b/tests/specs/npm/adding_npm_dep_in_dynamic_import/deno.json
index 27f0b80e7..70897da12 100644
--- a/tests/specs/npm/adding_npm_dep_in_dynamic_import/deno.json
+++ b/tests/specs/npm/adding_npm_dep_in_dynamic_import/deno.json
@@ -1,5 +1,5 @@
{
- "nodeModules": "local-auto",
+ "nodeModulesDir": "auto",
"tasks": {
"cat": "cat",
"rm_node_modules": "rm -rf node_modules"
diff --git a/tests/specs/npm/bin_entries_prefer_closer/deno.json b/tests/specs/npm/bin_entries_prefer_closer/deno.json
index b2edaa035..fbd70ec48 100644
--- a/tests/specs/npm/bin_entries_prefer_closer/deno.json
+++ b/tests/specs/npm/bin_entries_prefer_closer/deno.json
@@ -1,3 +1,3 @@
{
- "nodeModules": "local-auto"
+ "nodeModulesDir": "auto"
}
diff --git a/tests/specs/npm/check_prefers_non_types_node_pkg/__test__.jsonc b/tests/specs/npm/check_prefers_non_types_node_pkg/__test__.jsonc
index fc67a5de4..d2682e161 100644
--- a/tests/specs/npm/check_prefers_non_types_node_pkg/__test__.jsonc
+++ b/tests/specs/npm/check_prefers_non_types_node_pkg/__test__.jsonc
@@ -15,12 +15,12 @@
}]
},
"auto_install": {
- "args": "check --node-modules=local-auto --quiet main.ts",
+ "args": "check --node-modules-dir=auto --quiet main.ts",
"exitCode": 1,
"output": "expected.out"
},
"global_folder": {
- "args": "check --node-modules=global-auto --quiet main.ts",
+ "args": "check --node-modules-dir=none --quiet main.ts",
"exitCode": 1,
"output": "expected.out"
}
diff --git a/tests/specs/npm/check_types_in_types_pkg/__test__.jsonc b/tests/specs/npm/check_types_in_types_pkg/__test__.jsonc
index 9fff27348..3ca5f23d2 100644
--- a/tests/specs/npm/check_types_in_types_pkg/__test__.jsonc
+++ b/tests/specs/npm/check_types_in_types_pkg/__test__.jsonc
@@ -15,12 +15,12 @@
}]
},
"auto_install": {
- "args": "check --node-modules=local-auto --quiet main_auto_install.ts",
+ "args": "check --node-modules-dir=auto --quiet main_auto_install.ts",
"exitCode": 1,
"output": "expected.out"
},
"global_folder": {
- "args": "check --node-modules=global-auto --quiet main_auto_install.ts",
+ "args": "check --node-modules-dir=none --quiet main_auto_install.ts",
"exitCode": 1,
"output": "expected.out"
}
diff --git a/tests/specs/npm/conditional_exports_node_modules_dir/__test__.jsonc b/tests/specs/npm/conditional_exports_node_modules_dir/__test__.jsonc
index 84e26dd47..745b28f4f 100644
--- a/tests/specs/npm/conditional_exports_node_modules_dir/__test__.jsonc
+++ b/tests/specs/npm/conditional_exports_node_modules_dir/__test__.jsonc
@@ -1,5 +1,5 @@
{
"tempDir": true,
- "args": "run --allow-read --node-modules=local-auto main.js",
+ "args": "run --allow-read --node-modules-dir=auto main.js",
"output": "main.out"
}
diff --git a/tests/specs/npm/future_node_modules_dir_setting/__test__.jsonc b/tests/specs/npm/future_node_modules_dir_setting/__test__.jsonc
index bc39e85da..745dc9530 100644
--- a/tests/specs/npm/future_node_modules_dir_setting/__test__.jsonc
+++ b/tests/specs/npm/future_node_modules_dir_setting/__test__.jsonc
@@ -10,11 +10,11 @@
"exitCode": 1
}, {
// this should override byonm
- "args": "run --node-modules=global-auto --quiet main.ts",
+ "args": "run --node-modules-dir=none --quiet main.ts",
"output": "main.out"
}, {
// same with this
- "args": "run --node-modules=local-auto --quiet main.ts",
+ "args": "run --node-modules-dir=auto --quiet main.ts",
"output": "main.out"
}]
}
diff --git a/tests/specs/npm/lifecycle_scripts/__test__.jsonc b/tests/specs/npm/lifecycle_scripts/__test__.jsonc
index 3d322504c..6ea9b8f6e 100644
--- a/tests/specs/npm/lifecycle_scripts/__test__.jsonc
+++ b/tests/specs/npm/lifecycle_scripts/__test__.jsonc
@@ -135,7 +135,7 @@
"output": ""
},
{
- "args": "cache --allow-scripts --node-modules=local-auto no_deno_json.js",
+ "args": "cache --allow-scripts --node-modules-dir=auto no_deno_json.js",
"output": "no_deno_json.out"
}
]
@@ -148,7 +148,7 @@
"output": ""
},
{
- "args": "cache --allow-scripts --node-modules=local-auto conflicting_bin.js",
+ "args": "cache --allow-scripts --node-modules-dir=auto conflicting_bin.js",
"output": "conflicting_bin.out"
}
]
diff --git a/tests/specs/npm/lifecycle_scripts/deno.json b/tests/specs/npm/lifecycle_scripts/deno.json
index b2edaa035..fbd70ec48 100644
--- a/tests/specs/npm/lifecycle_scripts/deno.json
+++ b/tests/specs/npm/lifecycle_scripts/deno.json
@@ -1,3 +1,3 @@
{
- "nodeModules": "local-auto"
+ "nodeModulesDir": "auto"
}
diff --git a/tests/specs/npm/local_dir_no_duplicate_resolution/deno.json b/tests/specs/npm/local_dir_no_duplicate_resolution/deno.json
index 7a51e3d29..fe867fcc8 100644
--- a/tests/specs/npm/local_dir_no_duplicate_resolution/deno.json
+++ b/tests/specs/npm/local_dir_no_duplicate_resolution/deno.json
@@ -1,5 +1,5 @@
{
- "nodeModules": "local-auto",
+ "nodeModulesDir": "auto",
"imports": {
"preact": "npm:preact",
"preact-render-to-string": "npm:preact-render-to-string"
diff --git a/tests/specs/npm/lossy_utf8_script_from_cjs/__test__.jsonc b/tests/specs/npm/lossy_utf8_script_from_cjs/__test__.jsonc
index cfa5a949e..fa00d6b9d 100644
--- a/tests/specs/npm/lossy_utf8_script_from_cjs/__test__.jsonc
+++ b/tests/specs/npm/lossy_utf8_script_from_cjs/__test__.jsonc
@@ -1,5 +1,5 @@
{
- "args": "run --node-modules=local-auto --allow-read main.mjs",
+ "args": "run --node-modules-dir=auto --allow-read main.mjs",
"output": "main.out",
"exitCode": 0,
"tempDir": true
diff --git a/tests/specs/npm/npmrc/__test__.jsonc b/tests/specs/npm/npmrc/__test__.jsonc
index 6378566ae..d45c5944c 100644
--- a/tests/specs/npm/npmrc/__test__.jsonc
+++ b/tests/specs/npm/npmrc/__test__.jsonc
@@ -14,7 +14,7 @@
}]
},
"run_node_modules_dir": {
- "args": "run --node-modules=local-auto -A --quiet main.js",
+ "args": "run --node-modules-dir=auto -A --quiet main.js",
"output": "main.out"
}
}
diff --git a/tests/specs/npm/npmrc_tarball_other_server/__test__.jsonc b/tests/specs/npm/npmrc_tarball_other_server/__test__.jsonc
index b20ca9046..a60339fae 100644
--- a/tests/specs/npm/npmrc_tarball_other_server/__test__.jsonc
+++ b/tests/specs/npm/npmrc_tarball_other_server/__test__.jsonc
@@ -3,13 +3,13 @@
"tests": {
"auth_success": {
"cwd": "success",
- "args": "run --node-modules=local-auto -A main.js",
+ "args": "run --node-modules-dir=auto -A main.js",
"output": "success/main.out",
"exitCode": 1
},
"auth_fail": {
"cwd": "fail",
- "args": "run --node-modules=local-auto -A main.js",
+ "args": "run --node-modules-dir=auto -A main.js",
"output": "fail/main.out",
"exitCode": 1
}
diff --git a/tests/specs/npm/workspace_basic/__test__.jsonc b/tests/specs/npm/workspace_basic/__test__.jsonc
index 768c193fc..763f10649 100644
--- a/tests/specs/npm/workspace_basic/__test__.jsonc
+++ b/tests/specs/npm/workspace_basic/__test__.jsonc
@@ -2,15 +2,15 @@
"tempDir": true,
"tests": {
"global_cache": {
- "args": "run --node-modules=global-auto b/main.ts",
+ "args": "run --node-modules-dir=none b/main.ts",
"output": "b/main_global_cache.out"
},
"global_cache_bare_specifier_not_in_pkg": {
- "args": "run --node-modules=global-auto main.ts",
+ "args": "run --node-modules-dir=none main.ts",
"output": "main.out"
},
"node_modules_dir": {
- "args": "run --node-modules=local-auto b/main.ts",
+ "args": "run --node-modules-dir=auto b/main.ts",
"output": "b/main_node_modules_dir.out"
},
"byonm": {
diff --git a/tests/specs/npm/workspace_sub_deno_json/non_member/deno.json b/tests/specs/npm/workspace_sub_deno_json/non_member/deno.json
index b2edaa035..fbd70ec48 100644
--- a/tests/specs/npm/workspace_sub_deno_json/non_member/deno.json
+++ b/tests/specs/npm/workspace_sub_deno_json/non_member/deno.json
@@ -1,3 +1,3 @@
{
- "nodeModules": "local-auto"
+ "nodeModulesDir": "auto"
}
diff --git a/tests/specs/npm/workspace_wildcards/__test__.jsonc b/tests/specs/npm/workspace_wildcards/__test__.jsonc
index cefc307a6..6067beb51 100644
--- a/tests/specs/npm/workspace_wildcards/__test__.jsonc
+++ b/tests/specs/npm/workspace_wildcards/__test__.jsonc
@@ -1,4 +1,4 @@
{
- "args": "run --node-modules=global-auto main.ts",
+ "args": "run --node-modules-dir=none main.ts",
"output": "main.out"
}
diff --git a/tests/specs/publish/package_json/deno.json b/tests/specs/publish/package_json/deno.json
index 00e8db5a8..949be1f27 100644
--- a/tests/specs/publish/package_json/deno.json
+++ b/tests/specs/publish/package_json/deno.json
@@ -4,5 +4,5 @@
"exports": {
".": "./mod.ts"
},
- "nodeModules": "global-auto"
+ "nodeModulesDir": "none"
}
diff --git a/tests/specs/task/bin_package/deno.json b/tests/specs/task/bin_package/deno.json
index b2edaa035..fbd70ec48 100644
--- a/tests/specs/task/bin_package/deno.json
+++ b/tests/specs/task/bin_package/deno.json
@@ -1,3 +1,3 @@
{
- "nodeModules": "local-auto"
+ "nodeModulesDir": "auto"
}
diff --git a/tests/specs/task/node_modules_dir_false/deno.json b/tests/specs/task/node_modules_dir_false/deno.json
index c11dfbbba..ac5f8ba14 100644
--- a/tests/specs/task/node_modules_dir_false/deno.json
+++ b/tests/specs/task/node_modules_dir_false/deno.json
@@ -1,5 +1,5 @@
{
- "nodeModules": "local-auto",
+ "nodeModulesDir": "auto",
"tasks": {
"repro": "echo hi"
}