Migrate monorepo from Yarn to pnpm#2069
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughRepo-wide migration from Yarn to pnpm ([email protected]) across workspace config, package.json scripts, CI composite actions and workflows, native build wiring, test/runtime resolution, and docs. Adds a CI force-run sentinel ChangesPNPM cutover (workspace, CI actions, workflows, packages, tooling, native, tests)
CI force-run sentinel and automation
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
|
Summary
pnpm-workspace.yaml,pnpm-lock.yaml,.npmrc, and removal ofyarn.lock/.yarnrc.yml.pnpm-installcomposite, acache-pnpmstore cache, and updated cache keys keyed offpnpm-lock.yaml.pnpm exectriggered an implicitpnpm installover a stale cachednode_modules: build-artifact caches (cache-mobile-sdk-build,cache-core-sdk-build) now cover onlydist/outputs, notnode_modules.docs/pnpm-migration-status.mddocumenting the phased migration.Changes
Config/infra
pnpm-workspace.yaml(hoistednodeLinker, package extensions),.npmrc, andpnpm-lock.yaml; removedyarn.lock,.yarnrc.yml, and.github/actions/yarnrc-hash..github/actions/yarn-install→pnpm-installand.github/actions/cache-yarn→cache-pnpm; rewiredmobile-setupto use them.packageManagerand scripts across root and all workspacepackage.jsonfiles to pnpm.packageExtensionsChecksumto lockfile; overrodejsdomto resolve a peer-deps conflict.CI workflows
mobile-ci,mobile-sdk-ci,core-sdk-ci,web,webview-*,circuits,contracts,npm-publish,mobile-deploy*,mobile-e2e,mobile-sdk-demo*,rn-sdk-test-app-ci,qrcode-sdk-ci,workspace-ci, etc.) fromyarn/yarn-installtopnpm/pnpm-install.pnpmworkspace command forms (--filtersyntax) introduced during the first migration pass.node_modulespaths fromcache-mobile-sdk-buildandcache-core-sdk-buildto eliminate a 20mpnpm installhang on lint.React Native app
metro.config.cjs/jest.config.cjsupdated for pnpm's hoisted node_modules layout.blurEffectMock.js,lottieMock.js); removed dupe mocks fromjest.setup.js.mobile-ci-build-android.shandinstall-ios-deps-if-needed.shupdated to call pnpm.android/settings.gradlepath adjustments for pnpm hoisting (also inpackages/mobile-sdk-demo,packages/rn-sdk-test-app).SDK packages
mobile-sdk-alpha,webview-app,webview-bridge,rn-sdk,rn-sdk-test-app,mobile-sdk-demo,sdk/core,sdk/qrcode*,sdk/sdk-common,common,new-common,circuits,contracts: package/tsconfig updates for pnpm.webview-app/vite.config.ts: dedupe/resolver tweak for hoisted layout.packages/mobile-sdk-demo/src/hooks/useRegistration.ts: import path fix.Docs/specs
specs/projects/sdk/workstreams/monorepo-tooling/SPEC.mdandspecs/projects/sdk/INDEX.mdentry.docs/pnpm-migration-status.md.AGENTS.md,CLAUDE.md,app/AGENTS.md,packages/*/AGENTS.mdfor pnpm-first instructions.Bundled CI tooling (intentional)
.github/CI_FORCE_RUNsentinel +scripts/ci/add-force-run-sentinel.pyhelper.This PR will be re-synced with
devmultiple times before merge, and eachre-sync needs to re-validate the full workflow matrix to confirm the pnpm
upgrade remains sound.
check_changespath gating otherwise skips workflowswhose touched paths are unchanged; bumping the sentinel forces every gated
workflow to run. Tracked as MT-24 in the monorepo-tooling SPEC; retention
after merge will be evaluated separately.
Test Plan
pnpm lint && pnpm types && pnpm buildpasses locallymobile-sdk-cilint job completes (previously timed out at 20m — see cache fix)core-sdk-ci,mobile-ci,webview-app-ci,webview-bridge-ciall greenpnpm installfrom clean checkout reproduces the committed lockfileapp/,rn-sdk-test-app) succeeds with pnpm-installed podsapp/,rn-sdk-test-app,mobile-sdk-demo) succeeds with newsettings.gradlepathsNative Consolidation Checklist
cd app && pnpm jest:run/pnpm --filter @selfxyz/rn-sdk-test-app test)🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Chores
Documentation
Bug Fixes