Skip to content

chore: Yarn classic から npm 12 へ移行(strict-allow-scripts) - #40

Merged
YouheiNozaki merged 4 commits into
mainfrom
cursor/npm-12-strict-allow-scripts-b493
Nov 9, 2026
Merged

YouheiNozaki merged 4 commits into
mainfrom
cursor/npm-12-strict-allow-scripts-b493

Conversation

@YouheiNozaki

@YouheiNozaki YouheiNozaki commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Yarn classic(yarn.lock)から package-lock.json へ移行し、packageManager を npm@12.2.1 に固定(リポジトリ開発用)
  • .npmrc を npm 向けに整理し strict-allow-scripts=true(Takumi Guard / min-release-age=7 は維持)。pnpm 向けキーは削除
  • 依存の install script は esbuild@0.25.12 / esbuild@0.28.2 のみ許可
  • CI / release は npm ci の前に npm 12 を入れ、setup-node の cache: yarn は使わない(npm 12 導入後に actions/cache)
  • Check workflow に permissions: contents: read を明示
  • npm cache は _cacache のみ保存し、restore-keys を外して exact key のみ(lockfile 不一致時の広い fallback を避ける)
  • 公開パッケージに engines.npm は付けない(利用者へ npm 12 を強制しない)
  • Node.js を 26.13.0 に更新(.tool-versions)。release も 24.x 浮動をやめ、同じファイルを参照

ClickUp: https://app.clickup.com/t/36964664/z92047dkga

Test plan

  • Node 26.13.0 / npm 12.2.1 で npm ci(strict-allow-scripts あり)
  • npm run dev:prepare
  • npm run lint
  • npm run dev:build(以前のコミットで確認)
  • CI(移行・permissions/cache 時点)
  • CI(Node 26.13.0 更新後)
Open in Web Open in Cursor 

Pin packageManager to npm@12.2.1, replace yarn.lock with package-lock.json,
keep Takumi Guard / min-release-age, and allow only the esbuild install
scripts needed for module builds. CI and release now use npm ci after
installing npm 12.

Co-authored-by: YoheiNozaki <YouheiNozaki@users.noreply.github.com>
@YouheiNozaki YouheiNozaki self-assigned this Nov 9, 2026
cursoragent and others added 3 commits November 9, 2026 10:43
packageManager stays for repo/dev pinning. engines.npm would ship to
npm consumers and is not appropriate for this OSS library.

Co-authored-by: YoheiNozaki <YouheiNozaki@users.noreply.github.com>
Set contents:read, cache only _cacache, and drop restore-keys so a
mismatched lockfile cannot fall back to another branch's cache.

Co-authored-by: YoheiNozaki <YouheiNozaki@users.noreply.github.com>
Use .tool-versions as the single source for both Check and release so
release no longer floats on Node 24.x. Keep npm 12 pinned separately.

Co-authored-by: YoheiNozaki <YouheiNozaki@users.noreply.github.com>
@YouheiNozaki
YouheiNozaki merged commit f18ffb0 into main Nov 9, 2026
1 check passed
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