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

Support NPM 2.0 / Semver 3.0 #235

Closed
voxpelli opened this issue Jul 25, 2014 · 5 comments
Closed

Support NPM 2.0 / Semver 3.0 #235

voxpelli opened this issue Jul 25, 2014 · 5 comments

Comments

@voxpelli
Copy link

The upcoming NPM 2.0 release contains the updated 3.0 version of Semver which has changed ^0.x.y from always being to ~0.x.y to always be equivalent to =0.x.y.

This requires especially the peerDependency on Grunt to be updates as otherwise it will become very hard for projects to fulfill it and failing peerDependencies in dependencies results in npm install aborting all installs which essentially breaks a project's entire NPM setup.

So all ^0.x.x dependencies should be changed to ~0.x.x.

As I haven't got a CLA signed I can't provide you with a pull request for this just yet and it's such a small change that it's just easier if someone with a CLA submits the fix.

@voxpelli
Copy link
Author

This is actually worse than it initially looked. Currently also an npm update -g will update npm's dependencies to make the check for fulfilled peerDependencies already use the new Semver 3.0 and thus even updated NPM 1.4 installations will run across this issue.

Relevant issue for the problem in NPM 1.4: npm/read-installed#28

@jamesplease
Copy link
Member

Thanks for the heads up, @voxpelli!

I'm thinking 0.4.x would give us the same functionality as the old caret operator, as it won't pull in minor updates nor prereleases.

@voxpelli
Copy link
Author

Most other grunt plugins use ~0.4.0 so it would make for a more consistent experience if that were used – at least for the peerDependency

@tkellen
Copy link
Member

tkellen commented Jul 25, 2014

I suspect we'll be removing peerDependencies entirely, given that they are going away (npm/npm#5080). @cowboy, any thoughts here?

@vladikoff
Copy link
Member

npm issue and peerDep issues tracked in gruntjs/grunt#1186 and npm/read-installed#28

Installation issues with grunt-contrib-uglify in "npm 2" have been resolved for 0.4.x and 0.5.x versions of the plugin
image

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