ember-pod-workflow-cli
v0.1.6
Published
This tool allows you to work through Ember 3.x deprecations on your way to 4.x.
Readme
Pod Workflow CLI
This tool allows you to work through Ember 3.x deprecations on your way to 4.x.
This assumes a few key assumptions and is highly opinionated (though PRs are welcome to make it more flexible for the greater Ember community):
- Your app is organized using pods located in
app/pods - You're using lint-to-the-future or heavy uses of Eslint Ignore to identify and address Deprecations
- You're wanting to update to Native Classes (this isn't completely necessary for 4.x but makes addressing some of the deprecations a bit easier)
Installation
Install this package from npm using
yarn global add ember-pod-workflow-cli@latestThen make sure you have installed/cached the various codemods (this prevents errors and speeds up execution of the workflow):
yarn global add ember-angle-brackets-codemod@latest ember-no-implicit-this-codemod@latest ember-native-class-codemod@latest
npx github:ember-codemods/es5-getter-ember-codemod # This will ask to install from github: select y (the command will likely error after that)Use
To use this CLI run:
pod-workflow upgrade-podThis will interactively guide you through removing deprecations from a selected pod folder structure.
After completing work on deprecations in a pod you can create a quick PR template.
First set POD_DASHBOARD to the public URL of a pod workflow dashboard. Then run:
pod-workflow pr-descriptionThis will copy a markdown flavored PR description with info about what has changed and what lint/deprecations are still left.
Command Goals
- [X] Prompt for pod to work on
- [X] Show files to work on
- [X] Run Codemods
- [X] Run Angle Bracket Codemod
- [X] Run No Implicit This Codemod
- [X] ES5 Getter Codemod
- [X] Run Native Class Codemod
- [X] Prompt User to Commit Changes (check for changes)
- [X] Remove lint ignore for files in selected pod
- [X] Run Lint Fix
- [X] Prompt For Commit
- [X] Show Remaining Lint Errors
- [ ] Show Components Used
- [X] Prompt user to select which components they want to fix
- Figure out by getting component info
- List places where it is used outside of selected pod
- [X] Repeat 3-7 on selected component paths
