-
Notifications
You must be signed in to change notification settings - Fork 58
chore: migrate from Yarn to PNPM #1458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Migrate CI workflows, scripts, and workspaces to
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR migrates the repository from Yarn v1 to PNPM to take advantage of performance and security improvements. The migration involves updating package manager references, workspace configurations, CI/CD workflows, and dependency declarations across the monorepo.
Key Changes:
- Migration from Yarn to PNPM as the package manager with workspace protocol for internal dependencies
- Updated all GitHub Actions workflows to use PNPM with proper caching setup
- Converted documentation and scripts to reference PNPM instead of Yarn
Reviewed changes
Copilot reviewed 75 out of 79 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-workspace.yaml | New PNPM workspace configuration with security settings |
| package.json | Updated packageManager field, scripts, and publish commands for PNPM |
| lerna.json | Changed npmClient from yarn to pnpm |
| packages/*/package.json | Converted dependencies to workspace:* protocol and updated scripts to use pnpm |
| .github/workflows/*.yml | Updated CI/CD workflows to use PNPM with setup-node v4 and caching |
| .husky/* | Updated git hooks to use pnpm commands |
| README.md, CONTRIBUTING.md, AGENTS.md | Updated documentation references from yarn to pnpm |
| test-server/README.md | Updated test server instructions to use pnpm |
| tsconfig.json | Removed 'idb' from types array |
| packages/*/test/tsconfig.json | Added test-specific TypeScript configs |
| packages/*/jest.config.js | Added transformIgnorePatterns for PNPM compatibility |
| packages/analytics-core/src/types/proxy.ts | New file exporting InstanceProxy type |
| packages/session-replay-browser/src/targeting/targeting-manager.ts | Bug fix for parsing string sessionId to number |
| packages/session-replay-browser/src/helpers.ts | Added explicit return type annotation |
| packages/plugin-experiment-browser/package.json | Fixed missing && operator in version script |
| Various test files | Updated imports and mocking strategies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c867195 to
5158268
Compare
a027f2a to
a22af1e
Compare
a22af1e to
7b1baaa
Compare
Mercy811
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected]
859dcdf to
003570e
Compare
This reverts commit db34376.
- @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected] - @amplitude/[email protected]
5380682 to
cc96e65
Compare
cc96e65 to
66ffd36
Compare
Mercy811
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Summary
We're migrating from Yarn to PNPM to take advantage of performance and security enhancements that PNPM provides. And because Yarn v1 has been in maintenance mode for ~6 years
Made a test pre-release called



@amplitude/[email protected]and tested it locallyChecklist
Note
Migrates the build system to pnpm and aligns CI, publishing, and docs accordingly, with minor code/test adjustments for compatibility.
yarntopnpm, addspnpm/action-setupand enablessetup-node@v4cachingpackage.jsonscripts (build/test/lint/publish) to pnpm; sets LernanpmClienttopnpm; adds deploy dry-run/pack helpersworkspace:*and replacesanalytics-types/client-commonimports with@amplitude/analytics-corewhere applicableInstanceProxyand new proxy types inanalytics-core; broaden tsconfig includes; add JesttransformIgnorePatternsfor RN packages; update tests to use core types and mock browser clientsessionIdto number in targeting manager and add a unit test; tighten types in helpersWritten by Cursor Bugbot for commit 454f675. This will update automatically on new commits. Configure here.