summaryrefslogtreecommitdiff
path: root/cli/args/mod.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2024-08-30 18:58:58 +0100
committerGitHub <noreply@github.com>2024-08-30 13:58:58 -0400
commitb1c6142f741a507ba6594ab174065e00213100b9 (patch)
treef3dce3e55e4b10b6cf0570dddb6f69340da7a0cf /cli/args/mod.rs
parent4639ae655e9db396fdf4408961db59372334b69b (diff)
BREAKING: `DENO_FUTURE=1` by default, or welcome to Deno 2.0 (#25213)
This commit effectively turns Deno into Deno 2.0. This is done by forcing `DENO_FUTURE=1` env var, that was available in the past few months to try Deno 2 changes. This commit contains several breaking changes scheduled for Deno 2: - all deprecated JavaScript APIs are not available any more, mostly `Deno.*` APIs - `window` global is removed - FFI, WebGPU and FS APIs are now stable and don't require `--unstable-*` flags - import assertions are no longer supported - "bring your own node modules" is enabled by default This is the first commit in a series that are scheduled before the Deno 2 release. Follow up work is tracked in https://github.com/denoland/deno/issues/25241. --------- Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com> Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com> Co-authored-by: Nathan Whitaker <nathan@deno.com>
Diffstat (limited to 'cli/args/mod.rs')
-rw-r--r--cli/args/mod.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/args/mod.rs b/cli/args/mod.rs
index a0888ca58..e339cb714 100644
--- a/cli/args/mod.rs
+++ b/cli/args/mod.rs
@@ -117,8 +117,8 @@ pub static DENO_DISABLE_PEDANTIC_NODE_WARNINGS: Lazy<bool> = Lazy::new(|| {
.is_some()
});
-pub static DENO_FUTURE: Lazy<bool> =
- Lazy::new(|| std::env::var("DENO_FUTURE").ok().is_some());
+// TODO(2.0): remove this in a follow up.
+pub static DENO_FUTURE: Lazy<bool> = Lazy::new(|| true);
pub fn jsr_url() -> &'static Url {
static JSR_URL: Lazy<Url> = Lazy::new(|| {
@@ -1680,6 +1680,7 @@ impl CliOptions {
}
});
+ // TODO(2.0): remove this conditional and enable these features in `99_main.js` by default.
if *DENO_FUTURE {
let future_features = [
deno_runtime::deno_ffi::UNSTABLE_FEATURE_NAME.to_string(),