mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 17:34:47 -05:00
feat(task): add warning about package.json scripts support (#17900)
This commit is contained in:
parent
998aeff3d4
commit
214bdbbc2b
5 changed files with 13 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
||||||
Download http://localhost:4545/npm/registry/@denotest/bin
|
Download http://localhost:4545/npm/registry/@denotest/bin
|
||||||
Download http://localhost:4545/npm/registry/@denotest/bin/1.0.0.tgz
|
Download http://localhost:4545/npm/registry/@denotest/bin/1.0.0.tgz
|
||||||
|
Warning Currently only basic package.json `scripts` are supported.
|
||||||
|
Programs like `rimraf` or `cross-env` will not work correctly. This will be fixed in the upcoming release.
|
||||||
Task bin cli-esm testing this out "asdf"
|
Task bin cli-esm testing this out "asdf"
|
||||||
testing
|
testing
|
||||||
this
|
this
|
||||||
|
|
2
cli/tests/testdata/task/npx/non_existent.out
vendored
2
cli/tests/testdata/task/npx/non_existent.out
vendored
|
@ -1,2 +1,4 @@
|
||||||
|
Warning Currently only basic package.json `scripts` are supported.
|
||||||
|
Programs like `rimraf` or `cross-env` will not work correctly. This will be fixed in the upcoming release.
|
||||||
Task non-existent npx this-command-should-not-exist-for-you
|
Task non-existent npx this-command-should-not-exist-for-you
|
||||||
npx: could not resolve command 'this-command-should-not-exist-for-you'
|
npx: could not resolve command 'this-command-should-not-exist-for-you'
|
||||||
|
|
2
cli/tests/testdata/task/npx/on_own.out
vendored
2
cli/tests/testdata/task/npx/on_own.out
vendored
|
@ -1,2 +1,4 @@
|
||||||
|
Warning Currently only basic package.json `scripts` are supported.
|
||||||
|
Programs like `rimraf` or `cross-env` will not work correctly. This will be fixed in the upcoming release.
|
||||||
Task on-own npx
|
Task on-own npx
|
||||||
npx: missing command
|
npx: missing command
|
||||||
|
|
2
cli/tests/testdata/task/package_json/bin.out
vendored
2
cli/tests/testdata/task/package_json/bin.out
vendored
|
@ -1,6 +1,8 @@
|
||||||
Download http://localhost:4545/npm/registry/@denotest/bin
|
Download http://localhost:4545/npm/registry/@denotest/bin
|
||||||
Download http://localhost:4545/npm/registry/@denotest/bin/0.5.0.tgz
|
Download http://localhost:4545/npm/registry/@denotest/bin/0.5.0.tgz
|
||||||
Download http://localhost:4545/npm/registry/@denotest/bin/1.0.0.tgz
|
Download http://localhost:4545/npm/registry/@denotest/bin/1.0.0.tgz
|
||||||
|
Warning Currently only basic package.json `scripts` are supported.
|
||||||
|
Programs like `rimraf` or `cross-env` will not work correctly. This will be fixed in the upcoming release.
|
||||||
Task bin @denotest/bin hi && cli-esm testing this out && npx cli-cjs test "extra"
|
Task bin @denotest/bin hi && cli-esm testing this out && npx cli-cjs test "extra"
|
||||||
hi
|
hi
|
||||||
testing
|
testing
|
||||||
|
|
|
@ -71,6 +71,11 @@ pub async fn execute_script(
|
||||||
.to_owned(),
|
.to_owned(),
|
||||||
};
|
};
|
||||||
let script = get_script_with_args(script, &ps);
|
let script = get_script_with_args(script, &ps);
|
||||||
|
log::info!(
|
||||||
|
"{} Currently only basic package.json `scripts` are supported.",
|
||||||
|
colors::yellow("Warning"),
|
||||||
|
);
|
||||||
|
log::info!("{}", colors::gray("Programs like `rimraf` or `cross-env` will not work correctly. This will be fixed in the upcoming release."));
|
||||||
output_task(task_name, &script);
|
output_task(task_name, &script);
|
||||||
let seq_list = deno_task_shell::parser::parse(&script)
|
let seq_list = deno_task_shell::parser::parse(&script)
|
||||||
.with_context(|| format!("Error parsing script '{task_name}'."))?;
|
.with_context(|| format!("Error parsing script '{task_name}'."))?;
|
||||||
|
|
Loading…
Add table
Reference in a new issue