Skip to content
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

Newly updated ncu informs of update #372

Closed
2 tasks done
krokofant opened this issue Jun 27, 2017 · 5 comments
Closed
2 tasks done

Newly updated ncu informs of update #372

krokofant opened this issue Jun 27, 2017 · 5 comments

Comments

@krokofant
Copy link

krokofant commented Jun 27, 2017

  • node version: v8.1.2
  • npm version: 5.0.4
  • npm-check-updates version: 2.12.1

I often react to a newly updated ncu reporting that the just installed updated is available to update to. I find it hard to replicate but this has come to my mind before so I thought I'd share the issue.

@raineorshine
Copy link
Owner

Thanks for bring it to our attention. Hopefully someone can find a way to consistently reproduce.

Will you post a full output next time it happens to you? That will help me understand it more precisely. I wasn't clear in your description whether you were talking about an update for ncu itself or one of your dependencies.

@krokofant
Copy link
Author

krokofant commented Jun 27, 2017

@raineorshine It's when ncu itself is updated. The update available banner is what this issue is about.

Example output:

✘  ~  npm install -g npm-check-updates
/usr/local/bin/npm-check-updates -> /usr/local/lib/node_modules/npm-check-updates/bin/npm-check-updates
/usr/local/bin/ncu -> /usr/local/lib/node_modules/npm-check-updates/bin/ncu
+ npm-check-updates@2.12.1
added 45 packages, removed 3 packages and updated 20 packages in 16.285s
 ~  ncu -g


   ╭──────────────────────────────────────────────╮
   │                                              │
   │      Update available 2.11.3 → 2.12.1        │
   │   Run npm i -g npm-check-updates to update   │
   │                                              │
   ╰──────────────────────────────────────────────╯

Next time ncu is run it does not report about the update.


I tried to reproduce this be installing an older version and checking npm -gbut then I didn't get the update banner. What in the code regulates when the update banner is displayed? It does not seem to display all the times.

@raineorshine
Copy link
Owner

raineorshine commented Jun 28, 2017 via email

@krokofant
Copy link
Author

krokofant commented Jun 28, 2017

I found the issue upstream yeoman/update-notifier#67

And an older local issue linked via that thread #190

Could we leave this issue open until it's resolved upstream?

Edit: I reproduced the issue with this

# install old npm-check-updates
npm install -g npm-check-updates@2.11.1
# reset the lastUpdate time
sed -i '' -E "s/([0-9]+)/0/" ~/.config/configstore/update-notifier-npm-check-updates.json
# make ncu check for updates once
ncu -g
# install latest
npm install -g npm-check-updates
# what's this now?
ncu -g

@raineorshine
Copy link
Owner

raineorshine commented Jun 28, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants