Skip to content

Commit c907894

Browse files
committed
refactor: simplify root scripts with unified flag forwarding
Simplify monorepo scripts to use clean 'pnpm run <cmd> --<flag>' pattern: - build, test, check, lint, type now support flag forwarding with -- - Removed redundant script variants (test:unit now aliases test) - Added build:all for building all packages - CI scripts now use base commands with --ci flag - pretest automatically builds CLI before running tests Examples: pnpm run build # Build CLI pnpm run build -- --clean # Build with --clean flag pnpm run test # Run tests pnpm run test -- -t pattern # Run tests matching pattern pnpm run build:custom-node -- --yes # Build custom Node.js
1 parent 3d781d6 commit c907894

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

package.json

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -177,25 +177,26 @@
177177
},
178178
"private": true,
179179
"scripts": {
180-
"build": "pnpm --filter \"./packages/**\" run build",
181-
"build:cli": "pnpm --filter @socketsecurity/cli run build",
182-
"build:socket": "pnpm --filter socket run build",
180+
"build": "pnpm --filter @socketsecurity/cli run build --",
181+
"build:all": "pnpm --filter \"./packages/**\" run build",
182+
"build:cli": "pnpm run build --",
183183
"build:custom-node": "pnpm --filter @socketbin/custom-node run build --",
184184
"build:sea": "pnpm --filter @socketbin/sea run build --",
185-
"check": "pnpm --filter @socketsecurity/cli run check",
186-
"check-ci": "pnpm --filter @socketsecurity/cli run check-ci",
185+
"build:socket": "pnpm --filter socket run build --",
186+
"check": "pnpm --filter @socketsecurity/cli run check --",
187+
"check-ci": "pnpm run check -- --ci",
187188
"clean": "pnpm --filter \"./packages/**\" run clean",
188-
"lint": "pnpm --filter @socketsecurity/cli run lint",
189-
"lint-ci": "pnpm --filter @socketsecurity/cli run lint-ci",
189+
"coverage:percent": "pnpm --filter @socketsecurity/cli run coverage:percent --",
190+
"lint": "pnpm --filter @socketsecurity/cli run lint --",
191+
"lint-ci": "pnpm run lint -- --ci",
190192
"prepare": "dotenvx -q run -f .env.local -- husky",
191-
"pretest:unit": "pnpm run build:cli",
192-
"test": "pnpm --filter @socketsecurity/cli run test",
193-
"test:unit": "pnpm --filter @socketsecurity/cli run test:unit",
194-
"test:unit:coverage": "pnpm --filter @socketsecurity/cli run test:unit:coverage",
195-
"test-ci": "pnpm --filter @socketsecurity/cli run test-ci",
196-
"type": "pnpm --filter @socketsecurity/cli run type",
197-
"type-ci": "pnpm --filter @socketsecurity/cli run type-ci",
198-
"coverage:percent": "pnpm --filter @socketsecurity/cli run coverage:percent"
193+
"pretest": "pnpm run build",
194+
"test": "pnpm --filter @socketsecurity/cli run test:unit --",
195+
"test-ci": "pnpm run test -- --ci",
196+
"test:coverage": "pnpm --filter @socketsecurity/cli run test:unit:coverage --",
197+
"test:unit": "pnpm run test --",
198+
"type": "pnpm --filter @socketsecurity/cli run type --",
199+
"type-ci": "pnpm run type -- --ci"
199200
},
200201
"typeCoverage": {
201202
"cache": true,

0 commit comments

Comments
 (0)