fix: pin @types/node to deduplicate Vite type resolutions#3650
Merged
itsjustriley merged 1 commit intomainfrom Apr 1, 2026
Merged
fix: pin @types/node to deduplicate Vite type resolutions#3650itsjustriley merged 1 commit intomainfrom
itsjustriley merged 1 commit intomainfrom
Conversation
pnpm resolved @types/node to two different patch versions (22.19.11 and 22.19.15) across workspace packages. This caused Vite's Plugin<any> type from one resolution to be incompatible with Plugin<any> from the other, breaking the skeleton template's typecheck with TS2769. The duplicate resolution also caused snapshot infrastructure failures in hydrogen-react unit tests (Image.test.tsx, RichText.test.tsx, getProductOptions.test.ts) due to mismatched vitest peer dependency trees. Pin @types/node to 22.19.15 in the catalog so pnpm produces a single resolution across all workspace packages. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
Oxygen deployed a preview of your
Learn more about Hydrogen's GitHub integration. |
This was referenced Apr 1, 2026
fredericoo
approved these changes
Apr 1, 2026
Contributor
fredericoo
left a comment
There was a problem hiding this comment.
i think it was dependabot not being aware of monorepo and surgically updating the lockfile instead of actually running the install
I dont think we needed to pin it, but just to reinstall packages
BUT it also doesn’t hurt it (we already update manually) so lets go
thanks for fixing this! we should note it for future dependabot updates
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.
WHY are these changes introduced?
The happy-dom bump (#3638) introduced a dependency graph change that caused pnpm to resolve
@types/nodeto two different patch versions (22.19.11and22.19.15) across workspace packages. The split wasn't caught because #3638's CI was cancelled, and subsequent PRs (including #3572) inherited the broken state. This broke CI on main:TypeScript failure: Vite's
Plugin<any>type from one@types/noderesolution is not assignable toPlugin<any>from the other, causingTS2769: No overload matches this callin the skeleton'svite.config.ts.Unit test failure: The duplicate resolution caused mismatched vitest peer dependency trees, breaking snapshot infrastructure in hydrogen-react (
Image.test.tsx,RichText.test.tsx,getProductOptions.test.ts).Root cause: The workspace catalog specified
@types/node: ^22(a range). The existing override (@types/node: catalog:) correctly funnels all resolutions through the catalog, but pnpm's partial lockfile resolution resolves the range to different patch versions for new vs existing entries. Pinning to an exact version completes the design intent of the override.WHAT is this pull request doing?
Pins
@types/nodeto22.19.15in the workspace catalog so pnpm produces a single resolution across all packages.HOW to test your changes?
pnpm run typecheck— should pass with zero errorscd packages/hydrogen-react && npx vitest run— 412 tests pass (the previously failing snapshot tests are green)cd packages/hydrogen && npx vitest run— 500 tests passChecklist