Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .pi/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"formatter": {
"formatters": {
"oxfmt": {
"command": "pnpm",
"args": ["exec", "vp", "fmt", "--no-error-on-unmatched-pattern", "$FILE"],
"files": {
"extensions": [
".js",
".jsx",
".ts",
".tsx",
".mjs",
".cjs",
".mts",
".cts",
".json",
".jsonc",
".md",
".yml",
".yaml",
".css"
]
},
"rootMarkers": ["pnpm-workspace.yaml"],
"requireRootMarker": true
}
}
},
"lsp": {
"servers": {
"typescript": {
"command": "pnpm",
"args": ["exec", "effect-tsgo", "tsrs", "--lsp", "--stdio"],
"languages": [
{ "extensions": [".ts", ".mts", ".cts"], "languageId": "typescript" },
{ "extensions": [".tsx"], "languageId": "typescriptreact" }
],
"rootMarkers": ["tsconfig.json"],
"workspaceRootMarkers": ["pnpm-workspace.yaml"],
"requireRootMarker": true
},
"oxlint": {
"command": "pnpm",
"args": ["exec", "vp", "lint", "--lsp"],
"languages": [
{ "extensions": [".js", ".mjs", ".cjs"], "languageId": "javascript" },
{ "extensions": [".jsx"], "languageId": "javascriptreact" },
{ "extensions": [".ts", ".mts", ".cts"], "languageId": "typescript" },
{ "extensions": [".tsx"], "languageId": "typescriptreact" }
],
"rootMarkers": ["pnpm-workspace.yaml"],
"requireRootMarker": true
}
}
}
}
3 changes: 2 additions & 1 deletion docs/adr/0055-vite-plus-and-pnpm.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ Measured on an 8-core Apple Silicon laptop (2026-11-12), warm caches:

## Consequences

- The type-aware lint runs on tsrs's own linter (`tsrs-lint`, `tsrs --lint`, since tsrs 0.21: tsgolint's headless protocol and its 61 type-aware rules), which replaces tsrslint, its predecessor outside tsrs. Vite+ sets `OXLINT_TSGOLINT_PATH` to the `bin/tsgolint` of its own `oxlint-tsgolint` and ignores `node_modules/.bin`, so `scripts/link-tsrslint.sh` is gone, and a pnpm override makes `oxlint-tsgolint` the repo's `tools/tsrs-lint-shim`, whose `bin/tsgolint.js` loads the root `tsrs` package's `tsrs-lint`. It rests on where Vite+ looks for its backend (docs/development/dependencies.md says what to check on an upgrade). The shim has no `package.json`, or `effect-tsgo patch` finds it as Vite+'s `oxlint-tsgolint` and fails `prepare` looking for tsgolint's platform binary. The `tsrs` package is the linter only: `effect-tsgo tsrs` typechecks with the Effect-patched tsrs that `@effect/tsgo` ships. It goes once `effect-tsgo --tsrs-lint vp lint` (`@effect/tsgo` 0.68 and later: Vite+'s lint on the Effect-patched tsrs, with the Effect rules, and no shim) can run, which needs oxlint 1.91 or later, so a Vite+ past 1.4.0 (`Versions`). The shim does not run on Windows, where Vite+ looks for `tsgolint.exe` or `tsgolint.cmd` in `.bin`, not the `.js` the shim is; tsrs itself ships for macOS, Linux (glibc and musl) and Windows.
- The type-aware lint runs on tsrs's own linter (`tsrs-lint`, `tsrs --lint`, since tsrs 0.21: tsgolint's headless protocol and its 61 type-aware rules), which replaces tsrslint, its predecessor outside tsrs. Vite+ sets `OXLINT_TSGOLINT_PATH` to the `bin/tsgolint` of its own `oxlint-tsgolint` and ignores `node_modules/.bin`, so `scripts/link-tsrslint.sh` is gone, and a pnpm override makes `oxlint-tsgolint` the repo's `tools/tsrs-lint-shim`, whose `bin/tsgolint.js` loads the root `tsrs` package's `tsrs-lint`. Vite+ fills that variable in only when it is unset, so the root `vite.config.ts` assigns it to the shim itself: a process that inherited another checkout's value, as Pi's agents and the language servers they start do, linted on that checkout's tsrs, and a stale value failed the lint. Every Vite+ entry point that lints (`vp lint`, `vp check`, `vp staged`, `vp lint --lsp`) loads that config first. It rests on where Vite+ looks for its backend (docs/development/dependencies.md says what to check on an upgrade). The shim has no `package.json`, or `effect-tsgo patch` finds it as Vite+'s `oxlint-tsgolint` and fails `prepare` looking for tsgolint's platform binary. The `tsrs` package is the linter only: `effect-tsgo tsrs` typechecks with the Effect-patched tsrs that `@effect/tsgo` ships. It goes once `effect-tsgo --tsrs-lint vp lint` (`@effect/tsgo` 0.68 and later: Vite+'s lint on the Effect-patched tsrs, with the Effect rules, and no shim) can run, which needs oxlint 1.91 or later, so a Vite+ past 1.4.0 (`Versions`). The shim does not run on Windows, where oxlint cannot start the `.js` the variable names (and Vite+ itself looks for `tsgolint.exe` or `tsgolint.cmd` in `.bin`); tsrs itself ships for macOS, Linux (glibc and musl) and Windows.
- Pi's agents format with `pnpm exec vp fmt` and run two language servers from `.pi/settings.json`: `pnpm exec vp lint --lsp` (this lint, rooted at `pnpm-workspace.yaml`) and `pnpm exec effect-tsgo tsrs --lsp --stdio` (the typecheck's Effect-patched tsrs, one per package `tsconfig.json`). They replace the owner's global definitions, which look for `.oxlintrc.json` and `.oxfmtrc.json` and run a tsrs without the Effect diagnostics.
- Run the project's own `vp`: `pnpm exec vp`, the root scripts, or the standalone global CLI from vite.plus, which hands a command to the project's copy. mise's `npm:vite-plus` is a second copy of the whole toolchain.
- Turborepo's CI pruning is gone; the Vite Task cache is experimental in CI (Vite+'s docs say so) and is bounded by size instead.
- On macOS, Vite Task runs a cached task's system coreutils as uutils' to record what it reads. The tests that probe the host for GNU coreutils check `--version` for `(GNU coreutils)`, and `@cloudpid/sandbox-image`'s `test` is uncached, since its memory-guard tests fail under uutils. Linux is unaffected.
Expand Down
Loading
Loading