Skip to content

chore: Upgrade TypeScript to 7.0 and enable isolatedDeclarations - #990

Merged
armandabric merged 2 commits into
masterfrom
typescript-7
Oct 18, 2026
Merged

armandabric merged 2 commits into
masterfrom
typescript-7

Conversation

@armandabric

@armandabric armandabric commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Upgrades typescript from 6.0.3 to 7.0.2 and enables isolatedDeclarations.

TypeScript 7.0

TypeScript 7.0 has no stable JS API. Without isolatedDeclarations, tsdown (through rolldown-plugin-dts) would generate the declarations by running the tsgo binary, with a "TypeScript 7.0 does not yet have a stable API" warning. Also, rolldown-plugin-dts only supports ~7.0.0, so a 7.1 bump would break the build.

No tsconfig change is needed for TypeScript 7.

isolatedDeclarations

With isolatedDeclarations, tsdown generates dist/index.d.ts with Oxc instead of TypeScript. The build no longer depends on the TypeScript API or the tsgo binary: no warning, future TypeScript upgrades can't break it, and the declarations are generated faster. tsc still enforces the rule, so code that Oxc can't handle is reported by pnpm run typecheck and in the editor.

Changes:

  • createPropFilter: explicit return type.
  • defaultOptions: typed as Options.
  • tsdown.config.ts / vitest.config.ts: the default export is a typed constant, because these files are part of the tsconfig and isolatedDeclarations can't infer default exports.

dist/index.js and dist/index.d.ts are byte-identical to the current build.

Checks

  • pnpm run typecheck
  • pnpm run test (215 tests)
  • pnpm run build (attw and publint pass, declarations generated by Oxc, no warning)
  • pnpm run lint / pnpm run format

🤖 Generated with Claude Code

With TypeScript 7.0, tsdown generates the declarations with the tsgo
binary instead of the TypeScript API. The build output is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: dd03aeb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

TIP This summary will be updated as you push new changes.

@armandabric armandabric mentioned this pull request Oct 18, 2026
4 tasks done
With isolatedDeclarations, tsdown generates the declarations with Oxc
instead of TypeScript, so the build no longer depends on the TypeScript
API or the tsgo binary. The generated declarations are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@armandabric armandabric changed the title chore: Upgrade TypeScript to 7.0 chore: Upgrade TypeScript to 7.0 and enable isolatedDeclarations Oct 18, 2026
@armandabric
armandabric merged commit 289d95c into master Oct 18, 2026
4 checks passed
@armandabric
armandabric deleted the typescript-7 branch October 18, 2026 07:48
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.

1 participant