Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
"test:fetch-conformance": "vitest run tests/harness/fetch-conformance.test.ts",
"test:url-conformance": "vitest run tests/harness/url-conformance.test.ts",
"test:events-conformance": "vitest run tests/harness/events-conformance.test.ts",
"test:conformance": "vitest run tests/harness/fetch-conformance.test.ts tests/harness/url-conformance.test.ts tests/harness/events-conformance.test.ts",
"test:conformance:node24": "tsx scripts/node-matrix.mjs --target node24",
"test:conformance:node26": "tsx scripts/node-matrix.mjs --target node26",
"gate:node-matrix": "tsx scripts/node-matrix.mjs",
"inventory:node": "node scripts/node-surface-inventory.mjs",
"inventory:node:check": "node scripts/node-surface-inventory.mjs --check --offline",
"test:cache-identity": "node tests/harness/cache-identity.mjs",
"test:sandbox": "node scripts/sandbox-test.mjs",
"test:sandbox:image": "node scripts/sandbox-image.mjs",
Expand Down
7 changes: 4 additions & 3 deletions packages/compiler/ambient/scriptc-node-fallback.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1318,9 +1318,10 @@ declare module "node:os" {
* LIVE query view — mutations through it re-serialize into the URL, so
* href reflects immediately; every read answers the same object, Node's
* caching), and toString() (the href serialization).
* URL values have no SETTERS — the component fields are read-only (the
* one supported mutation path is searchParams) — and participate in
* unions (URL | undefined). The parser covers the common CLI schemes
* pathname is the one WRITABLE component — assignment re-runs the WHATWG
* path parse and re-serializes href; every other component field is
* read-only (the other mutation path is searchParams). URL values
* participate in unions (URL | undefined). The parser covers the common CLI schemes
* exactly (http/https/ws/wss/ftp/file authority URLs, opaque paths like
* data: and mailto:) — divergences from the full WHATWG algorithm are
* documented in SEMANTICS.md. */
Expand Down
45 changes: 45 additions & 0 deletions packages/compiler/compat/inventories/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Node surface inventories

The **denominator** behind the compat profiles, derived mechanically from
Node's own generated API database (`all.json`) for every runtime in the
matrix — see `packages/compiler/src/compat/node-matrix.ts`.

The profiles under `packages/compiler/src/compat/` classify three slices
member by member, which answers *"is this member supported?"* but never *"how
much of Node is that?"*. These files answer the second question: what
documented classes exist, per module, per version, and what changed between
the two majors. Nothing here is classified — an added class is **not** a
support claim in either direction, and a class the compiler will never
implement counts toward the denominator exactly like one it already does.

| File | What it is |
| --- | --- |
| `node-<version>-classes.json` | Module-qualified class list for one runtime, with counts and the pinned source |
| `node-class-diff.json` | The mechanical delta between the matrix runtimes |

Regenerate with `pnpm inventory:node`; `pnpm inventory:node:check` fails on
drift without touching the network. The generator is
`scripts/node-surface-inventory.mjs`.

## What is pinned, and what is not committed

The source URL is pinned by **exact version** —
`https://nodejs.org/docs/v<version>/api/all.json`, never `/latest/` and never
a major alias — because those URLs move under you. Each artifact records the
byte length and SHA-256 of the `all.json` it was derived from, so a silently
republished upstream is detectable rather than assumed away.

The raw `all.json` downloads are ~8 MB each and are **cached, not committed**
(`node_modules/.cache/node-api/`). The derived inventories are the artifact
that matters — they are what a coverage dashboard consumes, and they are small
enough to read in a diff. Pass `--vendor-raw` if you want the upstream bytes
in-tree as well.

## Normalization worth knowing

