refactor: unify the toolchain on Vite+ (vp) - #33
Closed
ubugeeei wants to merge 1 commit into
Closed
Conversation
Replaces the split oxlint/vitest/vite setup with the Vite+ toolchain and moves tool configuration into `vite.config.ts`. Toolchain - Adds `vite-plus` (0.2.7); `vite` becomes a workspace catalog alias for @voidzero-dev/vite-plus-core, so plugins keep resolving `vite` as before. - Scripts call `vp lint` / `vp test` / `vp build`; pnpm still drives the recursive orchestration, so `pnpm lint`, `pnpm build` and `pnpm test` keep their meaning and CI needs no changes -- `vp` comes from node_modules/.bin. - `vitest` imports rewritten to `vite-plus/test`, `vitest/config` to `vite-plus`. No formatting changes: the repo is not oxfmt-clean, so `check.fmt` is false and `vp check` runs lint only. Configuration - `.oxlintrc.json` moves into the `lint` block of a new root `vite.config.ts`, rules and comments intact. `vp lint` reports the same 0 errors / 64 warnings. - Every `vitest*.config.ts` folds into its package's `vite.config.ts`. The two packages that ran two suites (workshop-backend, gatekeeper-scheduler) now use `test.projects` instead of a second config file and a second `vitest` call. TypeScript 7 - Most packages move to TypeScript 7. It has no JS compiler API -- the npm package exports `version` and nothing else -- so code that drives the API uses a `typescript-5` alias, and workshop-frontend/workshop-backend/ gatekeeper-scheduler stay on 5.9 (capnweb's recursive Stub types exceed tsgo's instantiation depth; capnweb-validate builds a ts.Program). - tsgo requires explicit `rootDir` under declaration emit and drops `baseUrl`. `baseUrl` is removed from 21 tsconfigs (their `paths` were already relative). The 17 packages that compile sibling-package sources get `noEmit: true` -- nothing consumes their `dist`, and AGENTS.md already describes `pnpm build` as a type check -- and the 5 that only compile their own `src` get `rootDir`. Known gap: `vp test` does not yet work for workshop-backend and gatekeeper-scheduler. Under Vite+ their @cloudflare/vitest-pool-workers suites fall back to Node's vm instead of workerd. Bumping the pool to 0.20.2 does not help. Every other package's tests pass, as do `pnpm build` and `pnpm lint`.
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
Contributor
|
Thanks for your interest and contribution! We have our own upgrade process in the works and are putting careful thought into introducing new dependencies |
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.
Replaces the split oxlint/vitest/vite setup with the Vite+ toolchain and moves tool configuration into
vite.config.ts.Toolchain
vite-plus(0.2.7);vitebecomes a workspace catalog alias for @voidzero-dev/vite-plus-core, so plugins keep resolvingviteas before.vp lint/vp test/vp build; pnpm still drives the recursive orchestration, sopnpm lint,pnpm buildandpnpm testkeep their meaning and CI needs no changes --vpcomes from node_modules/.bin.vitestimports rewritten tovite-plus/test,vitest/configtovite-plus. No formatting changes: the repo is not oxfmt-clean, socheck.fmtis false andvp checkruns lint only. Configuration.oxlintrc.jsonmoves into thelintblock of a new rootvite.config.ts, rules and comments intact.vp lintreports the same 0 errors / 64 warnings.vitest*.config.tsfolds into its package'svite.config.ts. The two packages that ran two suites (workshop-backend, gatekeeper-scheduler) now usetest.projectsinstead of a second config file and a secondvitestcall. TypeScript 7versionand nothing else -- so code that drives the API uses atypescript-5alias, and workshop-frontend/workshop-backend/ gatekeeper-scheduler stay on 5.9 (capnweb's recursive Stub types exceed tsgo's instantiation depth; capnweb-validate builds a ts.Program).rootDirunder declaration emit and dropsbaseUrl.baseUrlis removed from 21 tsconfigs (theirpathswere already relative). The 17 packages that compile sibling-package sources getnoEmit: true-- nothing consumes theirdist, and AGENTS.md already describespnpm buildas a type check -- and the 5 that only compile their ownsrcgetrootDir. Known gap:vp testdoes not yet work for workshop-backend and gatekeeper-scheduler. Under Vite+ their @cloudflare/vitest-pool-workers suites fall back to Node's vm instead of workerd. Bumping the pool to 0.20.2 does not help. Every other package's tests pass, as dopnpm buildandpnpm lint.