diff --git a/package.json b/package.json index acb8f21608b5e..071e4996b2e05 100644 --- a/package.json +++ b/package.json @@ -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 .", @@ -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", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5fa1770b5c89f..b75b9aaf23d2a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -383,9 +383,6 @@ importers: node-plop: specifier: 0.31.1 version: 0.31.1 - npm-run-all: - specifier: 4.1.5 - version: 4.1.5 nprogress: specifier: 0.2.0 version: 0.2.0 @@ -17195,11 +17192,6 @@ packages: engines: {node: '>= 0.6'} dev: true - /memorystream@0.3.1: - resolution: {integrity: sha1-htcJCzDORV1j+64S3aUaR93K+bI=} - engines: {node: '>= 0.10.0'} - dev: true - /meow@3.7.0: resolution: {integrity: sha512-TNdwZs0skRlpPpCUK25StC4VH+tP5GgeY1HQOOGP+lQ2xtdkN2VtT/5tiX9k3IWpkBPV9b3LsAWXn4GGi/PrSA==} engines: {node: '>=0.10.0'} @@ -18393,22 +18385,6 @@ packages: - supports-color dev: true - /npm-run-all@4.1.5: - resolution: {integrity: sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==} - engines: {node: '>= 4'} - hasBin: true - dependencies: - ansi-styles: 3.2.1 - chalk: 2.4.2 - cross-spawn: 6.0.5 - memorystream: 0.3.1 - minimatch: 3.1.2 - pidtree: 0.3.0 - read-pkg: 3.0.0 - shell-quote: 1.7.3 - string.prototype.padend: 3.1.0 - dev: true - /npm-run-path@1.0.0: resolution: {integrity: sha512-PrGAi1SLlqNvKN5uGBjIgnrTb8fl0Jz0a3JJmeMcGnIBh7UE9Gc4zsAMlwDajOMg2b1OgP6UPvoLUboTmMZPFA==} engines: {node: '>=0.10.0'} @@ -19297,12 +19273,6 @@ packages: engines: {node: '>=12'} dev: true - /pidtree@0.3.0: - resolution: {integrity: sha512-9CT4NFlDcosssyg8KVFltgokyKZIFjoBxw8CTGy+5F38Y1eQWrt8tRayiUOXE+zVKQnYu5BR8JjCtvK3BcnBhg==} - engines: {node: '>=0.10'} - hasBin: true - dev: true - /pify@2.3.0: resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} engines: {node: '>=0.10.0'} @@ -23104,14 +23074,6 @@ packages: regexp.prototype.flags: 1.4.3 side-channel: 1.0.4 - /string.prototype.padend@3.1.0: - resolution: {integrity: sha512-3aIv8Ffdp8EZj8iLwREGpQaUZiPyrWrpzMBHvkiSW/bK/EGve9np07Vwy7IJ5waydpGXzQZu/F8Oze2/IWkBaA==} - engines: {node: '>= 0.4'} - dependencies: - define-properties: 1.1.4 - es-abstract: 1.20.2 - dev: true - /string.prototype.trim@1.2.7: resolution: {integrity: sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==} engines: {node: '>= 0.4'} diff --git a/scripts/run-p.mjs b/scripts/run-p.mjs new file mode 100644 index 0000000000000..e986be3bea21d --- /dev/null +++ b/scripts/run-p.mjs @@ -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) + }) +}