You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
0.5.0
Highlights
Strict mode:--strict fails the build on every untyped or any value and dynamic-tier fallback anywhere, every conversion that copies, every SC61xx performance hint and every Node island, with an explicit per-line // scriptc-allow <code> escape.
Node.js parity: the global WebSocket client, CompressionStream/DecompressionStream, Intl.ListFormat, fs.Utf8Stream and fs.openAsBlob(), the crypto DH and X448 key surfaces with ML-KEM encapsulation, TLS session tickets and certificate revocation lists, async-iterable HTTP and HTTP/2 streams with ALTSVC and ORIGIN frames, module.stripTypeScriptTypes, and Node islands on Windows x64.
TypeScript: legacy class, method, property and parameter decorators lower, generic function values instantiated with the enclosing type parameters compile, and mapped sources compile under --strict.
Faster builds: cold release builds compile faster in the LLVM backend, unchanged compile partitions survive an edit, and a linked executable is reused when every input is a known linkable artifact.
Breaking
Reading the result of a void-typed call is now a build error (SC1090). This covers a read used as an argument, as a member or element, from a Map.get(), from a destructured value, through a callback parameter or alias, through an optional chain, a non-null assertion or an angle-bracket assertion, and a conditional arm. Version 0.4.17 compiled these reads and answered undefined; return the value from the callee instead, or drop the read.
A truthiness test of a void-typed expression that can hold a value, including an awaited void call, is now a build error (SC1090). 0.4.17 compiled it.
A partial record assertion whose key order the compiler cannot prove is now refused (SC3001, partialRecordAssertion:layout): a literal with required properties unwritten when the asserted type is a tuple, has an index signature or accessors, or keeps more than one property order, and a literal whose shared source shape leaves the asserted order unproven. 0.4.17 compiled a literal such as { from: 1, to: 2 } as Span in these shapes; write every required property in the asserted type's order, or collect the properties in a Partial<T> or Record<string, T> value and assert it once complete.
Conditional object spreads beyond ...(c ? { field: v } : {}), ...(c ? record : {}) and one ...(c ? { a } : { b }) after properties without effects are refused (SC1090). Spell other shapes as optional fields.
A variadic function value stored under a narrower function type is refused (SC1090) when a caller may pass more arguments than the type names, because the stored function would not receive them.
Destructuring a method from a process stream (write, writable) is refused (SC1031); the stream's data members answer and methods are called through the stream.
instanceof a built-in class that has no run-time class test yet, such as Iterator or MessagePort, is refused (SC1090); test the members the value has instead.
Object.getPrototypeOf() on a value whose prototype has no representation (a generator object among them) is now a named refusal (SC1090) instead of a plain object whose chain would disagree with Node.
Boxing a synchronous generator into a checked-dynamic value is refused (SC1090).
Class decorators on a factory-base class that declares statics, and parameter decorators on function-local classes, are refused.
A NUL in an HTTP header name built from a dynamic record is refused.
X509Certificate values in unknown or any slots, for...in over them, object spread over them and Object.getOwnPropertyDescriptor() on them have no lowering (SC1090). Their own-key walks answer Node's empty result: Object.keys(), Object.getOwnPropertyNames() and Object.entries() are empty, and hasOwnProperty() and Object.hasOwn() answer false.
An own-property check on the global object through a checked-dynamic value raises the named refusal Own-property checks on this checked-dynamic kind are not supported yet (SC1090) instead of silently answering false.
Behaviour that changes output: padStart() and padEnd() past Node's maximum string length, and a repeat() result past it, now throw Node's RangeError instead of producing a wrong result; process.send serializes records like JSON.stringify; structuredClone keeps object aliases and shared ArrayBuffers.
Added
Node.js: the global WebSocket client, CompressionStream and DecompressionStream, AbortSignal.any, a natively compiled FinalizationRegistry, process.config, Object.getPrototypeOf() over every runtime value, Intl.ListFormat, and an Intl locale decided at run time.
crypto:crypto.diffieHellman with DH keys and KeyObjects, key generation on the Koblitz and brainpool curves, explicit EC curve parameters, raw X448 keys (Ed448 is refused clearly), WebCrypto ML-KEM encapsulation, crypto.parsePKCS12, and X509Certificate reflection and construction.
tls: session resumption with tickets and setSession(), getEphemeralKeyInfo(), setMaxSendFragment(), certificate revocation list checks in tls.connect, and getTicketKeys()/setTicketKeys().
http and http2:IncomingMessage and HTTP/2 streams are async-iterable, writeInformation() takes its callback form, ClientRequest.setHeaders() takes a Headers object or a Map, request header and trailer objects take array values, ALTSVC and ORIGIN frames are sent and received, performServerHandshake(), goaway/setTimeout/ref/unref on sessions, stream timeouts, priority and ready, session.setLocalWindowSize(), and a server closes its sessions with GOAWAY on server.close().
streams: async iteration and disposal across the stream classes, plain function stages in pipeline() and stream.compose(), Readable.from() over iterables, generators and a signal, Duplex.from() over a lone web WritableStream, and stream/consumers handling that matches Node.
fs:fs.Utf8Stream, fs.openAsBlob(), stat/lstat options on the promise API, FileHandle.stat with bigint, and a file-backed Blob read through its creation descriptor.
worker_threads: a worker's heap statistics through worker.performance, Node's postMessage results and transfer-list validation, clone-error messages, the messageerror surface, Worker and MessagePort event keys, and listener counting and removal on MessagePorts.
node:module:module.stripTypeScriptTypes in strip mode, SourceMap and source-map support in a compiled program, require.extensions, require.cache and module.exports kept in step, createRequire filename validation, named imports and re-exports from JSON modules, and a literal import("pkg") joined to the compiled module graph.
TypeScript: legacy class, method, property and parameter decorators lower, including on generic and factory-base classes; generic function values instantiated with the enclosing type parameters; mapped sources under --strict; classes extending namespace members; symbol-keyed class fields; ?? chains whose last operand the checker calls unreachable; optional chains narrowed above their result; a tuple's length through an optional chain; indexed-access member calls; typeof folded for a known type; unions with checked-dynamic members in spreads and destructuring; Map value types seeded from constructor entries; and Array.from({ length }) without a mapper.
Diagnostics: SC8002 when islands are off and a package cannot compile, a cast named in a failed unknown-cast check, a warning on impossible layout casts, and no suggested rewrite that would change output.
Windows: Node islands on Windows x64, with island cache ownership and DACLs verified before reuse.
Changed
Faster release builds: large dynamic-dispatch helpers compile with a lighter pipeline.
Faster builds: cold release builds compile faster in the LLVM backend, unchanged compile partitions survive an edit, a linked executable is reused when every input is a known linkable artifact, a large module's function text stays off the V8 heap, and codegen memory accounting counts reclaimable page cache as available on Linux.
Release and CI: the release reuses the canary build in merge-queue runs that do not change build inputs, requires a green CI run on the release commit, and guards the native compiler profile against drift; canary merges run the plain corpus shards, and the sanitized tier is sharded across lanes.
Fixed
A WebCrypto namespace alias initializer no longer drops its call, arguments or exceptions.
fetch: a buffered body's read now settles its job after its chunks, matching Node's order.
http: a destroyed request reports its own 'close' before the response's, getHeader() returns the value as set, pipelined responses finish when their bytes are written, writes to IncomingMessage members land like Node, header values survive reentrant coercion, a header array with holes writes like Node, off/removeListener/unpipe work on messages, and a createConnection dial for an Agent the program did not create is refused.
http2: session state around connect, settings and timeouts matches Node, CONNECT req.url and untyped dropRequest listeners match Node, a second sendTrailers answers like Node, and pseudo- and connection-specific headers are validated.
streams: a destroy error reaches a stored iterator's catch, the readable watermark grows from at least 1, readable.read() validates its size, readers, encodings and pipe destinations stay alive through reentrant calls, once() wrappers come back from rawListeners(), and a checked-dynamic stream runs its Symbol.asyncDispose.
net and dgram: the event loop no longer spins when a corked write meets a drained peer, socket.write() and socket.end() take an encoding, net.connect takes Node's options, an idle socket connects to a Unix path, createServer reads array-backed options, and dgram socket and bind options match Node.
crypto and tls: OpenSSL ASN.1 error codes are reported for malformed DER private keys, an ECDSA hash error matches Node, a JWK import's usages are checked before its contents, SubtleCrypto methods read as values answer, the hash context is released, invalid secureProtocol values raise Node's errors, and a certificate's materialized identifiers are released on a bad SAN.
worker_threads, cluster and process: cluster settings are read through getters before the credential check, a failed worker launch stays alive until it finishes initializing, IPC close and child exit follow Node's order, process.send serializes records like JSON.stringify, and IPC message and disconnect listeners can be removed.
events, timers and promises:errorMonitor runs before the unhandled-error decision, the rejectionHandled queue survives a recovered throw, the timer sequence no longer wraps at 2^32, Promise.all takes a Set, race takes plain entries, a dynamic allSettled input routes to the checked combinator, and JavaScript thenable awaits match Node.
objects, records and arrays: per-instance key order is kept across shared literal shapes, conditional keys, re-added optional keys and dynamic-data records, structuredClone preserves object aliases and shared ArrayBuffers, Object.assign skips an optional source record, writes to a frozen array are ignored in sloppy code, cycles held through an Error payload are collected, and Error.prepareStackTrace reads and writes behave like Node.
strings, numbers and JSON:Symbol.toPrimitive is invoked with the string hint during ToString, JSON.stringify returns undefined for a maybe-undefined value and writes through a getter's this, toFixed takes untyped digits, and TextEncoder and TextDecoder match Node's encoding rules.
fs and Blob: Blob reads are iterative, validate before allocating and open with O_CLOEXEC, a file-backed Blob reads through its creation descriptor, macOS directory-watch writes are reported, fs.watchFile keeps Node's registration baseline, and FileHandle web streams close and keep toWeb writes and sized reads safe.
memory safety: a segmented record's prototype is released before its block is freed, a region held only by an array's metadata is collected, stackless coroutine frames allocate on the inline small-block fast path, and an allocation grow that cannot map its new run copies instead of trapping.
security: registry tokens, the regex scan cache and histogram buckets are hardened, the WebSocket subprotocol duplicate check is bounded, header names from dynamic records refuse NUL, TLS checks certificate revocation lists, an island tree another process may be loading from is never deleted, island directories are created owned by the user, and Windows island cache ownership and DACLs are verified before reuse.