Skip to content

ci: cap TS matrix at 6 and build before swapping TS version - #6312

Open
deepshekhardas wants to merge 1 commit into
colinhacks:mainfrom
deepshekhardas:fix/ci-ts7-zshy-complete
Open

ci: cap TS matrix at 6 and build before swapping TS version#6312
deepshekhardas wants to merge 1 commit into
colinhacks:mainfrom
deepshekhardas:fix/ci-ts7-zshy-complete

Conversation

@deepshekhardas

Copy link
Copy Markdown

Fixes #6185.

Every CI run of \ est.yml\ fails at \pnpm build\ since TypeScript 7.0.2 became npm's \latest\ (2026-07-08). \ ypescript@latest\ now resolves to the Go-native compiler, which no longer ships \ s.sys\ — and \zshy\ (used by \packages/zod\ and @zod/resolution) reads tsconfigs through \ s.sys.readFile, crashing with:

Build failed: TypeError: Cannot read properties of undefined (reading 'readFile')

Both matrix jobs go red for this one root cause (the 5.5 job is only cancelled by matrix fail-fast).

Two changes:

  • Move \pnpm build\ above \pnpm add typescript@… -w\ so the repo-pinned TypeScript always runs the build; the matrix TS then applies only to the test/typecheck phase.
  • Cap the matrix at TypeScript 6 (\5.5\ and \6) instead of \latest. TS 6 still ships the JS compiler API, so zshy builds and @zod/resolution's own zshy build both pass. This keeps broader coverage than pinning at 5, and the matrix can resume tracking \latest\ once zshy supports TS 7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: pnpm build fails on every PR since TypeScript 7.0.2 became latest (zshy crash)

1 participant