docs: retire bare-node-builtins flag references for Deno 2.9#3260
Draft
bartlomieju wants to merge 1 commit into
Draft
docs: retire bare-node-builtins flag references for Deno 2.9#3260bartlomieju wants to merge 1 commit into
bartlomieju wants to merge 1 commit into
Conversation
deno PR #33316 stabilizes bare node built-in resolution in Deno 2.9: import os from "os" resolves to the built-in with no prefix and no flag. Add a stabilization note to the --unstable-bare-node-builtins section (the flag is no longer needed for built-ins; it still applies to bare npm specifiers), and stop using that flag in the generic deno.json and env-var examples. Drop bare-node-builtins from the Next.js tutorial's unstable config, where it is no longer required.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Deno PR denoland/deno#33316 stabilizes bare node built-in resolution in
Deno 2.9: a specifier that matches a Node built-in (for example
import os from "os") resolves to the built-in with nonode:prefixand no flag. That makes a handful of
--unstable-bare-node-builtinsreferences stale in pages outside the Node compatibility page itself, which
the three competing node.md rewrites (#3244, #3245, #3246) already cover.
The unstable flags reference gains a stabilization note on the
--unstable-bare-node-builtinssection, mirroring how the page alreadymarks
--unstable-oteland--unstable-temporalas stabilized. The noteis scoped: the flag is no longer needed for Node built-ins, but it still
applies to importing npm packages without an
npm:specifier when youmanage dependencies manually, so the section stays. The two generic
examples on that page that happened to use this flag (the deno.json
snippet and the environment-variable example) now use
--unstable-sloppy-importsinstead, since that flag is still unstable andillustrates the same configuration mechanics.
The Next.js tutorial no longer lists
bare-node-builtinsin itsrecommended unstable config; on 2.9 it is unnecessary, while the remaining
entries (detect-cjs, node-globals, unsafe-proto, sloppy-imports) are still
required.
Like the node.md rewrites, this is gated on Deno 2.9 actually shipping.
The Next.js config change in particular would break the tutorial for 2.8
users, so this should land together with whichever node.md rewrite wins,
once 2.9 is out. Kept as a draft until then.