Repository navigation
build: install with pnpm and check, lint, format and run tasks with Vite+ - #753
Conversation
…ite+ - pnpm-workspace.yaml and pnpm-lock.yaml replace bun.lock and bunfig.toml. - vite-plus 1.4.0 (Vitest 5.0.5): one root vite.config.ts for lint, format and staged files; vp check replaces per-package oxlint and oxfmt, and tsgolint replaces tsrslint. - Vite Task replaces Turborepo: each package's typecheck and test tasks (packages/config/src/tasks.ts), cached by the files they read. - .vite-hooks and vp staged replace Husky and lint-staged. - CI sets up with setup-vp and caches the Vite Task cache per part. - The Container no longer preinstalls Bun (ADR-0004's fifth revision). - ADR-0055; ADR-0028 partly superseded.
- no-module-mocking also matches vi from vite-plus/test. - The test cache keys MODEL_PROXY_API_KEY and CHANGES_BENCH too. - pnpm refuses workspace cycles; ws pin documented. - The deploy job uses the setup action without a cache. - Docs: apps/web's vite-plus, sandbox-image's uncached test, allowBuilds.
|
Review report for head
Dismissed (advisory, reasons in the PR body → Decisions/Review): the three GNU probes stay separate; the version pins repeat across files; the identical per-package |
|
Review report for head |
Preview deployedURL: https://cloudpid-server-pr-753.ian-g-pascoe.workers.dev Built from 345d4a2 (stage This comment updates on each push. |
vp lint runs the bin/tsgolint of its own oxlint-tsgolint, so a pnpm override makes that package tools/tsrslint-shim, which runs @maschwenk/tsrslint's binary. A whole-repo vp lint takes 9-10 s and 2 GB at most, against 16 s and 3.6 GB on Vite+'s tsgolint.
tsrs 0.21 ships tsgolint's port as tsrs-lint, so the shim loads the tsrs package's linter in place of @maschwenk/tsrslint. A whole-repo vp lint takes 7-8 s and 1 GB at most.
npm: effect 4.1.4, pi 1.5.2 (chord's root foundations move to /context, /delta and /json), alchemy beta.86, @cloudflare/vitest-plugin 1.8.0 (workerd 1.20261110), isomorphic-git 1.44.13, @effect/tsgo 0.68.1, tsrs 0.25, and the rest; patches ported. Image: mise v2026.11.7, ubuntu:26.04's current digest, git 2.56.1, gh 2.104.0, Node 26.13.1, pnpm 12.18.0, uv 0.13.8.
The remount patch is ported unchanged; computer's change-log tables, sync span names and computerd's FUSE driver are as in 0.9.0. Records that the Vitest 5.1 hold still fails with vite-plus 1.6 and @cloudflare/vitest-plugin 1.8.
Summary
The repo moves from Bun and Turborepo to pnpm and Vite+ (ADR-0055). The Container stops preinstalling Bun (ADR-0004's fifth revision).
Dependency updates
Everything moved to its latest version that pnpm's day-old minimum release age allows, except where noted.
@cloudflare/vitest-plugin1.8.0 (workerd 1.20261110), isomorphic-git 1.44.13,@effect/tsgo0.68.1, tsrs 0.25, and the unpinned rest.@cloudflare/computer0.11.1, not 0.11.2: 0.11.2 is under a day old.@cloudflare/vitest-pluginand computer are ported unchanged.retryDeploymentsReadin its place (First Preview deploy of a new PR stage fails with WorkerNotFound (needs 1–2 reruns) #615).Context,DraftandJsonValueoff its root, so imports now come from/context,/deltaand/json.claude-fable-5-2, so it joins the 400k context-window cap list (it was capped before, as a templated model). The test fixture's uncatalogued model is now Fable 5.3.ubuntu:26.04digest, git 2.56.1, gh 2.104.0, Node 26.13.1, pnpm 12.18.0 and uv 0.13.8.checkout@v7,cache@v6,setup-vp@v1.22.0).rolldownstays at alchemy's own pin, 1.2.16.Evidence
Before:
bun run checkpassed onmain(93ba45a).After (local, macOS):
pnpm exec vp check: no format, lint or type errors in 1,886 files.vp run -r typecheck: 16/16 packages.vp run -r test: 16/16 packages, every workerd project included.@cloudpid/web#build, and@cloudpid/server#startup(599 KiB, 47.8 ms).git-install:check: npm's production install of the root loads/cloudpid..vite-hooks/(vp staged, commitlint).Type-aware lint, whole-repo
vp lintwith type-check, two runs each, macOS arm64:tsrs-lint(this PR)A probe file still reports
typescript(TS2322)andno-floating-promises.Caching: a rerun of
vp run -r typecheckreplays all 16 tasks in 0.9 s. An edit topackages/protocol/src/index.tsreruns exactly the 9 tasks that read it.Decisions
testtask isvitest run, notvp test.vp runruns avp testinside thevpthat started it, with that copy's Vitest. A non-projectvp, such as mise'snpm:vite-plus, then gives@cloudflare/vitest-plugina second Vitest, and the workerd projects fail withreading 'config'.tsrs-lint(tsrs 0.24), instead of Vite+'s bundled tsgolint. Vite+ setsOXLINT_TSGOLINT_PATHitself, so a pnpm override pointsoxlint-tsgolintattools/tsrs-lint-shim, whosebin/tsgolint.jsruns thetsrspackage'stsrs-lintbin in-process.tsrshere is the linter only; the typecheck is stilleffect-tsgo tsrs.package.jsonon purpose. With one, theeffect-tsgo patchstep inpreparemistakes it for Vite+'soxlint-tsgolintand fails the install.effect-tsgo --tsrs-lint vp lint(@effect/tsgo0.68+) needs oxlint 1.91+, so a Vite+ past 1.4.0, which waits on the Vitest 5.1 workerd issue.hooks-serve.test.ts. oxlint 1.89 reports a falseno-invalid-fetch-optionsthere.--versionfor(GNU …).apps/sandbox-image'stestis uncached.dedupePeersand an exactwsoverride remove duplicate@cloudflare/computerandalchemycopies that failed typecheck.disallowWorkspaceCyclesmakes pnpm enforce the no-cycle property that mcp-apps.md had credited to Turborepo.apps/web/tsconfig.jsonregains itspathsfor React types. They were dropped by the Bun move, and the Container's global virtual store needs them again..bunscan exclusion,TURBO_CACHE_DIRand the**/.turboignore.no-module-mockingalso matchesviimported fromvite-plus/test.vp fmt --check.Review
Both axes passed (Standards and Spec, on head 76be304) after two fix rounds. Advisory findings left as is:
1.4.0and5.0.5pins repeat across files. dependencies.md says they move together.vite.config.tsfiles are identical, as AGENTS.md's "copy from a sibling" rule intends.Merge Danger
Door: two-way. A revert restores Bun, though every checkout would then need
bun installagain. Developers need to change one habit: run Vite+ aspnpm exec vpor throughpnpm run, never with mise'snpm:vite-plusvp.Blast Radius: tooling. This covers CI, hooks, deploy jobs and the Container image's toolchains.
vp lintfails loudly withError running tsgolint(dependencies.md has the check). On Windows Vite+ looks fortsgolint.exeor.cmd, so the shim doesn't run there; macOS, Linux, CI and the Container are covered. tsrs is pinned at 0.24 (0.25 was under pnpm's minimum release age). Removing the override andtsrsputs back Vite+'s tsgolint. The first prod and preview deploys after merge rebuild the web app once, because the WebBuild step's inputs changed (vite.config.tsand the lockfile).Plan
Migrate the repo to Vite+ with pnpm instead of Bun, with the owner's decisions:
vp run.vp check.vp stagedand.vite-hooks.vp migraterewrite Vitest imports tovite-plus/test.tsrs-lint(first a stacked follow-up, build: run Vite+'s type-aware lint on tsrs's own linter #754, then folded into this PR).