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/factory.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/factory.rs') diff --git a/cli/factory.rs b/cli/factory.rs index ed5232470..1b084fc28 100644 --- a/cli/factory.rs +++ b/cli/factory.rs @@ -603,7 +603,7 @@ impl CliFactory { // TODO(bartlomieju): enable, once we deprecate `--unstable` in favor // of granular --unstable-* flags. // feature_checker.set_warn_cb(Box::new(crate::unstable_warn_cb)); - if self.options.unstable() { + if self.options.legacy_unstable_flag() { checker.enable_legacy_unstable(); } let unstable_features = self.options.unstable_features(); @@ -709,7 +709,7 @@ impl CliFactory { .options .unsafely_ignore_certificate_errors() .clone(), - unstable: self.options.unstable(), + unstable: self.options.legacy_unstable_flag(), maybe_root_package_json_deps: self.options.maybe_package_json_deps(), }) } -- cgit v1.2.3