Skip to content

chore: パッケージマネージャを npm から pnpm へ移行#34

Merged
yk-lab merged 2 commits into
mainfrom
chore/migrate-to-pnpm
Jun 22, 2026
Merged

chore: パッケージマネージャを npm から pnpm へ移行#34
yk-lab merged 2 commits into
mainfrom
chore/migrate-to-pnpm

Conversation

@yk-lab

@yk-lab yk-lab commented Jun 22, 2026

Copy link
Copy Markdown
Owner

概要

パッケージマネージャを npm → pnpm へ移行します。packageManager フィールドで版を固定し、CI と一致させます(先日の npm 版ズレ事故の再発防止)。

変更

  • package.json: packageManager: pnpm@11.8.0 固定、preinstall: only-allow pnpm で pnpm 強制、all スクリプトを pnpm に。
  • lockfile: package-lock.json 削除 → pnpm-lock.yaml 生成。
  • pnpm-workspace.yaml(新規): minimumReleaseAge: 4320(3日)。公開3日未満の依存版を使わない供給網 cooldown(SHA ピン・checksum 検証と同じ硬化方針)。CI の --frozen-lockfile は毎回このポリシーも検証する。
  • CI / self-test: pnpm/action-setup@v6.0.9SHA ピン)を setup-node より前に配置、cache: pnpmpnpm install --frozen-lockfilepnpm run ...
  • dist/ 再ビルド: ポリシーにより semver が 7.8.5→7.8.4 等に解決され、ncc 再バンドル。CI も同 lockfile + pnpm 11.8.0 で再ビルドし鮮度チェックは一致。
  • ドキュメント: CLAUDE / CONTRIBUTING / README / PR テンプレ / TODO を pnpm に更新。

テスト

  • pnpm install --frozen-lockfile(ポリシー検証込み)OK
  • pnpm run all green(47 tests)
  • CI / self-test pass

🤖 Generated with Claude Code


Summary by cubic

Migrate package management from npm to pnpm across the repo and CI for consistent installs and supply‑chain hardening. Pin pnpm to 11.8.0, add a 3‑day minimumReleaseAge, replace the lockfile, and rebuild dist/.

  • Refactors

    • Enforce pnpm: set packageManager: pnpm@11.8.0 and preinstall: only-allow pnpm; replace package-lock.json with pnpm-lock.yaml.
    • Add pnpm-workspace.yaml with minimumReleaseAge: 4320 (3 days).
    • Update CI/self-test: use pnpm/action-setup (SHA-pinned) before actions/setup-node, enable cache: pnpm, run pnpm install --frozen-lockfile, and pnpm run ....
    • Rebuild dist/ to match new resolutions (e.g., semver 7.8.4); update docs/templates to pnpm.
  • Migration

    • Run corepack enable to use the pinned pnpm.
    • Use pnpm run all locally; CI should run pnpm install --frozen-lockfile.

Written for commit 5fdf3d3. Summary will update on new commits.

Review in cubic

yk-lab and others added 2 commits June 22, 2026 11:16
- packageManager: pnpm@11.8.0 を固定し、preinstall: only-allow pnpm で強制(既存)。
- package-lock.json を削除し pnpm-lock.yaml を生成。
- CI/self-test: pnpm/action-setup(v6.0.9・SHA ピン)を setup-node より前に置き、cache: pnpm /
  pnpm install --frozen-lockfile / pnpm run ... に変更。
- pnpm-workspace.yaml に minimumReleaseAge: 4320(3日) を設定(供給網 cooldown)。
  これに伴い semver 7.8.5->7.8.4 等、公開3日以上の版に解決し dist を再ビルド。
  CI の --frozen-lockfile はこのポリシーも毎回検証する。
- ドキュメント(CLAUDE/CONTRIBUTING/README/PR テンプレ/TODO)を pnpm に更新。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 13 files

Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.

Re-trigger cubic

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a409e408-4ab5-4a7f-ae89-a04fe47ab958

📥 Commits

Reviewing files that changed from the base of the PR and between 922e3ca and 5fdf3d3.

⛔ Files ignored due to path filters (8)
  • .github/workflows/ci.yml is excluded by !**/*.yml
  • .github/workflows/self-test.yml is excluded by !**/*.yml
  • dist/index.js is excluded by !**/dist/**, !dist/**
  • dist/index.js.map is excluded by !**/dist/**, !**/*.map, !dist/**, !**/*.map
  • package-lock.json is excluded by !**/package-lock.json, !**/*.json
  • package.json is excluded by !**/*.json
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !**/*.yaml
  • pnpm-workspace.yaml is excluded by !**/*.yaml
📒 Files selected for processing (5)
  • .github/pull_request_template.md
  • CLAUDE.md
  • CONTRIBUTING.md
  • README.md
  • TODO.md

📝 Walkthrough

Summary by CodeRabbit

リリースノート

  • Documentation
    • パッケージマネージャーの指示を npm から pnpm に統一しました
    • セットアップ手順、実行コマンド、ビルドプロセスの説明を更新しました
    • Node 24+ の要件とコアパック対応を明記しました

Walkthrough

README、CONTRIBUTING.md、CLAUDE.md、PR テンプレート、TODO.md の全ドキュメントで npm/npx ベースのコマンドを pnpm に統一。corepack enable による固定バージョン使用や minimumReleaseAge クールダウンに関する注記も追加された。

Changes

npm → pnpm ドキュメント更新

Layer / File(s) Summary
npm → pnpm コマンド一括置換
README.md, CONTRIBUTING.md, CLAUDE.md, .github/pull_request_template.md, TODO.md
各ドキュメントで npm install / npm run all / npm run build / npx vitest を対応する pnpm コマンドへ置き換え。CONTRIBUTING.mdCLAUDE.md には pnpm install の supply-chain cooldown 挙動と CI の packageManager ピン合わせに関する注記を追加。

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 にんじん畑のコマンド畑、
npm の芽を pnpm に植え替えて、
corepack でピン留め、ぴょんと跳ねる!
クールダウンも README も整えて、
今日も元気にドキュメント完成 🥕✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed タイトルはパッケージマネージャーをnpmからpnpmへ移行するというPRの主要な変更を的確に要約している。
Description check ✅ Passed PRの説明は必要なセクション(概要、変更内容、テスト)をカバーしており、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 chore/migrate-to-pnpm

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.

@yk-lab yk-lab merged commit f654a77 into main Jun 22, 2026
15 checks passed
@yk-lab yk-lab deleted the chore/migrate-to-pnpm branch June 22, 2026 11:33
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.

1 participant