Skip to content

Commit 4b2eae6

Browse files
authored
fix: Tailored turbo-ignore deprecation notice for Vercel users (#12385)
## Summary - When `turbo-ignore` runs on Vercel (`VERCEL=1`), the deprecation notice now points users to [Vercel's built-in project skipping](https://vercel.com/docs/monorepos#skipping-unaffected-projects) instead of `turbo query affected` - Non-Vercel environments continue to see the existing `turbo query affected` guidance Vercel users don't need to adopt `turbo query affected` as a migration path since Vercel already has first-class support for skipping unaffected projects. Sending them to the right docs reduces friction.
1 parent 1885f08 commit 4b2eae6

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

packages/turbo-ignore/src/ignore.ts

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,21 @@ export function turboIgnore(
4242
...opts
4343
};
4444

45-
warn(
46-
`\x1b[33m"turbo-ignore" is deprecated and will be removed in a future major version. Use "turbo query affected" instead.\x1b[39m`
47-
);
48-
warn(
49-
`\x1b[33mLearn more: https://turborepo.dev/docs/reference/query#migrating-from-turbo-ignore\x1b[39m\n`
50-
);
45+
if (process.env.VERCEL === "1") {
46+
warn(
47+
`\u001B[33m"turbo-ignore" is deprecated. Use Vercel's built-in project skipping instead.\u001B[39m`
48+
);
49+
warn(
50+
`\u001B[33mLearn more: https://vercel.com/docs/monorepos#skipping-unaffected-projects\u001B[39m\n`
51+
);
52+
} else {
53+
warn(
54+
`\u001B[33m"turbo-ignore" is deprecated. Use "turbo query affected" instead.\u001B[39m`
55+
);
56+
warn(
57+
`\u001B[33mLearn more: https://turborepo.dev/docs/reference/query#migrating-from-turbo-ignore\u001B[39m\n`
58+
);
59+
}
5160

5261
info(
5362
`Using Turborepo to determine if this project is affected by the commit...\n`

0 commit comments

Comments
 (0)