chore(deps): update dependency typescript to v7 - #145
Conversation
dawsontoth
left a comment
There was a problem hiding this comment.
Blocked: TypeScript 7 breaks npm run build
The ESM bundle still builds, but the declaration step crashes:
$ npm run build
ESM ⚡️ Build success in 45ms
node:internal/event_target:1118
TypeError: Cannot read properties of undefined (reading 'useCaseSensitiveFileNames')
at rollup-plugin-dts@6.1.1_..._typescript@5.7.3/.../rollup-plugin-dts.cjs
at .../node_modules/tsup/dist/rollup.js:4857:37
tsup 8.5.1 generates --dts output through a bundled rollup-plugin-dts@6.1.1, which drives the TS compiler API directly. TS 7.0 (the native port) reshaped that API surface, so the plugin gets an undefined host back.
Isolated to typescript alone — on this exact branch head (3ba23105), with every other dependency untouched and only typescript reverted:
| typescript | npm run build |
|---|---|
| 7.0.2 (this PR) | ✗ TypeError: ... useCaseSensitiveFileNames |
| 6.0.3 (main) | ✓ DTS ⚡️ Build success in 2300ms |
Why CI is green
There is no build job. The checks on this PR are Format, Lint, Test (Node 24), commitlint, renovate/stability-days — nothing runs tsup. Since prepublishOnly is npm run build, this would surface at publish time, breaking a release rather than a PR.
Lint and Format do pass on TS 7 (oxlint/dprint don't use the TS compiler), so those greens aren't evidence either way.
Path forward
Hold until tsup ships a rollup-plugin-dts that supports TS 7 (upstream tracking: rollup-plugin-dts needs a TS 7 compatible release; tsup then needs to pick it up). Nothing to change in this repo. Note the shipped JS output is unaffected — it's only declaration generation — so if the .d.ts files ever became optional this could be revisited, but exports currently ships dist/index.d.ts.
Suggest a Renovate hold on typescript majors for this repo until then, so this doesn't get re-proposed each cycle.
Tracking update (2026-08-13) — still blocked, but the upstream blocker has narrowedRe-verified against head
|
| ESM bundle | DTS | |
|---|---|---|
main (typescript 6.0.3) |
✓ | ✓ DTS Build success in 1057ms |
| this PR (typescript 7.0.2) | ✓ Build success in 33ms |
✗ TypeError: ... useCaseSensitiveFileNames |
npm ci is clean on this branch (the lockfile still carries the react-native subtree, unlike #141).
On generating declarations without tsup
I tried the obvious escape hatch — tsc -p tsconfig.json --declaration --emitDeclarationOnly — and TS 7.0.2 does emit the .d.ts files. It is not a drop-in swap, though: it also reports pre-existing type errors that the current tsup --dts path never surfaces (15 on main under TS 6.0.3, 18 on this branch under TS 7.0.2). So that route means fixing a backlog first, and it's a build-system change well outside a dependency bump. Noting it only as a data point, not a proposal — keeping this in draft until tsup updates remains the right call.
My earlier suggestion still stands: a Renovate hold on typescript majors for this repo would stop this being re-proposed each cycle. 🤖
d0ea465 to
2e144ce
Compare
Tracking update (2026-08-18) — still blocked; CI now catches it on its ownRe-verified against head The build still fails identicallyNode 24.19.0 / npm 11.17.0, clean tree. Same signature as 08-11 and 08-13: the ESM bundle builds, declaration generation dies inside the Isolation re-run in place at this exact head, changing nothing but the compiler:
🆕 CI is no longer blind to thisMy 08-13 note said this class of breakage couldn't be seen by CI and would only surface at publish time via Upstream watch item: no movementThe blocker is
Leaving as draft with changes requested. The escape hatch I evaluated on 08-13 — swapping |
2e144ce to
ca004b0
Compare
Tracking update (2026-08-26) — still blocked; added a baseline proof and ruled out the one workaroundRe-verified against head
The JS bundle builds fine; it's only the Two things I hadn't established before1. Clean baseline — the failure is attributable to
Same tsup, same rollup, same Node. Only the TS major differs. 2. But it fails on Upstream hasn't moved
So the blocker is entirely "tsup needs to cut a release that vendors a TS7-capable dts plugin," and there's no sign of one. Why this can't be merged green-ish
Nothing to do on our side. Leaving this open as the tracker; it needs a tsup release. |
Still blocked — and correcting my own forecast: TS 7.1 is not the unblockNo change in disposition ( TS 7.1 dev builds now exist — and they change nothing here
The ESM bundle builds fine in all three; only declaration generation dies. Failure frame is unchanged: Why 7.1 was never going to fix itI'd been carrying the assumption that TS 7.0 "ships no JS API" and 7.1 restores one. The first half is misleading and the second half is wrong. Comparing the two packages' ".": "./lib/version.cjs",
"./unstable/sync": "./dist/api/sync/api.js",
"./unstable/async": "./dist/api/async/api.js",
"./unstable/ast": "./dist/ast/index.js",
...So:
The gate is therefore a tool-side rewrite against What to actually watchWatch Previously ruled out and still ruled out: Holding at changes-requested. Nothing for Renovate to fix — this needs an upstream |
This PR contains the following updates:
^6.0.0→^7.0.0Release Notes
microsoft/TypeScript (typescript)
v7.0.2Compare Source
Configuration
📅 Schedule: (in timezone America/New_York)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.