Skip to content

chore(deps): Node 24.22.1, compatibility date 2026-11-16, a clean pnpm audit and V8 coverage - #296

Merged
sydevs-bot merged 5 commits into
mainfrom
claude/chore-deps-node-24-and-compat-date
Nov 19, 2026
Merged

sydevs-bot merged 5 commits into
mainfrom
claude/chore-deps-node-24-and-compat-date

Conversation

@sydevs-bot

Copy link
Copy Markdown
Contributor

Summary

Visitors and editors see nothing change: every page we checked renders byte-identical HTML under the old and new settings. The changes are all for developers, CI and the Worker runtime:

  • Node 24.22.1 everywhere. .node-version moves from 22.17.0 to 24.22.1, and CI's gate and smoke jobs follow it because both read node-version-file: .node-version. 24.22.1 is the default Node in Cloudflare's Workers Builds image. @types/node moves to ^24.19.2. Node 22.17.0 was already outside the engines range of @payloadcms/richtext-lexical 3.93.0 and of msw's @inquirer/*.
  • The Worker's compatibility_date moves from 2025-09-06 to 2026-11-16. This is the newest date the pinned wrangler 4.163.0 and its workerd accept. nodejs_compat is kept. As a side effect the server entry shrinks by 19.2 kB, because process, console and the Performance classes are now native and unenv no longer inlines polyfills for them.
  • pnpm audit is clean. Two pnpm.overrides clear the three moderate advisories that came in through Photon.
  • pnpm test:coverage runs the unit suite once with V8 coverage. It has no thresholds and does not run in CI. The README and docs/rules/testing.md list it.

