-
Notifications
You must be signed in to change notification settings - Fork 48.6k
[compiler][patch] Fix jsx non-ascii regex pattern #30382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
[ghstack-poisoned]
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Comparing: 512b09b...f1f0aaf Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
## Error | ||
|
||
``` | ||
Property arguments[0] of CallExpression expected node to be of a type ["Expression","SpreadElement","JSXNamespacedName","ArgumentPlaceholder"] but instead got "JSXExpressionContainer" |
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 error is not caught and handled by Forget as it occurs in babel-plugin-fbt
. Going to go back to hack in a check in MemoizeFbtAndMacroOperandsInSameScope
for now, but ideally we would have some type / annotation on Identifier
instances to know which strings are fbt operands
EDIT: moved this fixture to #30386
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@@ -2206,7 +2206,7 @@ function codegenInstructionValue( | |||
* https://en.wikipedia.org/wiki/List_of_Unicode_characters#Control_codes | |||
*/ | |||
const STRING_REQUIRES_EXPR_CONTAINER_PATTERN = | |||
/[\u{0000}-\u{001F}|\u{007F}|\u{0080}-\u{FFFF}]|"/u; | |||
/[\u{0000}-\u{001F}\u{007F}\u{0080}-\u{FFFF}]|"/u; |
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.
Previously, we were matching |
literals
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.
I can't recall why we needed to escape the u{...
, does it work without them?
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.
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@@ -2206,7 +2206,7 @@ function codegenInstructionValue( | |||
* https://en.wikipedia.org/wiki/List_of_Unicode_characters#Control_codes | |||
*/ | |||
const STRING_REQUIRES_EXPR_CONTAINER_PATTERN = | |||
/[\u{0000}-\u{001F}|\u{007F}|\u{0080}-\u{FFFF}]|"/u; | |||
/[\u{0000}-\u{001F}\u{007F}\u{0080}-\u{FFFF}]|"/u; |
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.
I can't recall why we needed to escape the u{...
, does it work without them?
ghstack-source-id: 97ed491 Pull Request resolved: facebook#30382
ghstack-source-id: 97ed491 Pull Request resolved: facebook#30382
Stack from ghstack (oldest at bottom):