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.

Upgrade lodash to v4.17.5+

See original GitHub issue

This is using lodash@2.x, which has a vulnerability: https://snyk.io/vuln/npm:lodash:20180130

I might revisit and PR this at some point later - dealing with other modules having the same problem in the meantime…

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
spalgercommented, Mar 15, 2018

is there any kind of CI behind this somewhere out of the public eye?

Not at this time

Which versions of node/browser are supposed to be supported? I see most of the code is ES5?

As of version 14.0 esjs only supports node 4+. Also as of version 14.0 browser builds are not currently being transpiled, which means that they probably don’t have great browser support but that should be fixed by #645

what would your estimate of how long it would take for this lib?

Things I’m considering when estimating:

  • I was pretty new to lodash when I first wrote this lib so I don’t expect much esoteric feature usage
  • you are already familiar with the breaking changes that will need to be accounted for
  • 558 uses of _. across 70 files using 80 different method, 25 of which are custom methods from src/utils.js (list of uses found)

Based on this I’d assume it would take at least a week or two to walk thought and verify each use and make sure that it’s going to work in the new version of lodash. That of course depends on how much time is in “a week”.

I know there’s issues getting integration tests to run… but is there a summary of what it takes to do it? Even if they’re flaky - they might still be useful…

The majority of the integration tests just verify that the client is exposing the elasticsearch rest api spec, which can be useful but I don’t feel it really stresses the parts of the lib that are actually at risk with an upgrade like this; I’m more concerned with things like connection pooling sniffing.

As I can’t get grunt coverage to run… what was the last known coverage? How much can I trust unit tests?

Last know coverage was 96%, but that was from two years ago. The core library hasn’t seen any major updates in that time, so the unit tests can’t be trusted completely, but it’s not in the worst shape. I could probably spend some time and get the coverage report working again. Here is the one from Feb 2016: https://coveralls.io/builds/5225485

What’s master branch for (14.x is the default…)?

A while ago I tried to make a bunch of improvements to the client, which I was doing in master, but I never finished them and ended up needing to divert attention elsewhere and subsequently release new versions of the client. So, master is mostly broken and I think be migrated to a “failed” branch of some sort for reference, then we could reset master to match 14.x… For all intents and purposes 14.x is the current master branch.

What’s your take on “unbundling” utils back into lodash and node util? (and whatever remains as utils)

I assume you mean not extending the lodash object with the utils? I’m 100% for that. I would never extend lodash with new methods like I did back then. I also would never use a library like lodash so extensively ever again, because the upgrade path when massive changes are made to the library is so rough when you use it everywhere. I’m much more keen to use small modules that can be independently upgraded, or just writing simple helpers that do the one thing I need from a lodash method.

0reactions
dman777commented, Jul 14, 2018

With ES6, there should be no reason not to stay native to JS and avoid the extra bloat of libraries like lodash. Please remove lodash.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrading Node.js to latest version - Stack Overflow
If you just need to upgrade your old version of Node.js to the latest one and don't need multiple versions, ... C:\node -v...
Read more >
lodash - npm
Lodash modular utilities.. Latest version: 4.17.21, last published: 2 years ago. Start using lodash in your project by running `npm i lodash`.
Read more >
Visual Studio 2022 for Mac v17.5 Preview - Release Notes
Get information on the latest release features, bug fixes, and support for Visual Studio 2022 for Mac v17.5 Preview. Download today.
Read more >
Upgrade Cisco ISR 4000 series of Routers to 16.X from 3.X for ...
4. Upgrade the ROMMON using the uploaded image from flash. This process will that about five minutes. Once that image is upgraded save...
Read more >
Download & Update Node.js to the Latest Version! Node v19 ...
Changelog for Node Version 19.0.0 (Current). Node.js 19 is here! Highlights include the update of the V8 JavaScript engine to 10.7, HTTP(s)/1.1 ...
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