ci(workflows): pin pnpm version via packageManager field#7
Conversation
pnpm/action-setup@v4 was failing the test workflow with "No pnpm version is specified". Declaring packageManager in package.json is the preferred way to fix this — the action picks it up automatically. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: ZverGuy <maximbel2003@gmail.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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.
Code Review
This pull request adds the packageManager field to package.json. The review feedback correctly identifies a syntax error due to a missing trailing comma and points out that the specified pnpm version is invalid, providing a code suggestion to resolve these issues.
| "name": "cozystack-ui", | ||
| "private": true, | ||
| "type": "module", | ||
| "packageManager": "pnpm@10.26.0", |
There was a problem hiding this comment.
This line is missing a trailing comma, which makes the package.json file invalid JSON. Any subsequent pnpm or npm commands will fail due to this syntax error.
Additionally, the specified pnpm version 10.26.0 does not appear to be a valid, publicly released version. This will likely cause the CI to fail when pnpm/action-setup tries to download it, as it won't be found in the official pnpm releases.
Please add the comma and use a valid pnpm version to fix both issues.
| "packageManager": "pnpm@10.26.0", | |
| "packageManager": "pnpm@9.4.0", |
What
Add
"packageManager": "pnpm@10.26.0"to the rootpackage.json.Why
The
testworkflow added in #5 has been failing on every run withNo pnpm version is specified—pnpm/action-setup@v4requires eithera
version:input on the action or apackageManagerfield inpackage.json. The latter is the preferred declaration because italso pins the version for local developers, not just CI.
Verification
pnpm install --frozen-lockfile— cleanpnpm typecheck— cleanpnpm test— 29/29 passingOnce merged, the
testcheck should go green onmainand onsubsequent PRs.