Skip to content

CI: fail on new deprecated or unsupported packages; vite fs.strict extended - #1969

Open
nedtwigg wants to merge 2 commits into
mainfrom
ci-pnpm-audit-fs-strict
Open

nedtwigg wants to merge 2 commits into
mainfrom
ci-pnpm-audit-fs-strict

Conversation

@nedtwigg

@nedtwigg nedtwigg commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Two follow-ups from this week's dependency updates.

Deprecated and unsupported packages in CI

scripts/pnpm-audit-health.mjs (pnpm audit:packages) runs in Build & Test after the dependency-disclosure check.

  • Engines: pnpm audit engines (new in pnpm 12.24, Update pnpm to v12.24.0 #1963; works offline). Any package that doesn't support the pinned Node.js or the platform fails. None do today.
  • Deprecations: read from the deprecated: fields pnpm records in pnpm-lock.yaml at resolution, not from the registry (pnpm audit deprecations), so the result changes only with the commit. A version deprecated later fails the next PR that re-resolves it, never unrelated PRs, and a registry outage can't fail the step.
    • node-domexception@1.0.0 is gone: the Cloudflare SDK under wrangler now gets formdata-node 6 through an override. Version 6 has no dependencies and keeps the FormData/File/Blob/fileFromPath exports the SDK imports. Wrangler installs the SDK's web shim, so formdata-node never loads there anyway.
    • @secretlint/secretlint-rule-preset-recommend@10.2.2 is allowlisted. @vscode/vsce 4.1.1 requires it, ovsx pulls it in through vsce, and the 4.1.2 prereleases drop it, so it goes when Renovate bumps vsce. Any other deprecated package fails. An allowlisted entry that's no longer deprecated also fails, so the list can't go stale.

vite fs.strict: 'extended' for the standalone dev server

vite 8.4 (#1960) added server.fs.strict: 'extended'. It checks every module against fs.allow before any plugin loads it, not only /@fs requests. The standalone dev server is reachable on loopback by any page, and it already has an explicit allow list.

Testing

  • pnpm audit:packages passes on Windows.
  • Before the override, the script failed on node-domexception. Removing the allowlist entry fails it, and so does adding one the lockfile doesn't mark as deprecated.
  • wrangler deploy --dry-run (voice Worker) bundles with formdata-node 6. The website dependency disclosure is unchanged.
  • innerdogfood on this branch: the app loads, a split and Settings work, and the browser reports no console errors and no refused module. /@fs/C:/Windows/win.ini and a repo-root file still get 403, and /src/main.tsx gets 200.
  • lint:workflows, lint:outbound, lint:loopback, lint:specs pass.
  • Not tested: the Tauri dev app on macOS. The harness serves the same vite config.

🤖 Generated with Claude Code

…tended

pnpm 12.24 added `pnpm audit deprecations` and `pnpm audit engines`.
scripts/pnpm-audit-health.mjs runs both in Build & Test. Deprecations has
no ignore list, so the script allowlists the two only a dependency can drop
(both dev tooling) and fails on an entry the audit stops reporting.

vite 8.4's `server.fs.strict: 'extended'` checks every module against the
standalone dev server's allow list before plugins load it, not only `/@fs`
requests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5f26d81
Status: ✅  Deploy successful!
Preview URL: https://5f45752f.mouseterm.pages.dev
Branch Preview URL: https://ci-pnpm-audit-fs-strict.mouseterm.pages.dev

View logs

@dormouse-bot dormouse-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pnpm audit deprecations gets its deprecation status from the registry when it runs, not from the lockfile. A run pointed at an unreachable registry hangs retrying. That makes this the first Build & Test step whose result can change while the commit stays the same. Say a maintainer deprecates any installed transitive version, like the two allowlisted ones, which were both deprecated after they were resolved. Every open PR and the next push to main then fail this step with no change to their diff, until someone adds an allowlist entry or bumps the parent. A registry outage fails the step the same way.

Two cheaper options:

  • Check the lockfile instead. pnpm-lock.yaml already records deprecated: for each package when it is resolved; it has the field for both allowlisted packages. A check of those fields fails only the PR that brings in a deprecated version, and needs no network.
  • Run the live audit on a schedule. Run it in the nightly audit, or as a job outside Build & Test, so later deprecations are still caught without turning unrelated PRs red.

Is a red on unrelated PRs worth catching later deprecations sooner? That's your call.

`pnpm audit deprecations` asks the registry, so a later deprecation would
turn unrelated PRs red. Read the `deprecated:` fields pnpm records in
pnpm-lock.yaml instead; `pnpm audit engines` already works offline.

Override the Cloudflare SDK's formdata-node 4 to 6, which has no
dependencies, dropping node-domexception. Wrangler installs the SDK's web
shim, so formdata-node never loads there anyway.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants