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

Version designation not standard. #1075

Closed
garretwilson opened this issue Mar 20, 2023 · 2 comments
Closed

Version designation not standard. #1075

garretwilson opened this issue Mar 20, 2023 · 2 comments

Comments

@garretwilson
Copy link

This is a small issue, but if I indicate the Node version like this:

<nodeVersion>18.15.0</nodeVersion>

I get a warning:

[WARNING] Node version does not start with naming convention 'v'.

It is true that if there is no context, prefixing something with a v is the convention for indicating that it is a version. For example tagging a Git repository commit with v1.2.3 is preferable to 1.2.3, because you don't necessarily know what 1.2.3 means.

But here the name of the element is <nodeVersion>, and the name of the setting is nodeVersion. There is no ambiguity about what 1.2.3 means, and indicating v1.2.3 as the value is redundant, as the setting name already indicates "version". Furthermore this is not the standard practice for maven dependency version indication; normally one does not indicate v… in the value.

Again this is a little thing, but it's a thing nevertheless. 😄

@garretwilson
Copy link
Author

I just want to come back and say thought that this plugin is amazing. Thank you so much for creating it!! Please consider this ticket as an attempt to make something really good even better. The most important thing is that the plugin works, and it works like a charm.

@eirslett
Copy link
Owner

Yeah, I agree it's a bit weird. It's for historical reasons. This plugin was initially released back in the day when Node v0.10.x (I think) was the latest and greatest. Back then, they had the habit of prefixing all Node versions with v. It was even stranger that npm doesn't follow the same naming convention with the v prefix.
You can see the v prefix thing going on in their CDN: https://nodejs.org/dist/
The same v prefix is not in the npm CDN https://registry.npmjs.org/npm/-/

The way this plugin works, is that it builds the download URL dynamically based on <nodeVersion>. Therefore, it was a deliberate choice to explicitly use the v prefix in the pom.xml file. The reason is that if this plugin were to always add the v for you in the URL, that could cause problems in the future, if Node.js ever decided to remove their v from their version names. Looks like they never did, though, at least not yet! Again, this decision was made many years ago when Node was at 0.10.something. Most people were using JAWR for bundling. Grunt was bleeding edge, TypeScript was still 0.x.something. Well, anyways, here we are! That's the story of the v.

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

No branches or pull requests

2 participants