chore: untrack auto-generated MSW worker and relax engines.node#2714
Merged
chore: untrack auto-generated MSW worker and relax engines.node#2714
Conversation
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
public/mockServiceWorker.jsを.gitignoreに追加し、追跡中のファイルとワーカー自動更新ワークフロー (.github/workflows/update-msw.yml) を削除。ワーカーはローカル/デプロイ時にmsw init public/で再生成する前提に寄せるpackage.jsonのengines.nodeを24.15.0→>=24に緩和。Node バージョンの単一ソースはmise.tomlに一本化し、パッチ一致の二重管理を解消package.jsonのmsw.workerDirectoryを"./public"→"public"に整形Test plan
pnpm installが engines 関連の警告なしで通ることpnpm check/pnpm test:unit/pnpm buildが通ることpublic/mockServiceWorker.jsが手元で生成されていれば OK)🤖 Generated with Claude Code