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/info_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/info_tests.rs')
-rw-r--r-- | cli/tests/integration/info_tests.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/tests/integration/info_tests.rs b/cli/tests/integration/info_tests.rs index 6897458ac..922fcee06 100644 --- a/cli/tests/integration/info_tests.rs +++ b/cli/tests/integration/info_tests.rs @@ -51,12 +51,12 @@ itest!(info_flag_location { }); itest!(info_json { - args: "info --json --unstable", + args: "info --json", output: "info/info_json.out", }); itest!(info_json_location { - args: "info --json --unstable --location https://deno.land", + args: "info --json --location https://deno.land", output: "info/info_json_location.out", }); @@ -67,7 +67,7 @@ itest!(info_flag_script_jsx { }); itest!(json_file { - args: "info --quiet --json --unstable info/json_output/main.ts", + args: "info --quiet --json info/json_output/main.ts", output: "info/json_output/main.out", exit_code: 0, }); @@ -79,7 +79,7 @@ itest!(import_map_info { }); itest!(info_json_deps_order { - args: "info --unstable --json info/076_info_json_deps_order.ts", + args: "info --json info/076_info_json_deps_order.ts", output: "info/076_info_json_deps_order.out", }); |