turbo
e570d29e - fix: Support `turbo.jsonc` in codemod transforms (#12532)

Commit
48 days ago
fix: Support `turbo.jsonc` in codemod transforms (#12532) ## Summary - All codemod transforms hardcoded `path.join(root, "turbo.json")`, causing migrations to fail with `No turbo.json found` on repos using `turbo.jsonc` - Exports `resolveTurboConfigPath` from `@turbo/utils` (was module-private) and uses it across all 12 transforms to resolve either `turbo.json` or `turbo.jsonc` - Rewrites `getTurboRoot()` to check both filenames at each directory level during the upward search, so a closer `turbo.jsonc` takes priority over a parent `turbo.json` - Updates `FileTransform` to parse `.jsonc` files with JSON5 ## Testing The string-based transforms (like `update-versioned-schema-json`) preserve comments in `.jsonc` files since they operate on raw strings. A new test + fixture verifies this end-to-end. Object-based transforms (e.g. `rename-pipeline`) will strip comments since they parse to JSON objects -- this is a pre-existing architectural limitation that would require a comment-preserving serializer to fix.
Author
Parents
Loading