turbo
35a07081 - feat(codemod): add logic for major version bump (#8260)

Commit
1 year ago
feat(codemod): add logic for major version bump (#8260) ### Description Add migration logic for the 1->2 move. For the major bump we run all existing transforms that are safe to be run twice to ensure that `turbo.json` is in the desired state. A few things to note: - We change the introduction version for the 2.0 codemods to the canary to allow for easier testing - I updated `migrate-dot-env` to work with either `pipeline` or `tasks` as there isn't a great way to order transforms that are introduced in the same version. - Add an idempotent flag to transformers that defaults to `true`. This is used to mark a transformation as one to avoid re-running. ### Testing Instructions Added unit test for major version migration. Manual testing on repos via `turbo build --filter='@turbo/codemod'` and then using `node ~/code/turbo/packages/turbo-codemod/dist/cli.js migrate --to 2.0.0-canary.0` (canary is necessary due to 2.0.0 not existing in npm yet).
Parents
Loading