Findings addressed

  • F11b: Node 22.17.0, which reaches EOL on 2027-04-30. .node-version:1 is now 24.22.1 (still with no trailing newline). README.md:9 matches, and package.json has "@types/node": "^24.19.2", which resolves to 24.19.2. Two things confirm the version: the Cloudflare Workers Builds image docs list 24.22.1 as preinstalled and the default, and 24.22.1 (stable, linux-x64) is in the actions/node-versions manifest that actions/setup-node reads. Checking every engines.node range in the lockfile with semver, 24.22.1 satisfies all of them except the optional @img/sharp-win32-ia32. 22.17.0 failed @payloadcms/richtext-lexical, @payloadcms/ui and @inquirer/*. A copy of @types/node 22.20.5 stays in the lockfile only through the * range of @types/busboy and @types/set-cookie-parser. tsc --listFiles loads only 24.19.2. Pinned by: this is toolchain config, so no unit test covers it. pnpm install --frozen-lockfile reports no engine errors under Node 24.22.1, and the full gate, pnpm ladle:build, pnpm check:wrangler and pnpm test:coverage all pass under it.

  • F11c: compatibility_date = "2025-09-06". wrangler.toml:2 is now 2026-11-16, which is wrangler 4.163.0's DEFAULT_COMPAT_DATE and the version date of its workerd 1.20261116.1. No other line changes. 59 flags change default between the two dates. They were parsed from workerd's compatibility-date.capnp at v1.20261116.1 (the reviewer's independent parse matches) and cross-checked against Cloudflare's compatibility-flags history. The ones this Worker reaches:

    • enable_nodejs_process_v2, enable_nodejs_console_module and enable_global_performance_classes make these APIs native. node:events and node:stream drop out of the server bundle, which now imports only node:async_hooks. server/entry.ts reads only process.env.PORT.
    • enable_nodejs_global_timers: global setTimeout returns a Timeout object. The only server use, the sleep at server/error-utils.ts:111, ignores the return value.
    • spec_compliant_dispatch_exceptions: AbortSignal.timeout at server/sahajcloud-fetch.ts:86 changes only if a listener throws, and none of ours does.
    • strip_bom_in_read_all_text affects .text() / .json() only when a BOM is present.
    • fetch_iterable_type_support: we pass only string or stream bodies.
    • writable_stream_spec_compliant_writer and encoder_stream_spec_compliant_backpressure sit on the SSR stream and compression path, and the HTML came out identical.
    • unhandled_rejection_after_microtask_checkpoint changes only the timing of Sentry's rejection hook.
    • enable_fast_jsg_struct could touch crypto.subtle under jose. The reviewer bundled the exact verifyLivePreviewToken construction (raw Ed25519 importKey + jwtVerify EdDSA), ran it under workerd 1.20261116.1, and it verifies under both dates.
    • enhanced_error_serialization: the only server structuredClone, at server/content-index.ts:255, clones content JSON, not errors.
    • nodejs_compat and nodejs_compat_v2 become default from 2026-08-04, and the flag stays anyway.

    The rest are not reached: the node:* module stubs (fs, os, vm, domain, punycode, cluster, wasi, trace_events, stream_wrap, dgram, inspector, sqlite, perf_hooks, v8, tty, child_process, worker_threads, readline, repl), require_returns_default_export (no CJS require in the bundle), ctx exports, RPC, TextDecoder, WebSocket, Durable Object, Queues, Containers, Workflows and 8 Python flags. Pinned by: both builds were served with wrangler dev -c dist/server/wrangler.json against the real SahajCloud. /, /about-meditation, /fr, /meditations/17, /lectures/150, /map, /sitemap.xml, /robots.txt and /nope-404 return the same statuses as the deployed main Worker (7 × 200, 2 × 404), and the HTML is byte-identical once the port and asset hashes are normalised. /api/related-meditations/150 and /api/related-lectures/17 return 200 JSON. Measurement: dist/server/index.mjs goes from 564,382 B to 545,150 B, and SSR modules transformed go from 2249 to 2231.

  • F11d: 3 moderate advisories via Photon. package.json pnpm.overrides gains "glob@>=9.0.0 <14.0.2": "14.0.6" and "ts-deepmerge@<8.0.0": "8.0.0", keyed on each advisory's vulnerable range like the existing undici and happy-dom entries. glob 10.5.0's only consumer was @vercel/nft 0.30.4, which reaches it through vike-photon → @photonjs/runtime → standaloner. nft's CJS require('glob') now resolves to 14.0.6, and nodeFileTrace works with nft's exact glob options. ts-deepmerge 8.0.0 still exports the merge that @photonjs/core imports. The minimatch 9.0.9 advisory came only through glob 10.5.0, so the glob override clears it too, and only minimatch 11.0.8 remains. Pinned by: pnpm audit goes from 3 moderate to "No known vulnerabilities found". After a rebuild, the server bundle differs only in the Sentry release id and what follows from it, so neither package reaches the Worker.

  • F12b: no coverage tooling. @vitest/coverage-v8 ^5.1.0 resolves to 5.1.0, which peers exactly on vitest 5.1.0. "test:coverage": "vitest run --coverage" sits right after test:run in package.json. It has no thresholds, no vitest.config.ts change and no CI wiring, and coverage/ was already gitignored (.gitignore:26) and eslint-ignored (eslint.config.js:72). The README command table and the docs/rules/testing.md command block now list it. Resolving magicast's @babel/parser to the 7.29.14 already in the tree also moves @babel/generator and @babel/traverse from 7.29.12 to 7.29.14, a patch-level change. Pinned by: pnpm test:coverage exits 0 with 129 files and 1219 tests. The first baseline, which counts only files the suite loads, is 72.05% statements, 69.02% branches, 69.05% functions and 73.35% lines.

Not in this PR

  • A minimatch override. After the glob override, no minimatch below 11.0.1 is left in the tree, so "minimatch@>=7.0.0 <11.0.1" would match nothing from day one. chore(deps): clear the high undici DoS advisory from the tree #195 already removed one override that matched nothing. If it is wanted as a guard anyway, the line is "minimatch@>=7.0.0 <11.0.1": "11.0.8", and it does not change the lockfile.
  • Node 24.22.3. It exists (2026-11-10, a security release) and is in actions/node-versions, but Cloudflare's Workers Builds image does not preinstall it yet. Pinning it would add a Node download to every Workers build. Moving to it needs a decision.
  • pnpm prod is broken on main, before this PR. It passes ./dist/server/index.js, but the build emits dist/server/index.mjs, so wrangler stops with "entry-point file … was not found". Verification here used the equivalent wrangler dev -c dist/server/wrangler.json. The fix is to drop the positional path or point it at index.mjs, and it belongs in its own change.
  • A page rendered through pnpm dev is not verified. In this sandbox the dev server's SahajCloud fetches fail with "Network connection lost" under both the old and the new date, so the cause is the sandbox proxy. With the new date the dev server starts on the Vite plugin's workerd 1.20261110.1 with no compatibility-date warning.
  • No new unit tests. All four changes are toolchain and runtime config, so no unit test fails without them. The evidence above is the gate under Node 24, a clean audit, and identical rendered HTML under both dates.
  • No new translation keys. Nothing here renders text.
  • @payloadcms/* stays pinned at SahajCloud's 3.93.0, and vidstack is untouched.

Reconciled with open PRs

Test results

The full gate (.claude/skills/pr-prep/check.sh --full) ran under Node 24.22.1:

  • Lint: ✖ 1084 problems (0 errors, 1084 warnings). That is the same total as main. The only files this PR touches outside config are Markdown, so it adds no warnings.
  • tsc --noEmit: passed.
  • vitest run: 129 of 129 test files and 1219 of 1219 tests passed.
  • pnpm build: passed (client 1515 modules, SSR 2231 modules). The only warnings are ones main already has: Sentry's no-auth-token notice, the deprecated vike-photon, the bare import.meta.env and the chunk size.
  • Total: === ✓ Checks passed — 50s ===.

An earlier run in this session failed one test: eslint-rules/index.test.ts hit a 5000 ms timeout while the shared sandbox's load average was above 20 on 4 cores. This PR does not touch that test, and it passed alone in 2.8 s and in the full rerun above.

pnpm install --frozen-lockfile under Node 24.22.1 reports no engine errors, and pnpm audit on the pushed head says "No known vulnerabilities found". Earlier runs on this branch also passed pnpm ladle:build, pnpm check:wrangler (dry run) and pnpm test:coverage (129 files, 1219 tests). Since those runs, only the two Markdown files have changed.


Generated by Claude Code

Node 22 reaches end of life on 2027-04-30; Node 24 is supported until
2028-04-30. The pinned 22.17.0 already falls outside the engines range of
@payloadcms/richtext-lexical 3.93.0 (^22.23.4 || >=24.22.1) and of the
@InQuirer packages msw pulls in for Ladle and Vitest
(^22.22.2 || ^24.15.0).

24.22.1 is the Node 24 that the Workers Builds image preinstalls and uses
by default, so both Workers build on a preinstalled runtime instead of
fetching 22.17.0, and actions/setup-node resolves it from
actions/node-versions for CI. The newer 24.22.3 security release is not
preinstalled there yet.

@types/node moves to the 24 line with it. @types/busboy and
@types/set-cookie-parser still hold a 22.20.5 copy through their `*`
range; tsc loads only 24.19.2, and `pnpm dedupe` would move unrelated
packages too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZcE8bs5uRJ6dsg6kw
2026-11-16 is the newest date the pinned wrangler 4.163.0 knows (its
DEFAULT_COMPAT_DATE) and the date of the workerd it runs, 1.20261116.1.
The Cloudflare Vite plugin still carries workerd 1.20261110.1, but no flag
changes default between those two dates and the dev server starts on it.

Between 2025-09-06 and 2026-11-16, 59 flags change default (workerd's
compatibility-date.capnp at v1.20261116.1, cross-checked against the
Cloudflare flags history). The ones this Worker reaches:

- enable_nodejs_process_v2 (2025-09-15), enable_nodejs_console_module
  (2025-09-21) and enable_global_performance_classes (2026-03-17) make
  process, console and the Performance classes native, so
  @cloudflare/unenv-preset stops bundling its polyfills for them: the
  server entry drops from 564 kB to 545 kB, and node:events and
  node:stream leave its imports. server/entry.ts reads only
  process.env.PORT, and no binding is named PORT.
- enable_nodejs_global_timers (2026-02-10): global setTimeout returns a
  Timeout object; withRetry's sleep ignores the return value.
- spec_compliant_dispatch_exceptions (2026-09-15): a throwing abort
  listener no longer reaches the caller; sahajcloud-fetch's
  AbortSignal.timeout adds no listener of its own.
- strip_bom_in_read_all_text, fetch_iterable_type_support,
  fast_jsg_struct, unhandled_rejection_after_microtask_checkpoint,
  writable_stream_spec_compliant_writer and
  encoder_stream_spec_compliant_backpressure align fetch bodies, streams
  and promise rejection with the specs the SSR stream, the compress
  middleware and the SahajCloud reads sit on.
- nodejs_compat is itself on by default from 2026-08-04; the flag stays.

The rest (Python, Workflows, Queues, Durable Objects, containers,
WebSockets, RPC, ctx.exports, CommonJS require, UTF-16 and CJK
TextDecoder, tls, diagnostics_channel and the other node:* module stubs)
touch nothing this Worker imports or calls.

Served by wrangler dev against SahajCloud, /, /about-meditation, /fr,
/meditations/17, /lectures/150, /map, /sitemap.xml, /robots.txt and an
unknown path return the same status and the same HTML under both dates,
once asset hashes and the port are normalised.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZcE8bs5uRJ6dsg6kw
pnpm audit reported three moderate advisories, all reached only through
Photon:

- GHSA-87mf-gv2c-c62c (CVE-2026-12644): ts-deepmerge <8.0.0 merges a
  non-function toString or valueOf over the prototype's, and the merged
  object throws in any string context. 7.0.3 arrives via
  @photonjs/core, which pins ^7.0.3.
- GHSA-3g3m-2fjr-6pw4 (CVE-2026-118773): glob >=9.0.0 <=14.0.1 keeps
  walking the filesystem after its AbortSignal fires. 10.5.0 arrives via
  vike-photon -> @photonjs/runtime -> standaloner 0.1.11 ->
  @vercel/nft 0.30.4.
- GHSA-g3hv-75wg-m249 (CVE-2026-118764): minimatch >=7.0.0 <11.0.1
  amplifies glob parts quadratically. 9.0.9 arrived only as glob 10.5.0's
  own dependency.

Two overrides clear all three: ts-deepmerge 8.0.0 keeps the `merge` export
@photonjs/core imports, and glob 14.0.6, already in the tree for
@vercel/nft 1.x, keeps the `glob()` export nft 0.30.4 requires and brings
minimatch 11.0.8 with it. A minimatch override would match nothing, so
there is none. Both keys use the advisory's vulnerable range, so each
stops matching once its requesters move past it.

pnpm audit now reports no known vulnerabilities. Neither package reaches
the built Worker: it differs only in the Sentry release id and the asset
hashes that follow from it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZcE8bs5uRJ6dsg6kw
Nothing measured which modules the unit suite reaches. @vitest/coverage-v8
moves in lockstep with vitest, and 5.1.0 peers on exactly vitest 5.1.0,
so it takes the same caret range and resolves to the same version. Its
magicast dependency resolves @babel/parser to the 7.29.14 already in the
tree, and pnpm moves @babel/generator and @babel/traverse off 7.29.12
onto it.

`pnpm test:coverage` runs the unit lane with coverage on and writes the
report to coverage/, which .gitignore and the eslint ignores already
cover. It sets no thresholds and CI does not run it: this is a local
measurement, not a gate. Vitest's default include counts only the files
the suite loads, so a module no test imports is absent from the report
rather than at 0%.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZcE8bs5uRJ6dsg6kw
The script landed in package.json, but the README's command table and
the testing rule's command block still named only test, test:run and
test:ui, so a contributor reading either would not find it. Both now
say what it writes and that it is a local measurement, not a gate.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZcE8bs5uRJ6dsg6kw
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
wemeditate-web 470b7c4 Commit Preview URL

Branch Preview URL
Nov 19 2026, 09:08 PM

@sydevs-bot
sydevs-bot added this pull request to the merge queue Nov 19, 2026
@sydevs-bot

sydevs-bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running

Written by the sydevs dispatcher. Sessions never edit this comment.

@sydevs-bot sydevs-bot moved this from Awaiting to Pending in SYDevelopers Technical Roadmap Nov 19, 2026
Merged via the queue into main with commit a7d4e89 Nov 19, 2026
17 checks passed
@sydevs-bot
sydevs-bot deleted the claude/chore-deps-node-24-and-compat-date branch November 19, 2026 23:05
@sydevs-bot sydevs-bot moved this from Pending to Done in SYDevelopers Technical Roadmap Nov 19, 2026
sydevs-bot pushed a commit that referenced this pull request Nov 19, 2026
Two conflicts, both from main's Node 24 bump (#296) and its Ladle watch
guard.

pnpm-lock.yaml: regenerated with `pnpm install` rather than merged by
hand. The hunk was this branch's `@unhead/schema-org` entry against
main's `@types/[email protected]` peer rewrite, and both are wanted — the
resolved entry carries the new peer.

.github/workflows/ci.yml: `server/sitemap` joins the Ladle WATCH list.
main's new `ladle-watch-paths` guard asserts every `server/` module the
Ladle build bundles is named there, and this branch makes
`lib/content-seo.ts` and `lib/atlas-seo.ts` import `isCanonicalOrigin`
from `server/sitemap.ts`.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjXfn9FAEmxn2QsmK15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants