Backbone: Lodash 5 Support

Created on 21 Jun 2017  ·  9Comments  ·  Source: jashkenas/backbone

Since Backbone 1.3.3 supports Lodash 4, I figure I ask if Lodash 5 will be supported.
https://github.com/lodash/lodash/wiki/Roadmap points out functions that are getting removed in favor of native approaches. This is pre-emptive since the roadmap gradually updates but the changes aren't difficult to make in the code base.

change fixed

Most helpful comment

All 9 comments

Want to submit a pull request, and we can see what the required changes would look like?

Will do.

changing _.bind to fn.bind would support IE9+. Is that a deal breaker? Browser support isn't mentioned in Backbone page.

Yes, that sounds fine, and not a deal breaker.

I would say, if we can keep support for all browsers that have > 0.5% global market share currently, I'm cool with it.

I'm all for this change as essentially this is a primary goal of backbone-esnext which is to remove dependence on Underscore if / as possible which I previously commented on in the preparing Backbone 1.4 issue.

A good article to peruse regarding native options vs Underscore / Lodash. I assume the mainline BB effort will target native functions with ES 5.1 and below. For my effort with backbone-esnext I'll be targeting ES2016 / stage 2 for switching to native functions.

A suggestion is to ship BB 1.4 as there are already enough changes in it to warrant a release. Then target 1.5 to include any potential switch to native functions and perhaps only these changes. I'd be glad to help with any PR in regard to a switch to native options.

As a proof of concept I already have removed Underscore from Events functionality in backbone-esnext-events. Mainly it was switching to fn.bind at #113, #217 though there might have been a few more changes I can't recall offhand.

I'm waiting for at least 1.4 to drop before I update backbone-es6 which tracks mainline BB or continue to work on backbone-esnext which will diverge a bit.

the only updates I found that need changes were _.bind. PR is up. Had to make a different PR for the CI to start working again.

@rafde indeed and a good catch.. Pretty straightforward and as you mentioned no other changes in Lodash 5 roadmap apply to BB.

To maintainers: ship it (1.4)! ;)

Hi,
Any news on this? Would love to have BB on Lodash.
If any help required, please, announce.
Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

g00fy- picture g00fy-  ·  9Comments

azizZaben picture azizZaben  ·  5Comments

inf3rno picture inf3rno  ·  17Comments

gfranko picture gfranko  ·  18Comments

spawnedc picture spawnedc  ·  9Comments