-
Notifications
You must be signed in to change notification settings - Fork 333
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
Weird behavior: in unstable, ^1.1.0 is not updated to ^1.2.1 #94
Comments
Thank you for a clear explanation of this incongruence. I agree that this would be confusing for anyone switching from v1. I have updated the README to highlight the key differences in v2. Let me know how it looks. The change was indeed made because For the old behavior, you can specify the -f/--force flag. I'm open to hearing about use cases that I may not have considered. |
Your welcome. Thanks for the quick reply. The changes to the documentation looks good, the issue is clarified. I think that I didn't realize what the
What about changing |
I like that idea. How about this?
|
Sounds good 👍 For versions that are satisfied by the current version, the output will look like this? Regarding the upgrade all, maybe we can replace |
Yes, and maybe add an additional note to the end:
|
Awesome! :) Let me know if you need any assistance. |
Good stuff! 👍 It all makes sense and is more intuitive! |
"Merging" discussion from #96. Please continue discussion here. |
(regarding @etiktin's comment) I like the table display (inspired by salita), and am excited to move forward with that! I agree that the installed version is nice information to have, and that the exact latest version does not need to be displayed since it is implied by the upgraded version range. I'm still not a big fan of showing satisfied dependencies, so I'm thinking about what a good compromise might be. I find it unnecessary to modify package.json to change ^1.0.0 to ^1.1.0 when they will ultimately install the same versions. Unnecessary commits, and potentially perpetuates ignorance of the Still, I recognize that people have their reasons for wanting that behavior, and it was confusing for folks when the satisfied dependencies were omitted completely. I suggest we separate out the satisfied dependencies from the main upgrades:
We can leave off the verbs since they would be in separate groups. We could perhaps color the entire satisfied table gray to make it clearer that they do not need to be upgraded in the same way. Thanks for your input! |
It looks good 👍 In my opinion, the main reason to show satisfied dependencies is just so the user will know that there's a newer version than the one currently installed. Displaying it in a separate table with a different color makes sense.
What do you think about coloring the range operators in some contrasting color so the version number will pop out? |
I'm in favor of a shorter message as long as it is still clear. Even
details. I'm not sure about the colored range operators. Let's get a basic version Looking good! 👍 On Wed, Jul 15, 2015 at 11:45 AM Eran Tiktin notifications@github.com
|
This is more than fine! 😄 Always better than just ignoring them. |
I have the colored output table implemented. I opted for a more minimal output that just shows current → upgraded. It's hard to overestimate the beauty of simplicity. The satisfied versions are shown in a separate table as previously discussed: @etiktin and @mathieumg, would love to get your opinion! Good news is that after this is confirmed, I think I'm finally ready to release v2 on the stable tag. 😅 |
This looks great! When did you want to release? I've been meaning to finish my work on #83 (which I had working with alpha 10, though not polished), but I've been really busy as of late... I had to fork https://github.com/hughsk/closest-package too, so I'd need to make a PR there as well or roll out my own modified version. |
It looks awesome! 👍 Some things that come to mind:
Before publishing it on the stable tag, maybe we should use with it for a couple of days and see if anything is missing. @mathieumg, the issue you mentioned doesn't seem to involve breaking the current V2 API, so I think it would be fine to add it when it's ready. Thanks Raine! |
@etiktin Good point! I just realized that for instance only the |
I think it's fine to color just what changed as long as we color all the digits that comes after it. |
I think that is the current behavior, I was just poking around saying perhaps it shouldn't be. |
@mathieumg I'm trying to get all breaking changes into v2, but #83 is an enhancement that can be added as a minor version update any time. Hopefully we can leverage the work you've done already!
@mathieumg Yeah, now that I look at it more, I agree the whole version part should be colored. It looks weird having half of it colored.
@etiktin I'm wondering why packages would be listed in package.json but not installed, and even if they are, it'll be pretty obvious when you try to start the app. I really value the minimal presentation. I would be open to a "verbose" mode that spells out everything with multiple columns, close to what was originally planned.
What are you referring to here? The message about
Yes, we can wait a few days. |
In #107 I updated the look of the rest of the messages for consistency. I think the satisfied message is not clear enough. The older version that Raine suggested (the one with the "They can be updated without modifying the dependency...") was clearer even due it was longer. I think we should use that or use the short message that tells the user to Another thing that I notice is that if you only have satisfied updates, we still show the "Run with -u to upgrade your package.json". I think we shouldn't show it, because it won't do anything in this specific case.
It happens from time to time (e.g. if you accidentally used
I get that, but I think it might confuse users. Maybe we can just use the term "update" everywhere (including arguments) and make sure that in any relevant message we explain that By the way, in your screenshots the color used for commands seems more like a type of purple/magenta, but the actual color I see in the source and when I run it, is blue. Did you change it? |
Thanks! Pull request look good. I agree, we can use the word update for everything. The satisfied wording is almost identical. What do you think needs clarification? Suggested:
Current:
|
Publishing v2 tomorrow. We can always patch if the wording needs to be tweaked. |
The first wording is just more explicit. In the second, I'm not sure it's obvious that updating package.json is unnecessary and that the result (the updates you will get from npm update) are exactly the same.
We might want to remove "using npm update" to make it a bit shorter (at the end of every upgrade we already mention that you should run npm update to update the installed dependencies). |
Yes! How about:
|
👍 I think we have a winner :) |
Published in v2.0.2. Thanks for all the help getting this nailed down! |
The unstable version (v2.0.0-alpha.11) returns different results from the stable version (v1.5.1).
In my package.json I have the following dependency:
The
bindings
latest version is 1.2.1 (ATTOW). When I run the unstable version ofncu
it doesn't list the update, but when I run the stable version it does.The reason it doesn't list the update is because in the
isUpgradeable
function we test if the latest version is satisfied by the current version and if it does, we skip it (1.2.1 is satisfied by ^1.1.0). I guess the reason this test was added is because if the latest version is satisfied by the current version, all you have to do to get it isnpm install
.Some users, myself included, expect
ncu
to let us know of any update. If I had runnpm i bindings --save
when the version was 1.1.0 and then I runncu
today when the version is 1.2.1, I won't get any warning...Also, the documentation in the readme file (for v2), in the "How dependency updates are determined" section states that
ncu
will do the following:But it's not how v2 currently works.
I suggest removing the
!semver.satisfies(latest, version)
so we will be notified of any update.At the very list we should update the documentation to make it clear that v2 doesn't show updates to versions that are satisfied by the current version.
The text was updated successfully, but these errors were encountered: