diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-09-09 22:44:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-09 23:44:29 +0200 |
commit | 064a73f7a08eb12d99fcdf8844e9ce5db62be78b (patch) | |
tree | a1672b2151d3e7c5db490dad9fc3917064ee64aa /cli/tools/installer.rs | |
parent | 560ad0331bf99a2564f53201cd086ff902901bfe (diff) |
BREAKING: Remove `--unstable` flag (#25522)
This commit effectively removes the --unstable flag.
It's still being parsed, but it only prints a warning that a granular
flag should be used instead and doesn't actually enable any
unstable feature.
Closes https://github.com/denoland/deno/issues/25485
Closes https://github.com/denoland/deno/issues/23237
Diffstat (limited to 'cli/tools/installer.rs')
-rw-r--r-- | cli/tools/installer.rs | 34 |
1 files changed, 6 insertions, 28 deletions
diff --git a/cli/tools/installer.rs b/cli/tools/installer.rs index 065c5aa1c..bc8769de1 100644 --- a/cli/tools/installer.rs +++ b/cli/tools/installer.rs @@ -490,10 +490,6 @@ async fn resolve_shim_data( TypeCheckMode::Local => executable_args.push("--check".to_string()), } - if flags.unstable_config.legacy_flag_enabled { - executable_args.push("--unstable".to_string()); - } - for feature in &flags.unstable_config.features { executable_args.push(format!("--unstable-{}", feature)); } @@ -822,13 +818,7 @@ mod tests { create_install_shim( &HttpClientProvider::new(None, None), - &Flags { - unstable_config: UnstableConfig { - legacy_flag_enabled: true, - ..Default::default() - }, - ..Flags::default() - }, + &Flags::default(), InstallFlagsGlobal { module_url: "http://localhost:4545/echo_server.ts".to_string(), args: vec![], @@ -850,12 +840,11 @@ mod tests { let content = fs::read_to_string(file_path).unwrap(); if cfg!(windows) { assert!(content.contains( - r#""run" "--unstable" "--no-config" "http://localhost:4545/echo_server.ts""# + r#""run" "--no-config" "http://localhost:4545/echo_server.ts""# )); } else { - assert!(content.contains( - r#"run --unstable --no-config 'http://localhost:4545/echo_server.ts'"# - )); + assert!(content + .contains(r#"run --no-config 'http://localhost:4545/echo_server.ts'"#)); } } @@ -886,13 +875,7 @@ mod tests { async fn install_unstable_legacy() { let shim_data = resolve_shim_data( &HttpClientProvider::new(None, None), - &Flags { - unstable_config: UnstableConfig { - legacy_flag_enabled: true, - ..Default::default() - }, - ..Default::default() - }, + &Default::default(), &InstallFlagsGlobal { module_url: "http://localhost:4545/echo_server.ts".to_string(), args: vec![], @@ -907,12 +890,7 @@ mod tests { assert_eq!(shim_data.name, "echo_server"); assert_eq!( shim_data.args, - vec![ - "run", - "--unstable", - "--no-config", - "http://localhost:4545/echo_server.ts", - ] + vec!["run", "--no-config", "http://localhost:4545/echo_server.ts",] ); } |