-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display message to user if an ember-cli update is available (and add ember update
command)
#899
Conversation
Nice! |
Persistence should be handled by yam (pending in another PR), which adds a |
We should also have a flag to disable the check (think mobile with no network scenarios). |
👍 - I like it. |
I'm a bit concerned about using npm directly for this. As it is often a bit of a slow boot problem. Can we issue a quick raw http request to its api? |
@stefanpenner yeah... If I get persistence working (after the |
@andycrum loading NPM itself is like 400ms -> 500ms regardless of the HTTP request. So as long as we can defer that aswell |
Running into some really strange test errors with |
@andycrum can you post the error output? Might be something I've seen. |
@stefanpenner @rjackson @jgwhite looks like tests are passing now. would you guys mind reviewing? |
@@ -0,0 +1,7 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already being done (https://github.com/stefanpenner/ember-cli/blob/master/blueprints/app/files/.ember-cli), is there a reason to have two files and rename?
ember update
command)
Rebased and fixed a couple bugs. @stefanpenner @rjackson what still needs to be done here? |
return new Promise(function(resolve) { | ||
// if the 'checkForUpdates' setting is true, check for an updated ember-cli version | ||
// if environment.settings is undefined, that means there is no .ember-cli file, so check by default | ||
if(commandName !== 'update' && (typeof environment.settings === 'undefined' || environment.settings.checkForUpdates)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OCD: 80 char line limit
some superficial feedback, but this looks good! |
@stefanpenner I think I've now addressed most of your notes. Couldn't get |
ember update
command)ember update
command)
…is available Add ember update command and change update message to suggest running that rather than npm install Persist checkForUpdates setting and version information via .ember-cli file Add .ember-cli files to blueprint tests/fixture directories where needed Wrap checkForUpdates call/command.validateAndRun() in a Promise to prevent async weirdness Remove unnecessary ember-cli file (already there) Make an HTTP call to npm when checking for updates rather than loading npm module Syntax fix and remove stray call in test to create ember-cli file (not needed) Add test to confirm update command is run Update the package.json file manually after doing a global install, so the correct ember-cli version is reflected there Add a couple unit tests for update command/update task fix syntax errors Remove debug statement Add entry to CHANGELOG
…mise // Use .catch() instead of then(success, failure) syntax // Fix some 80+ char lines
Think I've gotten everything now... got |
Display message to user if an ember-cli update is available (and add `ember update` command)
awesome thanks! |
Why isn't |
This is a first pass at checking for ember-cli updates and displaying a message to the user if an update is available (fixes #335).
TODOs
ember update
command