diff options
author | Bartek Iwańczuk <biwanczuk@gmail.com> | 2024-01-23 15:33:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-23 15:33:07 +0100 |
commit | 427b73c3ec1e01ca8c670d403a85fcf31777d253 (patch) | |
tree | be2fca19021b892c4137abca8f7bfc35f87f72ca /cli/tests/integration/test_tests.rs | |
parent | ebe4c1421e13e61295221982900ac5b77c848227 (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/test_tests.rs')
-rw-r--r-- | cli/tests/integration/test_tests.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cli/tests/integration/test_tests.rs b/cli/tests/integration/test_tests.rs index 97aba8051..27bef8007 100644 --- a/cli/tests/integration/test_tests.rs +++ b/cli/tests/integration/test_tests.rs @@ -50,7 +50,7 @@ itest!(ignore { }); itest!(ignore_permissions { - args: "test --unstable test/ignore_permissions.ts", + args: "test test/ignore_permissions.ts", exit_code: 0, output: "test/ignore_permissions.out", }); @@ -200,25 +200,25 @@ itest!(no_check { }); itest!(no_run { - args: "test --unstable --no-run test/no_run.ts", + args: "test --no-run test/no_run.ts", output: "test/no_run.out", exit_code: 1, }); itest!(allow_all { - args: "test --unstable --allow-all test/allow_all.ts", + args: "test --allow-all test/allow_all.ts", exit_code: 0, output: "test/allow_all.out", }); itest!(allow_none { - args: "test --unstable test/allow_none.ts", + args: "test test/allow_none.ts", exit_code: 1, output: "test/allow_none.out", }); itest!(ops_sanitizer_unstable { - args: "test --unstable --trace-ops test/ops_sanitizer_unstable.ts", + args: "test --trace-ops test/ops_sanitizer_unstable.ts", exit_code: 1, output: "test/ops_sanitizer_unstable.out", }); @@ -449,7 +449,7 @@ fn captured_output() { let context = TestContext::default(); let output = context .new_command() - .args("test --allow-run --allow-read --unstable test/captured_output.ts") + .args("test --allow-run --allow-read test/captured_output.ts") .env("NO_COLOR", "1") .run(); |