Prevents libuv/E2BIG errors when a large NOTICE file exists (fixes #7783) #8093
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes #7783 by following the example from #7419 that was used to fix #5420.
TLDR: it prevents yarn from erroring out anytime you have a >40kb NOTICE file at the root of your repo and try to invoke any run-script that involves
exec()
ing a new node process.This change has some backcompat risk (it no longer sets the
npm_package_noticeText
env var that was previously available to run scripts); I don't see any references to that variable name in an all-github code search, so I think the risk is lower than the benefit.Test plan
Similarly to #7419, this doesn't add any new test code because the existing tests already cover verifying each value in the
IGNORE_MANIFEST_KEYS
list.I manually verified that it addresses #7783 by testing it against a small test yarn project with a 40kb notice.txt file: