Code Monkey home page Code Monkey logo

ember-cli-update's Introduction

ember-cli-update

Greenkeeper badge npm version Build Status Build status

Update Ember CLI Ember.js apps and addons (and Glimmer.js apps)

You can run this either as a global executable available to all projects or an Ember CLI command in a single project.

Installation

As a global executable:

npm install -g ember-cli-update

As an Ember CLI command:

ember install ember-cli-update

(You must commit the change to package.json before running the update command or else you get an error.)

Usage

Make sure your git working directory is clean before updating.

Inside your project directory, if you installed globally run

ember-cli-update

or if you installed as an Ember CLI command run

ember update

This will update your app or addon to the latest Ember CLI version. It does this by fetching the latest version and comparing it to your project's Ember CLI version. It then applies a diff of the changes from the latest version to your project. It will only modify the files if there are changes between your project's version and the latest version, and it will only change the section necessary, not the entire file.

This is different from the existing ember init command. That command tries to reset your project back to a brand new project. It removes all your changes and additions.

You will probably encounter merge conflicts, in which the default behavior is to let you resolve conflicts on your own. You can supply the --resolve-conflicts option to run your system's git merge tool if any conflicts are found.

Options

Option Description Type Examples Default
--from Use a starting version that is different than what is in your package.json String "2.9.1"
--to Update to a version that isn't latest String "2.14.1" "~2.15" "latest" "beta" "latest"
--resolve-conflicts Automatically run git mergetool if conflicts found Boolean false
--run-codemods Run codemods to help update your code Boolean false
--reset Reset your code to the default blueprint at the new version Boolean false
--compare-only Show the changes between different versions without updating Boolean false
--dry-run Show what would happen without actually doing it Boolean false
--list-codemods List available codemods Boolean false

Hints

Need help using git mergetool? Here are some starting points:

If you made a mistake during the update/conflict resolution, run these commands to undo everything and get you back to before the update:

git reset --hard
git clean -f

If you notice ".orig" files lying around after a merge and don't want that behavior, run git config --global mergetool.keepBackup false.

To avoid being prompted "Hit return to start merge resolution tool (vimdiff):" for every conflict, set a merge tool like git config --global merge.tool "vimdiff".

Troubleshooting

If you are getting an error or unexpected results, running the command with the debug flag:

  • Unix (global):   DEBUG=ember-cli-update,git-diff-apply ember-cli-update
  • Windows (global):   set DEBUG=ember-cli-update,git-diff-apply && ember-cli-update
  • Unix (command):   DEBUG=ember-cli-update,git-diff-apply ember update
  • Windows (command):   set DEBUG=ember-cli-update,git-diff-apply && ember update

will give you more detailed logging.

Troubleshooting tips

Running into the following error { Error: Command failed: git apply /var/folders/59/.../T/tmp-.../file.patch error: unrecognized input you may need to update your gitconfig color option.

  • .gitconfig The color attribute should be auto.
    [color]
      ui = auto

ember-cli-update's People

Contributors

0xadada avatar akashdsouza avatar alonski avatar bendemboski avatar greenkeeper[bot] avatar kiwiupover avatar renovate-bot avatar renovate[bot] avatar rondale-sc avatar rwjblue avatar shouldergiant avatar yohanmishkin avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.