chore: use pnpm exec in precommit#1671
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
📝 WalkthroughWalkthroughThe pull request updates package.json to replace direct Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
package.json (1)
151-151: Usepnpm execfor binary calls in hooks.According to pnpm v10 documentation,
pnpm exec <binary>is the recommended form for running local dependency binaries in hook contexts. Whilstpnpm <binary>works in many setups, usingpnpm execexplicitly prevents potential future conflicts if pnpm adds a built-in command matching a binary name.Suggested diff
"simple-git-hooks": { - "pre-commit": "pnpm lint-staged" + "pre-commit": "pnpm exec lint-staged" }, "lint-staged": { "i18n/locales/*": [ "node ./lunaria/lunaria.ts", - "pnpm oxfmt lunaria/files/", + "pnpm exec oxfmt lunaria/files/", "git add lunaria/files/", "node scripts/generate-i18n-schema.ts", - "pnpm oxfmt i18n/schema.json", + "pnpm exec oxfmt i18n/schema.json", "git add i18n/schema.json" ], "*.{js,ts,mjs,cjs,vue}": [ - "pnpm oxlint --fix" + "pnpm exec oxlint --fix" ], "*.{js,ts,mjs,cjs,vue,json,yml,md,html,css}": [ - "pnpm oxfmt" + "pnpm exec oxfmt" ] },Also applies to: 156-157, 159-160, 163-164, 169-170
d93a8f5 to
41b94f8
Compare
41b94f8 to
0817598
Compare
🧭 Context
Bin files need to be called differently depending on the system, and to avoid solving this problem for others, I implemented it through pnpm exec, which only works with local bin files and therefore should work fast