You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Improve regular expressions in this repository that could match with unexpected overhead for certain strings.
What changes did you make? (Give an overview)
I improved a regular expression in the plugin-kit package that could match in quadratic runtime for certain strings. I did not find any other regular expressions in the source code of this repository that could have this kind of impact.
Related Issues
n/a
Is there anything you'd like reviewers to focus on?
Thanks for the pull request @ericcornelissen. Could you also add a unit test to packages/plugin-kit/tests/config-comment-parser.test.js to show that the problem has been fixed? Mocha tests timeout with an error after 2 seconds, so in this case it's sufficient to no copy-paste the repro code into a new test to verify that no timeout occurs.
Updated, without the patch this test takes ~10s for me and therefor fails due to the 2s timeout (unfortunately because it's blocking the test is not killed after 2s).
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.
Prerequisites checklist
What is the purpose of this pull request?
Improve regular expressions in this repository that could match with unexpected overhead for certain strings.
What changes did you make? (Give an overview)
I improved a regular expression in the plugin-kit package that could match in quadratic runtime for certain strings. I did not find any other regular expressions in the source code of this repository that could have this kind of impact.
Related Issues
n/a
Is there anything you'd like reviewers to focus on?
no