Skip to content

fix: Only show update message if current < latest#1499

Merged
marvinhagemeister merged 2 commits into
mainfrom
smever-sort
Jul 24, 2023
Merged

fix: Only show update message if current < latest#1499
marvinhagemeister merged 2 commits into
mainfrom
smever-sort

Conversation

@marvinhagemeister

@marvinhagemeister marvinhagemeister commented Jul 21, 2023

Copy link
Copy Markdown
Contributor

Noticed that we still had a case where the cache has the old value latest and users may have just upgraded to a newer version than in the cache, that we'd still show the upgrade message. This was because we only checked if current !== latest, which doesn't account for the current > latest.

Note that this only during the time interval between a new release and the next update check. Once the update check updates the cache we don't run in the situation where current > latest.

To address that I've added a basic semver comparison check.

Comment thread src/dev/update_check.ts Outdated

@bartlomieju bartlomieju left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@marvinhagemeister marvinhagemeister merged commit e18a608 into main Jul 24, 2023
@marvinhagemeister marvinhagemeister deleted the smever-sort branch July 24, 2023 11:21
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.

3 participants