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

Comments

Projects
None yet
5 participants
@andrewwakeling

andrewwakeling commented Jan 8, 2014

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

This comment has been minimized.

Show comment
Hide comment
@andrewwakeling

andrewwakeling Jan 8, 2014

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.

andrewwakeling commented Jan 8, 2014

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

This comment has been minimized.

Show comment
Hide comment
@Raynos

Raynos 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 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

This comment has been minimized.

Show comment
Hide comment
@Raynos

Raynos 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 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

This comment has been minimized.

Show comment
Hide comment
@Raynos

Raynos 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.

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

This comment has been minimized.

Show comment
Hide comment
@andrewwakeling

andrewwakeling Jan 8, 2014

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.

andrewwakeling commented Jan 8, 2014

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

This comment has been minimized.

Show comment
Hide comment
@Raynos

Raynos 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.

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

This comment has been minimized.

Show comment
Hide comment
@benjamingr

benjamingr Jan 8, 2014

Collaborator

Nice catch!

Collaborator

benjamingr commented Jan 8, 2014

Nice catch!

@city41

This comment has been minimized.

Show comment
Hide comment
@city41

city41 Jan 12, 2014

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

bower install bluebird#0.11.6-1

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

This comment has been minimized.

Show comment
Hide comment
@petkaantonov

petkaantonov Jan 12, 2014

Owner

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

Owner

petkaantonov commented Jan 12, 2014

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