mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-19 06:34:43 +01:00
Pre-push test selection finds tests in monorepo apps that use their own @/ alias (#4464)
/ship's pre-push test selection now finds the tests of a monorepo app that imports through its own `@/` alias (for example `apps/mobile` mapping `@/*` to `./src/*`). Why: only the root tsconfig was read, so every touched file in such an app failed with `PREGATE_NO_LANE` even with a test beside it. Rebuilt from #4462 by @dtoelke, who found and fixed it; thank you. Nothing to do: a repo whose only tsconfig is at the root (gstack itself) resolves exactly as before. Co-authored-by: stackpt-agent <348614618+stackpt-agent@users.noreply.github.com> Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: p1/specialist-batched#1 reader=testing Review-Finding: p2v/outside-voice#1 reader=outside-voice
This commit is contained in:
4 files changed
+143
-11
No files matched your search
@@ -353,6 +353,15 @@ Two stages with separate clocks, both printed:
|
||||
modified file whose only test the branch deleted still has no lane, and a
|
||||
remaining test that reads a deleted file or directory is selected. /review
|
||||
lists a deleted test as a gate edit (RH-1) either way.
|
||||
A JS/TS file's `paths` aliases and `baseUrl` come from the nearest
|
||||
tsconfig.json (else jsconfig.json) above it that declares `paths` or
|
||||
`baseUrl`, itself or through a relative `extends` chain inside the
|
||||
repository (up to four hops), joined relative to the config that declares
|
||||
them. A nested config that declares neither defers to the next one up, and
|
||||
the repository root's config governs the rest, so `@/x` in
|
||||
`apps/mobile/src/a.test.ts` resolves through `apps/mobile/tsconfig.json`.
|
||||
A package-name `extends` or one that leaves the repository is not followed
|
||||
and is named in the no-lane explanation.
|
||||
An extensionless JS/TS import (relative, a tsconfig/jsconfig `paths` alias or
|
||||
`baseUrl`) tries the exact path, then `.ts`, `.tsx`, `.js`, `.jsx`, `.mjs`,
|
||||
`.cjs`, `.mts`, `.cts`, then `index.ts`, `index.tsx`, `index.js`, `index.jsx`
|
||||
|
||||
Reference in new issue
Block a user