feat: migrate to Vite+ - #103
Merged
Merged
Conversation
Run `vp migrate` and follow up so the whole toolchain is green: - scripts now call vp (vp dev / vp build / vp test run); prepare runs vp config before void prepare - vite, vitest and vite-plus resolve through the pnpm catalog with overrides pinning vite to @voidzero-dev/vite-plus-core - config and test imports rewritten to vite-plus / vite-plus/test; vite.config.ts gains fmt, lint (type-aware + type-check) and staged blocks, with fmt set to the repo's single-quote, no-semicolon style - nested tsconfig.json shims for .github/actions/publish-preview and test/action so vp check's type-aware pass resolves Node types there (tsgolint only discovers tsconfig.json, not tsconfig.action.json; the tsc-based typecheck script is unchanged) - interpolate caught errors via String(err) and narrow fetch-mock URL arguments, fixing the restrict-template-expressions and no-base-to-string warnings - compare the gzip MTIME bytes as a plain array: the Vitest bundled in vite-plus no longer treats a Uint8Array as toEqual a plain array (standalone vitest 4.1.10 still does) - rebuild the committed publish-action bundle from the changed source - oxfmt formatting pass across the tree; pre-commit hook runs vp staged Validated with vp check, vp test run (215 passing), vp build, pnpm typecheck and pnpm build:action. Closes #16
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
vp check's type-aware pass (tsgolint on TypeScript 7, the same compiler generation as the repo's typescript ^7.0.0) already covers both tsconfig projects through the nested shims, so the separate tsc pass is redundant. Add a check script wrapping vp check, point CI and the docs at it, and drop typecheck. CI now also gates formatting and linting, which it never did before. tsconfig.action.json stays: the shims extend it.
Replace pnpm/action-setup + setup-node + pnpm install in all four workflows with voidzero-dev/setup-vp (pinned to v1.17.0), which installs vp at the version resolved from the pnpm catalog, Node.js 24, the pnpm pinned in devEngines, and the project dependencies, with lockfile-keyed caching. Steps invoke vp directly: vp check, vp test run, and vp run for package.json scripts (build:action, deploy:staging, deploy:only), since pnpm is no longer put on PATH by an action. The pnpm version previously duplicated in the workflows now has devEngines as its single source.
CI calls vp check directly since the setup-vp switch, and vp check is a built-in that scripts cannot shadow, so the pnpm bridge script has no callers left. Point the README and self-hosting commands at vp.
The preset brings GitHub Actions digest pinning, weekly scheduling with automerge, a 3-day minimumReleaseAge for npm and Actions updates, and a vite+ fast lane that proposes vite-plus and @voidzero-dev/vite-plus-* bumps immediately. Drop the now-redundant top-level minimumReleaseAge and exclude the fast-lane packages from pnpm's release-age cooldown so their bumps pass the frozen-lockfile install in CI. The repo-specific needs-bundle-rebuild rule stays.
vitest already picks the mode from the environment: watch in a local terminal, single run in CI and non-interactive shells. With scripts.test on plain vp test, test:watch duplicated it, so it is removed.
vp resolves the runtime from devEngines.runtime (vp env pin wrote it), so the workflows no longer pass node-version to setup-vp and package.json is the single source for both the runtime and the package manager.
pnpm 11 tracks devEngines.runtime as a lockfile entry, so the frozen install in CI rejects the pin without it.
fengmk2
commented
Aug 16, 2026
Per review: vite@8 and vitest@4 keep the catalog alias from applying to a future major pulled in transitively.
Per review: alias every version, not only the current major.
Apply the outstanding dedupe (peer-suffix duplicates of @cloudflare/vitest-pool-workers, void and better-auth) so the gate starts green. Renovate PRs stay deduped through the shared preset's pnpmDedupe post-update option.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates the toolchain to Vite+ via
vp migrate, with follow-ups so every check is green.vp(vp dev/vp build/vp test/vp check);preparerunsvp configbeforevoid prepare. vite, vitest and vite-plus resolve through the pnpm catalog, with overrides pinningviteto@voidzero-dev/vite-plus-core@0.2.9.vite-plus/vite-plus/test; thecloudflareTestworkers-pool setup is unchanged.vite.config.tsgainsfmt,lint(type-aware + type-check) andstagedblocks, withfmtset to the repo's single-quote, no-semicolon style, then onevp check --fixpass over the tree.tsconfig.jsonshims in.github/actions/publish-preview/andtest/action/letvp check's type-aware pass resolve Node types there (tsgolint only discoverstsconfig.json, not the custom-namedtsconfig.action.jsonthey extend).typecheckscript is replaced byvp check: tsgolint runs the same TypeScript 7 generation as the repo'stypescript@^7.0.0and covers both projects, so CI now gates formatting and linting too.tsconfig.action.jsonstays as the shared config the shims extend.voidzero-dev/setup-vp(pinned to v1.17.0) instead of pnpm/action-setup + setup-node +pnpm install: it installs vp at the catalog-resolved version, the devEngines-pinned Node.js (24.19.0, viavp env pin, tracked in the lockfile) and pnpm, and dependencies, with lockfile-keyed caching. Steps invokevp check/vp test/vp run <script>directly.github>Boshen/renovatepreset (Actions digest pinning, weekly schedule with automerge, 3-day release age for npm and Actions, immediate vite+ bumps); the redundant top-levelminimumReleaseAgeis dropped and the vite+ packages are excluded from pnpm's release-age cooldown so fast-lane bumps pass the frozen install.String(err)and the test fetch mocks narrowRequestInfo | URLprecisely, clearing the type-aware lint warnings. The committed publish-action bundle is rebuilt from the changed source.Uint8ArrayastoEquala plain array, while standalonevitest@4.1.10does; the gzip-MTIME assertion now compares viaArray.from.Validated with
vp check(clean),vp test(215 passing),vp buildandpnpm build:action; re-runningvp migrateproduces no diff. CI (check + test, staging deploy + smoke) is green on the setup-vp path.Closes #16