From f4454da063c6c2f6de2e69b38c11003dae051f3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20Roli=C5=84ski?= Date: Fri, 19 Dec 2025 14:24:32 +0100 Subject: [PATCH 1/2] Clear jest's cache without real config validation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It still clears the default cache directory and yet, the config can be invalid due to missing files in packages associated to the currently processed one… due to the processing order of the `npm run … --workspaces` command. --- packages/autocertifier-server/package.json | 2 +- packages/cdn-location/package.json | 2 +- packages/cli-tools/package.json | 2 +- packages/dht/package.json | 2 +- packages/geoip-location/package.json | 2 +- packages/node/package.json | 2 +- packages/proto-rpc/package.json | 2 +- packages/sdk/package.json | 2 +- packages/test-utils/package.json | 2 +- packages/trackerless-network/package.json | 2 +- packages/utils/package.json | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/autocertifier-server/package.json b/packages/autocertifier-server/package.json index 80260c9a87..bae2c659a6 100644 --- a/packages/autocertifier-server/package.json +++ b/packages/autocertifier-server/package.json @@ -26,7 +26,7 @@ "scripts": { "build": "tsc -b", "check": "tsc -p tsconfig.jest.json", - "clean": "jest --clearCache || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true", + "clean": "jest --clearCache --config '{}'; rm -rf dist *.tsbuildinfo node_modules/.cache || true", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "jest test/unit test/integration", "test-unit": "jest test/unit", diff --git a/packages/cdn-location/package.json b/packages/cdn-location/package.json index 12be35bf2f..ed6b52a9aa 100644 --- a/packages/cdn-location/package.json +++ b/packages/cdn-location/package.json @@ -20,7 +20,7 @@ "scripts": { "build": "tsc -b", "check": "tsc -p tsconfig.jest.json", - "clean": "jest --clearCache || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true", + "clean": "jest --clearCache --config '{}'; rm -rf dist *.tsbuildinfo node_modules/.cache || true", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "jest test/integration", "test-integration": "jest test/integration", diff --git a/packages/cli-tools/package.json b/packages/cli-tools/package.json index c45ef5d7a0..99a6556e88 100644 --- a/packages/cli-tools/package.json +++ b/packages/cli-tools/package.json @@ -19,7 +19,7 @@ "scripts": { "build": "tsc -b", "check": "tsc -p tsconfig.jest.json", - "clean": "jest --clearCache || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true", + "clean": "jest --clearCache --config '{}'; rm -rf dist *.tsbuildinfo node_modules/.cache || true", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "npm run build && jest --bail --forceExit" }, diff --git a/packages/dht/package.json b/packages/dht/package.json index 756b4c18d1..a4033f5421 100644 --- a/packages/dht/package.json +++ b/packages/dht/package.json @@ -27,7 +27,7 @@ "build": "tsc -b", "build-browser": "webpack --mode=development --progress", "check": "tsc -p tsconfig.jest.json", - "clean": "jest --clearCache || true; rm -rf dist generated *.tsbuildinfo node_modules/.cache || true", + "clean": "jest --clearCache --config '{}'; rm -rf dist generated *.tsbuildinfo node_modules/.cache || true", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "npm run test-unit && npm run test-integration && npm run test-end-to-end", "test-browser": "karma start karma.config.ts", diff --git a/packages/geoip-location/package.json b/packages/geoip-location/package.json index 52db8088c0..9d3b8ce7b8 100644 --- a/packages/geoip-location/package.json +++ b/packages/geoip-location/package.json @@ -25,7 +25,7 @@ "scripts": { "build": "tsc -b", "check": "tsc -p tsconfig.jest.json", - "clean": "jest --clearCache || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true", + "clean": "jest --clearCache --config '{}'; rm -rf dist *.tsbuildinfo node_modules/.cache || true", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "jest test/unit", "test-unit": "jest test/unit" diff --git a/packages/node/package.json b/packages/node/package.json index c6244e19a5..f8c76f94f8 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -27,7 +27,7 @@ "scripts": { "build": "tsc -b", "check": "tsc -p tsconfig.jest.json", - "clean": "jest --clearCache || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true", + "clean": "jest --clearCache --config '{}'; rm -rf dist *.tsbuildinfo node_modules/.cache || true", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "npm run test-unit && npm run test-integration && npm run test-sequential", "test-unit": "jest test/unit", diff --git a/packages/proto-rpc/package.json b/packages/proto-rpc/package.json index b1add8f67d..f521bfb2f8 100644 --- a/packages/proto-rpc/package.json +++ b/packages/proto-rpc/package.json @@ -22,7 +22,7 @@ "build": "tsc -b", "build-browser": "webpack --mode=development --progress", "check": "./test-proto.sh && tsc -p tsconfig.jest.json", - "clean": "jest --clearCache || true; rm -rf dist generated *.tsbuildinfo node_modules/.cache || true", + "clean": "jest --clearCache --config '{}'; rm -rf dist generated *.tsbuildinfo node_modules/.cache || true", "eslint": "./test-proto.sh && eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "./test-proto.sh && npm run test-unit && npm run test-integration", "test-browser": "./test-proto.sh && karma start karma.config.ts", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 217f96416f..8dbf91efa1 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -37,7 +37,7 @@ "build-browser-development": "NODE_ENV=development webpack --mode=development --progress", "build-browser-production": "NODE_ENV=production webpack --mode=production --progress", "check": "tsc -p tsconfig.jest.json", - "clean": "jest --clearCache || true; rm -rf dist src/generated *.tsbuildinfo node_modules/.cache || true", + "clean": "jest --clearCache --config '{}'; rm -rf dist src/generated *.tsbuildinfo node_modules/.cache || true", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts,mts}'", "generate-protoc-code": "./proto.sh", "test": "npm run test-unit && npm run test-integration && npm run test-end-to-end", diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 69755f295e..2124060b71 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -18,7 +18,7 @@ "scripts": { "build": "tsc -b", "check": "tsc -p tsconfig.jest.json", - "clean": "jest --clearCache || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true", + "clean": "jest --clearCache --config '{}'; rm -rf dist *.tsbuildinfo node_modules/.cache || true", "test": "jest", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'" }, diff --git a/packages/trackerless-network/package.json b/packages/trackerless-network/package.json index 6fb412c92c..34c801a0f8 100644 --- a/packages/trackerless-network/package.json +++ b/packages/trackerless-network/package.json @@ -21,7 +21,7 @@ "build-browser": "webpack --mode=development --progress", "prebuild": "./proto.sh", "check": "tsc -p tsconfig.jest.json", - "clean": "jest --clearCache || true; rm -rf dist generated *.tsbuildinfo node_modules/.cache || true", + "clean": "jest --clearCache --config '{}'; rm -rf dist generated *.tsbuildinfo node_modules/.cache || true", "coverage": "jest --coverage", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "npm run test-unit && npm run test-integration && npm run test-end-to-end", diff --git a/packages/utils/package.json b/packages/utils/package.json index 3bd2db03a5..f2e28249bf 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -18,7 +18,7 @@ "scripts": { "build": "tsc -b", "check": "tsc -p tsconfig.jest.json", - "clean": "jest --clearCache || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true", + "clean": "jest --clearCache --config '{}'; rm -rf dist *.tsbuildinfo node_modules/.cache || true", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "jest", "test-browser": "karma start karma.config.ts" From abdcb36cfcc82c8bbb2131fe2df53ae7e2e7789e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20Roli=C5=84ski?= Date: Fri, 26 Dec 2025 02:18:42 +0100 Subject: [PATCH 2/2] Keep `|| true` --- packages/autocertifier-server/package.json | 2 +- packages/cdn-location/package.json | 2 +- packages/cli-tools/package.json | 2 +- packages/dht/package.json | 2 +- packages/geoip-location/package.json | 2 +- packages/node/package.json | 2 +- packages/proto-rpc/package.json | 2 +- packages/sdk/package.json | 2 +- packages/test-utils/package.json | 2 +- packages/trackerless-network/package.json | 2 +- packages/utils/package.json | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/autocertifier-server/package.json b/packages/autocertifier-server/package.json index bae2c659a6..85079ac178 100644 --- a/packages/autocertifier-server/package.json +++ b/packages/autocertifier-server/package.json @@ -26,7 +26,7 @@ "scripts": { "build": "tsc -b", "check": "tsc -p tsconfig.jest.json", - "clean": "jest --clearCache --config '{}'; rm -rf dist *.tsbuildinfo node_modules/.cache || true", + "clean": "jest --clearCache --config '{}' || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "jest test/unit test/integration", "test-unit": "jest test/unit", diff --git a/packages/cdn-location/package.json b/packages/cdn-location/package.json index ed6b52a9aa..e23265e26c 100644 --- a/packages/cdn-location/package.json +++ b/packages/cdn-location/package.json @@ -20,7 +20,7 @@ "scripts": { "build": "tsc -b", "check": "tsc -p tsconfig.jest.json", - "clean": "jest --clearCache --config '{}'; rm -rf dist *.tsbuildinfo node_modules/.cache || true", + "clean": "jest --clearCache --config '{}' || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "jest test/integration", "test-integration": "jest test/integration", diff --git a/packages/cli-tools/package.json b/packages/cli-tools/package.json index 99a6556e88..68407cecff 100644 --- a/packages/cli-tools/package.json +++ b/packages/cli-tools/package.json @@ -19,7 +19,7 @@ "scripts": { "build": "tsc -b", "check": "tsc -p tsconfig.jest.json", - "clean": "jest --clearCache --config '{}'; rm -rf dist *.tsbuildinfo node_modules/.cache || true", + "clean": "jest --clearCache --config '{}' || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "npm run build && jest --bail --forceExit" }, diff --git a/packages/dht/package.json b/packages/dht/package.json index a4033f5421..5865f3baf1 100644 --- a/packages/dht/package.json +++ b/packages/dht/package.json @@ -27,7 +27,7 @@ "build": "tsc -b", "build-browser": "webpack --mode=development --progress", "check": "tsc -p tsconfig.jest.json", - "clean": "jest --clearCache --config '{}'; rm -rf dist generated *.tsbuildinfo node_modules/.cache || true", + "clean": "jest --clearCache --config '{}' || true; rm -rf dist generated *.tsbuildinfo node_modules/.cache || true", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "npm run test-unit && npm run test-integration && npm run test-end-to-end", "test-browser": "karma start karma.config.ts", diff --git a/packages/geoip-location/package.json b/packages/geoip-location/package.json index 9d3b8ce7b8..5ee83e0e2c 100644 --- a/packages/geoip-location/package.json +++ b/packages/geoip-location/package.json @@ -25,7 +25,7 @@ "scripts": { "build": "tsc -b", "check": "tsc -p tsconfig.jest.json", - "clean": "jest --clearCache --config '{}'; rm -rf dist *.tsbuildinfo node_modules/.cache || true", + "clean": "jest --clearCache --config '{}' || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "jest test/unit", "test-unit": "jest test/unit" diff --git a/packages/node/package.json b/packages/node/package.json index f8c76f94f8..9a3446a227 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -27,7 +27,7 @@ "scripts": { "build": "tsc -b", "check": "tsc -p tsconfig.jest.json", - "clean": "jest --clearCache --config '{}'; rm -rf dist *.tsbuildinfo node_modules/.cache || true", + "clean": "jest --clearCache --config '{}' || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "npm run test-unit && npm run test-integration && npm run test-sequential", "test-unit": "jest test/unit", diff --git a/packages/proto-rpc/package.json b/packages/proto-rpc/package.json index f521bfb2f8..bc080573a2 100644 --- a/packages/proto-rpc/package.json +++ b/packages/proto-rpc/package.json @@ -22,7 +22,7 @@ "build": "tsc -b", "build-browser": "webpack --mode=development --progress", "check": "./test-proto.sh && tsc -p tsconfig.jest.json", - "clean": "jest --clearCache --config '{}'; rm -rf dist generated *.tsbuildinfo node_modules/.cache || true", + "clean": "jest --clearCache --config '{}' || true; rm -rf dist generated *.tsbuildinfo node_modules/.cache || true", "eslint": "./test-proto.sh && eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "./test-proto.sh && npm run test-unit && npm run test-integration", "test-browser": "./test-proto.sh && karma start karma.config.ts", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 8dbf91efa1..a5e26005f1 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -37,7 +37,7 @@ "build-browser-development": "NODE_ENV=development webpack --mode=development --progress", "build-browser-production": "NODE_ENV=production webpack --mode=production --progress", "check": "tsc -p tsconfig.jest.json", - "clean": "jest --clearCache --config '{}'; rm -rf dist src/generated *.tsbuildinfo node_modules/.cache || true", + "clean": "jest --clearCache --config '{}' || true; rm -rf dist src/generated *.tsbuildinfo node_modules/.cache || true", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts,mts}'", "generate-protoc-code": "./proto.sh", "test": "npm run test-unit && npm run test-integration && npm run test-end-to-end", diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 2124060b71..1465ce1a1a 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -18,7 +18,7 @@ "scripts": { "build": "tsc -b", "check": "tsc -p tsconfig.jest.json", - "clean": "jest --clearCache --config '{}'; rm -rf dist *.tsbuildinfo node_modules/.cache || true", + "clean": "jest --clearCache --config '{}' || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true", "test": "jest", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'" }, diff --git a/packages/trackerless-network/package.json b/packages/trackerless-network/package.json index 34c801a0f8..46c69f5baa 100644 --- a/packages/trackerless-network/package.json +++ b/packages/trackerless-network/package.json @@ -21,7 +21,7 @@ "build-browser": "webpack --mode=development --progress", "prebuild": "./proto.sh", "check": "tsc -p tsconfig.jest.json", - "clean": "jest --clearCache --config '{}'; rm -rf dist generated *.tsbuildinfo node_modules/.cache || true", + "clean": "jest --clearCache --config '{}' || true; rm -rf dist generated *.tsbuildinfo node_modules/.cache || true", "coverage": "jest --coverage", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "npm run test-unit && npm run test-integration && npm run test-end-to-end", diff --git a/packages/utils/package.json b/packages/utils/package.json index f2e28249bf..391dd6d446 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -18,7 +18,7 @@ "scripts": { "build": "tsc -b", "check": "tsc -p tsconfig.jest.json", - "clean": "jest --clearCache --config '{}'; rm -rf dist *.tsbuildinfo node_modules/.cache || true", + "clean": "jest --clearCache --config '{}' || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "jest", "test-browser": "karma start karma.config.ts"