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

Bower installing a very old version (0.3.0) #60

Closed
andrewwakeling opened this issue Jan 8, 2014 · 9 comments
Closed

Bower installing a very old version (0.3.0) #60

andrewwakeling opened this issue Jan 8, 2014 · 9 comments
Labels

Comments

@andrewwakeling
Copy link

I'm not sure if bluebird supports bower or not, but it's listed in the repository and attempting to install bluebird will install version 0.3.0.

bower search bluebird gives:

bluebird git://github.com/petkaantonov/bluebird.git

bower install bluebird gives:

bower bluebird#*            not-cached git://github.com/petkaantonov/bluebird.git#*
bower bluebird#*               resolve git://github.com/petkaantonov/bluebird.git#*
bower bluebird#*              download https://github.com/petkaantonov/bluebird/archive/v0.3.0.tar.gz
bower bluebird#*               extract archive.tar.gz
bower bluebird#*              resolved git://github.com/petkaantonov/bluebird.git#0.3.0
@andrewwakeling
Copy link
Author

It seems to be related to this bower/semver issue.

All versions that include dashes are being treated as "pre-release" versions. 0.3.0 is the only version without a dash, so is considered the latest version.

This problem might be overcome by creating a bower.json but I need to confirm this.

@Raynos
Copy link

Raynos commented Jan 8, 2014

If bower doesn't comply with the semantics of require('semver').gt then it's a bower bug.

> gt('v0.11.6-1', 'v0.11.6')
false
> gt('v0.11.6-1', 'v0.11.5')
true

@Raynos
Copy link

Raynos commented Jan 8, 2014

semver spec says

Precedence MUST be calculated by separating the version into major, minor, patch and pre-release identifiers

so 0.11.5 < 0.11.6-1 < 0.11.6

@Raynos
Copy link

Raynos commented Jan 8, 2014

bower should probably install the "normal version" that is the next lowest version of the "major.minor.patch" of the current pre-release version.

Instead of ignoring all pre-release versions.

If a bower module author has 1.0.7, 1.1-alpha and 1.2-alpha then that will break too, but that might be an acceptable compromise.

@andrewwakeling
Copy link
Author

Putting aside the disagreement on how Bower resolves the latest package, in the very least it would be beneficial to document this somewhere.

Although it didn't take long to figure out that I had the wrong version, it's not something you want people to be constantly hitting.

@Raynos
Copy link

Raynos commented Jan 8, 2014

Thinking about it a bit more, bower probably won't change their semantics.

If you want to be kinder to people using bower you should probably add a bower.json file with different version numbers.

@benjamingr
Copy link
Collaborator

Nice catch!

@city41
Copy link

city41 commented Jan 12, 2014

For those finding this via Google (as I did), the quick fix is:

bower install bluebird#0.11.6-1

@petkaantonov
Copy link
Owner

Latest is now "1.0.0" so this shouldn't be a problem anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants