Skip to content

chore: convert repo from npm to pnpm#1

Merged
kibertoad merged 1 commit into
mainfrom
claude/repo-pnpm-conversion-rj8tom
Jun 21, 2026
Merged

chore: convert repo from npm to pnpm#1
kibertoad merged 1 commit into
mainfrom
claude/repo-pnpm-conversion-rj8tom

Conversation

@kibertoad

@kibertoad kibertoad commented Jun 13, 2026

Copy link
Copy Markdown
Owner
  • Add packageManager field (pnpm@11.6.0) and pnpm-lock.yaml
  • Update CI and publish workflows to use pnpm/action-setup and pnpm commands
  • Update prepublishOnly script and docs (README, PROFILING) to pnpm

Summary by CodeRabbit

  • Chores

    • Migrated project from npm to pnpm as the package manager, including CI/CD pipelines and build configurations.
  • Documentation

    • Updated all documentation, including setup and script instructions, to reflect pnpm commands.

- Add packageManager field (pnpm@11.6.0) and pnpm-lock.yaml
- Update CI and publish workflows to use pnpm/action-setup and pnpm commands
- Update prepublishOnly script and docs (README, PROFILING) to pnpm
@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR migrates the repository from npm to pnpm as the package manager. Changes include declaring pnpm@11.6.0 in package.json, updating CI and release GitHub Actions workflows to use pnpm commands with appropriate flags, and updating all documentation examples to show pnpm usage.

Changes

Package Manager Migration to pnpm

Layer / File(s) Summary
Package manager declaration
package.json
Declares pnpm@11.6.0 in packageManager field and updates the prepublishOnly script to invoke pnpm instead of npm.
CI workflow migration
.github/workflows/ci.yml
Adds pnpm setup step, enables pnpm caching in Node setup, and replaces all npm commands with pnpm install --frozen-lockfile and pnpm run equivalents for build, test, and lint.
Release workflow migration
.github/workflows/publish.yml
Adds pnpm setup and cache configuration, updates dependency install and build to use pnpm, replaces npm version with pnpm version --no-git-tag-version, and updates npm publish to pnpm publish --provenance --access public --no-git-checks.
Documentation command updates
README.md, PROFILING.md
Updates all documented shell commands to use pnpm in place of npm for unit tests, memory leak tests, benchmarks, profiling, and server invocations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A rabbit hops through package lands,
Where npm yields to pnpm's hands,
Install fast with frozen lock,
CI and docs—all synchronized around the clock! 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: convert repo from npm to pnpm' accurately and concisely describes the primary change: migrating the repository's package manager from npm to pnpm.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/repo-pnpm-conversion-rj8tom

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 23-24: The workflow uses tag-pinned actions (pnpm/action-setup@v4,
actions/setup-node@v6, actions/checkout@v6,
fastify/github-action-merge-dependabot@v3); replace each tag ref with the
corresponding full commit SHA (e.g., pnpm/action-setup@<commit-sha>) by looking
up the canonical action repo and using the exact commit SHA you want to pin,
updating the refs in .github/workflows/ci.yml so all four actions are referenced
by their full commit SHAs instead of the tag names.
- Around line 26-32: Remove the unsupported always-auth input from the
actions/setup-node@v6 step (delete the always-auth: false line) so the workflow
no longer supplies an invalid input, and update the workflow action references
(e.g., actions/checkout@v6, pnpm/action-setup@v4, actions/setup-node@v6,
fastify/github-action-merge-dependabot@v3) to pinned immutable commit SHAs
instead of floating tags to harden the supply chain.

In @.github/workflows/publish.yml:
- Around line 26-27: Replace floating action tags with immutable commit SHAs:
pin pnpm/action-setup@v4, actions/setup-node@v6 and actions/checkout@v6 used in
the publish workflow to their corresponding full commit SHAs (replace the `@vX`
style with @<commit-sha>), and make the same change for the unpinned actions in
the CI workflow; ensure each action reference is updated to a specific commit
SHA rather than a version tag so the workflows become immutable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a2ea7cf8-1260-43e1-8ced-4569de77639a

📥 Commits

Reviewing files that changed from the base of the PR and between 9ba28e7 and 835ba86.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • .github/workflows/ci.yml
  • .github/workflows/publish.yml
  • PROFILING.md
  • README.md
  • package.json

Comment thread .github/workflows/ci.yml
Comment on lines +23 to +24
- name: Setup pnpm
uses: pnpm/action-setup@v4

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the relevant portion of the workflow around the referenced lines
sed -n '1,120p' .github/workflows/ci.yml | nl -ba | sed -n '15,60p'

# Confirm all `uses:` entries in the workflow for security pinning review
rg -n "^\s*- uses:\s*" .github/workflows/ci.yml

Repository: kibertoad/json-river

Length of output: 107


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Print with line numbers using awk (since `nl` isn't available)
awk 'NR>=1 && NR<=120 {printf "%4d:%s\n", NR, $0}' .github/workflows/ci.yml | sed -n '15,80p'

# List all `uses:` entries in the workflow
rg -n '^\s*- uses:\s*' .github/workflows/ci.yml

Repository: kibertoad/json-river

Length of output: 1237


Pin GitHub Actions to full commit SHAs in .github/workflows/ci.yml
pnpm/action-setup@v4 and actions/setup-node@v6 are tag-pinned; replace the tag refs with full commit SHAs to strengthen CI supply-chain guarantees. (Also tag-pinned: actions/checkout@v6 and fastify/github-action-merge-dependabot@v3.)

Suggested fix
-      - name: Setup pnpm
-        uses: pnpm/action-setup@v4
+      - name: Setup pnpm
+        uses: pnpm/action-setup@<FULL_COMMIT_SHA>

       - name: Setup Node ${{ matrix.node-version }}
-        uses: actions/setup-node@v6
+        uses: actions/setup-node@<FULL_COMMIT_SHA>
🧰 Tools
🪛 zizmor (1.25.2)

[error] 24-24: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 23 - 24, The workflow uses tag-pinned
actions (pnpm/action-setup@v4, actions/setup-node@v6, actions/checkout@v6,
fastify/github-action-merge-dependabot@v3); replace each tag ref with the
corresponding full commit SHA (e.g., pnpm/action-setup@<commit-sha>) by looking
up the canonical action repo and using the exact commit SHA you want to pin,
updating the refs in .github/workflows/ci.yml so all four actions are referenced
by their full commit SHAs instead of the tag names.

Source: Linters/SAST tools

Comment thread .github/workflows/ci.yml
Comment on lines 26 to 32
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
always-auth: false
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE=".github/workflows/ci.yml"
echo "=== File: $FILE ==="
ls -la "$FILE" || true
echo "--- Lines 1-120 (context) ---"
nl -ba "$FILE" | sed -n '1,140p'
echo "--- Lines 20-60 (target) ---"
nl -ba "$FILE" | sed -n '20,70p'

echo "=== Actions used in $FILE (quick scan) ==="
rg -n "uses:\s*([^ \n]+)" "$FILE" -o --no-filename | sed -n '1,200p' || true

echo "=== Full uses: lines (no regex truncation) ==="
rg -n "^\s*uses:\s*" "$FILE" || true

Repository: kibertoad/json-river

Length of output: 268


🌐 Web query:

actions/setup-node v6 input always-auth

💡 Result:

In actions/setup-node version 6, the always-auth input has been completely removed [1][2]. This input was deprecated because always-auth is no longer supported or required by modern versions of the npm CLI [2][3]. To prevent workflow errors or warnings, you must remove any references to always-auth from your GitHub Actions configuration files [1][4]. If your specific workflow requirements necessitate the use of always-auth (for example, if you are using an older version of npm that still requires it), you will need to pin your action to a version prior to v6 [3].

Citations:


🌐 Web query:

actions/setup-node always-auth input

💡 Result:

The always-auth input in the actions/setup-node GitHub Action has been removed [1][2]. It is deprecated and no longer supported in modern versions of npm [2][3]. To avoid warnings or errors in your workflows, you should remove any existing references to always-auth from your workflow configuration files [1][4]. This change was implemented to align with current npm best practices, as the always-auth configuration was removed from the npm CLI several years ago [2][5].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE=".github/workflows/ci.yml"
echo "=== ls ==="
ls -la "$FILE"

echo "=== File contents (numbered, full) ==="
awk '{printf "%5d\t%s\n", NR, $0}' "$FILE"

echo "=== uses: entries ==="
rg -n "^\s*uses:\s*" "$FILE" || true

echo "=== any always-auth references ==="
rg -n "always-auth" "$FILE" || true

Repository: kibertoad/json-river

Length of output: 1762


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE=".github/workflows/ci.yml"
echo "=== All uses: occurrences ==="
rg -n "uses:" "$FILE"

echo "=== Check for pinned SHA patterns (40+ hex after @) ==="
rg -n "uses:\s*[^@\s]+@([0-9a-f]{40,})" "$FILE" || true

echo "=== Check for major-tag style (`@vN`) ==="
rg -n "uses:\s*[^@\s]+@v[0-9]+" "$FILE" || true

Repository: kibertoad/json-river

Length of output: 536


Remove unsupported always-auth input from actions/setup-node@v6

ci.yml sets always-auth: false for actions/setup-node@v6 (line 29), but always-auth is not supported in v6 and can cause workflow validation/lint errors.

Suggested fix
       - name: Setup Node ${{ matrix.node-version }}
         uses: actions/setup-node@v6
         with:
-          always-auth: false
           node-version: ${{ matrix.node-version }}
           cache: 'pnpm'

Also pin action references to immutable commit SHAs for supply-chain hardening (e.g., actions/checkout@v6, pnpm/action-setup@v4, actions/setup-node@v6, fastify/github-action-merge-dependabot@v3).

📝 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.

Suggested change
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
always-auth: false
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
🧰 Tools
🪛 actionlint (1.7.12)

[error] 29-29: input "always-auth" is not defined in action "actions/setup-node@v6". available inputs are "architecture", "cache", "cache-dependency-path", "check-latest", "mirror", "mirror-token", "node-version", "node-version-file", "package-manager-cache", "registry-url", "scope", "token"

(action)

🪛 zizmor (1.25.2)

[error] 27-27: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 26 - 32, Remove the unsupported
always-auth input from the actions/setup-node@v6 step (delete the always-auth:
false line) so the workflow no longer supplies an invalid input, and update the
workflow action references (e.g., actions/checkout@v6, pnpm/action-setup@v4,
actions/setup-node@v6, fastify/github-action-merge-dependabot@v3) to pinned
immutable commit SHAs instead of floating tags to harden the supply chain.

Source: Linters/SAST tools

Comment on lines +26 to +27
- name: Setup pnpm
uses: pnpm/action-setup@v4

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the reported section of publish.yml
sed -n '1,120p' .github/workflows/publish.yml | nl -ba | sed -n '15,110p'

# Extract all action uses in publish.yml (for pinning/unpinning context)
rg -n "^\s*uses:\s*" .github/workflows/publish.yml

# Check other workflows for floating action tags (same actions)
rg -n "uses:\s*(pnpm/action-setup@|actions/setup-node@)" .github/workflows || true

# Report all pnpm/action-setup and actions/setup-node occurrences with file+line
rg -n --hidden --glob '!.git/*' "pnpm/action-setup@|actions/setup-node@" .github/workflows || true

Repository: kibertoad/json-river

Length of output: 107


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Sanity: confirm file exists
ls -la .github/workflows/publish.yml

echo "---- publish.yml (around lines 20-50) ----"
# Print with line numbers (NR from awk)
awk 'NR>=15 && NR<=60 {printf "%5d  %s\n", NR, $0}' .github/workflows/publish.yml

echo "---- All uses: lines in publish.yml ----"
rg -n "^\s*uses:\s*" .github/workflows/publish.yml

echo "---- Floating tags for pnpm/action-setup and actions/setup-node across workflows ----"
rg -n "uses:\s*(pnpm/action-setup@v|actions/setup-node@v)" .github/workflows || true

echo "---- All occurrences of pnpm/action-setup@ and actions/setup-node@ across workflows ----"
rg -n "pnpm/action-setup@|actions/setup-node@" .github/workflows || true

Repository: kibertoad/json-river

Length of output: 2666


Pin GitHub Actions to immutable SHAs in publish (and CI) workflows

pnpm/action-setup@v4 (publish.yml:27) and actions/setup-node@v6 (publish.yml:30) use floating tags; pin to full commit SHAs. Same actions are also unpinned in .github/workflows/ci.yml, and actions/checkout@v6 is unpinned in publish.yml (line 21).

Suggested fix
-      - name: Setup pnpm
-        uses: pnpm/action-setup@v4
+      - name: Setup pnpm
+        uses: pnpm/action-setup@<FULL_COMMIT_SHA>

       - name: Setup Node
-        uses: actions/setup-node@v6
+        uses: actions/setup-node@<FULL_COMMIT_SHA>

Version bump is constrained to major|minor|patch, so no template-injection mitigation is needed there.

🧰 Tools
🪛 zizmor (1.25.2)

[error] 27-27: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/publish.yml around lines 26 - 27, Replace floating action
tags with immutable commit SHAs: pin pnpm/action-setup@v4, actions/setup-node@v6
and actions/checkout@v6 used in the publish workflow to their corresponding full
commit SHAs (replace the `@vX` style with @<commit-sha>), and make the same change
for the unpinned actions in the CI workflow; ensure each action reference is
updated to a specific commit SHA rather than a version tag so the workflows
become immutable.

Source: Linters/SAST tools

@kibertoad
kibertoad merged commit 0ded52e into main Jun 21, 2026
4 checks passed
@kibertoad
kibertoad deleted the claude/repo-pnpm-conversion-rj8tom branch June 21, 2026 10:41
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