fix(es/fixer): Fix a bug with awaited arrow fn expression #10555
+21 −3
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.
Description:
The minifier currently produces invalid syntax for awaited arrow expressions, for example:
is minified into the following invalid syntax (missing wrapping parens):
https://play.swc.rs/?version=1.11.29&code=H4sIAAAAAAAAA0ssT8wsUdDQ0FSwtVOoVkjOzyvOz0nVy8lP11BKy89X0lSo1bQGAMCbrPQlAAAA&config=H4sIAAAAAAAAA1VPOw6DMAzdc4rIc4cKVR16hx7CSg0Kyk9xkBoh7k6AhJbN7%2Bdnz0JKGFnBS85lLCBgZIonLgxnl%2FBbGCBlkVXUIcGtqSNvUo%2BGaaeWQ4GEcaC0p7i7d4%2BaAOM9U0tUzmqn%2B%2FzfqbwNkZivxs2KbjB0bRS1Faz%2FTLtYf0k50HHBE36mVnYuBs3vlkxxIrGsmdxHnRcBAAA%3D
BREAKING CHANGE:
N/A
Related issue (if exists):