Skip to content

chore: migrate from npm to Yarn v4#1489

Open
planning-center-cloud-agent[bot] wants to merge 2 commits into
mainfrom
cloud-agent/api-110/migrate-to-yarn-v4
Open

chore: migrate from npm to Yarn v4#1489
planning-center-cloud-agent[bot] wants to merge 2 commits into
mainfrom
cloud-agent/api-110/migrate-to-yarn-v4

Conversation

@planning-center-cloud-agent

@planning-center-cloud-agent planning-center-cloud-agent Bot commented Jul 7, 2026

Copy link
Copy Markdown

Summary

Migrates developers from npm to Yarn v4 (yarn@4.14.1), part of the API team's package-manager standardization (API-106, this issue API-110).

Changes

  • Add packageManager field to package.json pinning yarn@4.14.1 (managed via Corepack)
  • Add .yarnrc.yml with nodeLinker: node-modules, enableScripts: false, approved PCO git repos, and the PCO npm registry (matching api / pco-add-on-demo conventions)
  • Replace package-lock.json with yarn.lock
  • Remove .npmrc (registry now lives in .yarnrc.yml)
  • Update .gitignore for Yarn v4 conventions
  • Update CLAUDE.md setup instructions (npm ciyarn install)
  • Update .github/workflows/issue-triage.yml to install via Yarn: add a corepack enable step, switch setup-node cache from npm to yarn, and replace npm ci with yarn install --immutable (the workflow-level YARN_NPM_REGISTRY_SERVER env var already points yarn at the quarantine proxy, so no new registry config was needed)

This closes a gap from the original version of this PR, where package-lock.json was removed but CI still ran npm ci — that combination would have broken the workflow (npm ci hard-fails without a lockfile) the next time an issue was opened after merge. The workflow is now updated in this same PR so there's no window where auto-triage is broken.

Test plan

  • yarn install generates a valid yarn.lock
  • yarn install --immutable passes (verifies lockfile is in sync — what CI will run)
  • All dependencies resolve under node_modules (@anthropic-ai/sdk, @actions/core, @actions/github)

🤖 Generated with Claude Code

Standardize on Yarn v4 as the package manager (API-106).

- Add packageManager field pinning yarn@4.14.1
- Add .yarnrc.yml with node-modules linker and PCO npm registry
- Replace package-lock.json with yarn.lock; drop .npmrc
- Update .gitignore for yarn v4 conventions
- Update CLAUDE.md setup instructions

The CI workflow (.github/workflows/issue-triage.yml) still uses npm ci
and must be switched to yarn separately — the GitHub App lacks the
`workflows` permission to modify it in this PR.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@geolessel geolessel marked this pull request as ready for review July 7, 2026 14:37
@geolessel geolessel requested a review from a team as a code owner July 7, 2026 14:37
package-lock.json was removed in favor of yarn.lock, so `npm ci` would
fail with no lockfile the next time an issue is opened. Enable
Corepack, cache/install via yarn, and drop the now-unused npm
registry-url input (the workflow-level YARN_NPM_REGISTRY_SERVER env
var already routes yarn through the quarantine proxy).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants