Skip to content

chore(deps): update dependencies and move to Vitest 5 - #149

Merged
eve0415 merged 7 commits into
mainfrom
chore/vitest
Sep 6, 2026
Merged

eve0415 merged 7 commits into
mainfrom
chore/vitest

Conversation

@eve0415

@eve0415 eve0415 commented Sep 6, 2026 •

Copy link
Copy Markdown
Owner

Routine dependency refresh, plus the config changes Vitest 5 needs.

Dependencies

Vitest and @vitest/coverage-istanbul go to 5.0.0, wrangler to 4.129.0, Playwright to 1.63.0, oxlint/oxfmt/oxc and the remaining devDependencies to their current releases, and pnpm to 12.3.4. Node moves to 24.20.0 in all three places that pin it — devEngines.runtime, engines.node and .node-version.

@cloudflare/vitest-plugin is the exception: it runs from the preview build of cloudflare/workers-sdk#15500 rather than a published version. Published 1.1.4 corrupts Vitest 5's module evaluator while rewriting import.meta.url, so under Vitest 5 no test file starts at all. That preview declares its workspace siblings as pkg.pr.new URLs, which pnpm rejects as exotic subdeps, so pnpm-workspace.yaml pins miniflare and wrangler back to what published 1.1.4 resolves. The overrides are scoped to the plugin — unscoped, they also rewrote the peer range of the repo's own wrangler and @cloudflare/vite-plugin, which would have silently pinned a later wrangler bump back. Both the dependency and the overrides come out once the fix ships in a release.

Devcontainer

The image moves to 5.1.2-24-trixie and the github-cli feature to 1.1.2. onCreateCommand is gone: typescript-node builds on javascript-node, which uses ghcr.io/devcontainers/features/node:2 at "version": "none" — that setting skips only the nvm install, and the feature still installs pnpm globally. The pinned pnpm@11.21.0 was therefore downgrading the image's own copy in place, which packageManager then pulled forward again on the first invocation.

Test config

Two behaviour changes in Vitest 5 reach vitest.config.ts:

  • Inline projects now extend the root config by default, so the SHARED spread each project carried is a duplicate of what they already inherit. Removed; the options move to the root test block. sequence was already at the root for the separate reason noted in the old comment, and stays there.
  • Glob-keyed coverage thresholds no longer inherit a top-level perFile. With no global metric thresholds in this config, the outer perFile reached nothing, so each glob entry now carries perFile: true itself.

Review

CI is the check that matters here — the lint, build, vitest and Playwright steps all run against the preview plugin build for the first time.

🤖 Generated with Claude Code

https://claude.ai/code/session_01G9YZoAViKnPNMejgYADysN

eve0415 and others added 5 commits September 6, 2026 16:05
Published 1.1.4 corrupts Vitest 5's module evaluator while rewriting `import.meta.url`, so no test file starts: cloudflare/workers-sdk#15500
Its preview build declares workspace siblings as URLs, so miniflare and wrangler are pinned back to what 1.1.4 resolves.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G9YZoAViKnPNMejgYADysN
Vitest 5 stopped cascading a top-level `perFile` into glob-keyed entries, and with no global metric thresholds the outer one no longer reaches anything.
Each glob now carries the per-file intent itself.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G9YZoAViKnPNMejgYADysN
Inline projects extend the root config by default in Vitest 5, so the spread that carried these into each project is now a duplicate of what they already inherit.
Verified by an assertion-free test failing under both the worker and source projects.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G9YZoAViKnPNMejgYADysN
Unscoped, they also rewrote the peer range of the repo's own wrangler and vite-plugin, so a later wrangler bump would have been silently pinned back.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G9YZoAViKnPNMejgYADysN
Copilot AI lite review requested due to automatic review settings September 6, 2026 07:53
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 6, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://chore-vitest-website.eve0415.workers.dev (commit 01bda87)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://f26332ff-website.eve0415.workers.dev 01bda87 2026-09-06T08:07:19.550Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://fce09569-website.eve0415.workers.dev 8ed374f 2026-09-06T07:53:29.956Z Visit the dashboard ↗

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The devcontainer still installs pnpm@11.21.0, which is inconsistent with the repo’s pinned pnpm@12.3.4 and likely to break pnpm install --frozen-lockfile with the updated lockfile.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Updates the repo’s tooling/dependencies to current versions and migrates the test setup to Vitest 5, including the config adjustments required by Vitest 5’s changed project/coverage behaviors and a temporary pin/override strategy for a Cloudflare Vitest plugin preview build.

Changes:

  • Bump Vitest + coverage provider, Playwright, Wrangler, oxlint/oxfmt/oxc, and other devDependencies; update pnpm version and lockfile accordingly.
  • Adjust vitest.config.ts for Vitest 5 config inheritance and per-glob perFile coverage threshold behavior.
  • Add workspace overrides to keep @cloudflare/vitest-plugin’s preview build usable under pnpm.
File summaries
File Description
vitest.config.ts Moves shared test options to the root test block and updates coverage threshold entries for Vitest 5 behavior changes.
pnpm-workspace.yaml Adds scoped overrides for @cloudflare/vitest-plugin transitive deps to avoid pkg.pr.new “exotic subdeps” issues.
pnpm-lock.yaml Refreshes the full dependency graph/lockfile for the version bumps and preview dependency source.
package.json Updates dependency pins, Node runtime pin (devEngines), and the pinned pnpm packageManager.
.devcontainer/devcontainer.json Updates the base image and GitHub CLI feature version for the devcontainer.
.devcontainer/devcontainer-lock.json Updates the devcontainer feature lock to match the new GitHub CLI feature version.
Review details
  • Files reviewed: 5/6 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .devcontainer/devcontainer.json Outdated
"name": "eve0415 website devcontainer",
"image": "mcr.microsoft.com/devcontainers/typescript-node:5.0.3-24-trixie",
"image": "mcr.microsoft.com/devcontainers/typescript-node:5.1.2-24-trixie",
"onCreateCommand": "npm install -g pnpm@11.21.0",
Comment thread package.json Outdated
eve0415 and others added 2 commits September 6, 2026 17:06
The base image installs pnpm globally already, so the pinned 11.21.0 only downgraded it in place before `packageManager` pulled it forward again.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G9YZoAViKnPNMejgYADysN
`engines.node` and `.node-version` were left behind by the runtime pin that moved with the dependencies.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G9YZoAViKnPNMejgYADysN
@eve0415
eve0415 merged commit 29cdf16 into main Sep 6, 2026
5 checks passed
@eve0415
eve0415 deleted the chore/vitest branch September 6, 2026 08:12
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