fix(deps): pin typescript so lockfile regeneration cannot break ESLint (supersedes #69) - #72
Merged
Merged
Conversation
Bumps the npm_and_yarn group with 1 update in the / directory: [websocket-driver](https://github.com/faye/websocket-driver-node). Updates `websocket-driver` from 0.7.4 to 0.7.5 - [Changelog](https://github.com/faye/websocket-driver-node/blob/main/CHANGELOG.md) - [Commits](faye/websocket-driver-node@0.7.4...0.7.5) --- updated-dependencies: - dependency-name: websocket-driver dependency-version: 0.7.5 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
The websocket-driver security bump failed CI on Lint JavaScript with 'Failed to load plugin @typescript-eslint ... Cannot read properties of undefined (reading Intrinsic)'. This was not branch staleness -- @dependabot recreate reproduced it on top of current main. main's lockfile carries no typescript entry at all. Regenerating it materialized typescript 7.0.2, the native rewrite, plus twenty @typescript/typescript-* platform binaries: ts-api-utils and tsutils declare a non-optional peer on typescript >=4.2.0, so npm installs one and, unconstrained, takes the newest. @typescript-eslint 6.21.0, which @wordpress/scripts pulls in transitively, supports >=4.7.4 <5.4.0 and crashes reading TypeScript internals that moved in 7. Pin typescript to ~5.3.3 in the existing overrides block: the newest minor inside that supported range, floating patches only. The project has no TypeScript source, so the pin costs nothing and the entry drops back out of the tree entirely, matching main. Any future @wordpress/ scripts major that raises the ceiling will fail lint immediately rather than resolve into an incompatible pair again. Includes the websocket-driver 0.7.4 -> 0.7.5 bump from #69, which the regenerated lockfile preserves. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #72 +/- ##
=======================================
Coverage 81.01% 81.01%
=======================================
Files 43 43
Lines 3113 3113
Branches 522 522
=======================================
Hits 2522 2522
Misses 185 185
Partials 406 406 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #69. Carries that PR's
websocket-driver0.7.4 → 0.7.5 security bump and fixes the CI failure that blocked it.What was failing
#69 failed
Quality (Node 22)on Lint JavaScript:This was not branch staleness —
@dependabot recreatereproduced it identically on top of currentmain.Root cause
main's lockfile has notypescriptentry at all. Regenerating the lockfile materializedtypescript@7.0.2— the native rewrite — plus twenty@typescript/typescript-*platform binaries.ts-api-utilsandtsutilsdeclare a non-optional peer ontypescript >=4.2.0, so npm installs one; unconstrained, it takes the newest.@typescript-eslint@6.21.0, pulled in transitively by@wordpress/scripts, supports>=4.7.4 <5.4.0and crashes reading TypeScript internals that moved in 7.So any lockfile regeneration — from any Dependabot PR, not just this one — would have hit the same wall.
The fix
One line in the existing
overridesblock:That is the newest minor inside the range
@typescript-eslint@6.21.0supports, floating patches only, so it cannot drift into TS 5.4+ or 7. This project has no TypeScript source, so the pin costs nothing and the entry drops out of the tree entirely — matchingmain's state. A future@wordpress/scriptsmajor that raises the ceiling will fail lint immediately rather than silently resolve into an incompatible pair again.Nearly the whole diff is deletion: 400 removed lines are the TS7 tree. The 4 additions are
"dev": trueflags npm correctly added toencoding,iconv-lite, andsafer-buffer, whose only consumer is a devDependency. No production dependency drift.Verification
Clean
npm ci --legacy-peer-deps, then the full Quality job:lint:js(the check that was failing) passes,lint:cssclean,lint:i18npassed,npm audit --omit=dev --omit=optional0 vulnerabilities, 660 Jest tests passing, build succeeds.websocket-driverconfirmed at 0.7.5 in the installed tree — the security bump this PR exists to deliver survives the fix.Risk
Low, and dev-only. No plugin runtime code or shipped dependency is affected;
typescriptwas never in the distributed package.🤖 Generated with Claude Code