-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix handling regex symbols in tests path on Windows (#5941)
- Loading branch information
Showing
4 changed files
with
7 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
aa9790d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change seems to have broken (for Windows) the regex that
create-react-app
generates fortransformIgnorePatterns
: that regex is'[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs)$'
see this line, which, when run through this function, yields:[\\\]node_modules[\\\].+\\.(js|jsx|mjs)$
. This is an invalid regex, because it escapes the closing]
characters and the character class is never terminated.This can be fixed by changing it to
/node_modules/.+\\.(js|jsx|mjs)$
, which is nice, but it's unfortunate thatcreate-react-app
is broken by this.See this regex playground.
aa9790d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #6385
aa9790d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah great, I didn't see that, thanks!