From 2fb9ddd2e6d6a89ee3c362038581b37e9d388c92 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Thu, 12 Oct 2023 07:33:59 +0100 Subject: [PATCH] chore(task): remove warning for npm "scripts" (#20880) --- cli/tests/testdata/package_json/invalid_value/task.out | 1 - cli/tests/testdata/task/both/package_json_selected.out | 1 - cli/tests/testdata/task/npx/non_existent.out | 1 - cli/tests/testdata/task/npx/on_own.out | 1 - cli/tests/testdata/task/package_json/bin.out | 1 - cli/tests/testdata/task/package_json_post/bin.out | 1 - cli/tests/testdata/task/package_json_pre/bin.out | 1 - cli/tests/testdata/task/package_json_pre_post/bin.out | 1 - cli/tools/task.rs | 5 ----- 9 files changed, 13 deletions(-) diff --git a/cli/tests/testdata/package_json/invalid_value/task.out b/cli/tests/testdata/package_json/invalid_value/task.out index c78a327393..28e3c770d4 100644 --- a/cli/tests/testdata/package_json/invalid_value/task.out +++ b/cli/tests/testdata/package_json/invalid_value/task.out @@ -1,6 +1,5 @@ Warning Ignoring dependency '@denotest/cjs-default-export' in package.json because its version requirement failed to parse: Invalid specifier version requirement. Unexpected character. invalid stuff that won't parse ~ -Warning Currently only basic package.json `scripts` are supported. Programs like `rimraf` or `cross-env` will not work correctly. This will be fixed in an upcoming release. Task test echo 1 1 diff --git a/cli/tests/testdata/task/both/package_json_selected.out b/cli/tests/testdata/task/both/package_json_selected.out index d317af4ed4..3dd1ecafa5 100644 --- a/cli/tests/testdata/task/both/package_json_selected.out +++ b/cli/tests/testdata/task/both/package_json_selected.out @@ -1,7 +1,6 @@ Download http://localhost:4545/npm/registry/@denotest/bin Download http://localhost:4545/npm/registry/@denotest/bin/1.0.0.tgz Initialize @denotest/bin@1.0.0 -Warning Currently only basic package.json `scripts` are supported. Programs like `rimraf` or `cross-env` will not work correctly. This will be fixed in an upcoming release. Task bin cli-esm testing this out "asdf" testing this diff --git a/cli/tests/testdata/task/npx/non_existent.out b/cli/tests/testdata/task/npx/non_existent.out index 81065bf743..5df04917e6 100644 --- a/cli/tests/testdata/task/npx/non_existent.out +++ b/cli/tests/testdata/task/npx/non_existent.out @@ -1,3 +1,2 @@ -Warning Currently only basic package.json `scripts` are supported. Programs like `rimraf` or `cross-env` will not work correctly. This will be fixed in an upcoming release. Task non-existent npx this-command-should-not-exist-for-you npx: could not resolve command 'this-command-should-not-exist-for-you' diff --git a/cli/tests/testdata/task/npx/on_own.out b/cli/tests/testdata/task/npx/on_own.out index fc9673f7f6..67491f7b0a 100644 --- a/cli/tests/testdata/task/npx/on_own.out +++ b/cli/tests/testdata/task/npx/on_own.out @@ -1,3 +1,2 @@ -Warning Currently only basic package.json `scripts` are supported. Programs like `rimraf` or `cross-env` will not work correctly. This will be fixed in an upcoming release. Task on-own npx npx: missing command diff --git a/cli/tests/testdata/task/package_json/bin.out b/cli/tests/testdata/task/package_json/bin.out index 5e04796ebd..bf4693afc6 100644 --- a/cli/tests/testdata/task/package_json/bin.out +++ b/cli/tests/testdata/task/package_json/bin.out @@ -5,7 +5,6 @@ Initialize @denotest/bin@0.5.0 Download http://localhost:4545/npm/registry/@denotest/bin/1.0.0.tgz Initialize @denotest/bin@1.0.0 [UNORDERED_END] -Warning Currently only basic package.json `scripts` are supported. Programs like `rimraf` or `cross-env` will not work correctly. This will be fixed in an upcoming release. Task bin @denotest/bin hi && cli-esm testing this out && npx cli-cjs test "extra" hi testing diff --git a/cli/tests/testdata/task/package_json_post/bin.out b/cli/tests/testdata/task/package_json_post/bin.out index 9864cc76d0..96e5ca9104 100644 --- a/cli/tests/testdata/task/package_json_post/bin.out +++ b/cli/tests/testdata/task/package_json_post/bin.out @@ -1,4 +1,3 @@ -Warning Currently only basic package.json `scripts` are supported. Programs like `rimraf` or `cross-env` will not work correctly. This will be fixed in an upcoming release. Task test echo 'test' test Task posttest echo 'posttest' diff --git a/cli/tests/testdata/task/package_json_pre/bin.out b/cli/tests/testdata/task/package_json_pre/bin.out index 89c64f2e5a..f229618323 100644 --- a/cli/tests/testdata/task/package_json_pre/bin.out +++ b/cli/tests/testdata/task/package_json_pre/bin.out @@ -1,4 +1,3 @@ -Warning Currently only basic package.json `scripts` are supported. Programs like `rimraf` or `cross-env` will not work correctly. This will be fixed in an upcoming release. Task pretest echo 'pretest' pretest Task test echo 'test' diff --git a/cli/tests/testdata/task/package_json_pre_post/bin.out b/cli/tests/testdata/task/package_json_pre_post/bin.out index 0c686b9cdb..8c4abc6bec 100644 --- a/cli/tests/testdata/task/package_json_pre_post/bin.out +++ b/cli/tests/testdata/task/package_json_pre_post/bin.out @@ -1,4 +1,3 @@ -Warning Currently only basic package.json `scripts` are supported. Programs like `rimraf` or `cross-env` will not work correctly. This will be fixed in an upcoming release. Task pretest echo 'pretest' pretest Task test echo 'test' diff --git a/cli/tools/task.rs b/cli/tools/task.rs index f80a32577d..f3acd1b195 100644 --- a/cli/tools/task.rs +++ b/cli/tools/task.rs @@ -90,11 +90,6 @@ pub async fn execute_script( npm_resolver.resolve_pending().await?; } - log::info!( - "{} Currently only basic package.json `scripts` are supported. Programs like `rimraf` or `cross-env` will not work correctly. This will be fixed in an upcoming release.", - colors::yellow("Warning"), - ); - let cwd = match task_flags.cwd { Some(path) => canonicalize_path(&PathBuf::from(path))?, None => maybe_package_json