Node's `name` for a class is prose, not an identifier: bare
(`EventEmitter`), already qualified (`events.EventEmitterAsyncResource`), or
carrying a superclause (`BroadcastChannel extends EventTarget`). The generator
normalizes to one bare identifier owned by the document that defines it.
Without that, a docs edit adding or removing an `extends` clause makes the same
class appear as both an addition and a removal.
321 changes: 321 additions & 0 deletions packages/compiler/compat/inventories/node-24.15.0-classes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,321 @@
{
"schemaVersion": 1,
"node": "24.15.0",
"source": {
"url": "https://nodejs.org/docs/v24.15.0/api/all.json",
"bytes": 7977263,
"digest": "sha256:ad66cf85ee273e20ede86b6864cc6ecd1ae6d9ea44f2011e75f4427223f7d16c",
"note": "Pinned by EXACT version. The digest is what makes the pin verifiable: a silently republished all.json changes it."
},
"counts": {
"modules": 41,
"classes": 262
},
"modules": [
"assert",
"async_context",
"async_hooks",
"buffer",
"child_process",
"cluster",
"console",
"crypto",
"dgram",
"diagnostics_channel",
"dns",
"domain",
"errors",
"events",
"fs",
"globals",
"http",
"http2",
"https",
"inspector",
"module",
"net",
"perf_hooks",
"readline",
"repl",
"sqlite",
"stream",
"string_decoder",
"test",
"timers",
"tls",
"tty",
"url",
"util",
"v8",
"vm",
"wasi",
"webcrypto",
"webstreams",
"worker_threads",
"zlib"
],
"classes": [
"assert.Assert",
"assert.AssertionError",
"assert.CallTracker",
"async_context.AsyncLocalStorage",
"async_context.AsyncResource",
"async_hooks.AsyncHook",
"async_hooks.AsyncLocalStorage",
"async_hooks.AsyncResource",
"buffer.Blob",
"buffer.Buffer",
"buffer.File",
"buffer.SlowBuffer",
"child_process.ChildProcess",
"cluster.Worker",
"console.Console",
"crypto.Certificate",
"crypto.Cipheriv",
"crypto.Decipheriv",
"crypto.DiffieHellman",
"crypto.DiffieHellmanGroup",
"crypto.ECDH",
"crypto.Hash",
"crypto.Hmac",
"crypto.KeyObject",
"crypto.Sign",
"crypto.Verify",
"crypto.X509Certificate",
"dgram.Socket",
"diagnostics_channel.Channel",
"diagnostics_channel.TracingChannel",
"dns.Resolver",
"domain.Domain",
"errors.AssertionError",
"errors.Error",
"errors.RangeError",
"errors.ReferenceError",
"errors.SyntaxError",
"errors.SystemError",
"errors.TypeError",
"events.CustomEvent",
"events.Event",
"events.EventEmitter",
"events.EventEmitterAsyncResource",
"events.EventTarget",
"events.NodeEventTarget",
"fs.Dir",
"fs.Dirent",
"fs.FSWatcher",
"fs.FileHandle",
"fs.ReadStream",
"fs.StatFs",
"fs.StatWatcher",
"fs.Stats",
"fs.Utf8Stream",
"fs.WriteStream",
"globals.AbortController",
"globals.AbortSignal",
"globals.Blob",
"globals.BroadcastChannel",
"globals.Buffer",
"globals.ByteLengthQueuingStrategy",
"globals.CloseEvent",
"globals.CompressionStream",
"globals.CountQueuingStrategy",
"globals.Crypto",
"globals.CryptoKey",
"globals.CustomEvent",
"globals.DOMException",
"globals.DecompressionStream",
"globals.Event",
"globals.EventSource",
"globals.EventTarget",
"globals.File",
"globals.FormData",
"globals.Headers",
"globals.MessageChannel",
"globals.MessageEvent",
"globals.MessagePort",
"globals.Navigator",
"globals.PerformanceEntry",
"globals.PerformanceMark",
"globals.PerformanceMeasure",
"globals.PerformanceObserver",
"globals.PerformanceObserverEntryList",
"globals.PerformanceResourceTiming",
"globals.ReadableByteStreamController",
"globals.ReadableStream",
"globals.ReadableStreamBYOBReader",
"globals.ReadableStreamBYOBRequest",
"globals.ReadableStreamDefaultController",
"globals.ReadableStreamDefaultReader",
"globals.Request",
"globals.Response",
"globals.Storage",
"globals.SubtleCrypto",
"globals.TextDecoder",
"globals.TextDecoderStream",
"globals.TextEncoder",
"globals.TextEncoderStream",
"globals.TransformStream",
"globals.TransformStreamDefaultController",
"globals.URL",
"globals.URLPattern",
"globals.URLSearchParams",
"globals.WebAssembly",
"globals.WebSocket",
"globals.WritableStream",
"globals.WritableStreamDefaultController",
"globals.WritableStreamDefaultWriter",
"http.Agent",
"http.ClientRequest",
"http.IncomingMessage",
"http.OutgoingMessage",
"http.Server",
"http.ServerResponse",
"http.WebSocket",
"http2.ClientHttp2Session",
"http2.ClientHttp2Stream",
"http2.Http2SecureServer",
"http2.Http2Server",
"http2.Http2ServerRequest",
"http2.Http2ServerResponse",
"http2.Http2Session",
"http2.Http2Stream",
"http2.ServerHttp2Session",
"http2.ServerHttp2Stream",
"https.Agent",
"https.Server",
"inspector.Session",
"module.SourceMap",
"net.BlockList",
"net.Server",
"net.Socket",
"net.SocketAddress",
"perf_hooks.Histogram",
"perf_hooks.IntervalHistogram",
"perf_hooks.PerformanceEntry",
"perf_hooks.PerformanceMark",
"perf_hooks.PerformanceMeasure",
"perf_hooks.PerformanceNodeEntry",
"perf_hooks.PerformanceNodeTiming",
"perf_hooks.PerformanceObserver",
"perf_hooks.PerformanceObserverEntryList",
"perf_hooks.PerformanceResourceTiming",
"perf_hooks.RecordableHistogram",
"readline.Interface",
"readline.InterfaceConstructor",
"readline.Readline",
"repl.REPLServer",
"sqlite.DatabaseSync",
"sqlite.SQLTagStore",
"sqlite.Session",
"sqlite.StatementSync",
"stream.Duplex",
"stream.PassThrough",
"stream.Readable",
"stream.Transform",
"stream.Writable",
"string_decoder.StringDecoder",
"test.MockFunctionContext",
"test.MockModuleContext",
"test.MockPropertyContext",
"test.MockTimers",
"test.MockTracker",
"test.SuiteContext",
"test.TestContext",
"test.TestsStream",
"timers.Immediate",
"timers.Timeout",
"tls.Server",
"tls.TLSSocket",
"tty.ReadStream",
"tty.WriteStream",
"url.URL",
"url.URLPattern",
"url.URLSearchParams",
"util.MIMEParams",
"util.MIMEType",
"util.TextDecoder",
"util.TextEncoder",
"v8.CPUProfileHandle",
"v8.DefaultDeserializer",
"v8.DefaultSerializer",
"v8.Deserializer",
"v8.GCProfiler",
"v8.HeapProfileHandle",
"v8.Serializer",
"v8.SyncCPUProfileHandle",
"vm.Module",
"vm.Script",
"vm.SourceTextModule",
"vm.SyntheticModule",
"wasi.WASI",
"webcrypto.AeadParams",
"webcrypto.AesCbcParams",
"webcrypto.AesCtrParams",
"webcrypto.AesDerivedKeyParams",
"webcrypto.AesKeyAlgorithm",
"webcrypto.AesKeyGenParams",
"webcrypto.Algorithm",
"webcrypto.Argon2Params",
"webcrypto.CShakeParams",
"webcrypto.ContextParams",
"webcrypto.Crypto",
"webcrypto.CryptoKey",
"webcrypto.CryptoKeyPair",
"webcrypto.EcKeyAlgorithm",
"webcrypto.EcKeyGenParams",
"webcrypto.EcKeyImportParams",
"webcrypto.EcdhKeyDeriveParams",
"webcrypto.EcdsaParams",
"webcrypto.EncapsulatedBits",
"webcrypto.EncapsulatedKey",
"webcrypto.HkdfParams",
"webcrypto.HmacImportParams",
"webcrypto.HmacKeyAlgorithm",
"webcrypto.HmacKeyGenParams",
"webcrypto.KeyAlgorithm",
"webcrypto.KmacImportParams",
"webcrypto.KmacKeyAlgorithm",
"webcrypto.KmacKeyGenParams",
"webcrypto.KmacParams",
"webcrypto.Pbkdf2Params",
"webcrypto.RsaHashedImportParams",
"webcrypto.RsaHashedKeyAlgorithm",
"webcrypto.RsaHashedKeyGenParams",
"webcrypto.RsaOaepParams",
"webcrypto.RsaPssParams",
"webcrypto.SubtleCrypto",
"webstreams.ByteLengthQueuingStrategy",
"webstreams.CompressionStream",
"webstreams.CountQueuingStrategy",
"webstreams.DecompressionStream",
"webstreams.ReadableByteStreamController",
"webstreams.ReadableStream",
"webstreams.ReadableStreamBYOBReader",
"webstreams.ReadableStreamBYOBRequest",
"webstreams.ReadableStreamDefaultController",
"webstreams.ReadableStreamDefaultReader",
"webstreams.TextDecoderStream",
"webstreams.TextEncoderStream",
"webstreams.TransformStream",
"webstreams.TransformStreamDefaultController",
"webstreams.WritableStream",
"webstreams.WritableStreamDefaultController",
"webstreams.WritableStreamDefaultWriter",
"worker_threads.BroadcastChannel",
"worker_threads.MessageChannel",
"worker_threads.MessagePort",
"worker_threads.Worker",
"zlib.BrotliCompress",
"zlib.BrotliDecompress",
"zlib.Deflate",
"zlib.DeflateRaw",
"zlib.Gunzip",
"zlib.Gzip",
"zlib.Inflate",
"zlib.InflateRaw",
"zlib.Unzip",
"zlib.ZlibBase",
"zlib.ZstdCompress",
"zlib.ZstdDecompress"
]
}
Loading