Skip to content

chore: untrack auto-generated MSW worker and relax engines.node#2714

Merged
devmgn merged 7 commits intomainfrom
chore/gitignore-msw-worker
Apr 18, 2026
Merged

chore: untrack auto-generated MSW worker and relax engines.node#2714
devmgn merged 7 commits intomainfrom
chore/gitignore-msw-worker

Conversation

@devmgn
Copy link
Copy Markdown
Owner

@devmgn devmgn commented Apr 18, 2026

Summary

  • public/mockServiceWorker.js.gitignore に追加し、追跡中のファイルとワーカー自動更新ワークフロー (.github/workflows/update-msw.yml) を削除。ワーカーはローカル/デプロイ時に msw init public/ で再生成する前提に寄せる
  • package.jsonengines.node24.15.0>=24 に緩和。Node バージョンの単一ソースは mise.toml に一本化し、パッチ一致の二重管理を解消
  • package.jsonmsw.workerDirectory"./public""public" に整形

Test plan

  • pnpm install が engines 関連の警告なしで通ること
  • pnpm check / pnpm test:unit / pnpm build が通ること
  • CI(lint / test / build)が green
  • Storybook / MSW が動作すること(public/mockServiceWorker.js が手元で生成されていれば OK)

🤖 Generated with Claude Code

devmgn and others added 7 commits April 17, 2026 21:50
MSW postinstall auto-syncs public/mockServiceWorker.js via
package.json "msw.workerDirectory", so the update-msw.yml workflow
is redundant. Ignore the generated file and remove the workflow.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
pnpm hardlinks msw from its global store after the first build, so
msw's postinstall doesn't re-run on subsequent installs — new clones
hitting a warm store would not get public/mockServiceWorker.js.

Run `msw init public --save` in the prepare script so every
`pnpm install` regenerates the worker deterministically.

Normalize workerDirectory to "public" to keep `--save` idempotent
(passing "./public" triggers msw to append both forms).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
postinstall runs on every install variant (including `pnpm add`),
while prepare can skip under `--production` or single-package adds.
postinstall also avoids a future conflict with tools that claim
prepare (e.g., Husky).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@devmgn devmgn enabled auto-merge (squash) April 18, 2026 13:40
@devmgn devmgn merged commit 9fbf53d into main Apr 18, 2026
5 checks passed
@devmgn devmgn deleted the chore/gitignore-msw-worker branch April 18, 2026 13: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.

1 participant