-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
chore: expand prettier-e2e test and update typings/deps #14779
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/52614/ |
#14723 ( |
@@ -40,6 +40,6 @@ yarn install | |||
|
|||
# Only run js,jsx,misc format tests | |||
# Without --runInBand CircleCI hangs. | |||
yarn test "tests/format/(jsx?|misc)/" --update-snapshot --runInBand | |||
yarn test "tests/format/(jsx?|misc|typescript|flow|flow-repo)/" --update-snapshot --maxWorkers=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.
We may have to defer this change until prettier updated the snapshot.
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.
Yeah, I'll wait for prettier/prettier#13065.
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.
Won't work... I'm fixing that in next
branch
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 switch to next
? We'll focus on this branch for a while. And if you do that --maxWorkers
should be removed, because we use --runInBand
, have to do that with jest-light-runner
.
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'm worried this will be a little slow.😕
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.
It's a recoverable exception, it doesn't throw
, and ast is generated normally, maybe that has something to do with it?
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.
Yes, we allow some recoverable error https://github.com/prettier/prettier/blob/ab72a2c11c806f3a8a5ef42314e291843e1b3e68/src/language-js/parse/babel.js#L183, have you changed the message code or throwing a different message code?
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.
https://github.com/babel/babel/blob/v7.18.9/packages/babel-parser/src/plugins/jsx/index.js#L38-L41
Maybe this? Looks like a new addition.
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.
Could be.
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.
Anyway, we can fix that test by disallowing that from recovering( make it invalid ), it's invalid in typescript parser after all.
a5e04e6
to
6fe5cfb
Compare
ad4f09b
to
31496cf
Compare
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.
Thank you!
@nicolo-ribaudo Can you take a look at this? I'm not sure how I should update, using |
Delete |
Oh, thanks! (I didn't think of it at all😂) |
344893e
to
2bb785a
Compare
2bb785a
to
8354005
Compare
Fixes #1, Fixes #2
1.#14765 (comment)
2.#13414 (comment)
3.#14777 (comment)
4.#14701 (comment)