-
Notifications
You must be signed in to change notification settings - Fork 834
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
Upgrade lodash to v4 #1534
Upgrade lodash to v4 #1534
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This is going to cause issues with Kibana. Kibana is on lodash 3.10.1 and an upgrade would be very difficult |
I ran through a number of pages in Kibana built with EUI+lodash 4, specifically looking at places using EUI tables and EUI range slider (tables were previously the known issue, slider relies on two functions from v4) and hit no issues. I don't have a definitive answer why it broke previously, but I strongly suspect it was something with npm's dependency resolution (Kibana was not yet on yarn). |
Sounds good. Thanks for checking. |
Summary
Resolves #1525.
Gets EUI closer to the aspirations of #360.
Upgrades
lodash
dependency from pinned Kibana 3.x fork to latest 4.x. Single biggest benefit is cherry-pickableimports
(e.g.,import uniqBy from 'lodash/uniqBy';
).Where possible (and simple), I removed the
lodash
dependency entirely from files. Mostly, this involved simple methods that ES can handle natively (e.g.,filter
,slice
, simple array flattening)EUI's heaviest use of
lodash
is inservices
, specifically the predicate utils. As these are part of the public API, they remain unaltered (verified no breaking changes between v3 and v4). Where possible, we now use methods fromservices
rather import directly fromlodash
.Checklist
- [ ] This was checked in mobile- [ ] This was checked in IE11- [ ] This was checked in dark mode- [ ] Any props added have proper autodocs- [ ] Documentation examples were added- [ ] Jest tests were updated or added to match the most common scenarios- [ ] This was checked against keyboard-only and screenreader scenarios- [ ] This required updates to Framer X components