Skip to content

Conversation

azu
Copy link
Member

@azu azu commented Oct 11, 2025

Summary

Migrates the project from yarn v1 to pnpm and updates GitHub Actions to the latest versions.

Changes

Package Manager Migration

  • Root directory: Migrated from yarn v1 to pnpm
    • Converted yarn.lock to pnpm-lock.yaml
    • Updated packageManager field in package.json to [email protected]
  • Example directory: Also migrated to pnpm
    • Converted example/yarn.lock to example/pnpm-lock.yaml
    • Updated example/package.json with packageManager field

GitHub Actions Updates

  • Updated actions/checkout from v4.3.0 to v5.0.0
  • Updated actions/setup-node from v4.4.0 to v5.0.0
  • Updated peaceiris/actions-gh-pages to v4.0.0
  • Added pnpm/[email protected] for pnpm installation
  • Updated Node.js version from 20 to 22 in website workflow

Security Improvements

  • Added persist-credentials: false to checkout actions
  • Added explicit permissions blocks to workflows
    • test.yml: contents: read
    • website.yml: contents: write

Build Script Fixes

  • Replaced deprecated prepublish with prepublishOnly (runs only on npm publish)
  • Added explicit build step in pretest script
  • Kept prepare script for git hooks configuration only
  • Avoids unnecessary builds on every pnpm install

Testing

  • ✅ All tests pass locally
  • ✅ CI tests pass on Node.js 18, 20, and 22
  • ✅ Example directory tests work correctly

Breaking Changes

None. This is a maintenance update that doesn't affect the public API.

Checklist

  • Migrate root directory from yarn v1 to pnpm
  • Migrate example directory to pnpm
  • Update GitHub Actions workflows
  • Update GitHub Actions versions (SHA pinned)
  • Update Node.js version to 22 in website workflow
  • Add security configurations (persist-credentials, permissions)
  • Fix build scripts for pnpm compatibility
  • Verify all tests pass

azu and others added 6 commits October 11, 2025 23:48
- Update packageManager field in package.json
- Convert yarn.lock to pnpm-lock.yaml using pnpm import
- Update GitHub Actions workflows to use pnpm
- Update test script to use pnpm in example directory
- Add persist-credentials: false to checkout actions for security
- Add explicit permissions to workflow jobs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Update website.yml to use Node.js 22 (current LTS) instead of 20

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Add packageManager field to example/package.json
- Convert example/yarn.lock to example/pnpm-lock.yaml
- Remove example/yarn.lock

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Remove deprecated prepublish script
- Add build command to prepare script to ensure lib directory exists before testing
- Fixes CI test failure where example directory couldn't find built files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Replace prepare script with prepublishOnly for npm publish
- Add explicit build to pretest script before running tests
- Keep prepare script for git hooks only
- Avoids unnecessary builds on every pnpm install

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@azu azu added the Type: Refactoring A code change that neither fixes a bug nor adds a feature label Oct 11, 2025
@azu azu merged commit 24b6dcf into master Oct 11, 2025
6 checks passed
@azu azu deleted the pnpm branch October 11, 2025 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Refactoring A code change that neither fixes a bug nor adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant