From d20c9e75d1540b1a27e721d0cf66d29ba6a2c3fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 22 Jan 2024 18:37:28 +0100 Subject: 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 --- cli/main.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'cli/main.rs') 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 { -- cgit v1.2.3