From d0034180df68db8f56bc4508a61bc640065f47b5 Mon Sep 17 00:00:00 2001 From: Tom Milewski Date: Thu, 19 Oct 2023 04:47:01 -0400 Subject: [PATCH] test(repo): Add cmd to clear test cache (#1880) Co-authored-by: Lennart --- .changeset/gorgeous-radios-switch.md | 2 ++ package.json | 1 + packages/chrome-extension/package.json | 1 + packages/clerk-js/package.json | 1 + packages/fastify/package.json | 3 ++- packages/nextjs/package.json | 1 + packages/react/package.json | 1 + packages/sdk-node/package.json | 1 + packages/shared/package.json | 1 + turbo.json | 3 +++ 10 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 .changeset/gorgeous-radios-switch.md diff --git a/.changeset/gorgeous-radios-switch.md b/.changeset/gorgeous-radios-switch.md new file mode 100644 index 0000000000..a845151cc8 --- /dev/null +++ b/.changeset/gorgeous-radios-switch.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/package.json b/package.json index 9fcda4dd92..8d4bbc9c11 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "release:staging": "TURBO_FORCE=true FORCE_COLOR=1 npm run build && changeset publish --tag staging --no-git-tag", "release:verdaccio": "if [ \"$(npm config get registry)\" = \"https://registry.npmjs.org/\" ]; then echo 'Error: Using default registry' && exit 1; else TURBO_FORCE=true TURBO_CONCURRENCY=4 npm run build && changeset publish --no-git-tag; fi", "test": "FORCE_COLOR=1 turbo test --concurrency=${TURBO_CONCURRENCY:-80%}", + "test:cache:clear": "FORCE_COLOR=1 turbo test:cache:clear --continue --concurrency=${TURBO_CONCURRENCY:-80%}", "test:ci": "FORCE_COLOR=1 turbo test --concurrency=${TURBO_CONCURRENCY:-80%}", "test:integration:base": "DEBUG=1 npx playwright test --config integration/playwright.config.ts", "test:integration:deployment:nextjs": "DEBUG=1 npx playwright test --config integration/playwright.deployments.config.ts", diff --git a/packages/chrome-extension/package.json b/packages/chrome-extension/package.json index d5da6a8a47..09147a6fa6 100644 --- a/packages/chrome-extension/package.json +++ b/packages/chrome-extension/package.json @@ -29,6 +29,7 @@ "lint:publint": "publint", "lint:attw": "attw --pack .", "test": "jest", + "test:cache:clear": "jest --clearCache --useStderr", "test:ci": "jest --maxWorkers=70%", "test:coverage": "jest --collectCoverage && open coverage/lcov-report/index.html", "prepublishOnly": "npm run build" diff --git a/packages/clerk-js/package.json b/packages/clerk-js/package.json index c7ffe2fc6e..8236fb348a 100644 --- a/packages/clerk-js/package.json +++ b/packages/clerk-js/package.json @@ -37,6 +37,7 @@ "lint:publint": "publint", "lint:attw": "attw --pack .", "test": "jest", + "test:cache:clear": "jest --clearCache --useStderr", "test:ci": "jest --maxWorkers=70%", "test:coverage": "jest --collectCoverage && open coverage/lcov-report/index.html", "watch": "webpack --config webpack.config.js --env production --watch" diff --git a/packages/fastify/package.json b/packages/fastify/package.json index a1d302ffe7..77433d0cc0 100644 --- a/packages/fastify/package.json +++ b/packages/fastify/package.json @@ -26,7 +26,8 @@ "lint:publint": "publint", "lint:attw": "attw --pack .", "publish:local": "npx yalc push --replace --sig", - "test": "jest" + "test": "jest", + "test:cache:clear": "jest --clearCache --useStderr" }, "dependencies": { "@clerk/backend": "0.31.2", diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index ce1e7f7945..8819f7e1bd 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -74,6 +74,7 @@ "lint:publint": "publint", "lint:attw": "attw --pack .", "test": "jest", + "test:cache:clear": "jest --clearCache --useStderr", "test:ci": "jest --maxWorkers=70%" }, "dependencies": { diff --git a/packages/react/package.json b/packages/react/package.json index 31be6ece35..4b51c444ec 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -43,6 +43,7 @@ "lint:publint": "publint", "lint:attw": "attw --pack .", "test": "jest", + "test:cache:clear": "jest --clearCache --useStderr", "test:ci": "jest --maxWorkers=70%" }, "dependencies": { diff --git a/packages/sdk-node/package.json b/packages/sdk-node/package.json index b9a4b40287..dd3316b7b8 100644 --- a/packages/sdk-node/package.json +++ b/packages/sdk-node/package.json @@ -44,6 +44,7 @@ "lint:publint": "publint", "lint:attw": "attw --pack .", "test": "jest", + "test:cache:clear": "jest --clearCache --useStderr", "test:ci": "jest --maxWorkers=70%" }, "author": { diff --git a/packages/shared/package.json b/packages/shared/package.json index 0dc2a34d8c..0f7e5e7406 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -50,6 +50,7 @@ "lint:publint": "publint", "lint:attw": "attw --pack .", "test": "jest", + "test:cache:clear": "jest --clearCache --useStderr", "test:ci": "jest --maxWorkers=70%", "test:coverage": "jest --collectCoverage && open coverage/lcov-report/index.html" }, diff --git a/turbo.json b/turbo.json index 714d24c58e..67a165388a 100644 --- a/turbo.json +++ b/turbo.json @@ -88,6 +88,9 @@ "outputMode": "new-only", "outputs": [] }, + "test:cache:clear": { + "cache": false + }, "test:ci": { "dependsOn": ["build"], "inputs": [