chore(ci): add CI check for duplicate dependency resolutions#734
Open
vinzenzLIFI wants to merge 1 commit into
Open
chore(ci): add CI check for duplicate dependency resolutions#734vinzenzLIFI wants to merge 1 commit into
vinzenzLIFI wants to merge 1 commit into
Conversation
Adds scripts/check-deduped-deps.js which parses pnpm-lock.yaml and fails when a watched package has more than one resolved version within the same major. Adds a GitHub Actions workflow that runs the check on every PR targeting main. Also gitignores Playwright report output directories so Biome does not lint generated artifacts. Closes EMB-381
c4a65ba to
d01708f
Compare
effie-ms
reviewed
May 19, 2026
| on: | ||
| pull_request: | ||
| branches: | ||
| - main |
Contributor
There was a problem hiding this comment.
I think we will need to run it only on lock file changes:
paths:
- 'pnpm-lock.yaml'
Contributor
There was a problem hiding this comment.
And possibly on the script changes: 'scripts/check-deduped-deps.js'
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.
Which Linear task is linked to this PR?
EMB-381
Why was it implemented this way?
Some packages must be single-copy in a bundle — React context identity, module-level singletons (
@lifi/sdk), cross-copyinstanceofchecks (viem). When two versions end up in the same Vite bundle the symptoms range from a hard crash at mount (WagmiProviderNotFoundError) to silent runtime failures (Execution data not found).The check reads
pnpm-lock.yamldirectly (fast, no network) and fails with an actionable error — including a ready-to-pastepnpm-workspace.yamloverride — when a watched package has more than one resolved version within the same major.Running it against the current lockfile immediately surfaces a real duplicate:
wagmi@3.6.11andwagmi@3.6.12are both resolved within major 3.Visual showcase (Screenshots or Videos)
N/A — CI tooling only.
Checklist before requesting a review