Files
scriptc/tests/fixtures/node-types
Chris Tate 846552b0e2 Support crypto.getCipherInfo, AES-CCM and the AES key wrap ciphers
getCipherInfo(nameOrNid[, options]) runs in a new runtime unit,
scr_cipher_info.c, over a table that scripts/gen-cipher-info.mjs generates
from Node 24.22's getCipherInfo. The table covers every cipher OpenSSL
names, including the ones without a native implementation. Lookups match
names case-insensitively and accept OpenSSL's nids. The unit applies
cipher.js's argument checks and GetCipherInfo's keyLength and ivLength
rules, and returns the info object in Node's key order. CipherInfo maps
to a checked-dynamic value, so TypeScript and JavaScript code receive
Node's object. Reading the nid Node leaves out for the SIV and SM4 GCM,
CCM and XTS ciphers, where the declared type gives number, throws a
TypeError.

createCipheriv and createDecipheriv support aes-128/192/256-ccm (and the
id-aesN-ccm names) over OpenSSL's ccm128 steps. They follow Node's tag and
IV lengths, the plaintextLength requirement, the message-length caps and
the one-update rule, and report a failed authentication from final().

They also support the RFC 3394 and RFC 5649 key wrap ciphers (aes-N-wrap,
aesN-wrap, id-aesN-wrap, the -pad forms and the -inv ciphers) over
wrap128.c's routines, with Node's lengths, integrity failures and
one-update rule.

The new names follow the existing ones in the cipher table, so the lookup
cost of the existing ciphers is unchanged.
2026-10-22 17:18:54 -05:00
..
2026-07-22 18:08:04 -05:00
2026-07-22 18:08:04 -05:00
2026-10-14 21:17:46 -05:00
2026-07-22 18:08:04 -05:00
2026-07-22 18:08:04 -05:00
2026-07-22 18:08:04 -05:00

node-types fixture

A project whose node_modules contains @types/node — the adoption path for real-world Node/TypeScript projects. The vendored node_modules are COMMITTED TEST DATA, pinned so the type surface (and therefore the pinned diagnostics) never drifts with the registry:

  • @types/node 24.13.3
  • undici-types 7.18.2 (its dependency — declares the web-platform globals: fetch/Response/AbortSignal/ReadableStream/...)

What the fixture pins (see tests/harness/project-config.test.ts):

  • argv-env.ts — the SUPPORTED process surface (argv, env) typed by @types/node lowers statically and the binary runs: with @types/node present, the shipped fallback declarations for process/node:fs/ console stand down (their types come from @types/node), but the same members lower to the same libCalls, recognized by name + @types/node provenance.
  • fenced.ts — surface @types/node DECLARES but scriptc does not lower (process.uptime, Buffer.from, setInterval) reports the SC2020-family fence naming @types/node, instead of typechecking its way into a broken binary — and never a raw "Cannot find name" error.
  • event-loop-metrics.ts and timeout-type.ts — performance.eventLoopUtilization, monitorEventLoopDelay's IntervalHistogram and NodeJS.Timeout as declared types lower under @types/node exactly as under the fallback declarations.
  • source-import/ — an imported TypeScript source may use the RequestInfo global supplied by TypeScript's default DOM lib while scriptc adopts the project's @types/node declarations.

Projects WITHOUT @types/node (every other fixture and the whole corpus) keep the shipped fallback declarations and behave exactly as before.