Bootstrap-datepicker: 1.7.0 moved jQuery to peerDependencies which is a breaking change

Created on 19 Jun 2017  Â·  12Comments  Â·  Source: uxsolutions/bootstrap-datepicker

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.

BC-break

Most helpful comment

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?

All 12 comments

@andreypopp you can check the discussion about this change in #2163

It's possible to revert this change, but I merged by the discussion in the PR, so the fix looked good

Hm... I still consider moving to peerDependencies a breaking change as it requires changes in consumer code.

It's up to you to decide but considering that releasing 2.0.0 requires low effort — why not doing that instead?

I did not know this would introduce a bc break from the description in the PR. I would go for reverting it in 1.7.x and re-introduce if necessary in 2.0

What do you think @andreypopp and @Mithgol

That would be great!

I feel fine about reverting it in 1.7.x and re-introducing in 2.0.

Awesome! Can this be released as 1.7.1?

I will try to push a new release later tonight or tomorrow!

@andreypopp I've pushed a new release (1.7.1)

Thank you!
On Thu, 6 Jul 2017 at 15:18 Jeroen Thora notifications@github.com wrote:

@andreypopp https://github.com/andreypopp I've pushed a new release
(1.7.1)

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/uxsolutions/bootstrap-datepicker/issues/2206#issuecomment-313379802,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAB3goCcvbYVU6x6jkuVJNRg2ZeJFRzUks5sLNCkgaJpZM4N-COk
.

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?

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

Was this page helpful?
0 / 5 - 0 ratings