-
-
Notifications
You must be signed in to change notification settings - Fork 35.8k
Confusing process.release.compareVersion API #20053
Copy link
Copy link
Closed
Labels
metaIssues and PRs related to the general management of the project.Issues and PRs related to the general management of the project.processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.
Metadata
Metadata
Assignees
Labels
metaIssues and PRs related to the general management of the project.Issues and PRs related to the general management of the project.processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.
Type
Fields
Give feedbackNo fields configured for issues without a type.
It might only be me but the current implementation is not intuitive for me because I expect the output to be exactly the opposite of what it is. Even though it is not right or wrong either way.
Let's give an example.
The current master version is
10.0.0-pre.That way I expect
9.0.0to return-1because the input value is lower than the current version. Instead, it is1, because the current version is bigger than the input value. So it depends on what viewpoint the user is in.For me, it is more intuitive to have the input value being the main important part and not the current version (I hope it is clear what I want to express...).
So I would like to hear from others @nodejs/collaborators how they feel about this (it did not yet land on any release, so there would theoretically still be time to change this without being semver-major).