Skip to content

chore(renovate): hold TypeScript below 7 - #3772

Merged
marcusrbrown merged 3 commits into
mainfrom
chore/hold-typescript-below-7
Aug 27, 2026
Merged

marcusrbrown merged 3 commits into
mainfrom
chore/hold-typescript-below-7

Conversation

@marcusrbrown

Copy link
Copy Markdown
Collaborator

Renovate keeps proposing TypeScript 7 and it can't be merged. I closed #3713; this stops it coming back every cycle.

typescript-eslint reads ts.Extension.Cjs while building its extra-file-extension set. TypeScript 7's native rewrite doesn't expose that legacy API surface, so the lookup resolves undefined and type-aware linting crashes outright rather than degrading to a warning:

TypeError: Cannot read properties of undefined (reading 'Cjs')
    at @typescript-eslint/typescript-estree/dist/create-program/shared.js:59:18

Every typescript-eslint release through 8.68.0 still declares typescript >=4.8.4 <6.1.0, and the upstream report (typescript-eslint#12518) is closed as not planned. Bumping @bfra.me/eslint-config doesn't route around it either — 0.52.1 carries typescript-eslint 8.67.0, capped the same way. Microsoft's own guidance is that the native implementation doesn't preserve the Strada compiler API for tooling, and points at side-by-side installs rather than a shim.

Nothing here needs migrating when support lands. The resolved tsconfig already uses moduleResolution: "bundler" and target: "ES2022" with no baseUrl, so none of TS7's removals apply, and scripts/ runs on Node's strip-only loader rather than this TypeScript — the pin only affects check-types and lint.

The comment on the rule names the exact signal for lifting it: @typescript-eslint/parser publishing a peer range that permits 7.x.

typescript-eslint reads `ts.Extension.Cjs` while building its extra-file-extension
set. TypeScript 7's native rewrite no longer exposes that legacy API surface, so
type-aware linting crashes with a TypeError rather than degrading to a warning.

Every typescript-eslint release through 8.68.0 still peers `typescript >=4.8.4
<6.1.0`, and the upstream report (typescript-eslint#12518) is closed as not
planned. Bumping @bfra.me/eslint-config does not help — it carries 8.67.0, which
is capped the same way.

Nothing in this repo needs migrating when support lands: the resolved tsconfig
already uses moduleResolution bundler and target ES2022, with no baseUrl, and
scripts run on Node's strip-only loader rather than this TypeScript.
fro-bot
fro-bot previously approved these changes Aug 27, 2026

@fro-bot fro-bot left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a targeted quarantine of a version bump that can't survive contact with the toolchain. The comment does the heavy lifting: it names the exact failure surface (ts.Extension.Cjs resolving undefined), cites the upstream (typescript-eslint#12518), records the peer range that gates the fix (>=4.8.4 <6.1.0), and specifies the signal to lift the hold. That's a load-bearing comment, not decoration — the next person who wonders why TS is frozen gets the whole map.

The constraint is mechanically sound. Current pin is typescript: 6.0.3; allowedVersions: '<7' filters 7.x candidates while 6.x updates still flow, and the additional matchPackageNames: ['typescript'] rule merges additively with the existing two — no collision. Scope is a clean +10/-0 in one config file. No workflow, permission, secret, or injection surface touched.

Verdict: PASS

Blocking issues

None.

Non-blocking concerns

  • .github/renovate.json5:24 — The hold is <7, but the typescript-eslint peer actually caps at <6.1.0. A <7 ceiling still lets Renovate surface 6.1.x+ candidates that the peer would reject. In practice this is inert: patch-only is enabled for typescript (line 8) and the pin is 6.0.3, so Renovate only offers 6.0.x patches. If you want the hold to mirror the real constraint exactly, <6.1.0 is the tighter boundary — but <7 reads cleaner as intent and the patch-only rule already neutralizes the gap. Author's call.

Missing tests

None. This is declarative Renovate config, not executable code — there's no behavior to unit-test. JSON5 validity is CI's job, and the rule's effect is observable only against live Renovate resolution.

Risk assessment: LOW

Single-file config change that narrows an update range. Failure mode is bounded to "Renovate proposes a TS version it shouldn't," which the constraint exists to prevent. No automation, credential, or supply-chain surface altered. Worst case on a bad constraint is a rejected PR, not a broken pipeline.


Run Summary
Field Value
Event pull_request
Repository fro-bot/.github
Run ID 33111248639
Cache hit
Session ses_fbb2f81cdffe6J4XWSujeQmjSH

typescript-eslint peers `typescript >=4.8.4 <6.1.0`, so 6.1.x breaks type-aware
linting for the same reason 7.x does. Capping at <7 would have admitted it: no
other rule here restricts TypeScript to patch-only updates, so a minor bump
would flow normally.
@marcusrbrown

Copy link
Copy Markdown
Collaborator Author

Tightened the ceiling to <6.1.0 in 5cb73db.

The concern was right, though the reason it's not inert is different from the mitigation reasoning. The existing rule

{ matchUpdateTypes: ['patch'], matchPackageNames: ['!python', '!typescript'], enabled: false }

disables patch updates for everything except python and typescript — it exempts TypeScript from the patch-disable rather than restricting it to patch. Minor updates aren't governed by that rule for any package, so a 6.0.3 → 6.1.0 bump would have flowed straight through a <7 ceiling and broken linting for exactly the same reason 7.x does.

Mirroring the peer range is the right boundary. The comment now says why <6.1.0 rather than <7, so the next person doesn't loosen it back.

@fro-bot fro-bot left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review after 5cb73db. The ceiling moved from <7 to <6.1.0, and you were right to correct my reasoning on the way through.

My prior note called the <7 gap "inert" because typescript looked patch-only. That was a misread. The rule at .github/renovate.json5:8 — matchUpdateTypes: ['patch'], matchPackageNames: ['!python', '!typescript'], enabled: false — exempts typescript from the patch-disable; it doesn't restrict it to patch. Minor updates aren't governed by that rule for any package, so a 6.0.3 → 6.1.0 bump would have sailed through a <7 ceiling and detonated type-aware linting on the exact same ts.Extension.Cjs lookup as 7.x. The gap wasn't neutralized — it was live. <6.1.0 mirroring the peer range is the correct boundary, not just the tidier one.

The comment now carries that reasoning: it states why <6.1.0 and not <7, which stops the next person from loosening it back on the assumption that only the major is dangerous. Load-bearing again.

Verdict: PASS

Blocking issues

None.

Non-blocking concerns

None. The prior concern was resolved and the underlying justification is now tighter than my original framing.

Missing tests

None. Declarative Renovate config — no executable behavior to unit-test. JSON5 validity is CI's gate; the rule's effect is only observable against live Renovate resolution.

Risk assessment: LOW

Single-file config change narrowing an update range to match a documented upstream peer ceiling. Failure mode is bounded to Renovate proposing a TS version it shouldn't — which is exactly what this now prevents, including the minor-version path the previous ceiling left open. No workflow, permission, secret, or supply-chain surface touched.


Run Summary
Field Value
Event pull_request
Repository fro-bot/.github
Run ID 33116918076
Cache hit
Session ses_fbb2f81cdffe6J4XWSujeQmjSH

@marcusrbrown
marcusrbrown enabled auto-merge (squash) August 27, 2026 21:23

@fro-bot fro-bot left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review after the 51269b0 merge of main into the branch. The diff against main is byte-identical to what I approved in the prior run: the <6.1.0 ceiling holds, the load-bearing comment survived the merge intact, and no conflict residue landed in the file. This is a housekeeping merge to keep the branch current, not a change to the logic.

The substance was already settled: the hold mirrors the typescript-eslint peer range (>=4.8.4 <6.1.0) rather than the looser <7, closing the minor-version path (6.0.3 → 6.1.0) that would have detonated type-aware linting on the same ts.Extension.Cjs lookup as 7.x. The comment states why <6.1.0 and not <7, so the boundary won't get loosened back by someone who assumes only the major is dangerous.

Verdict: PASS

Blocking issues

None.

Non-blocking concerns

None. Nothing changed since the prior approval except a clean merge from main.

Missing tests

None. Declarative Renovate config — no executable behavior to unit-test. JSON5 validity is CI's gate; the rule's effect is only observable against live Renovate resolution.

Risk assessment: LOW

Single-file config change narrowing an update range to a documented upstream peer ceiling, unchanged across the merge. No workflow, permission, secret, or supply-chain surface touched. Worst case on a bad constraint is a rejected Renovate PR, not a broken pipeline.


Run Summary
Field Value
Event pull_request
Repository fro-bot/.github
Run ID 33117949085
Cache hit
Session ses_fbb2f81cdffe6J4XWSujeQmjSH

@marcusrbrown
marcusrbrown merged commit 84444a5 into main Aug 27, 2026
14 checks passed
@marcusrbrown
marcusrbrown deleted the chore/hold-typescript-below-7 branch August 27, 2026 21:25
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.

2 participants