-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Adopt Semantic Versioning 2.0.0: returning X.Y.Z
instead of vX.Y.Z
for node -v
#40964
Comments
17.1.0
for node -v
X.Y.Z
instead of vX.Y.Z
for node -v
In case it helps with your use case, if you want the version without a $ node -p process.versions.node
17.1.0
$
True if you maintain libraries used by a few thousand people. Not even close to true for Node.js. This seems like a change that is guaranteed to break a lot of code for little or no upside. |
No one should update a major version without checking release notes, especially the section "Breaking changes". So, if such change would not be digged somewhere in a list of commits, then there should not be a problem. For instance, the import appConfig from "./appconfig.json" assert {type: "json"}; That was even not a major release, just a minor one but still broke a code, which used to work for several years (yes, I know it's under the flag, but still). |
Anything experimental is explicitly opted-out from semver: Lines 31 to 34 in d0b58c0
That's why importing a JSON module comes with a
Reading the release notes would not help you in case you are relying on an old version of a package or software that do expect to see a |
FWIW, I checked the output of |
I've just checked a value for
Well, if other significant projects aren't semver-compatible as well, then OK, although, it's always good to be a widely accepted standard compatible. |
Thanks for opening the issue. I'm going to close this. If any collaborators think we should reconsider, please comment or reopen. |
Is your feature request related to a problem? Please describe.
Following #40957, Node.js version format contains a
v
-prefix prior the version, e.g.node -v
returnsv17.1.0
. According to the https://semver.org/#is-v123-a-semantic-version,v17.1.0
is not semver compliant.Describe the solution you'd like
Drop
v
from the version number and return17.1.0
fornode -v
.It should not be a problem at all if implemented in a major version:
Besides, if a Node.js version check implemented properly, not just substringing the first char, it should not break anything.
The text was updated successfully, but these errors were encountered: