fix(deps): resolve patched ws via in-range bumps instead of an override - #43
Merged
Conversation
Replaces the `ws: ^8.21.0` override added alongside the 0.8.0 sync with the upstream-sanctioned fix. `engine.io@6.6.8` and `socket.io-adapter@2.5.7` declare `ws: ~8.20.1`, a tilde range that excludes 8.21.x. The override forced them past it — patching GHSA-96hv-2xvq-fx4p, but by ignoring a constraint their authors set deliberately, and our suite never exercises a websocket handshake (socket.io arrives only via react-email), so a green run was weak evidence. Both have since published patch releases that widen the range to `~8.21.0` specifically to pick up the patched ws: engine.io 6.6.8 -> 6.6.9 socket.io-adapter 2.5.7 -> 2.5.8 Both sit inside socket.io@4.8.3's own declared ranges (`~6.6.0`, `~2.5.2`), so this is an ordinary in-range update, not a forced one. `ws` now hoists to 8.21.2 on its own and every consumer is satisfied: jsdom ^8.18.0 · openai ^8.18.0 · happy-dom ^8.21.0 engine.io ~8.21.0 · socket.io-adapter ~8.21.0 Net effect is two lockfile lines and one fewer override. Verified with a clean `npm ci`; audit parity with main is unchanged at 8/6-high, none of which is ws. Tracked upstream as human-centric-engineering/sunrise#538. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Follow-up to #39. Replaces the
wsoverride with the fix the package authors intended.Why the override was the wrong shape
#39 patched GHSA-96hv-2xvq-fx4p with
"ws": "^8.21.0"inoverrides. That worked, butengine.io@6.6.8andsocket.io-adapter@2.5.7declarews: ~8.20.1— a tilde range that excludes 8.21.x. The override forced them past a constraint their authors set deliberately.The test suite passing was weak evidence it was safe:
socket.ioreaches us only throughreact-email, so nothing in our 20,942 tests performs a websocket handshake. A green run wouldn't have told us either way.The fix
Both packages have since published patch releases that widen the range to
~8.21.0specifically to pick up patchedws:wsrangeengine.io~8.20.1→~8.21.0socket.io-adapter~8.20.1→~8.21.0Both land inside
socket.io@4.8.3's own declared ranges (engine.io: ~6.6.0,socket.io-adapter: ~2.5.2), so this is an ordinary in-range update — nothing is forced.wsnow hoists to 8.21.2 on its own, satisfying every consumer natively:Diff
Two lockfile lines, and one fewer override:
"overrides": { "hono": "^4.11.7", - "valibot": "^1.2.0", - "ws": "^8.21.0" + "valibot": "^1.2.0" }Also one less thing to conflict on the next upstream sync.
Verification
npm ci→ single dedupedws@8.21.2, no override in playtype-check,lint,format:checkcleannpm run buildexit 0, 174 static pages generatedmain: 8 total / 6 high, byte-identical set —adm-zip,epub2,next,postcss,sharp,@react-email/ui. None isws. This change removes thewsproblem and touches nothing else.Upstream
Reported as human-centric-engineering/sunrise#538 with this same transitive-bump fix recommended, plus a note that
dependency-review-actionis diff-based and so structurally cannot catch a vulnerable version already sitting onmain— it only fires in a fork, on the sync PR.🤖 Generated with Claude Code