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

[bug]: front end versioning display discrepancy when there's a leading 0 of minor version number #2624

Closed
1 task done
stupleb opened this issue May 17, 2024 · 3 comments
Closed
1 task done
Assignees
Labels
Bug Something isn't working
Milestone

Comments

@stupleb
Copy link

stupleb commented May 17, 2024

Prerequisites

Server Hardware

All

StartOS Version

0.3.5.1

Client OS

MacOS

Client OS Version

N/A

Browser

Firefox

Browser Version

N/A

Current Behavior

sos1 sos2

Leading zeros are displayed in some locations in StartOS, but not in some others. The lack of consistency means that at a glance the versions feel very distinct.

Expected Behavior

Display consistently.

Steps to Reproduce

Install a service
Install another that has the first as a dependency

Anything else?

No response

@stupleb stupleb added Bug Something isn't working Needs Triage Needs to be assigned a priority labels May 17, 2024
@MattDHill
Copy link
Member

@dr-bonez code to display version below.

export function displayEmver(version: string): string {
  const vs = version.split('.')
  if (vs.length === 4) return `${vs[0]}.${vs[1]}.${vs[2]}~${vs[3]}`
  return version
}

Clams manifest looks correct: https://github.com/clams-tech/clams-remote-startos/blob/master/manifest.yaml#L103

The leading "0" appears to be srtipped before reaching the FE.

@MattDHill MattDHill removed the Needs Triage Needs to be assigned a priority label May 17, 2024
@dr-bonez
Copy link
Member

The current emver specification doesn't actually support leading zeros, so it's stripped when the version is parsed. This will be accounted for in the new specification.

@MattDHill MattDHill added this to the 0.3.6 milestone May 17, 2024
@MattDHill
Copy link
Member

Leading zeros will not be supported by exver. The discrepancy shown in the image above will be resolved by neither having a leading zero. This means the upstream version of a package may look differently than otherise published by that team, but semantically it will behave the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants