Skip to content

fix(web): use semver comparison for update notification version check - #1770

Merged
ivan-aksamentov merged 1 commit into
masterfrom
fix/web-version-comparison
Jul 6, 2026
Merged

fix(web): use semver comparison for update notification version check#1770
ivan-aksamentov merged 1 commit into
masterfrom
fix/web-version-comparison

Conversation

@ivan-aksamentov

Copy link
Copy Markdown
Member

PR: fix(web): use semver comparison for update notification version check

fix/web-version-comparison -> master

Summary

UpdateNotification.tsx compared app versions with JavaScript string >, which fails for multi-digit semver components ("3.10.0" < "3.9.0" lexicographically). Replaced with semver.gt() -- the semver package is already a dependency and used correctly in fetchDatasetsIndex.ts.

Changes

  • Import semver in UpdateNotification.tsx
  • Replace appJson.version > (lastNotifiedAppVersion ?? PACKAGE_VERSION ?? '') with semver.gt(appJson.version, lastNotifiedAppVersion ?? PACKAGE_VERSION ?? '0.0.0')
  • Fallback changed from '' to '0.0.0' (valid semver required by semver.gt())

Related

Follow-up to: #1769 (same defect class, Rust side)

String comparison fails for multi-digit version components (e.g. "3.10.0" < "3.9.0" lexicographically). Use semver.gt() which is already used elsewhere in the web app (fetchDatasetsIndex.ts).
@ivan-aksamentov
ivan-aksamentov merged commit 3731ac6 into master Jul 6, 2026
1 of 3 checks passed
@ivan-aksamentov
ivan-aksamentov deleted the fix/web-version-comparison branch July 6, 2026 13:40
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.

1 participant