Closed fregante closed 4 years ago
Is that a bug in sindresorhus/latest-version?
Not sure, but I don't think so, since I've seen this problem happen on non-beta versions too.
Yeah the 2 comments were unrelated. I think latest-version could return a version older than its supposed to, I don’t know what else could be happening. Is it still cached here?
Hi,
Not sure it's related but we got those messages reported here:
https://github.com/facebook/docusaurus/issues/4782
Any idea what could be happening?
Looks like this bug is caused by the async nature of this package: fetch the update, and only notify about it on the 2nd run.
As I have my own code to notify users, I think I should just backport your logic to my own notifier.
Wouldn't it make sense to somehow "erase" this.update data if on 2nd run we detech packageVersion is > latest fetched version? This could fix the issue in a more generic way?
Fixes #181
I haven't investigated why this would happen in the first place, but I guess it could if you install a beta version.
Is that a bug in https://github.com/sindresorhus/latest-version?