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

NPM package and jQuery 3.x #4254

Closed
maksis opened this issue Jul 9, 2016 · 3 comments
Closed

NPM package and jQuery 3.x #4254

maksis opened this issue Jul 9, 2016 · 3 comments
Milestone

Comments

@maksis
Copy link

maksis commented Jul 9, 2016

At the moment the semantic-ui npm package depends on jQuery 2. If a developer using semantic-ui wants to upgrade to jQuery 3.x and adds an explicit dependency for it in his own package.json, it causes two conflicting version of jQuery to be loaded. This breaks everything (at least for webpack users), thus preventing people from upgrading to jQuery 3.x.

This could be solved by removing jquery from dependencies and putting it in peerDependencies instead:

  "peerDependencies": {
    "jquery": "^2.2.3 || ^3.0.0"
  },

That would allow (or actually force) users to put jquery 2.x or 3.x (whichever they want to use) into their own package.json file. I can also confirm that Semantic UI works fine together with webpack and jQuery 3.1 when there is no conflicting version present.

(at the moment many of the packages listed in dependencies have also been copied to peerDependencies but I'm not totally sure why)

Possibly related issues:

#4195
#4202
#4126

@IonutBajescu
Copy link
Member

@jlukic This one might need your attention.

@jlukic jlukic added this to the 2.2.3 milestone Jul 12, 2016
@mihir0x69
Copy link

Is there any progress on this front? I wish to use semantic-ui instead of semantic-ui-css (without jQuery) in my react + webpack project. Can I use jQuery 3.x?

jlukic added a commit that referenced this issue Jul 31, 2016
@jlukic
Copy link
Member

jlukic commented Jul 31, 2016

Peer dependencies have been deprecated in NPM3.

I think should be solved by allowing either version in dependencies. I've gone ahead and updated this with the next release.

@jlukic jlukic closed this as completed Jul 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants