Update dependency lodash.js to v4 #508
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.4.1->4.17.21Release Notes
lodash/lodash
v4.17.21Compare Source
v4.17.20Compare Source
v4.17.19Compare Source
v4.17.16Compare Source
v4.17.15Compare Source
v4.17.14Compare Source
v4.17.13Compare Source
v4.17.12Compare Source
v4.17.11Compare Source
v4.17.10Compare Source
v4.17.9Compare Source
v4.17.5Compare Source
v4.17.4Compare Source
v4.17.3Compare Source
v4.17.2Compare Source
v4.17.1Compare Source
v4.17.0Compare Source
v4.16.6Compare Source
v4.16.5Compare Source
v4.16.4Compare Source
v4.16.3Compare Source
v4.16.2Compare Source
v4.16.1Compare Source
v4.16.0Compare Source
v4.15.0Compare Source
v4.14.2Compare Source
v4.14.1Compare Source
v4.14.0Compare Source
v4.13.1Compare Source
v4.13.0Compare Source
v4.12.0Compare Source
v4.11.2Compare Source
v4.11.1Compare Source
v4.11.0Compare Source
v4.10.0Compare Source
v4.9.0Compare Source
v4.8.2Compare Source
v4.8.1Compare Source
v4.8.0Compare Source
v4.7.0Compare Source
v4.6.1Compare Source
v4.6.0Compare Source
v4.5.1Compare Source
v4.5.0Compare Source
v4.4.0Compare Source
v4.3.0Compare Source
v4.2.1Compare Source
v4.2.0Compare Source
v4.1.0Compare Source
v4.0.1Compare Source
v4.0.0Compare Source
lodash v4.0.0
2015 was big year! Lodash became the most depended on npm package, passed 1 billion downloads, & its v3 release saw massive adoption!
The year was also one of collaboration, as discussions began on merging Lodash & Underscore. Much of Lodash v4 is proofing out the ideas from those discussions. Lodash v4 would not be possible without the collaboration & contributions of the Underscore core team. In the spirit of merging our teams have blended with several members contributing to both libraries.
For 2016 & lodash v4.0.0 we wanted to cut loose, push forward, & take things up a notch!
Modern only
With v4 we’re breaking free from old projects, old environments, & dropping old IE < 9 support!
4 kB Core
Lodash’s kitchen-sink size will continue to grow as new methods & functionality are added. However, we now offer a 4 kB (gzipped) core build that’s compatible with Backbone v1.2.4 for folks who want Lodash without lugging around the kitchen sink.
More ES6
We’ve continued to embrace ES6 with methods like _.isSymbol, added support for cloning & comparing array buffers, maps, sets, & symbols, converting iterators to arrays, & iterable
_(…).In addition, we’ve published an es-build & pulled babel-plugin-lodash into core to make tree-shaking a breeze.
More Modular
Pop quiz! 📣
What category path does the
bindAllmethod belong to? Is itA)
require('lodash/function/bindAll')B)
require('lodash/utility/bindAll')C)
require('lodash/util/bindAll')Don’t know? Well, with v4 it doesn’t matter because now module paths are as simple as
We’ve also reduced module complexity making it easier to create smaller bundles. This has helped Lodash adoption with libraries like Async & Redux!
1st Class FP
With v3 we introduced lodash-fp. We learned a lot & with v4 we decided to pull it into core.
Now you can get immutable, auto-curried, iteratee-first, data-last methods as simply as
Chakra Optimized
Well actually, while we’re excited about Chakra, Lodash is optimized for great performance across all engines. Unlike many libraries, we don’t favor a single engine so we can deliver solid performance & support regardless of engine.
With v4 we’ve continued our commitment to performance; expanding support for lazy evaluation & improving the performance of core functionality like circular reference detection.
Emojis
Taking things up a notch Lodash v4 has added support for emojis! Includes things like
astral symbols, unicode modifiers, variation selector characters, zero-width joiners, & regional indicator symbols.
We’ve introduced more breaking changes in this release than any other so be sure to check out the changelog for a full rundown of changes & give lodash-migrate a spin to help migrate older Lodash code to the latest release.
If you dig Lodash don’t forget to star the repo or
npm star lodash!v3.10.1Compare Source
v3.10.0Compare Source
v3.9.3Compare Source
v3.9.2Compare Source
v3.9.0Compare Source
v3.8.0Compare Source
v3.7.0Compare Source
v3.6.0Compare Source
v3.5.0Compare Source
v3.4.0Compare Source
v3.3.1Compare Source
v3.3.0Compare Source
v3.2.0Compare Source
v3.1.0Compare Source
v3.0.1Compare Source
v3.0.0Compare Source
lodash v3.0.0
After a little over a year & more than 2,000 commits we’re excited to release lodash v3.0.0. lodash follows semantic versioning so with this major release we’ve taken the opportunity to clean house & make some back-compat breaking changes. We’ll get into that in a bit, but first lets talk about all the cool things this release has to offer.
String methods
By popular demand we surveyed the utility landscape for a cross-section of string APIs to add to lodash. We settled on 17 string methods:
_.camelCase, _.capitalize, _.deburr, _.endsWith, _.escapeRegExp,
_.kebabCase, _.pad, _.padLeft, _.padRight, _.repeat, _.snakeCase,
_.startsWith, _.trim, _.trimLeft, _.trimRight, _.trunc, & _.words
There’s familiar methods from ES5, like
_.trim, & ES6, like_.endsWith,_.repeat, &_.startsWith, as well as some lesser known methods like_.deburr&_.kebabCase.Following casing rules with methods like
_.camelCase,_.kebabCase, &_.snakeCaseallows for strings to be transformed from say camel case, to kebab case, to snake case, & back again.ES is our jam
Previous versions of lodash added
_.assign,_.find,_.findIndex, & ES template delimiter support. In this release we’re taking our ES adoption up a notch by aligning_.includes,_.isFinite, &_.keys, supporting typed arrays in_.clone&_.isEqual, usingSet&WeakMapfor performance-gains, allowingMap&WeakMapto be used as _.memoize.Cache, & supporting ES modularized builds with lodash-cli.Functional goodies
There’s lots of functional goodies in v3 like
_.ary,_.curryRight,_.flow,_.rearg, & support for customizable argument placeholders in_.bind,_.bindKey,_.curry,_.curryRight,_.partial, &_.partialRight.Also several methods now work out-of-the-box as iteratees for methods like
_.map&_.reduceWe’ve heard from some functional programming fans that lodash wasn’t functional enough, often citing our method signatures as an issue. To ease composition & currying they’d prefer methods like
_.filterbepredicatefirst &collectionsecond instead ofcollectionfirst &predicatesecond.It’d be a shame for those fans to lose out on lodash over something as little as method signatures so with v3 we’ve added
_.ary&_.rearg. The_.arymethod sets the argument cap of a function &_.reargrearranges the arguments provided to a function.You can also use individual packages like lodash.ary, lodash.curry, & lodash.rearg to convert functions.
Combined with _.runInContext you could easily create a version of lodash with auto-curried iteratee-first methods. In fact, that’s what we’ve done! Introducing lodash-fp.
lodash reduces the cost of method wrapping produced by
_.ary,_.curry, &_.reargby using aWeakMapto store function metadata. In this way a function is only wrapped once even though it may have_.ary,_.curry, &_.reargapplied.Modules, modules, modules
In lodash v2 we introduced npm packages per-method as well as bundles of modules for AMD & Node.js. With v3 we’ve improved lodash-cli’s ability to inline dependencies allowing us to easily customize inlining per method, enabling a better balance between deep dependency graphs & code duplication.
In addition all modularized dependencies now use the
^version range, instead of the~, so they’ll update as needed without you having to worry about it. Moving forward all per-method packages will be independently updated, instead of in bulk, becauselodash-cliwill soon be able to detect changes in packages & automatically bump patch/minor version numbers.The lodash & lodash-compat npm packages now come with modules baked in too.
Perfect for browserify and webpack!
The method modules are organized by category so they’re easy to find.
lodash is available in a variety of other builds & module formats.
Performance
We’ve improved performance 20-40% overall in v3 by better utilizing the JIT in JavaScript engines, using internal helper functions that avoid optimization disqualifications & increase the likelihood of function inlining.
In v3 we’ve also introduced lazily evaluated chaining for massive performance wins in certain scenarios.
As mentioned above we’re using
Set&WeakMapfor performance-gains which all modern browsers, Node.js, & io.js can benefit from.Breaking changes
lodash v3 is a major bump & we’ve introduced several back-compat breaking changes. One such change is that while we still test against Underscore/Backbone unit tests we’re no longer supporting an Underscore/Backbone build. Over the last year we’ve seen Underscore align more & more with lodash’s API so the need for a separate Underscore build has diminished. If you still need compatibility around some of the edges we recommend leveraging modules in lodash v3 to supplement your Underscore use.
Be sure to check out the changelog for a full rundown of changes & give lodash-migrate a spin to help migrate older lodash code to the latest release.
New Core Member
In closing I want to welcome Benjamin Tan (bnjmnt4n) as an official core member.
Without the efforts of contributors, like Benjamin, lodash v3 would not have happened.
If you dig lodash v3 don't forget to star the repo or
npm star lodash!v2.4.2Compare Source
Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.
🔕 Ignore: Close this PR and you won't be reminded about this update again.