diff --git a/docs/pages/blog/turbo-0-4-0.mdx b/docs/pages/blog/turbo-0-4-0.mdx index c9507ad3660b3..c4b92baeda210 100644 --- a/docs/pages/blog/turbo-0-4-0.mdx +++ b/docs/pages/blog/turbo-0-4-0.mdx @@ -173,7 +173,7 @@ Building on the example from above, you can now set cache output conventions acr "pipeline": { "build": { // Cache anything in dist or .next directories emitted by a `build` command - "outputs": ["dist/**", ".next/**"] + "outputs": ["dist/**", ".next/**", "!.next/cache/**"] "dependsOn": ["^build"] }, "test": { diff --git a/docs/pages/blog/turbo-1-1-0.mdx b/docs/pages/blog/turbo-1-1-0.mdx index eb0b2f30b187c..d111a095bdb6c 100644 --- a/docs/pages/blog/turbo-1-1-0.mdx +++ b/docs/pages/blog/turbo-1-1-0.mdx @@ -103,7 +103,7 @@ You can now control `turbo`'s [cache fingerprinting (a.k.a. hashing)](/repo/docs "$NEXT_PUBLIC_STRIPE_PUBLIC_KEY", "$NEXT_PUBLIC_ANALYTICS_ID", ], - "outputs": [".next/**"], + "outputs": [".next/**", "!.next/cache/**"], }, "docs#build": { // override settings for the "build" task for the "docs" app "dependsOn": [ @@ -113,7 +113,7 @@ You can now control `turbo`'s [cache fingerprinting (a.k.a. hashing)](/repo/docs "$NEXT_PUBLIC_STRIPE_PUBLIC_KEY", "$NEXT_PUBLIC_ANALYTICS_ID", ], - "outputs": [".next/**"], + "outputs": [".next/**", "!.next/cache/**"], } }, "globalDependencies": [ diff --git a/docs/pages/blog/turbo-1-3-0.mdx b/docs/pages/blog/turbo-1-3-0.mdx index 3400621b35355..f84b57eee91f9 100644 --- a/docs/pages/blog/turbo-1-3-0.mdx +++ b/docs/pages/blog/turbo-1-3-0.mdx @@ -79,11 +79,11 @@ Let's assume that the Next.js `docs-site` renders the markdown files from the `. // ... omitted for brevity "build": { "dependsOn": ["^build"], - "outputs": [".next/**", "dist/**"] + "outputs": [".next/**", "!.next/cache/**", "dist/**"] }, "docs#build": { "dependsOn": ["^build"], - "outputs": [".next/**"], + "outputs": [".next/**", "!.next/cache/**"], // Define set of relevant globs which impact caching of docs site // builds "inputs": [ diff --git a/docs/pages/blog/turbo-1-6-0.mdx b/docs/pages/blog/turbo-1-6-0.mdx index 7c18b084d22de..295f3129171c3 100644 --- a/docs/pages/blog/turbo-1-6-0.mdx +++ b/docs/pages/blog/turbo-1-6-0.mdx @@ -79,7 +79,7 @@ Try it out now by [starting from the example](https://github.com/vercel/turbo/tr { "pipeline": { "build": { - "outputs": [".next/**"] + "outputs": [".next/**", "!.next/cache/**"] }, "lint": { "outputs": [] diff --git a/docs/pages/blog/turbo-1-8-0.mdx b/docs/pages/blog/turbo-1-8-0.mdx index 4f95bd6d4cb9d..d533fc1306138 100644 --- a/docs/pages/blog/turbo-1-8-0.mdx +++ b/docs/pages/blog/turbo-1-8-0.mdx @@ -66,7 +66,7 @@ For example, imagine your monorepo has a Next.js app and a SvelteKit app, and yo "pipeline": { "build": { // dependsOn is inherited from root - "outputs": [".next/**"] + "outputs": [".next/**", "!.next/cache/**"] } } } diff --git a/docs/pages/repo/docs/core-concepts/caching.mdx b/docs/pages/repo/docs/core-concepts/caching.mdx index e833771367445..e19b8f3408944 100644 --- a/docs/pages/repo/docs/core-concepts/caching.mdx +++ b/docs/pages/repo/docs/core-concepts/caching.mdx @@ -216,7 +216,7 @@ the values of environment variables: "NEXT_PUBLIC_STRIPE_PUBLIC_KEY", "NEXT_PUBLIC_ANALYTICS_ID" ], - "outputs": [".next/**"] + "outputs": [".next/**", "!.next/cache/**"] } } } @@ -250,7 +250,7 @@ To alter the cache for _all_ tasks, you can declare environment variables in the "NEXT_PUBLIC_STRIPE_PUBLIC_KEY", "NEXT_PUBLIC_ANALYTICS_ID" ], - "outputs": [".next/**"], + "outputs": [".next/**", "!.next/cache/**"], }, }, + "globalEnv": [ @@ -376,7 +376,7 @@ invoking `turbo`! "build": { "dependsOn": ["^build"], "env": ["SOME_ENV_VAR"], - "outputs": [".next/**"], + "outputs": [".next/**", "!.next/cache/**"], }, } } @@ -401,7 +401,7 @@ To ensure you end up with the correct caching behavior for your task, add these "build": { "dependsOn": ["^build"], "env": ["SOME_ENV_VAR"], - "outputs": [".next/**"], + "outputs": [".next/**", "!.next/cache/**"], }, } } diff --git a/docs/pages/repo/docs/core-concepts/monorepos/configuring-workspaces.mdx b/docs/pages/repo/docs/core-concepts/monorepos/configuring-workspaces.mdx index 1a2fe0e8279aa..f205e647562b2 100644 --- a/docs/pages/repo/docs/core-concepts/monorepos/configuring-workspaces.mdx +++ b/docs/pages/repo/docs/core-concepts/monorepos/configuring-workspaces.mdx @@ -59,7 +59,7 @@ with a single `turbo.json` at the root like this: { "pipeline": { "build": { - "outputs": [".next/**", ".svelte-kit/**"], + "outputs": [".next/**", "!.next/cache/**", ".svelte-kit/**"], } } } @@ -87,8 +87,8 @@ and remove the config from the root configuration: { "pipeline": { "build": { -- "outputs": [".next/**", ".svelte-kit/**"] -+ "outputs": [".next/**"] +- "outputs": [".next/**", "!.next/cache/**", ".svelte-kit/**"] ++ "outputs": [".next/**", "!.next/cache/**"] } } } @@ -166,7 +166,7 @@ app again. Without a Workspace-specific task, you might configure your root "build": { "outputMode": "hash-only", "inputs": ["src/**"], - "outputs": [".next/**"], + "outputs": [".next/**", "!.next/cache/**"], }, "my-sveltekit-app#build": { "outputMode": "hash-only", // must duplicate this diff --git a/docs/pages/repo/docs/getting-started/add-to-project.mdx b/docs/pages/repo/docs/getting-started/add-to-project.mdx index af3c21bb6eefd..5923a47648ee2 100644 --- a/docs/pages/repo/docs/getting-started/add-to-project.mdx +++ b/docs/pages/repo/docs/getting-started/add-to-project.mdx @@ -58,7 +58,7 @@ For more information on configuring your `turbo.json`, see the [Configuration Op "$schema": "https://turbo.build/schema.json", "pipeline": { "build": { - "outputs": [".next/**"] + "outputs": [".next/**", "!.next/cache/**"] }, "lint": {} } diff --git a/docs/pages/repo/docs/getting-started/create-new.mdx b/docs/pages/repo/docs/getting-started/create-new.mdx index 4c4a10bda62fd..995e4bc55e6ec 100644 --- a/docs/pages/repo/docs/getting-started/create-new.mdx +++ b/docs/pages/repo/docs/getting-started/create-new.mdx @@ -325,7 +325,7 @@ Let's take a look inside `turbo.json`, at the root: "build": { // ^^^^^ "dependsOn": ["^build"], - "outputs": ["dist/**", ".next/**"] + "outputs": ["dist/**", ".next/**", "!.next/cache/**"] }, "lint": {}, "dev": { @@ -448,7 +448,7 @@ Take a look inside `build` in `turbo.json`. There's some interesting config ther { "pipeline": { "build": { - "outputs": [".next/**"] + "outputs": [".next/**", "!.next/cache/**"] } } } diff --git a/docs/pages/repo/docs/getting-started/existing-monorepo.mdx b/docs/pages/repo/docs/getting-started/existing-monorepo.mdx index 0eff1b2342d97..f36fd0cda3296 100644 --- a/docs/pages/repo/docs/getting-started/existing-monorepo.mdx +++ b/docs/pages/repo/docs/getting-started/existing-monorepo.mdx @@ -107,7 +107,7 @@ Workspaces that do not have the specified script defined in their `package.json` "dependsOn": ["^build"], // note: output globs are relative to each package's `package.json` // (and not the monorepo root) - "outputs": [".next/**"] + "outputs": [".next/**", "!.next/cache/**"] }, "test": { // A package's `test` script depends on that package's diff --git a/docs/pages/repo/docs/handbook/building-your-app.mdx b/docs/pages/repo/docs/handbook/building-your-app.mdx index 1d66ed8bda60f..e2e09de1c54e0 100644 --- a/docs/pages/repo/docs/handbook/building-your-app.mdx +++ b/docs/pages/repo/docs/handbook/building-your-app.mdx @@ -48,7 +48,7 @@ Inside `turbo.json`, you can add `build` to the pipeline. { "pipeline": { "build": { - "outputs": [".next/**"] + "outputs": [".next/**", "!.next/cache/**"] } } } diff --git a/docs/pages/repo/docs/reference/codemods.mdx b/docs/pages/repo/docs/reference/codemods.mdx index d34810ac2f01a..ac4cbee82c6fd 100644 --- a/docs/pages/repo/docs/reference/codemods.mdx +++ b/docs/pages/repo/docs/reference/codemods.mdx @@ -156,7 +156,7 @@ For example: "pipeline": { "build": { "dependsOn": ["^build", "$API_BASE"], - "outputs": [".next/**"] + "outputs": [".next/**", "!.next/cache/**"] }, "lint": {}, "dev": { @@ -179,7 +179,7 @@ For example: - "dependsOn": ["^build", "$API_BASE"], + "dependsOn": ["^build"], + "env": ["API_BASE"], - "outputs": [".next/**"], + "outputs": [".next/**", "!.next/cache/**"], }, "lint": {}, "dev": { @@ -224,7 +224,7 @@ For example: "build": { "dependsOn": ["^build"], "env": ["API_BASE"], - "outputs": [".next/**"] + "outputs": [".next/**", "!.next/cache/**"] }, "lint": { "outputs": [] @@ -247,7 +247,7 @@ For example: "build": { "dependsOn": ["^build"], "env": ["API_BASE"], - "outputs": [".next/**"] + "outputs": [".next/**", "!.next/cache/**"] }, - "lint": { - "outputs": [] diff --git a/docs/pages/repo/docs/reference/configuration.mdx b/docs/pages/repo/docs/reference/configuration.mdx index 2e670fdb6580c..c969a1909c5cc 100644 --- a/docs/pages/repo/docs/reference/configuration.mdx +++ b/docs/pages/repo/docs/reference/configuration.mdx @@ -150,12 +150,12 @@ The list of environment variables a task depends on. "build": { "dependsOn": ["^build"], "env": ["SOMETHING_ELSE"], // value will impact the hashes of all build tasks - "outputs": ["dist/**", ".next/**"] + "outputs": ["dist/**", ".next/**", "!.next/cache/**"] }, "web#build": { "dependsOn": ["^build"], "env": ["STRIPE_SECRET_KEY"], // value will impact hash of only web's build task - "outputs": [".next/**"] + "outputs": [".next/**", "!.next/cache/**"] } }, "globalEnv": [ @@ -202,7 +202,7 @@ logs (and treat them like an artifact). "build": { // "Cache all files emitted to workspace's dist/** or .next // directories by a `build` task" - "outputs": ["dist/**", ".next/**"], + "outputs": ["dist/**", ".next/**", "!.next/cache/**"], "dependsOn": ["^build"] }, "test": { diff --git a/examples/basic/turbo.json b/examples/basic/turbo.json index b51089215edb2..d44dedb04af78 100644 --- a/examples/basic/turbo.json +++ b/examples/basic/turbo.json @@ -3,7 +3,7 @@ "globalDependencies": ["**/.env.*local"], "pipeline": { "build": { - "outputs": [".next/**"] + "outputs": [".next/**", "!.next/cache/**"] }, "lint": {}, "dev": { diff --git a/examples/kitchen-sink/turbo.json b/examples/kitchen-sink/turbo.json index 28d031102ec29..048a903d9dfe8 100644 --- a/examples/kitchen-sink/turbo.json +++ b/examples/kitchen-sink/turbo.json @@ -7,6 +7,7 @@ "outputs": [ "dist/**", ".next/**", + "!.next/cache/**", "build/**", "api/**", "public/build/**" diff --git a/examples/non-monorepo/turbo.json b/examples/non-monorepo/turbo.json index 8d1f2830a38cf..c2a472197ab7c 100644 --- a/examples/non-monorepo/turbo.json +++ b/examples/non-monorepo/turbo.json @@ -2,7 +2,7 @@ "$schema": "https://turbo.build/schema.json", "pipeline": { "build": { - "outputs": [".next/**"] + "outputs": [".next/**", "!.next/cache/**"] }, "lint": {}, "dev": { diff --git a/examples/with-changesets/turbo.json b/examples/with-changesets/turbo.json index 47b318b37bafa..1c90d32fe0d52 100644 --- a/examples/with-changesets/turbo.json +++ b/examples/with-changesets/turbo.json @@ -3,7 +3,7 @@ "globalDependencies": ["**/.env.*local"], "pipeline": { "build": { - "outputs": ["dist/**", ".next/**"], + "outputs": ["dist/**", ".next/**", "!.next/cache/**"], "dependsOn": ["^build"] }, "test": { diff --git a/examples/with-docker/turbo.json b/examples/with-docker/turbo.json index 2756cd68369a8..7a59fef2a861f 100644 --- a/examples/with-docker/turbo.json +++ b/examples/with-docker/turbo.json @@ -4,7 +4,7 @@ "globalEnv": ["PORT"], "pipeline": { "build": { - "outputs": ["dist/**", ".next/**", "public/dist/**"], + "outputs": ["dist/**", ".next/**", "!.next/cache/**", "public/dist/**"], "dependsOn": ["^build"], "env": ["NEXT_PUBLIC_API_HOST"] }, diff --git a/examples/with-npm/turbo.json b/examples/with-npm/turbo.json index 44425e02d9256..f01e7ce2f4675 100644 --- a/examples/with-npm/turbo.json +++ b/examples/with-npm/turbo.json @@ -4,7 +4,7 @@ "pipeline": { "build": { "dependsOn": ["^build"], - "outputs": ["dist/**", ".next/**"] + "outputs": ["dist/**", ".next/**", "!.next/cache/**"] }, "lint": { "outputs": [] diff --git a/examples/with-prisma/turbo.json b/examples/with-prisma/turbo.json index ce0df08df3233..385119c1e4cb2 100644 --- a/examples/with-prisma/turbo.json +++ b/examples/with-prisma/turbo.json @@ -5,7 +5,7 @@ "pipeline": { "build": { "dependsOn": ["^build"], - "outputs": ["dist/**", ".next/**"] + "outputs": ["dist/**", ".next/**", "!.next/cache/**"] }, "db:migrate:deploy": {}, "db:push": {}, diff --git a/examples/with-react-native-web/turbo.json b/examples/with-react-native-web/turbo.json index e61fc61b49330..3965279396791 100644 --- a/examples/with-react-native-web/turbo.json +++ b/examples/with-react-native-web/turbo.json @@ -3,7 +3,7 @@ "globalDependencies": ["**/.env.*local"], "pipeline": { "build": { - "outputs": ["dist/**", ".next/**"], + "outputs": ["dist/**", ".next/**", "!.next/cache/**"], "dependsOn": ["^build"] }, "dev": { diff --git a/examples/with-rollup/turbo.json b/examples/with-rollup/turbo.json index 7d1f786a14b9f..8e38f8eb9cec7 100644 --- a/examples/with-rollup/turbo.json +++ b/examples/with-rollup/turbo.json @@ -2,7 +2,7 @@ "$schema": "https://turborepo.org/schema.json", "pipeline": { "build": { - "outputs": ["dist/**", "build/**", ".next/**"] + "outputs": ["dist/**", "build/**", ".next/**", "!.next/cache/**"] }, "lint": { "outputs": [] diff --git a/examples/with-tailwind/turbo.json b/examples/with-tailwind/turbo.json index 171986984f3f6..f601147cd593d 100644 --- a/examples/with-tailwind/turbo.json +++ b/examples/with-tailwind/turbo.json @@ -4,7 +4,7 @@ "pipeline": { "build": { "dependsOn": ["^build"], - "outputs": ["dist/**", ".next/**"] + "outputs": ["dist/**", ".next/**", "!.next/cache/**"] }, "lint": {}, "check-types": {}, diff --git a/examples/with-yarn/turbo.json b/examples/with-yarn/turbo.json index d771870cfa0f8..0c9369c289db8 100644 --- a/examples/with-yarn/turbo.json +++ b/examples/with-yarn/turbo.json @@ -3,7 +3,7 @@ "pipeline": { "build": { "dependsOn": ["^build"], - "outputs": ["dist/**", ".next/**"] + "outputs": ["dist/**", ".next/**", "!.next/cache/**"] }, "lint": {}, "dev": { diff --git a/packages/create-turbo/templates/_shared_ts/turbo.json b/packages/create-turbo/templates/_shared_ts/turbo.json index 44425e02d9256..f01e7ce2f4675 100644 --- a/packages/create-turbo/templates/_shared_ts/turbo.json +++ b/packages/create-turbo/templates/_shared_ts/turbo.json @@ -4,7 +4,7 @@ "pipeline": { "build": { "dependsOn": ["^build"], - "outputs": ["dist/**", ".next/**"] + "outputs": ["dist/**", ".next/**", "!.next/cache/**"] }, "lint": { "outputs": [] diff --git a/packages/eslint-plugin-turbo/docs/rules/no-undeclared-env-vars.md b/packages/eslint-plugin-turbo/docs/rules/no-undeclared-env-vars.md index c23596f2bc56a..049d7af411206 100644 --- a/packages/eslint-plugin-turbo/docs/rules/no-undeclared-env-vars.md +++ b/packages/eslint-plugin-turbo/docs/rules/no-undeclared-env-vars.md @@ -19,7 +19,7 @@ Examples of **incorrect** code for this rule: "pipeline": { "build": { "dependsOn": ["^build"], - "outputs": ["dist/**", ".next/**"] + "outputs": ["dist/**", ".next/**", "!.next/cache/**"] }, "lint": {}, "dev": { @@ -37,7 +37,7 @@ Examples of **correct** code for this rule: "pipeline": { "build": { "dependsOn": ["^build"], - "outputs": ["dist/**", ".next/**"] + "outputs": ["dist/**", ".next/**", "!.next/cache/**"] }, "lint": {}, "dev": { @@ -53,7 +53,7 @@ Examples of **correct** code for this rule: "build": { "dependsOn": ["^build"], "env": ["MY_API_TOKEN"], - "outputs": ["dist/**", ".next/**"] + "outputs": ["dist/**", ".next/**", "!.next/cache/**"] }, "lint": {}, "dev": { diff --git a/packages/turbo-codemod/__tests__/__fixtures__/create-turbo-config/both-configs/package.json b/packages/turbo-codemod/__tests__/__fixtures__/create-turbo-config/both-configs/package.json index 20db264492de5..c4606fa004ecc 100644 --- a/packages/turbo-codemod/__tests__/__fixtures__/create-turbo-config/both-configs/package.json +++ b/packages/turbo-codemod/__tests__/__fixtures__/create-turbo-config/both-configs/package.json @@ -13,7 +13,8 @@ }, "build": { "outputs": [ - ".next/**" + ".next/**", + "!.next/cache/**" ] }, "lint": { diff --git a/packages/turbo-codemod/__tests__/__fixtures__/create-turbo-config/both-configs/turbo.json b/packages/turbo-codemod/__tests__/__fixtures__/create-turbo-config/both-configs/turbo.json index 0c4510a3a88a6..e6eb6522e4709 100644 --- a/packages/turbo-codemod/__tests__/__fixtures__/create-turbo-config/both-configs/turbo.json +++ b/packages/turbo-codemod/__tests__/__fixtures__/create-turbo-config/both-configs/turbo.json @@ -6,7 +6,7 @@ "persistent": true }, "build": { - "outputs": [".next/**"] + "outputs": [".next/**", "!.next/cache/**"] }, "lint": { "outputs": [] diff --git a/packages/turbo-codemod/__tests__/__fixtures__/create-turbo-config/no-turbo-json-config/package.json b/packages/turbo-codemod/__tests__/__fixtures__/create-turbo-config/no-turbo-json-config/package.json index bb21eb0740b3e..7754c7d2fd200 100644 --- a/packages/turbo-codemod/__tests__/__fixtures__/create-turbo-config/no-turbo-json-config/package.json +++ b/packages/turbo-codemod/__tests__/__fixtures__/create-turbo-config/no-turbo-json-config/package.json @@ -9,7 +9,8 @@ "pipeline": { "build": { "outputs": [ - ".next/**" + ".next/**", + "!.next/cache/**" ] }, "lint": { diff --git a/packages/turbo-codemod/__tests__/__fixtures__/create-turbo-config/turbo-json-config/turbo.json b/packages/turbo-codemod/__tests__/__fixtures__/create-turbo-config/turbo-json-config/turbo.json index 0c4510a3a88a6..e6eb6522e4709 100644 --- a/packages/turbo-codemod/__tests__/__fixtures__/create-turbo-config/turbo-json-config/turbo.json +++ b/packages/turbo-codemod/__tests__/__fixtures__/create-turbo-config/turbo-json-config/turbo.json @@ -6,7 +6,7 @@ "persistent": true }, "build": { - "outputs": [".next/**"] + "outputs": [".next/**", "!.next/cache/**"] }, "lint": { "outputs": [] diff --git a/packages/turbo-codemod/__tests__/__fixtures__/migrate-env-var-dependencies/env-dependencies/turbo.json b/packages/turbo-codemod/__tests__/__fixtures__/migrate-env-var-dependencies/env-dependencies/turbo.json index a9988ecc925a1..bb3e2484b59c1 100644 --- a/packages/turbo-codemod/__tests__/__fixtures__/migrate-env-var-dependencies/env-dependencies/turbo.json +++ b/packages/turbo-codemod/__tests__/__fixtures__/migrate-env-var-dependencies/env-dependencies/turbo.json @@ -3,7 +3,7 @@ "globalDependencies": ["$NEXT_PUBLIC_API_KEY", "$STRIPE_API_KEY", ".env"], "pipeline": { "build": { - "outputs": [".next/**"], + "outputs": [".next/**", "!.next/cache/**"], "dependsOn": ["^build", "$PROD_API_KEY"] }, "lint": { diff --git a/packages/turbo-codemod/__tests__/__fixtures__/migrate-env-var-dependencies/migrated-env-dependencies/turbo.json b/packages/turbo-codemod/__tests__/__fixtures__/migrate-env-var-dependencies/migrated-env-dependencies/turbo.json index 98d3d2c2d1586..9217af680e020 100644 --- a/packages/turbo-codemod/__tests__/__fixtures__/migrate-env-var-dependencies/migrated-env-dependencies/turbo.json +++ b/packages/turbo-codemod/__tests__/__fixtures__/migrate-env-var-dependencies/migrated-env-dependencies/turbo.json @@ -6,7 +6,7 @@ "build": { "dependsOn": ["^build"], "env": ["PROD_API_KEY"], - "outputs": [".next/**"] + "outputs": [".next/**", "!.next/cache/**"] }, "dev": { "cache": false diff --git a/packages/turbo-codemod/__tests__/__fixtures__/migrate-env-var-dependencies/workspace-configs/turbo.json b/packages/turbo-codemod/__tests__/__fixtures__/migrate-env-var-dependencies/workspace-configs/turbo.json index 5e9be8debf82c..718e4619b41e8 100644 --- a/packages/turbo-codemod/__tests__/__fixtures__/migrate-env-var-dependencies/workspace-configs/turbo.json +++ b/packages/turbo-codemod/__tests__/__fixtures__/migrate-env-var-dependencies/workspace-configs/turbo.json @@ -3,7 +3,7 @@ "globalDependencies": ["$NEXT_PUBLIC_API_KEY", "$STRIPE_API_KEY", ".env"], "pipeline": { "build": { - "outputs": [".next/**"], + "outputs": [".next/**", "!.next/cache/**"], "dependsOn": ["^build", "$PROD_API_KEY"] }, "lint": { diff --git a/packages/turbo-codemod/__tests__/__fixtures__/migrate/old-turbo/package.json b/packages/turbo-codemod/__tests__/__fixtures__/migrate/old-turbo/package.json index 4678a1048633c..62959b8388a6e 100644 --- a/packages/turbo-codemod/__tests__/__fixtures__/migrate/old-turbo/package.json +++ b/packages/turbo-codemod/__tests__/__fixtures__/migrate/old-turbo/package.json @@ -10,7 +10,8 @@ "pipeline": { "build": { "outputs": [ - ".next/**" + ".next/**", + "!.next/cache/**" ] }, "lint": { diff --git a/packages/turbo-codemod/__tests__/migrate-env-var-dependencies.test.ts b/packages/turbo-codemod/__tests__/migrate-env-var-dependencies.test.ts index ab472ffe3153c..a2ade60207f2d 100644 --- a/packages/turbo-codemod/__tests__/migrate-env-var-dependencies.test.ts +++ b/packages/turbo-codemod/__tests__/migrate-env-var-dependencies.test.ts @@ -24,7 +24,7 @@ const getTestTurboConfig = (override: Schema = { pipeline: {} }): Schema => { cache: false, }, build: { - outputs: ["dist/**/*", ".next/**/*"], + outputs: ["dist/**/*", ".next/**/*", "!.next/cache/**"], dependsOn: ["^build", "$TASK_ENV_KEY", "$ANOTHER_ENV_KEY"], }, }, @@ -207,6 +207,7 @@ describe("migrate-env-var-dependencies", () => { "outputs": Array [ "dist/**/*", ".next/**/*", + "!.next/cache/**", ], }, "dev": Object { @@ -247,6 +248,7 @@ describe("migrate-env-var-dependencies", () => { "outputs": Array [ "dist/**/*", ".next/**/*", + "!.next/cache/**", ], }, "dev": Object { @@ -293,6 +295,7 @@ describe("migrate-env-var-dependencies", () => { "outputs": Array [ "dist/**/*", ".next/**/*", + "!.next/cache/**", ], }, "dev": Object { @@ -343,6 +346,7 @@ describe("migrate-env-var-dependencies", () => { "outputs": Array [ "dist/**/*", ".next/**/*", + "!.next/cache/**", ], }, "dev": Object { @@ -395,7 +399,7 @@ describe("migrate-env-var-dependencies", () => { build: { dependsOn: ["^build"], env: ["PROD_API_KEY"], - outputs: [".next/**"], + outputs: [".next/**", "!.next/cache/**"], }, dev: { cache: false, @@ -445,7 +449,7 @@ describe("migrate-env-var-dependencies", () => { build: { dependsOn: ["^build"], env: ["PROD_API_KEY"], - outputs: [".next/**"], + outputs: [".next/**", "!.next/cache/**"], }, dev: { cache: false, @@ -529,7 +533,7 @@ describe("migrate-env-var-dependencies", () => { build: { dependsOn: ["^build"], env: ["PROD_API_KEY"], - outputs: [".next/**"], + outputs: [".next/**", "!.next/cache/**"], }, dev: { cache: false, @@ -625,7 +629,7 @@ describe("migrate-env-var-dependencies", () => { build: { dependsOn: ["^build"], env: ["PROD_API_KEY"], - outputs: [".next/**"], + outputs: [".next/**", "!.next/cache/**"], }, dev: { cache: false, diff --git a/packages/turbo-codemod/__tests__/migrate.test.ts b/packages/turbo-codemod/__tests__/migrate.test.ts index 31813943770a2..8a51b7ecb50b3 100644 --- a/packages/turbo-codemod/__tests__/migrate.test.ts +++ b/packages/turbo-codemod/__tests__/migrate.test.ts @@ -64,7 +64,7 @@ describe("migrate", () => { $schema: "https://turbo.build/schema.json", pipeline: { build: { - outputs: [".next/**"], + outputs: [".next/**", "!.next/cache/**"], }, dev: { cache: false, @@ -201,7 +201,7 @@ describe("migrate", () => { $schema: "https://turbo.build/schema.json", pipeline: { build: { - outputs: [".next/**"], + outputs: [".next/**", "!.next/cache/**"], }, dev: { cache: false, @@ -277,7 +277,7 @@ describe("migrate", () => { $schema: "https://turbo.build/schema.json", pipeline: { build: { - outputs: [".next/**"], + outputs: [".next/**", "!.next/cache/**"], }, dev: { cache: false, @@ -437,7 +437,7 @@ describe("migrate", () => { $schema: "https://turbo.build/schema.json", pipeline: { build: { - outputs: [".next/**"], + outputs: [".next/**", "!.next/cache/**"], }, dev: { cache: false, @@ -522,7 +522,7 @@ describe("migrate", () => { $schema: "https://turbo.build/schema.json", pipeline: { build: { - outputs: [".next/**"], + outputs: [".next/**", "!.next/cache/**"], }, dev: { cache: false,