Skip to content

Commit 9fbf53d

Browse files
devmgnclaude
andauthored
chore: untrack auto-generated MSW worker and relax engines.node (#2714)
* chore: gitignore auto-generated mockServiceWorker.js 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]> * chore: add msw init to prepare script 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]> * chore: use postinstall instead of prepare for msw init 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]> * fix * fix --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
1 parent 7bd0967 commit 9fbf53d

5 files changed

Lines changed: 5 additions & 396 deletions

File tree

.claude/rules/ci.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ paths:
77

88
- `main` + feature branches, CI runs on non-main branches only
99
- **lint.yml**: `pnpm check`**test.yml**: `pnpm test:unit`**build.yml**: `pnpm build` + upload `.next/`
10-
- **update-msw.yml**: Auto-update MSW worker (Renovate bot only)
1110
- Shared setup: ubuntu-24.04, 10min timeout, `pnpm/action-setup@v6`, Node.js from `mise.toml`, copies `.env.development` to `.env.local`
1211
- `upload-artifact` requires `include-hidden-files: true` for `.next/`
1312
- Action versions pinned by commit SHA

.github/workflows/update-msw.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,3 +236,6 @@ scripts/actionlint
236236

237237
# next-agents-md
238238
.next-docs/
239+
240+
# MSW (auto-generated by postinstall via package.json "msw.workerDirectory")
241+
/public/mockServiceWorker.js

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
"vitest": "4.1.4"
9090
},
9191
"engines": {
92-
"node": "24.15.0"
92+
"node": ">=24"
9393
},
9494
"packageManager": "[email protected]",
9595
"pnpm": {
@@ -105,6 +105,6 @@
105105
]
106106
},
107107
"msw": {
108-
"workerDirectory": "./public"
108+
"workerDirectory": "public"
109109
}
110110
}

0 commit comments

Comments
 (0)