Off-course yes, it was easy to achieve with few commands.
Upgrading ember app it depends on whether the app having patch, minor and major version update.
- Patch Change -> 3.4.1 to 3.4.3
- Minor Change -> 3.4 to 3.5
- Major Change -> 3.0 to 4.0
Mostly in patch version update, internal refactors and bug fixes are introduced and also changes in dependency version in ember.
In minor version update, new feature are introduced and developers should notice the deprecations. In minor change, ember core team will not completely remove the deprecation changes. It will log in console as deprecation warnings, may be future(major change), it will be completely removed.
In major change update, breaking changes are introduced, So developers should ensure the deprecations before upgrade the app.
As i said, it was easy and do the following
- Step 1: Install npm package ember-cli-update globally.
- Step 2: Run the following command, it performs ember init jobs for latest version with current app.
- Step 3: Mostly in major version, code changes are very difficult. But no need to worry about it. Ember solves it in single command. Run the following command,
The above command will list the codemods like the following image
Codemod is a tool/library to assist you with large-scale codebase refactors that can be partially automated but still require human oversight and occasional intervention.
By running codemod, it overrides allover inside the ember app.
If you want to update specific version, run the following command.
ember-cli-update --to 3.4.3
If you want to revert the change, run the following command, it will get you back before the update.
git reset --hard
git clean -f
Ready to kick start ember version upgrade?
Hope you figure out the concept well. Thanks for reading.