docs: correct stale claims on the Node.js compatibility page - #41352
Conversation
Every claim on the page was checked against bun 1.4.1-canary.1 and Node.js v26.3.0. Most claims hold. These did not: - node:crypto: argon2() and argon2Sync() work. ml-kem-512 is missing. - node:https: client sockets are tls.TLSSocket. Only the server's req.socket is not. - node:http2: maxOriginSetSize is not a Node.js option. - node:worker_threads: execArgv applies --no-addons and --no-ffi-cc. - node:inspector: Session forwards Debugger configuration commands after open(). - process.binding: crypto/x509 and http_parser are available. node:util, node:sys and node:vm move to green. Their remaining gaps are experimental APIs or edge cases. Add the globals that Node.js has and the page did not list: CloseEvent, ErrorEvent, File, navigator, QuotaExceededError, Storage, URLPattern and WebSocket.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Essentials Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. WalkthroughUpdated Node.js compatibility documentation for crypto, HTTP/2, runtime modules, inspector behavior, process bindings, and web platform globals. ChangesNode.js compatibility documentation
Suggested reviewers: Merge Risk: ⚪ Minimal · up to This updates Node.js compatibility documentation and adds global compatibility entries. No current merge-readiness risk was identified. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Comment |
|
Updated 2:07 AM PT - Sep 4th, 2026
✅ @robobun, your commit 42ecb879b48855306b3468c825289eb2771eb0fe passed in 🧪 To try this PR locally: bunx bun-pr 41352That installs a local version of the PR into your bun-41352 --bun |
There was a problem hiding this comment.
LGTM — the execArgv wording is fixed and the rest of the compatibility updates read accurately.
What was reviewed: the reworded node:worker_threads entry — --stack-trace-limit and --tls-min-* do run through per-worker init, and --conditions/--no-deprecation are CLI-parsed only, so the new examples hold. Spot-checked the node:util/node:vm 🟢 promotions and the new globals entries (File's Blob toStringTag, WebSocket binaryType default, navigator missing languages/locks) against source — no overstated claims found.
Extended reasoning...
Overview
This PR updates docs/runtime/nodejs-compat.mdx only — no runtime code, tests, or types. It corrects stale compatibility claims for several node:* modules (crypto, https, http2, worker_threads, inspector, process.binding), promotes node:util/node:sys/node:vm from 🟡 to 🟢, and adds eight globals (CloseEvent, ErrorEvent, File, navigator, QuotaExceededError, Storage, URLPattern, WebSocket) to the globals table. The prior review flagged that the execArgv sentence incorrectly said "only --no-addons and --no-ffi-cc take effect"; commit 42ecb87 replaced that with "Some execArgv flags take effect… for example --no-addons, --stack-trace-limit and --tls-min-v1.3. Others, for example --conditions and --no-deprecation, only set process.execArgv", which matches what pre_execution.ts and the node:tls/node:net loaders actually read.
Security risks
None. This is a documentation-only change to an .mdx reference page; it does not touch executable code, build configuration, or dependencies.
Level of scrutiny
Low-to-moderate. The only real risk with compat-docs edits is factual overstatement (CLAUDE.md rule 11). The 🟡→🟢 promotions keep their caveat lists intact and match the page's stated convention that 🟢 means "only edge cases missing" — node:util still names diff/transferableAbort*/debuglog gaps, and node:vm still names the importModuleDynamically namespace quirk and measureMemory limitation, so nothing is being hidden. The new globals entries are conservative (two are 🔴, navigator is 🟡) and the File/WebSocket caveats accurately describe known Bun-vs-Node differences rather than papering over them.
Other factors
The one open inline thread from the previous run was directly addressed by the follow-up commit, and the new counter-examples (--conditions, --no-deprecation) check out — those are parsed by the CLI into transpiler/resolver options rather than re-read from process.execArgv inside a worker. No other reviewer has requested changes. Docs changes require no build or test proof per CLAUDE.md.
Problem
docs/runtime/nodejs-compat.mdxhad six claims that are wrong on main. For example, it says thatcrypto.argon2()throws.argon2()andargon2Sync()work since node:crypto: implement argon2 and argon2Sync #37015.WebSocketandURLPattern.Fix
node:crypto,node:https(client sockets aretls.TLSSockets),node:http2(maxOriginSetSizeis not a Node.js option),node:worker_threads(execArgv),node:inspector(Debuggercommands), and theprocess.bindinglist.node:util,node:sysandnode:vmto 🟢. Their remaining gaps are experimental APIs or edge cases.CloseEvent,ErrorEvent,File,navigator,QuotaExceededError,Storage,URLPatternandWebSocket.Background
node:module and each global with a status. 🟢 means that only edge cases are missing. 🟡 means that a commonly used API is missing.Notes
util.diff,module.findPackageJSON,module.registerHooks,v8.Serializer,worker_threads.locks,dns.resolveTlsa,Request.keepalive,crypto.encapsulate.Fileobjects reportBlobas theirconstructorandSymbol.toStringTag, and theWebSocketbinaryTypedefault is"nodebuffer".process.binding('http_parser')andprocess.binding('crypto/x509')return objects in Bun. Node.js v26 throws "No such module" for both.url.format()with an array inquery, andnew DOMException().stack) are not documented here. They go to separate fixes.no test proof · iteration 0 · docs-only change; test-proof not applicable