fix(repo): pin utf-8-validate via overrides to stabilize pnpm dedupe#8262
fix(repo): pin utf-8-validate via overrides to stabilize pnpm dedupe#8262jacekradko merged 3 commits intomainfrom
Conversation
The transitive optional dep `rpc-websockets@9.3.7` (via `@solana/web3.js`) requests `utf-8-validate@^6.0.0`, while every other consumer in the tree sticks with `^5.x`. This caused pnpm to materialize two `utf-8-validate` versions, which cascaded into duplicate `metro@0.83.3`, `metro-config@0.83.3`, and `react-native@0.81.5` peer-dep variants. The duplicate `metro-config` variants have identical content, so `pnpm dedupe` non-deterministically flips between them — and `pnpm dedupe --check` flaps between exit 0 and 1 for the same lockfile, blocking CI for every PR. `utf-8-validate` is an optional native peer of `ws` (warning-only when unmet), so consolidating to one version is safe. The diff is large but purely consists of resolution-context rewrites in the lockfile.
🦋 Changeset detectedLatest commit: 186d998 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughTwo files are modified to manage dependency versions. A new changeset markdown file is created to document the changes. The Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
Summary
pnpm dedupe --checkhas been flaky onmain— returning exit 0 or 1 non-deterministically against the same lockfile. This PR pinsutf-8-validateviapnpm.overridesto make the check deterministic.Root cause
This is upstream pnpm bug pnpm/pnpm#8155 —
pnpm dedupenon-deterministically resolves transitive peer-dep variants.The way it manifests in our lockfile:
rpc-websockets@9.3.7(transitive optional dep via@solana/web3.js) is the only package in the tree that requestsutf-8-validate@^6.0.0; every other consumer uses^5.x.utf-8-validate@5.0.10and@6.0.6, which cascades into duplicatemetro@0.83.3,metro-config@0.83.3, andreact-native@0.81.5peer-dep variants.metro-config@0.83.3variants have identical content, which hits the pnpm bug: the dedupe heuristic non-deterministically flips between collapsing them in either direction, sopnpm dedupe --checkflaps accordingly.Fix
Pin
utf-8-validateto5.0.10viapnpm.overridesin the rootpackage.json.utf-8-validateis an optional native peer ofws— it's a compile-time speedup only, andwsfalls back to a JS implementation when the native version doesn't match. Consolidating to one version is safe and has no functional impact.With only one
utf-8-validateversion in the tree, the duplicatemetro-config@0.83.3variants disappear entirely, and pnpm has nothing to non-deterministically flip between.The lockfile diff is large but consists almost entirely of resolution-context rewrites; no actual package versions changed.
Verification
pnpm dedupe --checkpasses 10/10 runs locally (previously ~3/10)pnpm buildpasses (21/21 tasks)Test plan