From 61243b6394d6e2a26267c2c94d00527d881ced6c Mon Sep 17 00:00:00 2001 From: Kevin Mas Ruiz Date: Wed, 22 Oct 2025 16:29:41 +0200 Subject: [PATCH 1/5] chore: use concurrently for the build process concurrently allows running independent tasks in parallel in different node.js processes. This can reduce execution time drastically. In my machine it reduces the `npm run check` command execution time to a half. ``` Without concurrently: real 0m20.025s user 0m41.886s sys 0m1.882s With concurrently: real 0m9.910s user 0m59.061s sys 0m2.201s ``` --- package-lock.json | 1 + package.json | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index ea84bf9b..9c45a92f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -50,6 +50,7 @@ "@typescript-eslint/parser": "^8.44.0", "@vitest/coverage-v8": "^3.2.4", "@vitest/eslint-plugin": "^1.3.4", + "concurrently": "^9.2.1", "duplexpair": "^1.0.2", "eslint": "^9.34.0", "eslint-config-prettier": "^10.1.8", diff --git a/package.json b/package.json index f31e1cda..ce718cd5 100644 --- a/package.json +++ b/package.json @@ -37,14 +37,13 @@ "prepare": "npm run build", "build:clean": "rm -rf dist", "build:update-package-version": "tsx scripts/updatePackageVersion.ts", - "build:esm": "tsc --project tsconfig.esm.json", + "build:esm": "tsc --project tsconfig.esm.json && chmod +x dist/esm/index.js", "build:cjs": "tsc --project tsconfig.cjs.json", "build:universal-package": "tsx scripts/createUniversalPackage.ts", - "build:chmod": "chmod +x dist/esm/index.js", - "build": "npm run build:clean && npm run build:esm && npm run build:cjs && npm run build:universal-package && npm run build:chmod", + "build": "npm run build:clean && concurrently 'npm run build:esm' 'npm run build:cjs' 'npm run build:universal-package'", "inspect": "npm run build && mcp-inspector -- dist/esm/index.js", "prettier": "prettier", - "check": "npm run build && npm run check:types && npm run check:lint && npm run check:format && npm run check:dependencies", + "check": "concurrently 'npm run build' 'npm run check:types' 'npm run check:lint' 'npm run check:format' 'npm run check:dependencies'", "check:lint": "eslint .", "check:dependencies": "knip --strict", "check:format": "prettier -c .", From 1e33819e15a6a1db25ca361187d649dfdd328328 Mon Sep 17 00:00:00 2001 From: Kevin Mas Ruiz Date: Wed, 22 Oct 2025 16:37:10 +0200 Subject: [PATCH 2/5] Update package.json Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ce718cd5..f492014d 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "build:esm": "tsc --project tsconfig.esm.json && chmod +x dist/esm/index.js", "build:cjs": "tsc --project tsconfig.cjs.json", "build:universal-package": "tsx scripts/createUniversalPackage.ts", - "build": "npm run build:clean && concurrently 'npm run build:esm' 'npm run build:cjs' 'npm run build:universal-package'", + "build": "npm run build:clean && concurrently 'npm run build:esm' 'npm run build:cjs' && npm run build:universal-package'", "inspect": "npm run build && mcp-inspector -- dist/esm/index.js", "prettier": "prettier", "check": "concurrently 'npm run build' 'npm run check:types' 'npm run check:lint' 'npm run check:format' 'npm run check:dependencies'", From 8c00f795c15664ab77ddcec7ff9f3ba58052bfd3 Mon Sep 17 00:00:00 2001 From: Kevin Mas Ruiz Date: Wed, 22 Oct 2025 16:39:41 +0200 Subject: [PATCH 3/5] chore: fix copilot missing quotes --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f492014d..b0454380 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "build:esm": "tsc --project tsconfig.esm.json && chmod +x dist/esm/index.js", "build:cjs": "tsc --project tsconfig.cjs.json", "build:universal-package": "tsx scripts/createUniversalPackage.ts", - "build": "npm run build:clean && concurrently 'npm run build:esm' 'npm run build:cjs' && npm run build:universal-package'", + "build": "npm run build:clean && concurrently 'npm run build:esm' 'npm run build:cjs' && npm run build:universal-package", "inspect": "npm run build && mcp-inspector -- dist/esm/index.js", "prettier": "prettier", "check": "concurrently 'npm run build' 'npm run check:types' 'npm run check:lint' 'npm run check:format' 'npm run check:dependencies'", From 1aeb48666330aede2e8dc092ce326d8a0b163a6e Mon Sep 17 00:00:00 2001 From: Kevin Mas Ruiz Date: Wed, 22 Oct 2025 16:48:54 +0200 Subject: [PATCH 4/5] chore: fix for windows (use escaped double quotes) --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b0454380..bf103c88 100644 --- a/package.json +++ b/package.json @@ -40,10 +40,10 @@ "build:esm": "tsc --project tsconfig.esm.json && chmod +x dist/esm/index.js", "build:cjs": "tsc --project tsconfig.cjs.json", "build:universal-package": "tsx scripts/createUniversalPackage.ts", - "build": "npm run build:clean && concurrently 'npm run build:esm' 'npm run build:cjs' && npm run build:universal-package", + "build": "npm run build:clean && concurrently \"npm run build:esm\" \"npm run build:cjs\" && npm run build:universal-package", "inspect": "npm run build && mcp-inspector -- dist/esm/index.js", "prettier": "prettier", - "check": "concurrently 'npm run build' 'npm run check:types' 'npm run check:lint' 'npm run check:format' 'npm run check:dependencies'", + "check": "concurrently \"npm run build\" \"npm run check:types\" \"npm run check:lint\" \"npm run check:format\" \"npm run check:dependencies\"", "check:lint": "eslint .", "check:dependencies": "knip --strict", "check:format": "prettier -c .", From 95445d83ee8a8ac115a80246d764c8e24d737749 Mon Sep 17 00:00:00 2001 From: Kevin Mas Ruiz Date: Wed, 22 Oct 2025 17:16:46 +0200 Subject: [PATCH 5/5] chore: add concurrently explicitly as a devDependency it seems the inspector uses it, so npm i -D didn't add it in the package.json. Now we mark it explicit. --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index bf103c88..309cb643 100644 --- a/package.json +++ b/package.json @@ -75,6 +75,7 @@ "@typescript-eslint/parser": "^8.44.0", "@vitest/coverage-v8": "^3.2.4", "@vitest/eslint-plugin": "^1.3.4", + "concurrently": "^9.2.1", "duplexpair": "^1.0.2", "eslint": "^9.34.0", "eslint-config-prettier": "^10.1.8",