chore: migrate to Corepack-managed Yarn 4#812
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (2)
📝 WalkthroughWalkthroughThis PR standardizes Node/Yarn tooling: adds Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
package.json (1)
63-63: Reasonable addition of--passWithNoTests.This flag prevents CI failures when no test files match. Consider removing it once test coverage is established, as it can mask the absence of expected tests.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@package.json` at line 63, The package.json "test" npm script currently includes the vitest flag --passWithNoTests which masks missing tests; update the "test" script (the "test" property in package.json) to remove the --passWithNoTests flag once you have real test files, so that CI will fail when tests are absent and ensure test coverage is enforced.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/release.yml:
- Around line 137-139: Add the missing --ignore-engines flag to the Windows
job's yarn install step to match other jobs: update the run command that
currently uses "yarn install --immutable" in the Windows job (the step following
"corepack enable") to include "--ignore-engines" so it reads "yarn install
--immutable --ignore-engines", ensuring consistent behavior with the Linux, Mac,
Android, and finalize-release jobs.
In `@vercel.json`:
- Around line 5-6: The vercel.json uses "installCommand" and "buildCommand" with
"corepack yarn" but Corepack is experimental on Vercel; set the environment
variable ENABLE_EXPERIMENTAL_COREPACK=1 in the Vercel project/deployment
settings and ensure package.json includes a packageManager entry (e.g.,
"packageManager": "yarn@4.x.x") so the "corepack yarn install --immutable" and
"corepack yarn build" commands work reliably during deployments.
---
Nitpick comments:
In `@package.json`:
- Line 63: The package.json "test" npm script currently includes the vitest flag
--passWithNoTests which masks missing tests; update the "test" script (the
"test" property in package.json) to remove the --passWithNoTests flag once you
have real test files, so that CI will fail when tests are absent and ensure test
coverage is enforced.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c571c556-f9f7-49f5-8f27-cf300a433460
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (8)
.github/workflows/release.yml.github/workflows/test.yml.nvmrc.yarnrc.ymlAGENTS.mdREADME.mdpackage.jsonvercel.json
| - run: corepack enable | ||
| - name: Install dependencies (with Node v22) | ||
| run: yarn install --immutable |
There was a problem hiding this comment.
Inconsistency: Windows job omits --ignore-engines.
Other jobs (Linux at line 33, Mac at line 94, Android at line 182, finalize-release at line 225) use --ignore-engines, but the Windows job does not. This could cause failures if engine constraints don't match on Windows runners.
🛠️ Proposed fix for consistency
- run: corepack enable
- name: Install dependencies (with Node v22)
- run: yarn install --immutable
+ run: yarn install --immutable --ignore-engines📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - run: corepack enable | |
| - name: Install dependencies (with Node v22) | |
| run: yarn install --immutable | |
| - run: corepack enable | |
| - name: Install dependencies (with Node v22) | |
| run: yarn install --immutable --ignore-engines |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/release.yml around lines 137 - 139, Add the missing
--ignore-engines flag to the Windows job's yarn install step to match other
jobs: update the run command that currently uses "yarn install --immutable" in
the Windows job (the step following "corepack enable") to include
"--ignore-engines" so it reads "yarn install --immutable --ignore-engines",
ensuring consistent behavior with the Linux, Mac, Android, and finalize-release
jobs.
| "installCommand": "corepack yarn install --immutable", | ||
| "buildCommand": "corepack yarn build", |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
Does Vercel support Corepack for Yarn?
💡 Result:
Yes—Vercel supports using Corepack for Yarn, but it’s treated as experimental and must be explicitly enabled.
- Enable Corepack on Vercel by setting the environment variable
ENABLE_EXPERIMENTAL_COREPACK=1, and set your desired Yarn version viapackageManagerin your rootpackage.json(for example,"packageManager": "yarn@4.x.x"). [1][2] - Vercel’s own docs note that if you’re using Yarn 4, you should enable Corepack. [3]
Sources: [1][2][3]
Environment variable required for Corepack to work on Vercel.
While Vercel supports Corepack, it's treated as experimental and requires explicit enablement. The corepack yarn commands in vercel.json will not work without setting the environment variable ENABLE_EXPERIMENTAL_COREPACK=1 in your Vercel deployment settings. Additionally, ensure your package.json includes the packageManager field (e.g., "packageManager": "yarn@4.x.x").
Verify that both the environment variable and package.json configuration are in place before deploying.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@vercel.json` around lines 5 - 6, The vercel.json uses "installCommand" and
"buildCommand" with "corepack yarn" but Corepack is experimental on Vercel; set
the environment variable ENABLE_EXPERIMENTAL_COREPACK=1 in the Vercel
project/deployment settings and ensure package.json includes a packageManager
entry (e.g., "packageManager": "yarn@4.x.x") so the "corepack yarn install
--immutable" and "corepack yarn build" commands work reliably during
deployments.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Summary
yarnTesting
Note
Medium Risk
Build and release pipelines now rely on Corepack/Yarn 4 and
yarn install --immutable, which can fail if lock/config isn’t aligned across environments. No runtime product logic changes, but CI/deploy breakage risk is moderate.Overview
Migrates the repo to Corepack-managed Yarn 4 by pinning
packageManagerinpackage.json, adding.yarnrc.yml, and updating contributor docs to usecorepack enablewith Node pinned via.nvmrc.Updates GitHub Actions release/test workflows and Vercel builds to run
corepackand replaceyarn install --frozen-lockfile(and related v1 flags) withyarn install --immutable. Also tweaks dependency sourcing for@plebbit/plebbit-react-hooks(tarball URL) and makesvitestpass when no tests are found (--passWithNoTests).Written by Cursor Bugbot for commit c4b83e6. This will update automatically on new commits. Configure here.
Summary by CodeRabbit
Chores
Documentation