diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-01-22 18:37:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-22 17:37:28 +0000 |
commit | d20c9e75d1540b1a27e721d0cf66d29ba6a2c3fb (patch) | |
tree | 83059b5759fad286d8131795d7d79d6fee5bb440 /cli/main.rs | |
parent | bc92f872988fd8b9cdf2ae1479278789911237a5 (diff) |
refactor: add "UnstableConfig" struct to cli/args/flags.rs (#21993)
This commit adds "UnstableConfig" struct which centralizes
handling of all "--unstable-*" flags.
Closes https://github.com/denoland/deno/issues/21920
Diffstat (limited to 'cli/main.rs')
-rw-r--r-- | cli/main.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cli/main.rs b/cli/main.rs index 53c7bdf5a..cd065f81e 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -401,8 +401,11 @@ pub fn main() { // https://github.com/microsoft/vscode/blob/48d4ba271686e8072fc6674137415bc80d936bc7/extensions/typescript-language-features/src/configuration/configuration.ts#L213-L214 DenoSubcommand::Lsp => vec!["--max-old-space-size=3072".to_string()], _ => { - if flags.unstable - || flags.unstable_features.contains(&"temporal".to_string()) + if flags.unstable_config.legacy_flag_enabled + || flags + .unstable_config + .features + .contains(&"temporal".to_string()) { vec!["--harmony-temporal".to_string()] } else { |