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

Request: Store Velocity version #95

Closed
allanesquina opened this issue Jun 3, 2014 · 13 comments
Closed

Request: Store Velocity version #95

allanesquina opened this issue Jun 3, 2014 · 13 comments

Comments

@allanesquina
Copy link

What do you think about put a version on a property?
Ex: jQuery.fn.jquery // "1.7.1"

@julianshapiro
Copy link
Owner

Thanks, Allan!

The problem with assigning a SEM string value is forcing the third-party plugin to parse it so that it can be numerically compared against a base required version. Although I guess that's pretty simple to do: Just strip out the periods and compare integer values.

I also wonder what the common use cases for this are? After all, for simple reference purposes, the version number is always included in the comment banner.

@julianshapiro julianshapiro changed the title Version on a property Request: Store Velocity version Jun 3, 2014
@allanesquina
Copy link
Author

It's a good idea to offer this kind of information!
It would be useful if we had:

  • Compatibility check
  • Sniffer (information only)
  • Load Control
  • Any other needs

@julianshapiro
Copy link
Owner

Thanks, Allan :)

Would love it if anyone else could chime in with specific instances where this was useful to them in the past.

I ask because I'll have to manually update this number on every push, and I'd like to avoid unnecessary manual overhead. Already have to do it for my package.json, component.json, and bower.json :-p

@allanesquina
Copy link
Author

I understand your concern.
I made a sample project for you to see how it can be done automatically.

Please see: https://github.com/allanesquina/version

I can do if you want!

@julianshapiro
Copy link
Owner

Awesome! Will take a look at this tomorrow morning.

@allanesquina
Copy link
Author

Ok man!
Your plugin is awesome!

@tomByrer
Copy link
Contributor

tomByrer commented Jun 7, 2014

strip out the periods and compare integer values

So if you have 1234 did they mean 1.2.34 or 1.23.4?
Better solution: node-semver. The build script allows a browser version; it isn't pre-built.

@julianshapiro
Copy link
Owner

So if you have 1234 did they mean 1.2.34 or 1.23.4?

Totally right. Thanks, Tom.

Better solution: node-semver.

This is awesome. This is exactly what I was waiting for.

Given the small likelihood of its use in front-end dev (Velocity of course has no use on the backend), I'm going to close this issue and avoid storing the version as a variable for now. I just don't see the use.

I'm open to revisiting this in the future if important use cases come up. If someone wants to enlighten me, please do so.

Thanks again for all your contributions, Allan. I hope I have not discouraged you from continuing to participate. I'd love to see more issues raised from you.

And thanks to you, @tomByrer, for helping us reach a conclusion on this.

@allanesquina
Copy link
Author

That's cool, I did not know node-semver. It is a good solution. It's always good to learn more, thanks @tomByrer.
Thank you for your attention @julianshapiro is a pleasure to continue participating.

@dashed
Copy link

dashed commented Jun 9, 2014

If you do use semver, use the convention: http://semver.org/

@tomByrer
Copy link
Contributor

tomByrer commented Jun 9, 2014

Welcome Allan.

If you do use semver, use the convention: http://semver.org/

Yes, or even if the versioning looks like SemVer, use the official SemVer.
In another repo I submitted a PR into uses X.x.x numbering like most do. The repo manager removed an API call a few months ago, but failed to bump versions properly, caused me alot of confusion.

julianshapiro added a commit that referenced this issue Jul 8, 2014
Closes #153. Closes #110. Closes #143. Closes #95. Closes #156.
@julianshapiro
Copy link
Owner

This is now integrated. Velocity.version returns a SEMVER object.

@allanesquina
Copy link
Author

Cool, I'll update the Library-Detector-for-Chrome to get the library version.
Thanks @julianshapiro!

Rycochet pushed a commit that referenced this issue Aug 3, 2020
Closes #153. Closes #110. Closes #143. Closes #95. Closes #156.
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

4 participants