Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: drop npm-run-all #62642

Merged
merged 1 commit into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"typescript": "tsc --noEmit",
"lint-typescript": "turbo run typescript",
"lint-eslint": "eslint . --ext js,jsx,ts,tsx --max-warnings=0 --config .eslintrc.json --no-eslintrc",
"lint-no-typescript": "run-p prettier-check lint-eslint lint-language",
"types-and-precompiled": "run-p lint-typescript check-precompiled",
"lint": "run-p test-types lint-typescript prettier-check lint-eslint lint-language",
"lint-no-typescript": "node scripts/run-p.mjs prettier-check lint-eslint lint-language",
"types-and-precompiled": "node scripts/run-p.mjs lint-typescript check-precompiled",
"lint": "node scripts/run-p.mjs test-types lint-typescript prettier-check lint-eslint lint-language",
"lint-fix": "pnpm prettier-fix && eslint . --ext js,jsx,ts,tsx --fix --max-warnings=0 --config .eslintrc.json --no-eslintrc",
"lint-language": "alex .",
"prettier-check": "prettier --check .",
Expand Down Expand Up @@ -179,7 +179,6 @@
"next": "workspace:*",
"node-fetch": "2.6.7",
"node-plop": "0.31.1",
"npm-run-all": "4.1.5",
"nprogress": "0.2.0",
"octokit": "3.1.0",
"open": "9.0.0",
Expand Down
38 changes: 0 additions & 38 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions scripts/run-p.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Runs multiple scripts in parallel using pnpm

import { spawn } from 'child_process'

for (const script of process.argv.slice(2)) {
spawn('pnpm', ['run', script], {
stdio: 'inherit',
shell: true,
})
.on('error', (error) => {
console.error(`Error: ${error.message}`)
process.exit(1)
})
.on('close', (code) => {
console.log(`script "${script}" exited with code ${code}`)
process.exit(code)
})
}