Migrate from yarn to pnpm

This comprehensive migration includes:

### Configuration Updates
- Updated root package.json with pnpm workspace configuration
- Added packageManager field and pnpm overrides for graphql version
- Updated GitHub Actions workflows (.github/workflows/ci.yml, code-size.yml)
- Updated Netlify configuration (netlify.toml)
- Updated deployment script (deploy.sh)

### Documentation Updates
- Updated all README files to use pnpm instead of yarn
- Updated installation and build instructions across packages:
  - packages/webamp/README.md
  - packages/webamp-modern/README.md
  - packages/webamp-docs/README.md
  - packages/ani-cursor/README.md
  - packages/webamp/demo/readme.md

### Lock File Migration
- Removed yarn.lock
- Generated pnpm-lock.yaml preserving exact dependency versions
- Moved resolutions from skin-database package.json to root pnpm overrides
- Created pnpm-workspace.yaml for optimized workspace configuration

### CI/CD Updates
- Updated all yarn commands to use pnpm equivalents
- Changed yarn workspace commands to pnpm --filter syntax
- Updated cache keys to use pnpm-lock.yaml instead of yarn.lock
- Added pnpm/action-setup for GitHub Actions

### Validation
- Tested builds for webamp, webamp-modern, ani-cursor, webamp-docs
- Tested installation and linting for skin-database
- Verified dependency resolution consistency
- Confirmed all scripts work with pnpm

All package versions remain identical to yarn.lock, ensuring no breaking changes.
This commit is contained in:
Jordan Eldredge 2025-07-06 13:20:28 -07:00
parent bcaa8dfdc6
commit 0d53884fde
15 changed files with 32840 additions and 26212 deletions

View file

@ -20,14 +20,18 @@ jobs:
- uses: actions/checkout@v4
- name: Generate cache key
id: cache-key
run: echo "key=node-modules-${{ hashFiles('**/yarn.lock') }}" >> $GITHUB_OUTPUT
run: echo "key=node-modules-${{ hashFiles('**/pnpm-lock.yaml') }}" >> $GITHUB_OUTPUT
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "yarn"
cache: "pnpm"
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
# Build job - Vite build for demo site
build:
@ -39,15 +43,19 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "yarn"
cache: "pnpm"
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Build Vite Demo
run: |
# Set CI environment variable for optimized builds
export CI=true
yarn workspace ani-cursor build
yarn workspace webamp build
pnpm --filter ani-cursor build
pnpm --filter webamp build
env:
NODE_ENV: production
- name: Cache build artifacts
@ -68,15 +76,19 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "yarn"
cache: "pnpm"
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Build Library Bundles
run: |
# Set CI environment variable for optimized builds
export CI=true
yarn workspace ani-cursor build
yarn workspace webamp build-library
pnpm --filter ani-cursor build
pnpm --filter webamp build-library
env:
NODE_ENV: production
- name: Cache library artifacts
@ -99,13 +111,17 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "yarn"
cache: "pnpm"
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Lint
run: |
yarn lint
yarn workspace webamp type-check
pnpm lint
pnpm --filter webamp type-check
# Test job - runs in parallel
test:
@ -117,16 +133,20 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "yarn"
cache: "pnpm"
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Run Unit Tests
run: |
touch packages/skin-database/config.js
# Run tests with optimizations for CI
export CI=true
yarn test --maxWorkers=2
yarn workspace webamp test --maxWorkers=2
pnpm test -- --maxWorkers=2
pnpm --filter webamp test -- --maxWorkers=2
env:
NODE_ENV: test
# - name: Run Integration Tests
@ -160,9 +180,13 @@ jobs:
with:
node-version: 20.x
registry-url: https://registry.npmjs.org/
cache: "yarn"
cache: "pnpm"
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Restore build artifacts
uses: actions/cache@v4
with:
@ -185,7 +209,7 @@ jobs:
if: github.ref == 'refs/heads/master'
run: |
echo "Setting version to 0.0.0-next-${RELEASE_COMMIT_SHA::7}"
yarn workspace webamp version --new-version 0.0.0-next-${RELEASE_COMMIT_SHA::7} --no-git-tag-version
pnpm --filter webamp version --new-version 0.0.0-next-${RELEASE_COMMIT_SHA::7} --no-git-tag-version
env:
RELEASE_COMMIT_SHA: ${{ github.sha }}
- name: Build release version

View file

@ -9,6 +9,10 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- uses: preactjs/compressed-size-action@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"