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
Update babel/parser to v7.12.17
#10345
Conversation
public b(); | ||
protected c(); | ||
static d(); | ||
e(); |
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.
function bar(x = await 2) {} | ||
} | ||
|
||
async (x = await 2) => {}; |
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.
Can you also test this? (Note that flow
parse this differently.)
Prettier pr-10345
Playground link
--parser babel
Input:
async function foo() {
function bar(x = await (2)) {}
}
async (x = await (2)) => {};
Output:
async function foo() {
function bar(x = await(2)) {}
}
async (x = await 2) => {};
p = await 0; | ||
} | ||
|
||
await 0; |
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.
flow
typescript
babel
all parse them differently.
Prettier pr-10345
Playground link
--parser typescript
Input:
export class C {
p = await (0);
}
await (0);
Output:
export class C {
p = await(0);
}
await 0;
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.
Let's add parenthesized await for all those cases in this PR, we don't need care how it formatted, just to have a snapshot record.
5 | class A { s: string } | ||
6 | } | ||
7 |" | ||
"Unexpected token, expected \\"{\\" (9:12) |
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.
Can we move code of module Y3
a separate file?
de430d5
to
5d5eaea
Compare
I think your solution is the best. |
@sosukesuzuki The AST compare tests are failing. |
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.
Nice job!
@sosukesuzuki You already print prettier/src/language-js/clean.js Lines 201 to 205 in 285c15e
|
@fisker Maybe we can remove it. But somehow all tests are passed without it in even |
IDK, I added in #9768 because tests failed. |
v7.12.17
Description
Closes #10308
Closes #10365
Checklist
✨Try the playground for this PR✨
Todo
Add tests for:
export default abstract class
babel/babel#12748