From 2dc8964b65adda975b4a38ef87d643182e5948c1 Mon Sep 17 00:00:00 2001 From: austincalvelage Date: Wed, 4 Nov 2026 13:33:48 -0700 Subject: [PATCH 1/7] ci(repo): scope the last integration suites to the packages they load Localhost, sessions, handshake and electron build their apps in shared helpers, and chrome-extension uses its own Playwright config without a tag. The dependency check now follows local imports from a suite's tests, reads the test folder of a suite's own config, and includes the @clerk packages listed in each app's template, so all 24 suites CI runs can be scoped. chrome-extension no longer depends on the Next.js build, which it never used. --- .changeset/scope-last-integration-suites.md | 2 + integration/models/applicationConfig.ts | 3 + .../__tests__/suiteBuildDependencies.test.ts | 88 ++++++-- turbo.json | 203 +++++++----------- 4 files changed, 151 insertions(+), 145 deletions(-) create mode 100644 .changeset/scope-last-integration-suites.md diff --git a/.changeset/scope-last-integration-suites.md b/.changeset/scope-last-integration-suites.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/scope-last-integration-suites.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/integration/models/applicationConfig.ts b/integration/models/applicationConfig.ts index 9e9474505d1..013ca6d98f6 100644 --- a/integration/models/applicationConfig.ts +++ b/integration/models/applicationConfig.ts @@ -156,6 +156,9 @@ export const applicationConfig = () => { get pkglabDependencies() { return [...dependencies.entries()].filter(([, version]) => version === PKGLAB).map(([name]) => name); }, + get template() { + return template; + }, get copyKeylessToEnv() { const writer = async (appDir: string) => { const CONFIG_PATH = path.join(appDir, '.clerk', '.tmp', 'keyless.json'); diff --git a/integration/presets/__tests__/suiteBuildDependencies.test.ts b/integration/presets/__tests__/suiteBuildDependencies.test.ts index 63accfd93a4..1806c7e1908 100644 --- a/integration/presets/__tests__/suiteBuildDependencies.test.ts +++ b/integration/presets/__tests__/suiteBuildDependencies.test.ts @@ -1,5 +1,5 @@ -import { readdirSync, readFileSync } from 'node:fs'; -import { join, resolve } from 'node:path'; +import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs'; +import { dirname, join, resolve, sep } from 'node:path'; import { beforeAll, describe, expect, it, vi } from 'vitest'; @@ -34,24 +34,69 @@ const scopedSuites = Object.entries<{ dependsOn?: string[]; inputs: string[] }>( .filter(([id, task]) => id.startsWith('//#test:integration:') && !task.inputs.some(i => i.startsWith('packages/'))) .map(([id, task]) => ({ suite: id.replace('//#test:integration:', ''), dependsOn: task.dependsOn ?? [] })); -const listTestFiles = (dir: string): string[] => +const helperDirs = [testsDir, resolve(repoRoot, 'integration/testUtils')]; + +const listFiles = (dir: string, pattern: RegExp): string[] => readdirSync(dir, { withFileTypes: true }).flatMap(entry => { const path = join(dir, entry.name); if (entry.isDirectory()) { - return listTestFiles(path); + return listFiles(path, pattern); } - return /\.test\.tsx?$/.test(entry.name) ? [path] : []; + return pattern.test(entry.name) ? [path] : []; }); const parseScript = (suite: string) => { const script: string | undefined = rootPackage.scripts[`test:integration:${suite}`]; + const config = script?.match(/--config (\S+)/)?.[1]; return { script, appIds: script?.match(/E2E_APP_ID=(\S+)/)?.[1].split(','), tag: script?.match(/--grep (@[\w:-]+)/)?.[1], + ownConfig: config && config !== 'integration/playwright.config.ts' ? config : undefined, }; }; +const resolveImport = (from: string, specifier: string) => + ['', '.ts', '.tsx', '/index.ts'] + .map(suffix => resolve(dirname(from), specifier + suffix)) + .find(path => existsSync(path) && statSync(path).isFile()); + +const withLocalImports = (entryFiles: string[]) => { + const seen = new Set(); + const queue = [...entryFiles]; + while (queue.length) { + const file = queue.pop()!; + if (seen.has(file)) { + continue; + } + seen.add(file); + const source = readFileSync(file, 'utf8'); + for (const [, specifier] of source.matchAll(/from '(\.{1,2}\/[^']+)'/g)) { + const target = resolveImport(file, specifier); + if (target && helperDirs.some(dir => target.startsWith(dir + sep))) { + queue.push(target); + } + } + } + return [...seen]; +}; + +const suiteFiles = (suite: string) => { + const { tag, ownConfig } = parseScript(suite); + if (tag) { + const tagPattern = new RegExp(`${tag}(?![\\w-])`); + return withLocalImports( + listFiles(testsDir, /\.test\.tsx?$/).filter(file => tagPattern.test(readFileSync(file, 'utf8'))), + ); + } + if (ownConfig) { + const configPath = resolve(repoRoot, ownConfig); + const testDir = readFileSync(configPath, 'utf8').match(/testDir:\s*'([^']+)'/)?.[1]; + return testDir ? withLocalImports(listFiles(resolve(dirname(configPath), testDir), /\.tsx?$/)) : []; + } + return []; +}; + let appConfigs: typeof AppConfigs; beforeAll(async () => { @@ -61,17 +106,14 @@ beforeAll(async () => { }); const appsLoadedBy = (suite: string) => { - const { appIds, tag } = parseScript(suite); + const { appIds } = parseScript(suite); const longRunning = appIds ? (appConfigs.longRunningApps.getByPattern(appIds) as unknown as { config: ApplicationConfig }[]).map( app => app.config, ) : []; - const tagPattern = new RegExp(`${tag}(?![\\w-])`); - const taggedSources = listTestFiles(testsDir) - .map(file => readFileSync(file, 'utf8')) - .filter(source => tagPattern.test(source)); + const taggedSources = suiteFiles(suite).map(file => readFileSync(file, 'utf8')); const referenced = taggedSources .flatMap(source => [...source.matchAll(/appConfigs\.(\w+)\.(\w+)/g)]) .filter(([, group]) => group !== 'envs' && group !== 'longRunningApps') @@ -85,9 +127,22 @@ const appsLoadedBy = (suite: string) => { return { configs: [...longRunning, ...referenced], addedInTests }; }; +const workspaceDependenciesOf = (template: string | undefined) => { + if (!template) { + return []; + } + const manifest = JSON.parse(readFileSync(join(template, 'package.json'), 'utf8')); + return Object.keys({ ...manifest.dependencies, ...manifest.devDependencies }).filter(name => + name.startsWith('@clerk/'), + ); +}; + const packagesLoadedBy = (suite: string) => { const { configs, addedInTests } = appsLoadedBy(suite); - return [...configs.flatMap(config => config.pkglabDependencies), ...addedInTests]; + return [ + ...configs.flatMap(config => [...config.pkglabDependencies, ...workspaceDependenciesOf(config.template)]), + ...addedInTests, + ]; }; describe('scoped integration suites declare the builds they load', () => { @@ -100,13 +155,16 @@ describe('scoped integration suites declare the builds they load', () => { }); describe.each(scopedSuites)('$suite', ({ suite, dependsOn }) => { - it('selects its tests with a --grep tag and its apps by id or from its tagged tests', () => { - const { script, tag } = parseScript(suite); + it('selects its tests with a --grep tag or its own config, and its apps by id or from its tests', () => { + const { script, tag, ownConfig } = parseScript(suite); expect(script, `package.json has no test:integration:${suite} script`).toBeDefined(); - expect(tag, `test:integration:${suite} must pass --grep @tag to be scoped`).toBeDefined(); + expect( + tag ?? ownConfig, + `test:integration:${suite} must pass --grep @tag or its own --config to be scoped`, + ).toBeDefined(); expect( appsLoadedBy(suite).configs.length, - `test:integration:${suite} must set E2E_APP_ID or its tagged tests must use appConfigs apps to be scoped`, + `test:integration:${suite} must set E2E_APP_ID or its tests must use appConfigs apps to be scoped`, ).toBeGreaterThan(0); }); diff --git a/turbo.json b/turbo.json index 0dc7e2338c9..8ac00fd21d3 100644 --- a/turbo.json +++ b/turbo.json @@ -233,6 +233,14 @@ "outputs": [] }, "//#test:integration:ap-flows": { + "dependsOn": [ + "@clerk/backend#build", + "@clerk/clerk-js#build", + "@clerk/nextjs#build", + "@clerk/shared#build", + "@clerk/testing#build", + "@clerk/ui#build" + ], "env": [ "CLEANUP", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", @@ -242,22 +250,7 @@ "INTEGRATION_INSTANCE_KEYS", "INTEGRATION_STAGING_INSTANCE_KEYS" ], - "inputs": [ - "integration/**", - "packages/*/package.json", - "packages/*/src/**", - "packages/*/tsconfig.json", - "packages/*/tsconfig.build.json", - "packages/*/tsconfig.declarations.json", - "packages/*/tsdown.config.*", - "packages/*/tsup.config.*", - "packages/*/rspack.config.*", - "packages/*/vite.config.*", - "!packages/*/src/**/*.test.*", - "!packages/*/src/**/__tests__/**", - "!packages/*/src/**/__mocks__/**", - "!packages/*/src/**/__snapshots__/**" - ], + "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], "outputLogs": "new-only" }, @@ -470,6 +463,14 @@ "outputLogs": "new-only" }, "//#test:integration:localhost": { + "dependsOn": [ + "@clerk/backend#build", + "@clerk/clerk-js#build", + "@clerk/nextjs#build", + "@clerk/shared#build", + "@clerk/testing#build", + "@clerk/ui#build" + ], "env": [ "CLEANUP", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", @@ -480,26 +481,19 @@ "INTEGRATION_STAGING_INSTANCE_KEYS", "NODE_EXTRA_CA_CERTS" ], - "inputs": [ - "integration/**", - "packages/*/package.json", - "packages/*/src/**", - "packages/*/tsconfig.json", - "packages/*/tsconfig.build.json", - "packages/*/tsconfig.declarations.json", - "packages/*/tsdown.config.*", - "packages/*/tsup.config.*", - "packages/*/rspack.config.*", - "packages/*/vite.config.*", - "!packages/*/src/**/*.test.*", - "!packages/*/src/**/__tests__/**", - "!packages/*/src/**/__mocks__/**", - "!packages/*/src/**/__snapshots__/**" - ], + "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], "outputLogs": "new-only" }, "//#test:integration:sessions": { + "dependsOn": [ + "@clerk/backend#build", + "@clerk/clerk-js#build", + "@clerk/nextjs#build", + "@clerk/shared#build", + "@clerk/testing#build", + "@clerk/ui#build" + ], "env": [ "CLEANUP", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", @@ -510,26 +504,19 @@ "INTEGRATION_INSTANCE_KEYS", "NODE_EXTRA_CA_CERTS" ], - "inputs": [ - "integration/**", - "packages/*/package.json", - "packages/*/src/**", - "packages/*/tsconfig.json", - "packages/*/tsconfig.build.json", - "packages/*/tsconfig.declarations.json", - "packages/*/tsdown.config.*", - "packages/*/tsup.config.*", - "packages/*/rspack.config.*", - "packages/*/vite.config.*", - "!packages/*/src/**/*.test.*", - "!packages/*/src/**/__tests__/**", - "!packages/*/src/**/__mocks__/**", - "!packages/*/src/**/__snapshots__/**" - ], + "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], "outputLogs": "new-only" }, "//#test:integration:sessions:staging": { + "dependsOn": [ + "@clerk/backend#build", + "@clerk/clerk-js#build", + "@clerk/nextjs#build", + "@clerk/shared#build", + "@clerk/testing#build", + "@clerk/ui#build" + ], "env": [ "CLEANUP", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", @@ -540,26 +527,19 @@ "INTEGRATION_INSTANCE_KEYS", "NODE_EXTRA_CA_CERTS" ], - "inputs": [ - "integration/**", - "packages/*/package.json", - "packages/*/src/**", - "packages/*/tsconfig.json", - "packages/*/tsconfig.build.json", - "packages/*/tsconfig.declarations.json", - "packages/*/tsdown.config.*", - "packages/*/tsup.config.*", - "packages/*/rspack.config.*", - "packages/*/vite.config.*", - "!packages/*/src/**/*.test.*", - "!packages/*/src/**/__tests__/**", - "!packages/*/src/**/__mocks__/**", - "!packages/*/src/**/__snapshots__/**" - ], + "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], "outputLogs": "new-only" }, "//#test:integration:handshake": { + "dependsOn": [ + "@clerk/backend#build", + "@clerk/clerk-js#build", + "@clerk/nextjs#build", + "@clerk/shared#build", + "@clerk/testing#build", + "@clerk/ui#build" + ], "env": [ "CLEANUP", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", @@ -570,26 +550,19 @@ "INTEGRATION_INSTANCE_KEYS", "NODE_EXTRA_CA_CERTS" ], - "inputs": [ - "integration/**", - "packages/*/package.json", - "packages/*/src/**", - "packages/*/tsconfig.json", - "packages/*/tsconfig.build.json", - "packages/*/tsconfig.declarations.json", - "packages/*/tsdown.config.*", - "packages/*/tsup.config.*", - "packages/*/rspack.config.*", - "packages/*/vite.config.*", - "!packages/*/src/**/*.test.*", - "!packages/*/src/**/__tests__/**", - "!packages/*/src/**/__mocks__/**", - "!packages/*/src/**/__snapshots__/**" - ], + "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], "outputLogs": "new-only" }, "//#test:integration:handshake:staging": { + "dependsOn": [ + "@clerk/backend#build", + "@clerk/clerk-js#build", + "@clerk/nextjs#build", + "@clerk/shared#build", + "@clerk/testing#build", + "@clerk/ui#build" + ], "env": [ "CLEANUP", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", @@ -600,22 +573,7 @@ "INTEGRATION_INSTANCE_KEYS", "NODE_EXTRA_CA_CERTS" ], - "inputs": [ - "integration/**", - "packages/*/package.json", - "packages/*/src/**", - "packages/*/tsconfig.json", - "packages/*/tsconfig.build.json", - "packages/*/tsconfig.declarations.json", - "packages/*/tsdown.config.*", - "packages/*/tsup.config.*", - "packages/*/rspack.config.*", - "packages/*/vite.config.*", - "!packages/*/src/**/*.test.*", - "!packages/*/src/**/__tests__/**", - "!packages/*/src/**/__mocks__/**", - "!packages/*/src/**/__snapshots__/**" - ], + "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], "outputLogs": "new-only" }, @@ -838,7 +796,15 @@ "outputLogs": "new-only" }, "//#test:integration:chrome-extension": { - "dependsOn": ["@clerk/nextjs#build"], + "dependsOn": [ + "@clerk/backend#build", + "@clerk/chrome-extension#build", + "@clerk/clerk-js#build", + "@clerk/react#build", + "@clerk/shared#build", + "@clerk/testing#build", + "@clerk/ui#build" + ], "env": [ "CLEANUP", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", @@ -847,27 +813,19 @@ "E2E_*", "INTEGRATION_INSTANCE_KEYS" ], - "inputs": [ - "integration/**", - "packages/*/package.json", - "packages/*/src/**", - "packages/*/tsconfig.json", - "packages/*/tsconfig.build.json", - "packages/*/tsconfig.declarations.json", - "packages/*/tsdown.config.*", - "packages/*/tsup.config.*", - "packages/*/rspack.config.*", - "packages/*/vite.config.*", - "!packages/*/src/**/*.test.*", - "!packages/*/src/**/__tests__/**", - "!packages/*/src/**/__mocks__/**", - "!packages/*/src/**/__snapshots__/**" - ], + "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], "outputLogs": "new-only" }, "//#test:integration:electron": { - "dependsOn": ["@clerk/electron#build"], + "dependsOn": [ + "@clerk/backend#build", + "@clerk/clerk-js#build", + "@clerk/electron#build", + "@clerk/shared#build", + "@clerk/testing#build", + "@clerk/ui#build" + ], "env": [ "CLEANUP", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", @@ -877,22 +835,7 @@ "INTEGRATION_INSTANCE_KEYS", "INTEGRATION_STAGING_INSTANCE_KEYS" ], - "inputs": [ - "integration/**", - "packages/*/package.json", - "packages/*/src/**", - "packages/*/tsconfig.json", - "packages/*/tsconfig.build.json", - "packages/*/tsconfig.declarations.json", - "packages/*/tsdown.config.*", - "packages/*/tsup.config.*", - "packages/*/rspack.config.*", - "packages/*/vite.config.*", - "!packages/*/src/**/*.test.*", - "!packages/*/src/**/__tests__/**", - "!packages/*/src/**/__mocks__/**", - "!packages/*/src/**/__snapshots__/**" - ], + "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], "outputLogs": "new-only" }, From fe3ea53031bdf1aba5d2d018a184160a3d607ff3 Mon Sep 17 00:00:00 2001 From: austincalvelage Date: Wed, 4 Nov 2026 13:49:59 -0700 Subject: [PATCH 2/7] chore(repo): temporary expo-only change to prove integration cache reuse --- packages/expo/src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/expo/src/index.ts b/packages/expo/src/index.ts index aa9223501c0..d62e1a28456 100644 --- a/packages/expo/src/index.ts +++ b/packages/expo/src/index.ts @@ -22,3 +22,5 @@ export * from './trusted-devices'; setErrorThrowerOptions({ packageName: PACKAGE_NAME }); export type { TokenCache } from './cache/types'; + +// CI cache probe, reverted in this PR From 3662ff7c05f36636ac133dddf67c64272e7e597e Mon Sep 17 00:00:00 2001 From: austincalvelage Date: Wed, 4 Nov 2026 13:54:24 -0700 Subject: [PATCH 3/7] chore(repo): temporary mosaic-only change to prove integration cache reuse --- packages/mosaic/src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/mosaic/src/index.ts b/packages/mosaic/src/index.ts index a64f3111ea2..da0e8742943 100644 --- a/packages/mosaic/src/index.ts +++ b/packages/mosaic/src/index.ts @@ -14,3 +14,5 @@ export type { MosaicProfile } from './features/profile-pages/use-mosaic-profile' export { MosaicProvider } from './mosaic-provider'; export type { PortalContainer, PortalProviderProps } from './primitives/portal'; export { PortalProvider } from './primitives/portal'; + +// CI cache probe, reverted in this PR From dfb61e9f1db38490177561490c5a554c5bf4a026 Mon Sep 17 00:00:00 2001 From: austincalvelage Date: Wed, 4 Nov 2026 14:05:33 -0700 Subject: [PATCH 4/7] chore(repo): revert temporary cache probe changes --- packages/expo/src/index.ts | 2 -- packages/mosaic/src/index.ts | 2 -- 2 files changed, 4 deletions(-) diff --git a/packages/expo/src/index.ts b/packages/expo/src/index.ts index d62e1a28456..aa9223501c0 100644 --- a/packages/expo/src/index.ts +++ b/packages/expo/src/index.ts @@ -22,5 +22,3 @@ export * from './trusted-devices'; setErrorThrowerOptions({ packageName: PACKAGE_NAME }); export type { TokenCache } from './cache/types'; - -// CI cache probe, reverted in this PR diff --git a/packages/mosaic/src/index.ts b/packages/mosaic/src/index.ts index da0e8742943..a64f3111ea2 100644 --- a/packages/mosaic/src/index.ts +++ b/packages/mosaic/src/index.ts @@ -14,5 +14,3 @@ export type { MosaicProfile } from './features/profile-pages/use-mosaic-profile' export { MosaicProvider } from './mosaic-provider'; export type { PortalContainer, PortalProviderProps } from './primitives/portal'; export { PortalProvider } from './primitives/portal'; - -// CI cache probe, reverted in this PR From 52dc6cd01ab0d227bd80c07921f67edd871ebfb5 Mon Sep 17 00:00:00 2001 From: austincalvelage Date: Wed, 4 Nov 2026 18:47:29 -0700 Subject: [PATCH 5/7] ci(repo): hash Clerk key variables only into the integration suites The CLERK_* families were in globalEnv, so a Clerk key set in a shell changed the hash of every build, test and lint task, though only the integration test apps read them. Each integration task now lists them in its own env, and globalPassThroughEnv keeps them available to every other task without hashing them. The globalEnv exclusions for the two CI secrets are no longer needed, since the families are no longer global. --- turbo.json | 254 +++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 217 insertions(+), 37 deletions(-) diff --git a/turbo.json b/turbo.json index 8ac00fd21d3..f262fe2d033 100644 --- a/turbo.json +++ b/turbo.json @@ -14,24 +14,15 @@ "tsconfig.*.json" ], "globalEnv": [ - "CLERK_*", - "EXPO_PUBLIC_CLERK_*", "NEXT_PHASE", - "NEXT_PUBLIC_CLERK_*", "NODE_ENV", "NODE_VERSION", "NPM_VERSION", - "PLASMO_PUBLIC_CLERK_*", - "PUBLIC_CLERK_*", - "REACT_APP_CLERK_*", "RSDOCTOR", "TZ", "VERCEL", "VERCEL_PROJECT_PRODUCTION_URL", - "VERCEL_TARGET_ENV", - "VITE_CLERK_*", - "!CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "!CLERK_PLATFORM_API_KEY" + "VERCEL_TARGET_ENV" ], "globalPassThroughEnv": [ "AWS_SECRET_KEY", @@ -43,7 +34,14 @@ "ACTIONS_STEP_DEBUG", "VERCEL_AUTOMATION_BYPASS_SECRET", "PORT", - "UI_PORT" + "UI_PORT", + "CLERK_*", + "EXPO_PUBLIC_CLERK_*", + "NEXT_PUBLIC_CLERK_*", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "tasks": { "build": { @@ -243,12 +241,19 @@ ], "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", + "EXPO_PUBLIC_CLERK_*", "INTEGRATION_INSTANCE_KEYS", - "INTEGRATION_STAGING_INSTANCE_KEYS" + "INTEGRATION_STAGING_INSTANCE_KEYS", + "NEXT_PUBLIC_CLERK_*", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], @@ -266,12 +271,19 @@ ], "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", + "EXPO_PUBLIC_CLERK_*", "INTEGRATION_INSTANCE_KEYS", - "INTEGRATION_STAGING_INSTANCE_KEYS" + "INTEGRATION_STAGING_INSTANCE_KEYS", + "NEXT_PUBLIC_CLERK_*", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], @@ -288,12 +300,19 @@ ], "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", + "EXPO_PUBLIC_CLERK_*", "INTEGRATION_INSTANCE_KEYS", - "INTEGRATION_STAGING_INSTANCE_KEYS" + "INTEGRATION_STAGING_INSTANCE_KEYS", + "NEXT_PUBLIC_CLERK_*", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], @@ -310,12 +329,19 @@ ], "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", + "EXPO_PUBLIC_CLERK_*", "INTEGRATION_INSTANCE_KEYS", - "INTEGRATION_STAGING_INSTANCE_KEYS" + "INTEGRATION_STAGING_INSTANCE_KEYS", + "NEXT_PUBLIC_CLERK_*", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], @@ -332,12 +358,19 @@ ], "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", + "EXPO_PUBLIC_CLERK_*", "INTEGRATION_INSTANCE_KEYS", - "INTEGRATION_STAGING_INSTANCE_KEYS" + "INTEGRATION_STAGING_INSTANCE_KEYS", + "NEXT_PUBLIC_CLERK_*", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], @@ -355,12 +388,19 @@ ], "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", + "EXPO_PUBLIC_CLERK_*", "INTEGRATION_INSTANCE_KEYS", - "INTEGRATION_STAGING_INSTANCE_KEYS" + "INTEGRATION_STAGING_INSTANCE_KEYS", + "NEXT_PUBLIC_CLERK_*", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], @@ -377,12 +417,19 @@ ], "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", + "EXPO_PUBLIC_CLERK_*", "INTEGRATION_INSTANCE_KEYS", - "INTEGRATION_STAGING_INSTANCE_KEYS" + "INTEGRATION_STAGING_INSTANCE_KEYS", + "NEXT_PUBLIC_CLERK_*", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], @@ -391,11 +438,18 @@ "//#test:integration:nextjs:canary": { "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", - "INTEGRATION_INSTANCE_KEYS" + "EXPO_PUBLIC_CLERK_*", + "INTEGRATION_INSTANCE_KEYS", + "NEXT_PUBLIC_CLERK_*", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "inputs": [ "integration/**", @@ -427,13 +481,20 @@ ], "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", + "EXPO_PUBLIC_CLERK_*", "INTEGRATION_INSTANCE_KEYS", "INTEGRATION_STAGING_INSTANCE_KEYS", - "VERCEL_AUTOMATION_BYPASS_SECRET" + "NEXT_PUBLIC_CLERK_*", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VERCEL_AUTOMATION_BYPASS_SECRET", + "VITE_CLERK_*" ], "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], @@ -451,12 +512,19 @@ ], "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", + "EXPO_PUBLIC_CLERK_*", "INTEGRATION_INSTANCE_KEYS", - "INTEGRATION_STAGING_INSTANCE_KEYS" + "INTEGRATION_STAGING_INSTANCE_KEYS", + "NEXT_PUBLIC_CLERK_*", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], @@ -473,13 +541,20 @@ ], "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", + "EXPO_PUBLIC_CLERK_*", "INTEGRATION_INSTANCE_KEYS", "INTEGRATION_STAGING_INSTANCE_KEYS", - "NODE_EXTRA_CA_CERTS" + "NEXT_PUBLIC_CLERK_*", + "NODE_EXTRA_CA_CERTS", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], @@ -496,13 +571,20 @@ ], "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "DISABLE_WEB_SECURITY", "E2E_*", + "EXPO_PUBLIC_CLERK_*", "INTEGRATION_INSTANCE_KEYS", - "NODE_EXTRA_CA_CERTS" + "NEXT_PUBLIC_CLERK_*", + "NODE_EXTRA_CA_CERTS", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], @@ -519,13 +601,20 @@ ], "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "DISABLE_WEB_SECURITY", "E2E_*", + "EXPO_PUBLIC_CLERK_*", "INTEGRATION_INSTANCE_KEYS", - "NODE_EXTRA_CA_CERTS" + "NEXT_PUBLIC_CLERK_*", + "NODE_EXTRA_CA_CERTS", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], @@ -542,13 +631,20 @@ ], "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "DISABLE_WEB_SECURITY", "E2E_*", + "EXPO_PUBLIC_CLERK_*", "INTEGRATION_INSTANCE_KEYS", - "NODE_EXTRA_CA_CERTS" + "NEXT_PUBLIC_CLERK_*", + "NODE_EXTRA_CA_CERTS", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], @@ -565,13 +661,20 @@ ], "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "DISABLE_WEB_SECURITY", "E2E_*", + "EXPO_PUBLIC_CLERK_*", "INTEGRATION_INSTANCE_KEYS", - "NODE_EXTRA_CA_CERTS" + "NEXT_PUBLIC_CLERK_*", + "NODE_EXTRA_CA_CERTS", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], @@ -580,11 +683,18 @@ "//#test:integration:expo-web": { "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", - "INTEGRATION_INSTANCE_KEYS" + "EXPO_PUBLIC_CLERK_*", + "INTEGRATION_INSTANCE_KEYS", + "NEXT_PUBLIC_CLERK_*", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "inputs": [ "integration/**", @@ -616,12 +726,19 @@ ], "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", + "EXPO_PUBLIC_CLERK_*", "INTEGRATION_INSTANCE_KEYS", - "INTEGRATION_STAGING_INSTANCE_KEYS" + "INTEGRATION_STAGING_INSTANCE_KEYS", + "NEXT_PUBLIC_CLERK_*", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], @@ -639,12 +756,19 @@ ], "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", + "EXPO_PUBLIC_CLERK_*", "INTEGRATION_INSTANCE_KEYS", - "INTEGRATION_STAGING_INSTANCE_KEYS" + "INTEGRATION_STAGING_INSTANCE_KEYS", + "NEXT_PUBLIC_CLERK_*", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], @@ -662,12 +786,19 @@ ], "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", + "EXPO_PUBLIC_CLERK_*", "INTEGRATION_INSTANCE_KEYS", - "INTEGRATION_STAGING_INSTANCE_KEYS" + "INTEGRATION_STAGING_INSTANCE_KEYS", + "NEXT_PUBLIC_CLERK_*", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], @@ -684,12 +815,19 @@ ], "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", + "EXPO_PUBLIC_CLERK_*", "INTEGRATION_INSTANCE_KEYS", - "INTEGRATION_STAGING_INSTANCE_KEYS" + "INTEGRATION_STAGING_INSTANCE_KEYS", + "NEXT_PUBLIC_CLERK_*", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], @@ -709,12 +847,19 @@ ], "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", + "EXPO_PUBLIC_CLERK_*", "INTEGRATION_INSTANCE_KEYS", - "INTEGRATION_STAGING_INSTANCE_KEYS" + "INTEGRATION_STAGING_INSTANCE_KEYS", + "NEXT_PUBLIC_CLERK_*", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], @@ -740,12 +885,19 @@ ], "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", + "EXPO_PUBLIC_CLERK_*", "INTEGRATION_INSTANCE_KEYS", - "INTEGRATION_STAGING_INSTANCE_KEYS" + "INTEGRATION_STAGING_INSTANCE_KEYS", + "NEXT_PUBLIC_CLERK_*", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], @@ -762,12 +914,19 @@ ], "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", + "EXPO_PUBLIC_CLERK_*", "INTEGRATION_INSTANCE_KEYS", - "INTEGRATION_STAGING_INSTANCE_KEYS" + "INTEGRATION_STAGING_INSTANCE_KEYS", + "NEXT_PUBLIC_CLERK_*", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], @@ -784,12 +943,19 @@ ], "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", + "EXPO_PUBLIC_CLERK_*", "INTEGRATION_INSTANCE_KEYS", - "INTEGRATION_STAGING_INSTANCE_KEYS" + "INTEGRATION_STAGING_INSTANCE_KEYS", + "NEXT_PUBLIC_CLERK_*", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], @@ -807,11 +973,18 @@ ], "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", - "INTEGRATION_INSTANCE_KEYS" + "EXPO_PUBLIC_CLERK_*", + "INTEGRATION_INSTANCE_KEYS", + "NEXT_PUBLIC_CLERK_*", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], @@ -828,12 +1001,19 @@ ], "env": [ "CLEANUP", + "CLERK_*", "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", + "EXPO_PUBLIC_CLERK_*", "INTEGRATION_INSTANCE_KEYS", - "INTEGRATION_STAGING_INSTANCE_KEYS" + "INTEGRATION_STAGING_INSTANCE_KEYS", + "NEXT_PUBLIC_CLERK_*", + "PLASMO_PUBLIC_CLERK_*", + "PUBLIC_CLERK_*", + "REACT_APP_CLERK_*", + "VITE_CLERK_*" ], "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], "outputs": ["integration/playwright-report/**"], From c19946e75e2165cdc0094c7a7a91eefa9969921b Mon Sep 17 00:00:00 2001 From: austincalvelage Date: Thu, 5 Nov 2026 09:29:48 -0700 Subject: [PATCH 6/7] ci(repo): drop env names that CLERK_* already covers --- turbo.json | 54 ------------------------------------------------------ 1 file changed, 54 deletions(-) diff --git a/turbo.json b/turbo.json index f262fe2d033..4f6090717e0 100644 --- a/turbo.json +++ b/turbo.json @@ -26,8 +26,6 @@ ], "globalPassThroughEnv": [ "AWS_SECRET_KEY", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "GITHUB_TOKEN", "INTEGRATION_TEST_RUN_KEY", "ACTIONS_RUNNER_DEBUG", @@ -242,8 +240,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", "EXPO_PUBLIC_CLERK_*", @@ -272,8 +268,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", "EXPO_PUBLIC_CLERK_*", @@ -301,8 +295,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", "EXPO_PUBLIC_CLERK_*", @@ -330,8 +322,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", "EXPO_PUBLIC_CLERK_*", @@ -359,8 +349,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", "EXPO_PUBLIC_CLERK_*", @@ -389,8 +377,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", "EXPO_PUBLIC_CLERK_*", @@ -418,8 +404,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", "EXPO_PUBLIC_CLERK_*", @@ -439,8 +423,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", "EXPO_PUBLIC_CLERK_*", @@ -482,8 +464,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", "EXPO_PUBLIC_CLERK_*", @@ -513,8 +493,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", "EXPO_PUBLIC_CLERK_*", @@ -542,8 +520,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", "EXPO_PUBLIC_CLERK_*", @@ -572,8 +548,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "DISABLE_WEB_SECURITY", "E2E_*", @@ -602,8 +576,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "DISABLE_WEB_SECURITY", "E2E_*", @@ -632,8 +604,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "DISABLE_WEB_SECURITY", "E2E_*", @@ -662,8 +632,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "DISABLE_WEB_SECURITY", "E2E_*", @@ -684,8 +652,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", "EXPO_PUBLIC_CLERK_*", @@ -727,8 +693,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", "EXPO_PUBLIC_CLERK_*", @@ -757,8 +721,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", "EXPO_PUBLIC_CLERK_*", @@ -787,8 +749,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", "EXPO_PUBLIC_CLERK_*", @@ -816,8 +776,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", "EXPO_PUBLIC_CLERK_*", @@ -848,8 +806,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", "EXPO_PUBLIC_CLERK_*", @@ -886,8 +842,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", "EXPO_PUBLIC_CLERK_*", @@ -915,8 +869,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", "EXPO_PUBLIC_CLERK_*", @@ -944,8 +896,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", "EXPO_PUBLIC_CLERK_*", @@ -974,8 +924,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", "EXPO_PUBLIC_CLERK_*", @@ -1002,8 +950,6 @@ "env": [ "CLEANUP", "CLERK_*", - "CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET", - "CLERK_PLATFORM_API_KEY", "DEBUG", "E2E_*", "EXPO_PUBLIC_CLERK_*", From 10007bf776f6dd370ed0543fec20661fb54deaea Mon Sep 17 00:00:00 2001 From: austincalvelage Date: Thu, 5 Nov 2026 10:57:44 -0700 Subject: [PATCH 7/7] ci(repo): hash files chrome-extension tests import from clerk-js no-rhc.test.ts imports createBaseEnvironmentJSON from packages/clerk-js/src/test/fixtures.ts, which neither the suite inputs nor the clerk-js build hashed, so editing it reused a stale result. The dependency check now fails when a scoped suite's tests import a runtime file from outside integration/ that its inputs don't list. --- .../__tests__/suiteBuildDependencies.test.ts | 24 +++++++++++++++---- turbo.json | 7 +++++- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/integration/presets/__tests__/suiteBuildDependencies.test.ts b/integration/presets/__tests__/suiteBuildDependencies.test.ts index 1806c7e1908..521e3bdb99d 100644 --- a/integration/presets/__tests__/suiteBuildDependencies.test.ts +++ b/integration/presets/__tests__/suiteBuildDependencies.test.ts @@ -1,5 +1,5 @@ import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs'; -import { dirname, join, resolve, sep } from 'node:path'; +import { dirname, join, relative, resolve, sep } from 'node:path'; import { beforeAll, describe, expect, it, vi } from 'vitest'; @@ -31,8 +31,12 @@ const harnessPackages = Object.entries(rootPackage.devDependencies) .map(([name]) => name); const scopedSuites = Object.entries<{ dependsOn?: string[]; inputs: string[] }>(turbo.tasks) - .filter(([id, task]) => id.startsWith('//#test:integration:') && !task.inputs.some(i => i.startsWith('packages/'))) - .map(([id, task]) => ({ suite: id.replace('//#test:integration:', ''), dependsOn: task.dependsOn ?? [] })); + .filter(([id, task]) => id.startsWith('//#test:integration:') && !task.inputs.includes('packages/*/src/**')) + .map(([id, task]) => ({ + suite: id.replace('//#test:integration:', ''), + dependsOn: task.dependsOn ?? [], + inputs: task.inputs, + })); const helperDirs = [testsDir, resolve(repoRoot, 'integration/testUtils')]; @@ -97,6 +101,14 @@ const suiteFiles = (suite: string) => { return []; }; +const importsOutsideIntegration = (suite: string) => + suiteFiles(suite).flatMap(file => + [...readFileSync(file, 'utf8').matchAll(/^import (?!type )[^;]*?from '(\.{1,2}\/[^']+)'/gm)] + .map(([, specifier]) => resolveImport(file, specifier)) + .filter((target): target is string => !!target && !target.startsWith(resolve(repoRoot, 'integration') + sep)) + .map(target => relative(repoRoot, target)), + ); + let appConfigs: typeof AppConfigs; beforeAll(async () => { @@ -154,7 +166,7 @@ describe('scoped integration suites declare the builds they load', () => { expect(harnessPackages).toEqual(expect.arrayContaining(['@clerk/backend', '@clerk/shared', '@clerk/testing'])); }); - describe.each(scopedSuites)('$suite', ({ suite, dependsOn }) => { + describe.each(scopedSuites)('$suite', ({ suite, dependsOn, inputs }) => { it('selects its tests with a --grep tag or its own config, and its apps by id or from its tests', () => { const { script, tag, ownConfig } = parseScript(suite); expect(script, `package.json has no test:integration:${suite} script`).toBeDefined(); @@ -174,5 +186,9 @@ describe('scoped integration suites declare the builds they load', () => { .sort(); expect([...dependsOn].sort()).toEqual(expected); }); + + it('hashes the files its tests import from outside integration/', () => { + expect(inputs).toEqual(expect.arrayContaining(importsOutsideIntegration(suite))); + }); }); }); diff --git a/turbo.json b/turbo.json index 4f6090717e0..461564fd311 100644 --- a/turbo.json +++ b/turbo.json @@ -934,7 +934,12 @@ "REACT_APP_CLERK_*", "VITE_CLERK_*" ], - "inputs": ["integration/**", "!integration/playwright-report/**", "!integration/test-results/**"], + "inputs": [ + "integration/**", + "packages/clerk-js/src/test/fixtures.ts", + "!integration/playwright-report/**", + "!integration/test-results/**" + ], "outputs": ["integration/playwright-report/**"], "outputLogs": "new-only" },