DEV Community

Ajith kannan
Ajith kannan

Posted on

Is Ember App Upgrade Easy?

Off-course yes, it was easy to achieve with few commands.

What to expect

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

Patch Change

Mostly in patch version update, internal refactors and bug fixes are introduced and also changes in dependency version in ember.

Minor Change

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.

Major Change

In major change update, breaking changes are introduced, So developers should ensure the deprecations before upgrade the app.

How to do an upgrade

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.
ember-cli-update --resolve-conflicts
  • 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,
ember-cli-update --run-codemods

The above command will list the codemods like the following image

So What is codemods?

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.

Pretty Cool?

If you want to update specific version, run the following command.

ember-cli-update --to 3.4.3

Trouble shooting

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

Options for ember-cli-update command:

Ready to kick start ember version upgrade?

Hope you figure out the concept well. Thanks for reading.

Top comments (0)