question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

1.7.0 moved jQuery to peerDependencies which is a breaking change

See original GitHub issue

Expected behaviour

npm install bootstrap-datepicker@^1.0.0 should install jQuery as its own dependency as before

Actual behaviour

npm install bootstrap-datepicker@^1.0.0 instead doesn’t install jQuery as it is moved to peerDependencies which broke our already released versions of packages which depend on bootstrap-datepicker.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
einfallstollcommented, Apr 17, 2020

What’s the status here? 2.0.0 is still not released, but I think moving jQuery to peerDependencies makes sense as stated in #2399. Could we publish 2.0.0 early and move the remaining breaking changes to 3.0.0?

0reactions
setefocoscommented, Aug 8, 2020

It is breaking with Webpack. that is instantiating a new jquery object just for bootstrap-datepicker. The jquery instance of our project ends with no .datepicker function. “peerDependencies” solves that. Please update package.json! It requires a major version bump, because it forces projects that uses bootstrap-datepicker to have jquery dependencie declared on the own package.json.

In my opinion, a lot of people is doing an ungly workround do deal with it, since webpack is the most used build tool. image https://2019.stateofjs.com/other-tools/build_tools

Read more comments on GitHub >

github_iconTop Results From Across the Web

NPM is ignoring jQuery version in package.json - Stack Overflow
I have 2.2.4 specified in package.json -- I'm running bootstrap 3.3.7, and any jQuery version newer than that will break bootstrap.
Read more >
Understanding Peer Dependencies in JavaScript
Imagine A depends on version 2.0.0 of B and C depends on version 7.1.3. If B is properly using semver, there are quite...
Read more >
jQuery Core 3.5 Upgrade Guide
A workaround. If you want to upgrade to jQuery 3.5.0 or newer and don't have time to deal with breaking changes at the...
Read more >
Official jQuery Blog | New Wave Javascript
Last week, we released jQuery 3.6.2. There were several changes in that release, but the most important one addressed an issue with some...
Read more >
Changelog - Cypress Documentation
Read our Migration Guide which explains the breaking changes in more detail. Component Testing: Removed cssFile , cssFiles , style , styles ,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found