Skip to content

v0.4.17

Latest

Choose a tag to compare

@github-actions github-actions released this 26 Nov 16:27
97248e9

0.4.17

Highlights

  • Node.js parity:
    • http and http2: HTTP/2 streams send trailers through sendTrailers and the 'trailers' and 'wantTrailers' paths, send informational responses through additionalHeaders, writeContinue, writeEarlyHints and writeInformation, answer the client's 'headers' and 'continue' events, and keep sentHeaders, sentInfoHeaders, sentTrailers and state readable for the stream's lifetime; respondWithFile and respondWithFD send files with statCheck, onError, range and blocked-response handling, and the compatibility request and stream state follows Node's endAfterHeaders, authority and statusMessage behavior. Sessions answer session.encrypted and session.alpnProtocol, responses take sendDate, servers dispose through [Symbol.asyncDispose](), session failures report Node's ERR_HTTP2_ERROR, and Expect: 100-continue requests route through checkContinue. writeHead(status, headers) sends its headers without adding them to getHeaders, getHeader, or getHeaderNames, 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') and server.on('upgrade') listeners written in plain JavaScript compile with Node's request, socket and head arguments, and http.setGlobalProxyFromEnv proxies plain HTTP requests with Node's NO_PROXY routing, credentials, variable precedence and NODE_USE_ENV_PROXY switch, including CONNECT tunnels for HTTPS targets.
    • stream: stream.compose and stream.pipeline take a TransformStream or any readable/writable pair as a stage, stream/consumers reads web streams and constructor-function streams, Readable.from takes its encoding option, Readable.toWeb and Duplex.toWeb take type: 'bytes' and readableType so a BYOB reader reads into its own view and a chunk larger than that view keeps its remainder for the next read, Writable.toWeb accepts 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, a TLSSocket emits 'keylog' and 'session' events, tls.createServer and https.createServer refuse ALPNCallback together with ALPNProtocols with ERR_TLS_ALPN_CALLBACK_WITH_PROTOCOLS, and a TLSSocket refuses a secureContext that is not a context with ERR_TLS_INVALID_CONTEXT.
    • crypto: crypto.subtle.wrapKey and unwrapKey take asymmetric keys, including RSA-OAEP wrapping and unwrapping, crypto.setFips(true) succeeds with getFips() answering 1 and later fetches failing with ERR_OSSL_EVP_UNSUPPORTED, and the remaining unsupported key types and WebCrypto algorithms refuse with documented errors.
    • child_process and cluster: spawnSync(...).pid answers the child's process id, or 0 when the spawn failed, child.stdio is Node's per-child array holding the same stream objects as child.stdin, stdout and stderr with null at unpiped slots, spawn, spawnSync and the callback execFile accept shell: true with separate arguments, an exec or execFile call stops through its signal, keeps the output it produced, and hands the same AbortError to 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, and node:cluster runs with forked workers and IPC, including setupPrimary credentials, 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 and allowHalfOpen keeps 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 as undefined and drop out of toJSON.
    • 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) and suite(fn) take their name from the function at run time, or <anonymous>, as Node does, node:test mocks without an implementation compile, and performance.now() and process.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_ENV worker writing process.env can no longer crash a concurrent read.
  • TypeScript parity:
    • A React and Ink terminal app's compile gaps close: execFileSync with a shell, a process.env value read through an import, Reflect.construct with new.target in a Node island, process and statfs reads, sloppy-mode arguments passed to apply, and process.stdin.ref and unref compile 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 void return is expected, such as pipeline(..., (err) => err ? reject(err) : resolve()), compiles and discards its value, void e used as a value evaluates e for its effects and answers undefined, and a JavaScript function inferred to return never that 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 querySelector on an element in a UI library runs instead of throwing.
  • 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/react is 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.
  • 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 EPERM and EBUSY and 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 moving latest, and never reuses a version whose publish failed partway, so a retried release cannot mix runtime packs from an earlier attempt.