summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/args/mod.rs4
-rw-r--r--cli/factory.rs1
-rw-r--r--cli/standalone/mod.rs1
-rw-r--r--cli/worker.rs5
4 files changed, 11 insertions, 0 deletions
diff --git a/cli/args/mod.rs b/cli/args/mod.rs
index 6aafd0ea6..d7ff91b84 100644
--- a/cli/args/mod.rs
+++ b/cli/args/mod.rs
@@ -987,6 +987,10 @@ impl CliOptions {
}
}
+ pub fn enable_future_features(&self) -> bool {
+ std::env::var("DENO_FUTURE").is_ok()
+ }
+
pub fn resolve_main_module(&self) -> Result<ModuleSpecifier, AnyError> {
match &self.flags.subcommand {
DenoSubcommand::Bundle(bundle_flags) => {
diff --git a/cli/factory.rs b/cli/factory.rs
index be2dc677d..2236e6090 100644
--- a/cli/factory.rs
+++ b/cli/factory.rs
@@ -775,6 +775,7 @@ impl CliFactory {
self.feature_checker().clone(),
self.create_cli_main_worker_options()?,
self.options.node_ipc_fd(),
+ self.options.enable_future_features(),
// TODO(bartlomieju): temporarily disabled
// self.options.disable_deprecated_api_warning,
true,
diff --git a/cli/standalone/mod.rs b/cli/standalone/mod.rs
index ecbb0be82..d1b90ecee 100644
--- a/cli/standalone/mod.rs
+++ b/cli/standalone/mod.rs
@@ -551,6 +551,7 @@ pub async fn run(
create_coverage_collector: None,
},
None,
+ false,
// TODO(bartlomieju): temporarily disabled
// metadata.disable_deprecated_api_warning,
true,
diff --git a/cli/worker.rs b/cli/worker.rs
index 3f75ebc5c..5c252e92c 100644
--- a/cli/worker.rs
+++ b/cli/worker.rs
@@ -144,6 +144,7 @@ struct SharedWorkerState {
maybe_lockfile: Option<Arc<Mutex<Lockfile>>>,
feature_checker: Arc<FeatureChecker>,
node_ipc: Option<i64>,
+ enable_future_features: bool,
disable_deprecated_api_warning: bool,
verbose_deprecated_api_warning: bool,
}
@@ -424,6 +425,7 @@ impl CliMainWorkerFactory {
feature_checker: Arc<FeatureChecker>,
options: CliMainWorkerOptions,
node_ipc: Option<i64>,
+ enable_future_features: bool,
disable_deprecated_api_warning: bool,
verbose_deprecated_api_warning: bool,
) -> Self {
@@ -446,6 +448,7 @@ impl CliMainWorkerFactory {
maybe_lockfile,
feature_checker,
node_ipc,
+ enable_future_features,
disable_deprecated_api_warning,
verbose_deprecated_api_warning,
}),
@@ -612,6 +615,7 @@ impl CliMainWorkerFactory {
node_ipc_fd: shared.node_ipc,
disable_deprecated_api_warning: shared.disable_deprecated_api_warning,
verbose_deprecated_api_warning: shared.verbose_deprecated_api_warning,
+ future: shared.enable_future_features,
},
extensions: custom_extensions,
startup_snapshot: crate::js::deno_isolate_init(),
@@ -818,6 +822,7 @@ fn create_web_worker_callback(
node_ipc_fd: None,
disable_deprecated_api_warning: shared.disable_deprecated_api_warning,
verbose_deprecated_api_warning: shared.verbose_deprecated_api_warning,
+ future: false,
},
extensions: vec![],
startup_snapshot: crate::js::deno_isolate_init(),