Skip to content

Commit c0242a4

Browse files
devmgnclaude
andcommitted
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]>
1 parent 10c006c commit c0242a4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"generate-api": "pnpm dlx @openapitools/openapi-generator-cli generate -i openapi.yml -g typescript-fetch -o ./src/api/openapi -c openapiconfig.json --openapi-normalizer SET_TAGS_FOR_ALL_OPERATIONS=default",
2626
"generate-api:clean": "rm -rf src/api/openapi && pnpm generate-api",
2727
"generate-mock": "msw-auto-mock openapi.yml -o ./src/mocks --typescript --base-url https://jsonplaceholder.typicode.com && sed -i '' 's|from \"@faker-js/faker\"|from \"@faker-js/faker/locale/ja\"|' ./src/mocks/handlers.ts",
28-
"prepare": "msw init public --save"
28+
"postinstall": "msw init public --save"
2929
},
3030
"dependencies": {
3131
"@hookform/resolvers": "5.2.2",

0 commit comments

Comments
 (0)