Skip to content

Commit 6e241fb

Browse files
committed
chore: use pnpm in package.json scripts
1 parent 1b6e212 commit 6e241fb

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
npx lint-staged
1+
pnpm lint-staged

lint-staged.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export default {
22
"*.rs": "rustfmt",
33
"*.{ts,tsx,js,mjs,yaml,yml}":
44
"node ./node_modules/prettier/bin/prettier.cjs --write",
5-
"*.toml": "npx @taplo/cli format",
5+
"*.toml": "pnpm @taplo/cli format",
66
"*.{ts,tsx,js,cts,cjs,mts,mjs}": [
77
"pnpm run lint:js",
88
// ignore staged file list; execute x without extra args

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
"format:rs": "cargo fmt --all",
2828
"format:js": "pnpm run format-ci:js --write",
2929
"format-ci:js": "node ./node_modules/prettier/bin/prettier.cjs \"packages/**/src/**/*.{ts,tsx,mts,cts,js,mjs,cjs,jsx}\" \"crates/rspack_plugin_runtime/**/*.{ts,js}\" \"scripts/**/*.{cjs,mjs,js}\" \"*.mjs\" \"x\" --check",
30-
"format-ci:toml": "npx @taplo/cli format --check '.cargo/*.toml' './crates/**/Cargo.toml' './Cargo.toml'",
31-
"format:toml": "npx @taplo/cli format '.cargo/*.toml' './crates/**/Cargo.toml' './Cargo.toml'",
30+
"format-ci:toml": "pnpm @taplo/cli format --check '.cargo/*.toml' './crates/**/Cargo.toml' './Cargo.toml'",
31+
"format:toml": "pnpm @taplo/cli format '.cargo/*.toml' './crates/**/Cargo.toml' './Cargo.toml'",
3232
"lint:js": "pnpm run lint-ci:js --write",
3333
"lint-ci:js": "biome check --diagnostic-level=warn --no-errors-on-unmatched --max-diagnostics=none --error-on-warnings",
3434
"lint:rs": "node ./scripts/check_rust_dependency.cjs",

x.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ rspackCommand
202202
.action(async ({ debug }) => {
203203
try {
204204
if (!debug) {
205-
await $`npx rspack ${getVariadicArgs()}`;
205+
await $`pnpm rspack ${getVariadicArgs()}`;
206206
return;
207207
}
208208
await launchRspackCli(getVariadicArgs());
@@ -234,7 +234,7 @@ jestCommand
234234
.argument("[args...]", "Arguments pass through to rspack cli")
235235
.action(async ({ debug }) => {
236236
if (!debug) {
237-
await $`npx jest ${getVariadicArgs()}`;
237+
await $`pnpm jest ${getVariadicArgs()}`;
238238
return;
239239
}
240240
await launchJestWithArgs(getVariadicArgs());

0 commit comments

Comments
 (0)