Repository navigation
Upgrade TypeScript to 7 - #305
Merged
Merged
Conversation
ts-node and karma-typescript, which relied on the TypeScript JS API, are gone, so the native TypeScript 7 compiler can be used for the build. - Set rootDir explicitly, now required. - Drop moduleResolution: node10 has been removed, and the default resolves undici-types for the ESM build. The emitted JavaScript is identical to TypeScript 5.1. The declaration files no longer start with /// <reference types="node" />, as TypeScript stopped synthesizing it in 5.5.
keichi
force-pushed
the
upgrade-typescript
branch
from
October 15, 2026 14:12
4c9cb4e to
2ad5a03
Compare
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.
Depends on #304. Base is
migrate-browser-tests-to-vitest; it will retarget tomasteronce #304 is merged.Summary
typescriptfrom 5.1 to 7. Nothing uses the TypeScript JS API anymore (ts-node and karma-typescript are gone), so the native compiler works fornpm run build.tsconfig.json:rootDir: "./lib"explicitly. TS 6+ requires it.moduleResolution: "node".node10has been removed, and the default resolution handlesundici-typesfor the ESM build.Output
.d.ts: the leading/// <reference types="node" />lines are gone. TypeScript stopped synthesizing them in 5.5. Consumers who referenceBuffertypes still need@types/node, as before.Testing
npm run buildpasses, and its output was diffed against TS 5.1.6.npm test: 166 passednpm run test:browser: 82 passed, 1 skippednpm run formatpasses