Skip to content
This repository was archived by the owner on Jul 16, 2020. It is now read-only.

Replace lodash dependency with native reduce and filter implementations#8

Closed
wvbe wants to merge 1 commit intobusterjs:masterfrom
wvbe:drop-lodash-dependency
Closed

Replace lodash dependency with native reduce and filter implementations#8
wvbe wants to merge 1 commit intobusterjs:masterfrom
wvbe:drop-lodash-dependency

Conversation

@wvbe
Copy link

@wvbe wvbe commented Jun 28, 2018

The lodash dependency was only used to flatten and deduplicate results. These two mutations on an array are quite easily expressed using Array#reduce and Array#filter. By adding a little extra code in lib/multi-glob.js we can drop the dependency on lodash, which is principally better.

Deduplicating results was already tested. If flattening results does not work, multiple tests will fail. For this reason I have not added new tests.

Copy link

@Natim Natim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a good idea to be honest.

@mroderick
Copy link
Contributor

@Natim are you using this package? It'll take some work to bring the setup back to working order

@Natim
Copy link

Natim commented Dec 11, 2018

I noticed that since lodash has got some vulnerabilities multi-glob needed to be updated so that the rest of the dependency tree looks good.

My dependency tree using multi-glob is the following babel-istanbul > multi-glob > lodash

Well I guess since babel-istanbul is now deprecated as well, I should probably move out of it altogether.

https://github.com/jmcriffey/babel-istanbul#deprecated

@Natim
Copy link

Natim commented Dec 11, 2018

@mroderick maybe one should switch multi-glob as a DEPRECATED project and archive its repository if it isn't planned to maintain it anymore.

@cjohansen
Copy link
Member

I did the same thing in #11, which also fixes the tests.

@cjohansen cjohansen closed this Dec 11, 2018
@wvbe
Copy link
Author

wvbe commented Dec 16, 2018

Thanks everyone, good to see this integrated 👍

@wvbe wvbe deleted the drop-lodash-dependency branch December 16, 2018 13:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants