Migrate package manager from Yarn to pnpm#25
Conversation
Co-authored-by: warengonzaga <15052701+warengonzaga@users.noreply.github.com>
Co-authored-by: warengonzaga <15052701+warengonzaga@users.noreply.github.com>
Co-authored-by: warengonzaga <15052701+warengonzaga@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
@CodeRabbit review |
✅ Actions performedReview triggered.
|
📝 WalkthroughWalkthroughThe project transitions from Yarn to pnpm as its primary package manager. GitHub Actions workflows, configuration files, and documentation have been updated to reflect this change, replacing all yarn commands with their pnpm equivalents and adjusting configuration accordingly. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Very good, sir. I find this transition to be rather straightforward in execution. The modifications exhibit a consistent and homogeneous pattern throughout—a methodical replacement of one package management system with another. The absence of intricate logic alterations or structural complications renders this review an efficient undertaking. One need merely verify that the conversions have been applied with uniformity across all affected systems and that no residual references to the preceding implementation remain. A most expedient matter, I assure you. 🚥 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)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
.github/workflows/support.yml (1)
158-158:⚠️ Potential issue | 🟡 MinorSir, a remnant from the previous era — a stale Yarn reference in the diagnostic output.
Line 158 still reads
"Yarn/Corepack setup problems"in the failure troubleshooting hints. Given the migration, this should reference pnpm instead.🐛 Proposed fix
- echo "- Yarn/Corepack setup problems" + echo "- pnpm/Corepack setup problems".github/workflows/scan.yml (1)
118-130:⚠️ Potential issue | 🟡 MinorThe JSON audit parsing requires recalibration, sir.
Two matters require attention on this reporting step:
jq path mismatch: The
.data.vulnerabilitiespath does not exist in pnpm's audit output. pnpm follows npm's audit report v2 schema, which places vulnerability summaries at.metadata.vulnerabilities(containing severity counts). The current jq expression will silently resolve to "0", rendering the reported count rather decorative. The remedy is to use.metadata.vulnerabilities.totalfor an accurate count.Severity filter omitted: The original command included
--severity moderate, but the pnpm replacement lacks--audit-level. While this step gracefully continues via|| true, you may wish to restore filtering for reporting fidelity. pnpm audit fully supports--audit-level moderate.A minor matter, as the step does not gate the build, but one warrants correcting for accurate audit reporting.
🔧 Proposed adjustment for pnpm audit JSON parsing
- pnpm audit --json > audit.json || true + pnpm audit --json --audit-level moderate > audit.json || true if [ -f audit.json ]; then - vulnerabilities=$(cat audit.json | jq -r '.data.vulnerabilities // {} | length // 0' 2>/dev/null || echo "0") + vulnerabilities=$(cat audit.json | jq '.metadata.vulnerabilities.total // 0' 2>/dev/null || echo "0") echo "Found $vulnerabilities vulnerabilities"
🤖 Fix all issues with AI agents
In `@CONTRIBUTING.md`:
- Line 204: The docs reference a non-existent npm script `test:ci:debug`; either
update the troubleshooting line to use the existing `test:debug` script or add a
new script named `test:ci:debug` to package.json (copying behavior from
`test:debug` or combining CI flags as intended). Locate the string `pnpm
test:ci:debug` in CONTRIBUTING.md and replace it with `pnpm test:debug` if you
prefer the doc change, or add a `test:ci:debug` entry in package.json mirroring
`test:debug` if you prefer to keep the original wording.
🧹 Nitpick comments (1)
package.json (1)
125-128: A minor observation regarding theenginesfield, sir.The
enginesblock specifiesnpm >= 7.0.0but makes no mention ofpnpm. Whileenginesis advisory and pnpm will function regardless, adding apnpmconstraint would provide a clear signal to contributors about the expected version, consistent with the Corepack configuration.🔧 Suggested adjustment
"engines": { "node": ">=16.0.0", - "npm": ">=7.0.0" + "npm": ">=7.0.0", + "pnpm": ">=9.0.0" }
Migrates repository from Yarn 4.9.2 to pnpm 9.15.4 as the primary package manager for development.
Changes
Package Manager
packageManagerfield topnpm@9.15.4.yarnrc.ymlandyarn.lockpnpm-lock.yamlwith all dependencies.pnpm-store/to.gitignoreCI/CD Workflows
yarn install --immutable→pnpm install --frozen-lockfilepnpm test -- --watchAll=false(requires--separator)yarn npm audit --severity high→pnpm audit --audit-level highpackage-build-flow-actionto usepackage-manager: 'pnpm'Scripts & Documentation
prepublishOnlyto usepnpm buildInstallation Options
Users can still install the package with any package manager:
Development requires pnpm:
pnpm install pnpm test pnpm buildWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
api.example.com/opt/hostedtoolcache/node/24.13.0/x64/bin/node /opt/hostedtoolcache/node/24.13.0/x64/bin/node /home/REDACTED/work/log-engine/log-engine/node_modules/.pnpm/jest-worker@29.7.0/node_modules/jest-worker/build/workers/processChild.js(dns block)downloads.snyk.io/home/REDACTED/work/_temp/ghcca-node/node/bin/node node wrapper_dist/bootstrap.js exec(dns block)o30291.ingest.sentry.io/home/REDACTED/work/_temp/ghcca-node/node/bin/node node wrapper_dist/bootstrap.js exec(dns block)static.snyk.io/home/REDACTED/work/_temp/ghcca-node/node/bin/node node wrapper_dist/bootstrap.js exec(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
Created from VS Code.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
Summary by CodeRabbit