Skip to content

Remove unneeded array-flatten dependency - #4707

Closed
mac-chaffee wants to merge 1 commit into
expressjs:masterfrom
mac-chaffee:master
Closed

Remove unneeded array-flatten dependency#4707
mac-chaffee wants to merge 1 commit into
expressjs:masterfrom
mac-chaffee:master

Conversation

@mac-chaffee

@mac-chaffeemac-chaffee commented Sep 26, 2021

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Contributor

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

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@mac-chaffee@dougwilson