Repository navigation
fix(ui): run TypeScript 6 API side-by-side with 7 for openapi-ts - #41
Merged
Merged
Conversation
TypeScript 7 no longer ships the JS compiler API, so @hey-api/openapi-ts 0.99.0 crashes at import and `make api` fails. Alias `typescript` to the @typescript/typescript6 compatibility package for API consumers and keep 7 as @typescript/native, which still provides `tsc`. Drop the aliases once hey-api ships a stable release that works with TypeScript 7: hey-api/hey-api#4235 Co-Authored-By: Claude Fable 5.2 <[email protected]>
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.
Problem
make apifails at thegeneratestep withTypeError: Cannot read properties of undefined (reading 'AnyKeyword'). #38 bumpedtypescriptto 7.0.2, which no longer ships the JS compiler API that@hey-api/openapi-ts0.99.0 needs. Its peer range lets 7 through, so pnpm did not complain.Fix
Microsoft's documented side-by-side setup, in
web/ui/package.json:typescript→npm:@typescript/[email protected](the 6.x API, for openapi-ts and other API consumers)@typescript/native→npm:[email protected](still providestsc, sobuildandtypecheckstay on 7)The fix upstream exists only on a
0.0.0-next-*prerelease (hey-api/hey-api#4235), which is a rewrite and sorts below every stable release, so it is not used here. Drop the aliases once a stable release works with TypeScript 7.Verification
generaterun clean;web/api/openapi.jsonandweb/ui/src/apiare unchangedtsc --versionreports 7.0.2pnpm build(vite +tsc -b) completes; 267 UI tests passRun with pnpm 10.34.9 via
npxon Node 26, not throughcorepack, somake apiitself has not been run end to end.🤖 Generated with Claude Code