$ the-wire · showcase
A "worker" condition for Web Workers, and a lint rule that catches dead benchmarks
By RepoJournal · Filed · About Node.js · Composed from the cited sources · methodology
Node gained a new package export condition scoped to Web Worker threads and a lint rule that would have caught a benchmark silently measuring nothing, while gyp-next shipped 0.22.4 with a Python 3.15 deprecation fix.
module: add "worker" condition for Web Worker threads nodejs/node
Node now resolves a `"worker"` package condition inside Web Worker threads created via the `Worker` global under `--experimental-web-worker`, applied to the entry point and its static dependencies. Previously Web Workers inherited the parent's conditions verbatim, so a package had no way to supply a worker-specific entry point.
tools: add lint rule for unread benchmark `n` nodejs/node
The new `node-core/benchmark-n-config` lint rule fails a benchmark that declares `n` in its configs without reading it in `main()`. It would have caught the rename from `num` to `n` that left `main({ num: n })` reading `undefined`, reporting near-zero results until the fix landed.
module: add --experimental-strip-private-modules nodejs/node
`--experimental-strip-private-modules` permits type stripping inside `node_modules` only for private packages, a followup to the earlier type-stripping work. The flag closes the smuggling route where a private `package.json` could be hidden inside a non-private package.
chore(main): release 0.22.4 nodejs/gyp-next
gyp-next 0.22.4 replaces the deprecated `os.path.commonprefix()` in `RelativePath` and builds precompiled headers after generated inputs. The deprecation is scheduled for removal in a future Python release, so the swap removes a build-time break for anyone on a newer interpreter.
tools: bump the doc group in /tools/doc with 4 updates nodejs/node
Also landing: the `/tools/doc` dependency group in node bumped across `@doc-kit/cli` 1.0.5, `@doc-kit/generator-react`, `@node-core/doc-kit` and `@node-core/doc-kit-legacy`, and nodejs.org added the missing `.mjs` extensions to site imports.