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

jQuery dep has problematic version in package.json #159

Closed
jalooc opened this issue Aug 28, 2017 · 6 comments
Closed

jQuery dep has problematic version in package.json #159

jalooc opened this issue Aug 28, 2017 · 6 comments

Comments

@jalooc
Copy link

jalooc commented Aug 28, 2017

This notation: "dependencies": { "jquery": ">=1.8" }, accepts also breaking versions (like 2.x, 3.x etc.), so it breaks semver security. It also creates problems when installing with yarn a package which has jquery.scrollTo as a dep:

$ yarn install --flat
yarn install v0.27.5
[1/4] Resolving packages...
info Unable to find a suitable version for "jquery", please choose one by typing one of the numbers below:
  1) "jquery@^2.2.2" which resolved to "2.2.4"
  2) "jquery@>=1.8" which resolved to "3.2.1"

geniuscarrier/webpack-boilerplate#7

@flesler
Copy link
Owner

flesler commented Oct 2, 2017

What do you mean by breaking versions? They break scrollTo or the fact that the major version changed?

@jalooc
Copy link
Author

jalooc commented Oct 4, 2017

The second one, that it will install potentially breaking versions.

@flesler
Copy link
Owner

flesler commented Oct 4, 2017

Would moving it to a peerDependency solve the issue for you?

@jalooc
Copy link
Author

jalooc commented Oct 16, 2017

Not really, the best solution is just to stick to minor version in package.json, like: "^2.2.2"

@flesler
Copy link
Owner

flesler commented Oct 16, 2017

That would lock the plugin to only one major version at a time, which is incorrect and undesired

@jalooc
Copy link
Author

jalooc commented Oct 17, 2017

Well, I think it is correct, because if some breaking change in major version is incompatible with your code, then you break all of you users code. But it's ofc up to you

@jalooc jalooc closed this as completed Oct 17, 2017
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