Skip to content

chore(ci): add CI check for duplicate dependency resolutions#734

Open
vinzenzLIFI wants to merge 1 commit into
mainfrom
chore/emb-381-add-ci-check-for-duplicate-dependency-resolutions
Open

chore(ci): add CI check for duplicate dependency resolutions#734
vinzenzLIFI wants to merge 1 commit into
mainfrom
chore/emb-381-add-ci-check-for-duplicate-dependency-resolutions

Conversation

@vinzenzLIFI
Copy link
Copy Markdown
Contributor

@vinzenzLIFI vinzenzLIFI commented May 19, 2026

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-copy instanceof checks (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.yaml directly (fast, no network) and fails with an actionable error — including a ready-to-paste pnpm-workspace.yaml override — 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.11 and wagmi@3.6.12 are both resolved within major 3.

Visual showcase (Screenshots or Videos)

N/A — CI tooling only.

Checklist before requesting a review

  • I have performed a self-review and testing of my code.
  • This pull request is focused and addresses a single problem.
  • If this PR modifies the Widget API or adds new features that require documentation, I have updated the documentation in the public-docs repository.

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
@vinzenzLIFI vinzenzLIFI force-pushed the chore/emb-381-add-ci-check-for-duplicate-dependency-resolutions branch from c4a65ba to d01708f Compare May 19, 2026 10:03
on:
pull_request:
branches:
- main
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we will need to run it only on lock file changes:

     paths:
        - 'pnpm-lock.yaml'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

And possibly on the script changes: 'scripts/check-deduped-deps.js'

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