Tests: map Node 26.13's new callables, and expect createDecipheriv in the features fixture #23
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/node-26-13-inventory"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes the two tests that fail on
main(0e01fb3) and so in every open PR.1. features fixture:
createDecipheriv()main.ts:55 unhandled-failurewas unexpected.git log -pshows that496821eadded both thecreateDecipherivcall in the fixture and itsthrowsentry (with its own error text,RangeError (invalid key or IV length)) in node-api.json. The map has been right from the start; the fixture line just never got its annotation. The fix adds// expect: unhandled-failure.2. Manifest test on Node 26.13
inventory.tsreported 205 unmapped and 41 stale. Those came from three causes:New in Node 26.13, now mapped. Each one was classified by reading Node's built-in JS source (
process.binding("natives")) and by calling it in node 26.13 for the failure cases, following the existing entries:node:ffi(new,node:-only, so added toPREFIXED): loading a library and resolving symbols arethrows(ERR_FFI_CALL_FAILED). Pointer get/set/export calls areargs.closeandgetSymbolsarenever.node:zlibZIP API (ZipFile,ZipEntry,ZipBuffer,createZipArchive*,zipFiles): opening and reading archives isthrows/rejects(ENOENT,ERR_ZIP_INVALID_ARCHIVE,ERR_ZIP_ENTRY_NOT_FOUND,ERR_ZIP_ENTRY_CORRUPT). Writes to aZipFilearethrows/rejects. Builders areargs. Streams areevent.forEachispropagates.node:perf_hookshistogram statistics:importHistogramisthrows(invalid export data). Methods with range checks areargs. Type-only checks arenever.createMac(key length, MAC or digest:throws, likecreateCipheriv),parsePKCS12(bad bundle or passphrase:throws),getMacs(never);fs.openAsBlobSync(throws, ENOENT); BlockList CIDR/remove methods (args, likeaddSubnet);Buffer.stringLength,isLatin1,Blob#textStream; httpisValidHeader*andwebsocketMask/Unmask; utildebounce/throttle/MIMEType.parse(returnsnull)/markPromiseAsHandled/isPartialDeepStrictEqual;v8.setHeapProfileNearHeapLimit;ReadableStreamTee;Writable.writeKnownBuffer; httpsAgent#keepSocketAlive.node:sqliterenamedDatabaseSync/StatementSynctoDatabase/Statement. The old names are aliases, so the inventory reports the new ones. The map is renamed, and gainsDatabase#createModule,Statement#stat,Statement#resetStatsandStatement#close.Platform, not version. The map was generated on Windows: the Windows
node.exehere is 26.4.0, and on Windowspath === path.win32.node:path/posix/node:path/win32is the same object asnode:path, so it listed path/posix on Windows and path/win32 elsewhere. It now lists both everywhere.posixOnlyclaimedfs.lchmod/lchmodSyncexist on POSIX. Node defines them only whenO_SYMLINKexists, which means macOS.posixOnlyis replaced byplatformOnly: { posix: {...}, darwin: {...} }.A slow probe. The
ClientHttp2Sessionprobe connected to127.0.0.1:9. Under WSL mirrored networking nothing answers there, so the test process stayed alive about 134 s waiting for the TCP timeout (onmaintoo). The probe now uses an in-memorycreateConnectionsocket, and the manifest test takes 0.3 s.ZipEntry.readandcreateZipArchiveSyncare sync generators that throw on iteration, not when called. They are mapped asiterates, whose description now reads "an iterator (usually async)".throwswould be wrong at the call site, and would also put a broadreadmethod into the zlib pack.safe-ts.json is regenerated with
inventory.ts --write-pack: 183 → 189 functions, 216 → 231 methods. Some fs method keys moved because the old file wasn't in the generator's sort order; the test compares withdeepEqual, which ignores key order. The README anddocs/guide/libraries.mdnumbers are updated (2,004 callables in Node 26.13 counting platform-specific ones, plus the category counts).Testing
cargo nextest run: 95 passed, 0 failednpm run test:std: 116 passed, 0 failed (manifest test included)npm run test:docs: passes (typecheck, wasm, VitePress build)node packages/feature-node/test/inventory.ts:2002 callables; 0 unmapped, 0 stale, 0 mapped twiceLeft out / uncertain
posixprocess.get*/set*would show up as stale there..forgejo/workflows/pages.ymluses a floatingnode-version: 26. Today that workflow only builds the docs and doesn't runtest:std, so I left it alone. If the test ever runs in CI, pin the exact version (26.13.0), or every Node minor will break it.Macclass (createMac()returns it) isn't exported, so the inventory doesn't see it, the same as before for other unexported classes. I didn't add it as an instance probe:Mac#finalonly fails on misuse (args), and that would dropfinalfrom the crypto pack, losingdecipher.final().open,stream,content,getSync,toBuffer, ...) are reported on any value fromnode:zlib.🤖 Generated with Claude Code