Skip to content

chore: update to cf 1.0 RC, Vite+ 1.9, pnpm 12 and the Cloudflare Vitest plugin - #2

Merged
ascorbic merged 1 commit into
mainfrom
matt/dazzling-goldberg-oei44z
Dec 4, 2026
Merged

ascorbic merged 1 commit into
mainfrom
matt/dazzling-goldberg-oei44z

Conversation

@ascorbic

@ascorbic ascorbic commented Dec 4, 2026

Copy link
Copy Markdown
Owner

Brings the template in line with what cf init (1.0.0-rc.7) now scaffolds, and updates everything to the latest releases.

Versions

  • cf 1.0.0-rc.7, @cloudflare/vite-plugin 2.0.0-rc.9, vite-plus 1.9.0, pnpm 12.26.0
  • Vite+ now versions its core separately: vite is npm:@voidzero-dev/vite-plus-core@8.4.0, and Vitest is 5.1.2. Both are pinned as dev dependencies and as pnpm-workspace.yaml overrides, as cf init does
  • Node engines uses the same supported ranges as cf

Setup

  • Scripts: dev, build and deploy run cf dev, cf build and cf deploy, which delegate to vp. cf deploy builds first, so the Workers Builds deploy command stays pnpm run deploy
  • Tests run inside workerd with @cloudflare/vitest-plugin (cloudflareTest({ config: true }) in a new vitest.config.ts), reading the Worker, bindings and compatibility settings from cloudflare.config.ts. This removes test/harness.ts, test/global-setup.ts, compatibility.ts, test/tsconfig.json and the direct miniflare pin
  • Worker: the greeting is a bindings.text() binding read via env from cloudflare:workers; compatibility date 2026-12-01
  • allowBuilds replaces onlyBuiltDependencies; tsconfig.json follows the scaffold (es2024, module: "preserve") and covers test/
  • .gitignore no longer ignores .env.example / .dev.vars.example

GitHub Actions

  • actions/checkout v7, setup-vp v1.22.0, sticky-pull-request-comment v3.0.5
  • claude.yml: claude-code-action@beta → @v1 (allowed_tools → claude_args: --allowedTools …, timeout_minutes → job-level timeout-minutes), and installs with setup-vp

Notes

  • pnpm 12 holds back releases under a day old, so pnpm-workspace.yaml has minimumReleaseAgeExclude entries for yesterday's Cloudflare releases. They can be removed once those age
  • cf rc.7 pins an older Miniflare than the plugins, so two workerd versions are installed for now. Dev, build and tests use the plugins' newer one

Testing

On a clean pnpm install --frozen-lockfile: pnpm check and pnpm test (2/2) pass; pnpm build and pnpm dev work (/ and /api/hello served). pnpm deploy and the workflow changes have not been run.


Generated by Claude Code

…est plugin

Align the template with what `cf init` now scaffolds:

- cf 1.0.0-rc.7, @cloudflare/vite-plugin 2.0.0-rc.9, vite-plus 1.9.0
  (Vite+ core 8.4.0, Vitest 5.1.2), pnpm 12
- `cf dev`, `cf build` and `cf deploy` now delegate to Vite+, so scripts
  use them directly
- Tests run inside workerd via @cloudflare/vitest-plugin with
  `cloudflareTest({ config: true })`, reading cloudflare.config.ts. This
  removes the Miniflare harness, global build step and compatibility.ts
- The greeting is a text binding read via `env` from cloudflare:workers
- `allowBuilds` replaces `onlyBuiltDependencies`; tsconfig follows the
  scaffold (es2024, module preserve) and covers test/
- Bump GitHub Actions; claude-code-action moves from @beta to @v1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LZ7qcSerar8pyiBVvXt1Mt
@ascorbic
ascorbic merged commit 1e57fe7 into main Dec 4, 2026
1 check passed
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