Skip to content

Conversation

@fregante
Copy link
Contributor

@fregante fregante commented Dec 11, 2019

Fixes #60

That bug exists because update-notifier caches the current version on first run and then notifies about it on the following one, without checking again which version is currently installed.

This PR now also fixes the value returned as notifier.update.current, which was previously just the cached version rather than the real current version (real => from the currently-installed package.json)


IssueHunt Summary

Referenced issues

This pull request has been submitted to:


IssueHunt has been backed by the following sponsors. Become a sponsor

@fregante fregante marked this pull request as ready for review December 11, 2019 15:26
@sindresorhus sindresorhus changed the title Avoid notifications if current version is the latest Avoid showing update notification if current version is the latest Dec 12, 2019
@sindresorhus sindresorhus changed the title Avoid showing update notification if current version is the latest Avoid showing notification if current version is the latest Dec 12, 2019
@sindresorhus sindresorhus merged commit bc1721a into sindresorhus:master Dec 12, 2019
@sindresorhus
Copy link
Owner

Yay! Thanks for fixing this 👍👍👍👍

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When run right after npm install, a wrong version is displayed

2 participants