summaryrefslogtreecommitdiff
path: root/cli/standalone/mod.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2024-01-22 18:37:28 +0100
committerGitHub <noreply@github.com>2024-01-22 17:37:28 +0000
commitd20c9e75d1540b1a27e721d0cf66d29ba6a2c3fb (patch)
tree83059b5759fad286d8131795d7d79d6fee5bb440 /cli/standalone/mod.rs
parentbc92f872988fd8b9cdf2ae1479278789911237a5 (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/standalone/mod.rs')
-rw-r--r--cli/standalone/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/standalone/mod.rs b/cli/standalone/mod.rs
index 8a98636a4..7054e3451 100644
--- a/cli/standalone/mod.rs
+++ b/cli/standalone/mod.rs
@@ -487,10 +487,10 @@ pub async fn run(
// 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 metadata.unstable {
+ if metadata.unstable_config.legacy_flag_enabled {
checker.enable_legacy_unstable();
}
- for feature in metadata.unstable_features {
+ for feature in metadata.unstable_config.features {
// `metadata` is valid for the whole lifetime of the program, so we
// can leak the string here.
checker.enable_feature(feature.leak());
@@ -535,7 +535,7 @@ pub async fn run(
seed: metadata.seed,
unsafely_ignore_certificate_errors: metadata
.unsafely_ignore_certificate_errors,
- unstable: metadata.unstable,
+ unstable: metadata.unstable_config.legacy_flag_enabled,
maybe_root_package_json_deps: package_json_deps_provider.deps().cloned(),
},
None,