`npm audit --audit-level=moderate` failed on develop: vite <=6.4.3 (high:
cross-origin script execution in custom middleware, fs.allow bypass,
launch-editor), vitest/@vitest/mocker <=4.1.11 (moderate: code injection via
manual mock registration) and fastify 5.12.2-5.12.5 (low, benchmark only).
All are devDependencies; the published package is unaffected. Lockfile-only:
vite 6.4.5, vitest 4.1.12, fastify 5.12.7, all inside the existing ranges.
Generated with npm 11 because npm 10.9.7's arborist crashes on this tree
(`Cannot read properties of null (reading 'edgesOut')`).
Verified: npm ci, audit (0), lint, format, typecheck, test (915),
build, complexity, test:deno, test:bun, test:edge.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
vitest 3.2.7 carried the last three dev audit advisories: tinypool
(critical, prototype pollution to RCE in worker options), vitest itself
(critical, through tinypool and @vitest/mocker) and @vitest/mocker
(moderate, path traversal through a redirected mock). 4.1.11 is the
first stable release outside every affected range; vitest 4 no longer
depends on tinypool at all. It needs Node 20 or newer, which the Node 22
floor now guarantees. vitest 5 would need Node 22.12, and 4.1.11 is
enough to clear the advisories.
vite stays on ^6.4.3, which vitest 4 accepts.
The one change the bump requires: vitest 4 types `vi.fn()` with no
arguments as a mock of a function *or* a constructor, so
`ReturnType<typeof vi.fn>` is no longer callable as a plain function.
listener-boundary.test.ts now types its spies as
`Mock<(...args: unknown[]) => void>`.
npm 10.9 crashes in arborist's #loadPeerSet resolving this tree, so the
lockfile was produced with npm 11.6.2; `npm ci` on Node 22's bundled
npm 10 installs it cleanly.
npm audit: 3 -> 0. npm audit --omit=dev stays at 0.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Node 18 and Node 20 are end-of-life and receive no security patches, so
supporting them before RC.1 would mean promising a runtime nobody can
patch. Node 22 is the oldest line still maintained.
engines.node moves to >=22, @types/node to ^22, the tsup target to
node22, and CI's build job from Node 18 to 22, so every workflow now
runs Node 22 only. The docs, the bug report example and the comments
that stated 18 as the floor follow.
The node:crypto fallback in the HTTP core existed only for Node 18,
which lacked the global crypto; it goes with its regression test, which
said as much. The ws fallback for the WebSocket client stays: Node 22
has the global, but it can still be switched off with a flag.
Moving off Node 18 and 20 also unblocks vitest 4, which the remaining
dev audit advisories need.
BREAKING CHANGE: Node 18 and Node 20 are no longer supported. The
minimum is Node 22.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
fastify <= 5.12.4 carries seven advisories (high), and it reaches us
twice, both benchmark-only: as a direct devDependency and through
@nestjs/platform-fastify 11.2.7, which pins fastify 5.11.3 exactly.
`npm audit fix --force` would move to @nestjs/platform-fastify 12,
which is ESM-only and needs @nestjs/core and @nestjs/common 12 as
well: a migration of the Nest benchmark servers, not a dependency fix.
Raise the direct range to ^5.12.5, a patch inside the major we already
use, and point nest's copy at it with `"fastify": "$fastify"` so the
tree holds a single, patched fastify.
Checked with `BENCH_SMOKE=1 npm run bench`: fastify, nestjs-fastify
and nestjs-express all boot and serve every scenario with 0% errors.
npm audit: 5 (2 critical, 1 high, 2 moderate) -> 3 (2 critical,
1 moderate), all of them vitest. `npm audit --omit=dev` stays at 0.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
miniflare 4.20260730.0 is still the newest stable release, and it pins
undici 7.28.0 and sharp 0.35.2. The existing undici 7.29.0 override is
now inside a new advisory range (7.0.0 - 7.29.0, high), and sharp is
under two libheif/librsvg advisories (<= 0.35.5-rc.1, high).
`npm audit fix --force` would install miniflare 5.20261006.1-alpha:
a major and a prerelease, for a test-only dependency.
Move the undici override to 7.29.1 and add sharp 0.35.5, both patch
releases and the exact versions the next miniflare ships with. Same
approach already used for find-my-way, hyperid's uuid and undici.
`test:edge` is the suite that drives workerd through miniflare and it
passes unchanged.
npm audit: 8 (2 critical, 4 high, 2 moderate) -> 5 (2 critical,
1 high, 2 moderate). `npm audit --omit=dev` stays at 0.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
`npm audit fix` without --force: every bump stays inside the ranges
package.json already declares, so only the lockfile changes.
Clears proxy-addr (critical), multer and @nestjs/platform-express,
qs, brace-expansion, fast-uri, js-yaml and source-map-js. All of them
are dev or benchmark dependencies; `npm audit --omit=dev` was and
stays at 0.
npm audit: 16 (3 critical, 11 high, 2 moderate) -> 8 (2 critical,
4 high, 2 moderate).
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
The plugins repository builds against Plugin { name, mount } and app.boot(),
which only develop has. Staging the version publishes it to Verdaccio under
stg and nowhere else; the npm and JSR cut stays a separate decision.
The bump also moves the exported VERSION, which was two releases behind and had
no business being. Its comment claimed it was "replaced at publish time" and
nothing ever did that — not tsup, not stage.yml, not release.yml, which only
reads the version out of package.json. VERSION is what a consumer quotes in a
bug report, so a stale one sends someone to the changelog of a release they are
not running.
Pinning it to package.json is what keeps this from being a fix with a shelf
life: the next bump that forgets it now fails the build. smoke.test.ts was
never going to catch it, because it asserts the CalVer shape and a stale
version matches that perfectly.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Clears Dependabot alert 26. The advisory is real but our exposure is not:
nanoid arrives through postcss, under tsup at the root and under astro in
website/, so it never ships. Production dependencies of the package are
reflect-metadata and nothing else, and `npm audit --omit=dev` was already
green. Reaching the bug needs control of the size argument passed to nanoid,
which postcss calls with a fixed length.
Fixing it anyway because the alert costs more to keep explaining than to
close, and an open badge trains us to skim Dependabot. The next advisory
should be the only one sitting there.
Dependabot files it under website/ as runtime scope because website/package.json
lists astro under dependencies and has no devDependencies at all. Moving them
would stop that mislabelling, but that is a separate change.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Both audit trees were failing, for unrelated reasons and with different fixes.
**Root — undici, high.** miniflare 4.20260730.0 (the newest stable) pulls
undici 7.28.0, and the advisory range is 7.0.0–7.28.0. `npm audit fix --force`
wants miniflare 5.20260801.1-alpha: a breaking major, and an alpha, to patch a
devDependency that never ships. undici 7.29.0 is outside the range, so pin it
through `overrides` instead — same approach already used for find-my-way and
hyperid.
**website — js-yaml, high.** Reached through Starlight. 4.3.1 carries the fix
and the bump is not breaking, so a plain `npm audit fix` covers it.
Verified: root and website audits both report 0 vulnerabilities; 357 tests
pass; `test:edge` still passes, which is the one that actually exercises
miniflare against the pinned undici; `docs:build` produces its 23 pages.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Boots the actual workerd engine locally (miniflare devDep, no CF account
needed) and round-trips HTTP (app.fetch) + WebSocket (WebSocketPair +
app.upgrade) through edgeHandler's real request path, mirroring the Deno/Bun
adapter tests' assertion shape.
workerd's nodejs_compat genuinely does not implement node:http/node:https
(confirmed in isolation against the real runtime; node:crypto, node:stream,
node:net, node:tls, node:events, node:util, node:buffer all load fine under
the same flags). The barrel statically imports them for the Node listen()
path even though edgeHandler never touches it, so the bundler stubs those
two modules at test-bundle time (inert createServer that throws if ever
called) purely to let the worker load — edgeHandler itself is untouched.
See project-docs/.superpowers/sdd/task-2-report.md for the full writeup and
the suggested core follow-up (lazy-defer those imports behind listen()).
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Packaging was broken for consumers: `main` resolved to a nonexistent
dist/index.js (tsc emitted dist/src/index.js), and the tarball shipped
tests, benches and sources. Build with tsup to emit CJS + ESM (+ types)
behind an `exports` map so `require` and `import` both resolve; a
createRequire banner keeps the lazy require('ws')/require('busboy') working
under ESM. Add the `files` allowlist and a `prepublishOnly` gate.
Bump to the first CalVer beta, published under the npm `beta` dist-tag.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>