0.4.17
Highlights
- Node.js parity:
- http and http2: HTTP/2 streams send trailers through
sendTrailersand the'trailers'and'wantTrailers'paths, send informational responses throughadditionalHeaders,writeContinue,writeEarlyHintsandwriteInformation, answer the client's'headers'and'continue'events, and keepsentHeaders,sentInfoHeaders,sentTrailersandstatereadable for the stream's lifetime;respondWithFileandrespondWithFDsend files withstatCheck,onError, range and blocked-response handling, and the compatibility request and stream state follows Node'sendAfterHeaders,authorityandstatusMessagebehavior. Sessions answersession.encryptedandsession.alpnProtocol, responses takesendDate, servers dispose through[Symbol.asyncDispose](), session failures report Node'sERR_HTTP2_ERROR, andExpect: 100-continuerequests route throughcheckContinue.writeHead(status, headers)sends its headers without adding them togetHeaders,getHeader, orgetHeaderNames, a CONNECT or upgrade response takes its socket out of the agent before the listener runs, a request waiting for a free slot emits'socket'when the agent assigns it one, and a pooled socket whose peer closed is not reused.server.on('connect')andserver.on('upgrade')listeners written in plain JavaScript compile with Node's request, socket and head arguments, andhttp.setGlobalProxyFromEnvproxies plain HTTP requests with Node'sNO_PROXYrouting, credentials, variable precedence andNODE_USE_ENV_PROXYswitch, including CONNECT tunnels for HTTPS targets. - stream:
stream.composeandstream.pipelinetake aTransformStreamor any readable/writable pair as a stage,stream/consumersreads web streams and constructor-function streams,Readable.fromtakes itsencodingoption,Readable.toWebandDuplex.toWebtaketype: 'bytes'andreadableTypeso a BYOB reader reads into its own view and a chunk larger than that view keeps its remainder for the next read,Writable.toWebaccepts any writable-like object with Node's cancellation and premature-close behavior, and queued reads on a byte stream are served one pull at a time instead of recursing on the same stack. - tls:
tlsSocket.getTLSTicket()answers the ticket the client received, aTLSSocketemits'keylog'and'session'events,tls.createServerandhttps.createServerrefuseALPNCallbacktogether withALPNProtocolswithERR_TLS_ALPN_CALLBACK_WITH_PROTOCOLS, and aTLSSocketrefuses asecureContextthat is not a context withERR_TLS_INVALID_CONTEXT. - crypto:
crypto.subtle.wrapKeyandunwrapKeytake asymmetric keys, including RSA-OAEP wrapping and unwrapping,crypto.setFips(true)succeeds withgetFips()answering 1 and later fetches failing withERR_OSSL_EVP_UNSUPPORTED, and the remaining unsupported key types and WebCrypto algorithms refuse with documented errors. - child_process and cluster:
spawnSync(...).pidanswers the child's process id, or 0 when the spawn failed,child.stdiois Node's per-child array holding the same stream objects aschild.stdin,stdoutandstderrwithnullat unpiped slots,spawn,spawnSyncand the callbackexecFileacceptshell: truewith separate arguments, anexecorexecFilecall stops through itssignal, keeps the output it produced, and hands the sameAbortErrorto its callback and listeners, a bridged child stdin write answers by the writer's own result and the child's'close'waits for its bridged stdout and stderr, andnode:clusterruns with forked workers and IPC, includingsetupPrimarycredentials, worker messages and send outcomes. - net, dgram and perf_hooks:
new net.Socket()builds an idle socket with Node's address, pending and stream flags,socket.connect(port[, host][, listener])dials it andallowHalfOpenkeeps the write half open after the peer ends, a dgram resolver's own error reaches the callback, and the perf_hooks histogram bucket helpers answer Node's bucket maps and error codes while resource-timing fields the timing info omits read asundefinedand drop out oftoJSON. - events, timers and Windows: a
'newListener'or'removeListener'listener receives a symbol-keyed event's name as the symbol itself, the check phase runs before the next timers phase when a poll callback has queued an immediate,test(fn),test("", fn),describe(fn)andsuite(fn)take their name from the function at run time, or<anonymous>, as Node does,node:testmocks without an implementation compile, andperformance.now()andprocess.uptime()on Windows read the high-resolution counter instead of a clock that moves in 15.6 ms steps. - diagnostics_channel: a console method held as a separate function value publishes on its
console.*channel, and a channel's bound stores are snapshotted before its transforms run. - the environment: every runtime read of the process environment goes through the lock, so a
SHARE_ENVworker writingprocess.envcan no longer crash a concurrent read.
- http and http2: HTTP/2 streams send trailers through
- TypeScript parity:
- A React and Ink terminal app's compile gaps close:
execFileSyncwith a shell, aprocess.envvalue read through an import,Reflect.constructwithnew.targetin a Node island,processandstatfsreads, sloppy-modeargumentspassed toapply, andprocess.stdin.refandunrefcompile and match Node. - React's module shapes compile statically: a JSX automatic runtime loaded from an npm package, React's default export aliasing and re-exports, a conditional CommonJS export alias, exports added after
module.exports, and react-reconciler's CommonJS function export no longer fall back to Node. - An array literal that spreads a variable-length array into a destructuring tuple context compiles, and a closure created above a destructuring declaration can capture its targets with the same temporal dead zone check as a plain
const. - A callback written as a bare expression where a
voidreturn is expected, such aspipeline(..., (err) => err ? reject(err) : resolve()), compiles and discards its value,void eused as a value evaluatesefor its effects and answersundefined, and a JavaScript function inferred to returnneverthat still returns an expression answers a checked-dynamic value instead of compiling as divergent. - A member call through a generic receiver whose method has no compiled body dispatches at run time instead of being deferred, so a call such as
querySelectoron an element in a UI library runs instead of throwing.
- A React and Ink terminal app's compile gaps close:
- CommonJS and islands:
- A CommonJS import binds to the export of the module it names, so a declaration file that re-exports a name from another module no longer points the import at that other module's value, which fixes a startup crash in React 19 apps when
@types/reactis installed deduplicated. - A literal
import("ms")refused with SC2013 now names the runtime package (ms, or@scope/name) and hints that a static import joins the graph or that the package can run in a Node island, and a coverage report's island header says the build needs the libnode pack for its target.
- A CommonJS import binds to the export of the module it names, so a declaration file that re-exports a name from another module no longer points the import at that other module's value, which fixes a startup crash in React 19 apps when
- Faster builds:
- Long runs of class branches in the dynamic static-field and property helpers become one switch on the class key, or chunk functions called in order: cold builds of large React and three.js apps are 13% to 23% faster with 3% to 4% smaller binaries, hello world is 1.7% faster, ui-settings is 1.3% faster with 1.1% to 1.6% smaller executables, and a five-page WPT program's static-field helper frame drops from 110,136 to 1,112 bytes, with byte-identical output.
- The class-case table that selected a property helper's class now covers every generated class table, so cold builds are 1.40% faster for hello world and 1.35% for ui-settings.
- Emission writes the module to a file and the frontend process exits before code generation, so the program text is not held during codegen: peak memory falls 31% for a dev build and 18% for a release build of the counter app, with identical executables.
- The finish-module passes do less work in devirtualization, cycle checks and jsval promotion: the counter app's finish-module phase is 16.8% faster and its total lowering 5.2% faster, with byte-identical IR.
- The checker memoizes immediate aliases and module export lists, so the effect/metric-counter workload drops from 87,608 to 914 raw checker queries and lowers 10.2% faster, and a held-constructor diagnostic is marked only where lowering meets a constructor, which makes ui-settings lowering 1.75 times faster, both with byte-identical IR.
- Dynamic-class dispatch helpers are named from their dispatch key instead of a counter, so names stay stable across edits: ui-settings cold builds 2.5% faster with a 16 KB smaller binary, and an in-place lifted-helper write is carried in the unit's record, so journal-serial lowering keeps the change instead of failing.
Fixes
- A build whose executable was already written no longer fails when OneDrive or another sync client still holds a handle on the scratch directory: the staging directory removal retries on
EPERMandEBUSYand leaves a directory that still cannot be removed instead of failing a successful build. - A dev library build keeps its TypeScript sources through the emitter, so debuggers and stack frames name the TypeScript lines.
- A program with HTTP/2 or TLS event listeners and a net socket
'data'listener no longer fails to compile with a duplicate function definition. - A large string or JSON builder past 4 MiB no longer crashes on older kernels when its fixed move fails, and a region held only by an array's metadata is collected.
- An async fiber gets the main thread's 8 MiB stack budget on 64-bit native targets (WASI and 32-bit targets keep 512 KiB), so a nine-module top-level-await program with deep frames starts instead of throwing
RangeError. - Performance warnings are quieter on ordinary code: SC6001 no longer reports a record copy passed to a parameter that is only read, SC6014 no longer reports plain same-shape spreads and clones, and SC6101 prints one line by default with the function list kept in the JSON diagnostic and
coverage --explain-dynamic. - A release publishes every package under
next, installs it from npm and runs a smoke test on Linux x64 and arm64, macOS arm64 and x64, and Windows x64 before movinglatest, and never reuses a version whose publish failed partway, so a retried release cannot mix runtime packs from an earlier attempt.