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 |
e047408 to
1228858
Compare
Tracking update (2026-09-04) — still blocked; the force-push changed nothingThis branch was rebased today ( Note the vendored path: Watch condition re-verified today
Upstream tsup still has this open and unaddressed: egoist/tsup#1405 (last activity 2026-07-14) and #1408 (2026-07-30). Disposition: unchanged — hold as draft, Reusable oracle if anyone wants to re-test: on this branch, |
1228858 to
98af85e
Compare
Head-move re-anchor (2026-09-11) — nothing changedRenovate rebased to
Confirmed the vendored path directly this time — grepping Watch condition, re-checked against the registry today:
Disposition: unchanged — hold as draft, Incidental, noted while I was here: this branch's lockfile is healthy — 1669 keys, all 28 🤖 Verified locally at |
98af85e to
37f3d2a
Compare
tsup 8.5.1 inlines its own `rollup-plugin-dts@6.1.1` compiled against `typescript@5.7.3`, and that vendored copy throws on TypeScript 7: TypeError: Cannot read properties of undefined (reading 'useCaseSensitiveFileNames') Nothing in our lockfile reaches it, so no `overrides` can fix it, and tsup has not published since 2025-11-12 - ~10 months, with 8.5.1 the only dist-tag. That is what blocks #145. tsdown is the rolldown-based successor from the same ecosystem, last published 2026-09-03. It emits declarations through TypeScript itself (`Emit types with typescript@7.0.2`) rather than a pinned copy of rollup-plugin-dts, which is structurally why it is not exposed to this class of breakage. While here: the declarations we were already building were unreachable. package.json had no `types` field and no `types` condition in `exports`, so no TypeScript consumer could resolve them. Added both, so the emit we are paying for is now usable. Config notes: - `outExtensions` pins .js. tsdown defaults to .mjs, which would break `bin` (./dist/cli.js) and `exports` (./dist/index.js). - dist gains .map files tsup did not emit, because tsdown forces sourcemaps on whenever tsconfig sets `declarationMap`, which ours does. They are not published - `files` already excludes `dist/**/*.map`. Verified with `npm pack --dry-run`. Verified: build succeeds on typescript 6.0.3 and 7.0.2, the built CLI runs (`node ./dist/cli.js --help`), and the packed tarball contains cli.js, index.js, both .d.ts files and schema.graphql with no maps. Lint, format and 53 files / 345 tests pass. Bundle is slightly smaller (94 kB vs 105 kB). Alternative to the --dts drop on build/drop-unused-dts - that branch unblocks TS 7 by removing declaration emit entirely. Pick one, not both.
tsup 8.5.1 inlines its own `rollup-plugin-dts@6.1.1` compiled against `typescript@5.7.3`, and that vendored copy throws on TypeScript 7: TypeError: Cannot read properties of undefined (reading 'useCaseSensitiveFileNames') Nothing in our lockfile reaches it, so no `overrides` can fix it, and tsup has not published since 2025-11-12 - ~10 months, with 8.5.1 the only dist-tag. That is what blocks #145. tsdown is the rolldown-based successor from the same ecosystem, last published 2026-09-03. It emits declarations through TypeScript itself (`Emit types with typescript@7.0.2`) rather than a pinned copy of rollup-plugin-dts, which is structurally why it is not exposed to this class of breakage. While here: the declarations we were already building were unreachable. package.json had no `types` field and no `types` condition in `exports`, so no TypeScript consumer could resolve them. Added both, so the emit we are paying for is now usable. Config notes: - `outExtensions` pins .js. tsdown defaults to .mjs, which would break `bin` (./dist/cli.js) and `exports` (./dist/index.js). - dist gains .map files tsup did not emit, because tsdown forces sourcemaps on whenever tsconfig sets `declarationMap`, which ours does. They are not published - `files` already excludes `dist/**/*.map`. Verified with `npm pack --dry-run`. Verified: build succeeds on typescript 6.0.3 and 7.0.2, the built CLI runs (`node ./dist/cli.js --help`), and the packed tarball contains cli.js, index.js, both .d.ts files and schema.graphql with no maps. Lint, format and 53 files / 345 tests pass. Bundle is slightly smaller (94 kB vs 105 kB). Alternative to the --dts drop on build/drop-unused-dts - that branch unblocks TS 7 by removing declaration emit entirely. Pick one, not both.
37f3d2a to
7f962ef
Compare
Unblocked — the tsup blocker is gone#167 merged ( Verified locally by merging current The build emits My What's needed to land this
🤖 Verified locally at |
Blocker resolved: #167 replaced tsup with tsdown, and the TS 7 build now passes locally on this branch merged with main (build, typecheck, lint, format, 345 tests all green). Dismissing so this is not held shut by a stale review.
7f962ef to
97cfdc6
Compare
|
🎉 This PR is included in version 0.16.57 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.