Skip to content

docs: retire bare-node-builtins flag references for Deno 2.9#3260

Draft
bartlomieju wants to merge 1 commit into
mainfrom
docs/bare-node-builtins-2-9-cleanup
Draft

docs: retire bare-node-builtins flag references for Deno 2.9#3260
bartlomieju wants to merge 1 commit into
mainfrom
docs/bare-node-builtins-2-9-cleanup

Conversation

@bartlomieju

Copy link
Copy Markdown
Member

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 no node: prefix
and no flag. That makes a handful of --unstable-bare-node-builtins
references 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-builtins section, mirroring how the page already
marks --unstable-otel and --unstable-temporal as stabilized. The note
is scoped: the flag is no longer needed for Node built-ins, but it still
applies to importing npm packages without an npm: specifier when you
manage 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-imports instead, since that flag is still unstable and
illustrates the same configuration mechanics.

The Next.js tutorial no longer lists bare-node-builtins in its
recommended 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.

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

1 participant