From b15f9e60a040e2e450e7ca9971a5fc07dbf8b94c Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 22 Feb 2023 22:45:35 -0500 Subject: feat(task): support scripts in package.json (#17887) This is a super basic initial implementation. We don't create a `node_modules/.bin` folder at the moment and add it to the PATH like we should which is necessary to make command name resolution in the subprocess work properly (ex. you run a script that launches another script that then tries to launch an "npx command"... this won't work atm). Closes #17492 --- cli/tests/integration/run_tests.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cli/tests/integration/run_tests.rs') diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index 7dbf9c74c..d89142c21 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -2752,7 +2752,7 @@ itest!(config_not_auto_discovered_for_remote_script { itest!(package_json_auto_discovered_for_local_script_log { args: "run -L debug -A no_deno_json/main.ts", output: "run/with_package_json/no_deno_json/main.out", - maybe_cwd: Some("run/with_package_json/"), + cwd: Some("run/with_package_json/"), // prevent creating a node_modules dir in the code directory copy_temp_dir: Some("run/with_package_json/"), envs: env_vars_for_npm_tests_no_sync_download(), @@ -2765,7 +2765,7 @@ itest!( package_json_auto_discovered_for_local_script_log_with_stop { args: "run -L debug with_stop/some/nested/dir/main.ts", output: "run/with_package_json/with_stop/main.out", - maybe_cwd: Some("run/with_package_json/"), + cwd: Some("run/with_package_json/"), copy_temp_dir: Some("run/with_package_json/"), envs: env_vars_for_npm_tests_no_sync_download(), http_server: true, @@ -2777,7 +2777,7 @@ itest!( package_json_auto_discovered_node_modules_relative_package_json { args: "run -A main.js", output: "run/with_package_json/no_deno_json/sub_dir/main.out", - maybe_cwd: Some("run/with_package_json/no_deno_json/sub_dir"), + cwd: Some("run/with_package_json/no_deno_json/sub_dir"), copy_temp_dir: Some("run/with_package_json/"), envs: env_vars_for_npm_tests_no_sync_download(), http_server: true, @@ -2787,7 +2787,7 @@ itest!( itest!(package_json_auto_discovered_for_npm_binary { args: "run -L debug -A npm:@denotest/bin/cli-esm this is a test", output: "run/with_package_json/npm_binary/main.out", - maybe_cwd: Some("run/with_package_json/npm_binary/"), + cwd: Some("run/with_package_json/npm_binary/"), copy_temp_dir: Some("run/with_package_json/"), envs: env_vars_for_npm_tests_no_sync_download(), http_server: true, -- cgit v1.2.3