chore: use typescript 7 for the packages, keep 6 for the docs build - #4058
Merged
Conversation
typedoc needs the TypeScript JS API that the TS 7 native compiler does not expose, so the website keeps its own typescript ^6.0.0 pin; pnpm nests that copy under node_modules/typedoc while the packages compile with TS 7. oxlint-tsgolint moves to ^7.0.2001, which version-tracks TS 7. TS 7 also flags the private RequestList#initialize() call in request_list.test.ts, suppressed like the private-constructor call above it. Same change as apify/apify-sdk-js#695.
The runner imports typescript for its report parsing, which now resolves to the TS 7 native compiler without the JS API and crashed on every package (api-extractor itself is unaffected: it bundles its own TypeScript). A typescript-v6 npm alias keeps the runner on the classic API. The regenerated reports pick up TS 7's single-quoted string literal types in three packages.
barjin
approved these changes
Aug 20, 2026
| "turbo": "^2.10.11", | ||
| "typescript": "^6.0.0", | ||
| "typescript": "^7.0.2", | ||
| "typescript-v6": "npm:typescript@^6.0.0", |
Member
There was a problem hiding this comment.
TIL you can do this with package.json versions, cool
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.
Bumps typescript to
^7.0.2(native compiler) for building and type-aware linting, together withoxlint-tsgolint@^7.0.2001, which version-tracks TS 7.The docs build stays on TS 6: typedoc needs the TypeScript JS API, which the native compiler no longer exposes. The website keeps its own
typescript: ^6.0.0pin and pnpm nests that copy undernode_modules/typedoc, so typedoc resolves 6.x while the packages compile with TS 7.TS 7 also caught one real issue in the tests:
RequestList#initialize()is private, and the call inrequest_list.test.tsnow needs the same@ts-expect-errorthe surrounding test already uses for the private constructor.The api-extractor runner script also imports
typescriptfor its report parsing; that import now goes through atypescript-v6alias (npm:typescript@^6.0.0), since the parsing needs the classic JS API (api-extractor itself bundles its own TypeScript and is unaffected). The regenerated reports indocs/public-api/pick up TS 7's single-quoted string literal types in three packages, 4 lines total.Same change as apify/apify-sdk-js#695. Build, docs build, type-aware lint, test typecheck and the unit suite all pass.