Repository navigation
Do not lower the process listener limit for small checks - #406
Merged
Merged
Conversation
calc() set the limit to files + 1, which is 2 for a single file. Only raise it. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Owner
|
Thanks. Do you need a release of this feature soon or we can release it with bigger changes? |
Contributor
Author
|
No rush at all - happy for it to ride with the bigger release. Thanks for the quick merge! |
Owner
|
Released in 14.2.0. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #405.
calc()calledprocess.setMaxListeners(files + 1). With one input file that sets the limit to 2, below Node's default of 10, so the three SIGINT/SIGTERM listeners that@puppeteer/browsersadds when thetimeplugin launches Chrome triggerMaxListenersExceededWarning.The limit now only goes up: it is set only when
files + 1is above the current limit. Multi-file runs behave as before, sincescripts/max-listeners-check.shstill passes.Tests: added
test/calc.test.js(the limit stays at 10 for one file, and rises to 21 for 20 files). The first test fails before the change (limit becomes 2) and passes after. Fullvitest runpasses (26 files, 269 tests) andscripts/max-listeners-check.shpasses.I could not reproduce the warning end to end with the repo's own
timesetup, because the Estimo/puppeteer versions in the workspace register fewer listeners than in the report. To check the cause I calledcalc()for one file and then added three SIGINT and three SIGTERM listeners, like@puppeteer/browsersdoes: 2 warnings before the change, 0 after.AI-assisted: written with Claude, and I ran the tests above myself.