Skip to content
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

Remove unneeded array-flatten dependency #4707

Closed
wants to merge 1 commit into from

Conversation

mac-chaffee
Copy link

@mac-chaffee mac-chaffee commented Sep 26, 2021

Back in 2015, express had its own ~9 line flatten() function, which got replaced by an external library in #2682 and #2624

That was just before the left-pad fiasco in 2016, when dependencies were a magical source of free code that someone else maintains who never gets hacked, bought-off, or becomes malicious ;)

https://owasp.org/Top10/A06_2021-Vulnerable_and_Outdated_Components/
https://en.wikipedia.org/wiki/Npm_(software)#Notable_breakages

This PR restores the old flatten function (we still have the test!) and removes the need for the external array-flatten dependency.

@dougwilson
Copy link
Contributor

Hello, and thank you for your pull request. The ecosystem has changed a lot, as well as the controls npm has. Our philosophy is yo move to more usage of smaller packages, and to remove these util code blocks from source.

@dougwilson
Copy link
Contributor

The array-flatten module is authored and maintained by an Express.js TC member.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants