fix: Guard against missing pipeline key in clean-globs codemod#12235
Merged
anthonyshew merged 2 commits intomainfrom Mar 11, 2026
Merged
fix: Guard against missing pipeline key in clean-globs codemod#12235anthonyshew merged 2 commits intomainfrom
pipeline key in clean-globs codemod#12235anthonyshew merged 2 commits intomainfrom
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
pipeline key in clean-globs codemod
github-actions Bot
added a commit
that referenced
this pull request
Mar 11, 2026
## Release v2.8.16 Versioned docs: https://v2-8-16.turborepo.dev ### Changes - docs: Remove CONSOLE DO NOT TRACK link (#12232) (`5bd21fb`) - release(turborepo): 2.8.16-canary.1 (#12233) (`e03a168`) - docs: missing `migrate` word (#12234) (`3f7edba`) - fix: Guard against missing `pipeline` key in `clean-globs` codemod (#12235) (`10386ae`) --------- Co-authored-by: Turbobot <turbobot@vercel.com>
github-actions Bot
added a commit
that referenced
this pull request
Mar 11, 2026
## Release v2.8.17-canary.1 Versioned docs: https://v2-8-17-canary-1.turborepo.dev ### Changes - docs: Remove CONSOLE DO NOT TRACK link (#12232) (`5bd21fb`) - release(turborepo): 2.8.16-canary.1 (#12233) (`e03a168`) - docs: missing `migrate` word (#12234) (`3f7edba`) - fix: Guard against missing `pipeline` key in `clean-globs` codemod (#12235) (`10386ae`) - release(turborepo): 2.8.16 (#12236) (`5c90bba`) - ci: Create GitHub Releases directly in release pipeline (#12237) (`9c0ec69`) - refactor: Replace Bun binary with tsdown + esbuild in `@turbo/gen` (#12240) (`6520a23`) - fix: Remove stale build-gen references from release workflow (#12241) (`ecba351`) Co-authored-by: Turbobot <turbobot@vercel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Several codemod transforms crash with
TypeError: Cannot convert undefined or null to objectwhenturbo.jsonhas nopipelinekey (e.g., already migrated totasks, or simply absent).The
isPipelineKeyMissingutility exists for exactly this purpose, but several transforms weren't using it.Changes
clean-globs—migrateConfigcalledObject.entries(config.pipeline)unconditionally. AddedisPipelineKeyMissingguard.rename-output-mode— Same issue. AddedisPipelineKeyMissingguard tomigrateConfig.rename-pipeline—migrateConfigdestructuredpipelinewithout checking, producing{ tasks: undefined }. AddedisPipelineKeyMissingguard.migrate-dot-env— Workspace config loop calledmigrateConfigunconditionally. Added"pipeline" in config || "tasks" in configguard (this transform usesforEachTaskDefwhich handles both keys).Testing
Added a test fixture and test case for
clean-globswith a missingpipelinekey. All 36 tests across the 4 affected transforms pass.