Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING: DENO_FUTURE=1 by default, or welcome to Deno 2.0 #25213

Merged
merged 44 commits into from
Aug 30, 2024

Conversation

bartlomieju
Copy link
Member

@bartlomieju bartlomieju commented Aug 26, 2024

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 #25241.

Copy link
Contributor

@iuioiua iuioiua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder whether we really require the ability to have DENO_FUTURE=0. Either way, LGTM!

Copy link
Contributor

@iuioiua iuioiua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests will need to be updated

@iuioiua
Copy link
Contributor

iuioiua commented Aug 27, 2024

We're running into this issue quite a bit:

error: Could not resolve "@denotest/esm-basic", but found it in a package.json. Deno expects the node_modules/ directory to be up to date. Did you forget to run `npm install`?

How should we approach folders that have a package.json but don't have the node_modules folder? Should we just use --node-modules-dir=false?

@iuioiua iuioiua changed the title feat: Make DENO_FUTURE the default feat: make DENO_FUTURE=1 the default Aug 27, 2024
bartlomieju added a commit that referenced this pull request Aug 28, 2024
Needed for #25213.

With Deno 2, we should suggest using `deno install` instead of `npm
install`.
bartlomieju added a commit that referenced this pull request Aug 28, 2024
This is still flaky and won't be needed anyway once
#25213 lands.
lucacasonato pushed a commit that referenced this pull request Aug 29, 2024
Needed for #25213.

With Deno 2, we should suggest using `deno install` instead of `npm
install`.
Copy link
Member

@nathanwhit nathanwhit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, cleanup will be fun 😅

@bartlomieju bartlomieju changed the title feat: make DENO_FUTURE=1 the default BREAKING: DENO_FUTURE=1 by default, or welcome Deno 2.0 Aug 30, 2024
@bartlomieju bartlomieju changed the title BREAKING: DENO_FUTURE=1 by default, or welcome Deno 2.0 BREAKING: DENO_FUTURE=1 by default, or welcome to Deno 2.0 Aug 30, 2024
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@@ -14240,7 +14247,7 @@ fn lsp_deno_json_workspace_node_modules_dir() {
"project1/deno.json",
json!({
"workspace": ["project2"],
"nodeModulesDir": true,
"nodeModules": "local-auto",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should change this to "nodeModules": "auto". This is too much to type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants