CodeVetter · Repo Unpack · Feature catalog
nodejs/node
User-facing surface is the CLI plus the `node:*` builtin module set. The CLI's 'subcommands' are really the run-mode branches in `src/node.cc` — `node inspect`, `node --test`, `node --experimental-bench`, `node --watch`, `node -e`, `node --check`, `node --prof-process`, `node --build-snapshot`, `node --build-sea`, and the default script/REPL/stdin paths. Module features are individually flag-gated and only become requirable when a `setupX()` in `pre_execution.js` calls `BuiltinModule.allowRequireByUsers()`. This tree's notable additions over a stock runtime are `node:vfs`, `node:ffi`, `node:dtls`, `node:bench`, `node:quic`, `node:sqlite` with virtual tables, and `stream/iter`/`zlib/iter`.
- `node:vfs` exposes `create()`, `registerProvider()`, and the classes `VirtualFileSystem`, `VirtualProvider`, `MemoryProvider`, `RealFSProvider`, `ZipProvider`; it is `node:`-scheme-only and requires `--experimental-vfs`.
- `--vfs-mount <src>` (repeatable) and `--vfs-load <src>` both append to the same `vfs_mounts` option vector; `--vfs-load` additionally sets the `[vfs_load_set]` implied bool so the entry point can be taken from inside a mount.
- `node:ffi` provides `DynamicLibrary` plus typed pointer accessors (`getInt8`…`getFloat64`, `setInt8`…, `exportBytes`, `getRawPointer`, `kFastArguments`) and emits an experimental warning at module load.
- `node:bench` mirrors the test runner's API shape — `bench`, `suite`/`describe`, `before`/`after`/`beforeEach`/`afterEach`, `run`, `runFile`, `createRunner` — and is reached from the CLI by `node --experimental-bench`, which routes to `internal/main/bench_runner`.
- `node:dtls` exposes `connect`, `listen`, `createSecureContext`, and `DTLSEndpoint`/`DTLSSecureContext`/`DTLSSession`, backed by `src/dtls/{dtls,dtls_context,dtls_endpoint,dtls_session}.cc`; `DTLSEndpoint` manages a UDP socket and routes datagrams to sessions.
- The permission model (`--permission`) exposes `process.permission.has()` / `.drop()` and nine scopes: fs (with read/write children), child, wasi, worker, inspector, net, addon, ffi, openssl.store.
- `--permission-audit` is a distinct mode from `--permission`: `isAuditMode()` reads it separately and `Permission::EnableWarningOnly()` makes denials warn rather than throw.
- Single-executable applications are configured by a JSON file parsed in `src/node_sea.cc` supporting `useSnapshot`, `useCodeCache`, `assets`, and `disableExperimentalSEAWarning`; assets are serialized into the blob and read back as `string_view` pairs.
- SEA assets can be surfaced as a read-only mounted VFS via `initSeaVfs()`, which places the SEA main script at the mount-point root so `__dirname`-relative `require()` calls inside a bundled app resolve to bundled assets.
- `node --watch` is implemented as a supervisor process: `internal/main/watch_mode.js` strips watch flags into `argsWithoutWatchOptions`, re-`spawn`s `process.execPath`, and drives restarts from a `FilesWatcher` with a 200 ms debounce in `filter` or `all` mode.
- The test runner CLI parses options via `parseCommandLine()`, supports `--test-isolation=none` (which defers user-module loading into `run()`), forces concurrency 1 when the inspector is active, and sets a nonzero exit code from the `test:summary` event.
- `--experimental-stream-iter` unlocks two additional builtins in one shot, `stream/iter` and `zlib/iter`, via the same `allowRequireByUsers` mechanism.
- `node:sqlite` is enabled by default (disabled only by `--no-experimental-sqlite`) and now supports user-defined virtual tables: `VirtualTableModule` populates an `sqlite3_module` with `xCreate`/`xConnect`/`xBestIndex`/`xOpen`/`xClose` trampolines.
- Documented public API pages exist for every new subsystem — `doc/api/vfs.md`, `ffi.md`, `dtls.md`, `bench.md`, `quic.md`, `stream_iter.md` — so a feature is not considered landed without its doc page. (inferred)