summaryrefslogtreecommitdiff
path: root/cli/tests/integration/npm_tests.rs
diff options
context:
space:
mode:
authorBartek Iwańczuk <biwanczuk@gmail.com>2024-01-23 15:33:07 +0100
committerGitHub <noreply@github.com>2024-01-23 15:33:07 +0100
commit427b73c3ec1e01ca8c670d403a85fcf31777d253 (patch)
treebe2fca19021b892c4137abca8f7bfc35f87f72ca /cli/tests/integration/npm_tests.rs
parentebe4c1421e13e61295221982900ac5b77c848227 (diff)
feat: warn when using --unstable, prefer granular flags (#21452)
This commit deprecates "--unstable" flag. When "--unstable" flag is encountered a warning like this is printed: ``` The `--unstable` flag is deprecated, use granular `--unstable-*` flags instead. Learn more at: https://docs.deno.com/runtime/manual/tools/unstable_flags ``` When "--unstable" flag is used and an unstable API is called an additional warning like this is printed for each API call: ``` The `Deno.dlopen` API was used with `--unstable` flag. The `--unstable` flag is deprecated, use granular `--unstable-ffi` instead. Learn more at: https://docs.deno.com/runtime/manual/tools/unstable_flags ``` When no "--unstable-*" flag is provided and an unstable API is called following warning is issued before exiting: ``` Unstable API 'Deno.dlopen'. The `--unstable-ffi` flag must be provided. ``` --------- Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com> Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com> Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
Diffstat (limited to 'cli/tests/integration/npm_tests.rs')
-rw-r--r--cli/tests/integration/npm_tests.rs15
1 files changed, 8 insertions, 7 deletions
diff --git a/cli/tests/integration/npm_tests.rs b/cli/tests/integration/npm_tests.rs
index 9840f2771..e3b1196b9 100644
--- a/cli/tests/integration/npm_tests.rs
+++ b/cli/tests/integration/npm_tests.rs
@@ -30,14 +30,14 @@ itest!(esm_module_eval {
});
itest!(esm_module_deno_test {
- args: "test --allow-read --allow-env --unstable npm/esm/test.js",
+ args: "test --allow-read --allow-env npm/esm/test.js",
output: "npm/esm/test.out",
envs: env_vars_for_npm_tests(),
http_server: true,
});
itest!(esm_import_cjs_default {
- args: "run --allow-read --allow-env --unstable --quiet --check=all npm/esm_import_cjs_default/main.ts",
+ args: "run --allow-read --allow-env --quiet --check=all npm/esm_import_cjs_default/main.ts",
output: "npm/esm_import_cjs_default/main.out",
envs: env_vars_for_npm_tests(),
http_server: true,
@@ -123,7 +123,7 @@ itest!(translate_cjs_to_esm {
});
itest!(compare_globals {
- args: "run --allow-read --unstable --check=all npm/compare_globals/main.ts",
+ args: "run --allow-read --check=all npm/compare_globals/main.ts",
output: "npm/compare_globals/main.out",
envs: env_vars_for_npm_tests(),
http_server: true,
@@ -160,14 +160,15 @@ itest!(child_process_fork_test {
});
itest!(cjs_module_export_assignment {
- args: "run -A --unstable --quiet --check=all npm/cjs_module_export_assignment/main.ts",
+ args: "run -A --quiet --check=all npm/cjs_module_export_assignment/main.ts",
output: "npm/cjs_module_export_assignment/main.out",
envs: env_vars_for_npm_tests(),
http_server: true,
});
itest!(cjs_module_export_assignment_number {
- args: "run -A --unstable --quiet --check=all npm/cjs_module_export_assignment_number/main.ts",
+ args:
+ "run -A --quiet --check=all npm/cjs_module_export_assignment_number/main.ts",
output: "npm/cjs_module_export_assignment_number/main.out",
envs: env_vars_for_npm_tests(),
http_server: true,
@@ -401,7 +402,7 @@ itest!(no_types_cjs {
});
itest!(no_types_in_conditional_exports {
- args: "run --check --unstable npm/no_types_in_conditional_exports/main.ts",
+ args: "run --check npm/no_types_in_conditional_exports/main.ts",
output: "npm/no_types_in_conditional_exports/main.out",
exit_code: 0,
envs: env_vars_for_npm_tests(),
@@ -1542,7 +1543,7 @@ fn auto_discover_lock_file() {
let output = context
.new_command()
- .args("run --unstable -A npm:@denotest/bin/cli-esm test")
+ .args("run -A npm:@denotest/bin/cli-esm test")
.run();
output
.assert_matches_text(