Skip to content

Commit c0c84cb

Browse files
dependabot[bot]jimmyandradecursoragent
authored
chore(deps-dev): bump typescript to 7.0.2 with typescript6 fallback (#803)
* chore(deps-dev): bump typescript from 5.9.3 to 7.0.2 Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.9.3 to 7.0.2. - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Commits](https://github.com/microsoft/TypeScript/commits) --- updated-dependencies: - dependency-name: typescript dependency-version: 7.0.2 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps-dev): add @typescript/typescript6 for TS 7 tooling unplugin-dts needs the TS 6 JS API package alongside typescript@7. Ignore it in Knip; document the failure mode in TROUBLESHOOTING. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jimmy Andrade <contato@jimmyandrade.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 2f160e0 commit c0c84cb

5 files changed

Lines changed: 576 additions & 36 deletions

File tree

TROUBLESHOOTING.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,3 +597,33 @@ Error: Cannot find package '@vitest/coverage-v8' imported from .../node_modules/
597597

598598
4. Re-run `npm test`.
599599

600+
---
601+
602+
## TypeScript 7+ breaks Vite/`unplugin-dts` build without `@typescript/typescript6`
603+
604+
### What error appeared
605+
606+
`npm run build` (or Knip loading `vite.config.ts`) fails with:
607+
608+
```text
609+
[unplugin-dts] The installed "typescript" package does not provide the JavaScript Compiler API (this happens with TypeScript 7+), and the fallback "@typescript/typescript6" was not found.
610+
Please install it alongside TypeScript 7:
611+
npm install -D @typescript/typescript6
612+
```
613+
614+
### Why it usually happens
615+
616+
TypeScript 7+ no longer ships the JavaScript Compiler API that `unplugin-dts` (and similar Vite plugins) use. Tooling expects a companion package `@typescript/typescript6` for that API while `typescript` stays on 7+ for typechecking.
617+
618+
### Steps to try to resolve
619+
620+
1. Install the fallback next to TypeScript 7 in the affected workspace (for webfont: `packages/webfont`):
621+
622+
```shell
623+
npm install -D @typescript/typescript6 -w webfont
624+
```
625+
626+
2. Keep Knip from flagging it as unused (dynamic require from `unplugin-dts`) via `ignoreDependencies` in `packages/webfont/knip.json`.
627+
628+
3. Re-run `npm run build` / `npm test` / `npm run depcheck`.
629+

0 commit comments

Comments
 (0)