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/watcher_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/watcher_tests.rs')
-rw-r--r-- | cli/tests/integration/watcher_tests.rs | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/cli/tests/integration/watcher_tests.rs b/cli/tests/integration/watcher_tests.rs index 6732d5284..008df3385 100644 --- a/cli/tests/integration/watcher_tests.rs +++ b/cli/tests/integration/watcher_tests.rs @@ -216,7 +216,6 @@ async fn lint_watch_test() { .arg("lint") .arg(&badly_linted) .arg("--watch") - .arg("--unstable") .piped_output() .spawn() .unwrap(); @@ -273,7 +272,6 @@ async fn lint_watch_without_args_test() { .current_dir(t.path()) .arg("lint") .arg("--watch") - .arg("--unstable") .piped_output() .spawn() .unwrap(); @@ -365,7 +363,6 @@ async fn fmt_watch_test() { .arg("fmt") .arg(&badly_formatted) .arg("--watch") - .arg("--unstable") .piped_output() .spawn() .unwrap(); @@ -420,7 +417,6 @@ async fn fmt_watch_without_args_test() { .current_dir(t.path()) .arg("fmt") .arg("--watch") - .arg("--unstable") .piped_output() .spawn() .unwrap(); @@ -514,7 +510,6 @@ async fn bundle_js_watch() { .arg(&file_to_watch) .arg(&bundle) .arg("--watch") - .arg("--unstable") .env("NO_COLOR", "1") .piped_output() .spawn() @@ -586,7 +581,6 @@ async fn bundle_watch_not_exit() { .arg(&file_to_watch) .arg(&target_file) .arg("--watch") - .arg("--unstable") .env("NO_COLOR", "1") .piped_output() .spawn() @@ -891,7 +885,6 @@ async fn run_watch_with_import_map_and_relative_paths() { let mut child = util::deno_cmd() .current_dir(temp_directory.path()) .arg("run") - .arg("--unstable") .arg("--watch") .arg("--import-map") .arg(&import_map_path) @@ -1191,7 +1184,6 @@ async fn test_watch_module_graph_error_referrer() { .current_dir(util::testdata_path()) .arg("run") .arg("--watch") - .arg("--unstable") .arg(&file_to_watch) .env("NO_COLOR", "1") .piped_output() @@ -1315,7 +1307,6 @@ async fn bench_watch_basic() { .current_dir(util::testdata_path()) .arg("bench") .arg("--watch") - .arg("--unstable") .arg("--no-check") .arg(t.path()) .env("NO_COLOR", "1") |