Skip to content
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

Upgrade Prettier to v3 #14311

Closed
wants to merge 19 commits into from
Closed

Upgrade Prettier to v3 #14311

wants to merge 19 commits into from

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Jul 7, 2023

Summary

This is #14108 without changing the version used by our packages - just the version of prettier used to format the jest code base

Test plan

Green CI

@netlify
Copy link

netlify bot commented Jul 7, 2023

Deploy Preview for jestjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 536a80a
🔍 Latest deploy log https://app.netlify.com/sites/jestjs/deploys/64bf8663e78a840008f16eec
😎 Deploy Preview https://deploy-preview-14311--jestjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mrazauskas
Copy link
Contributor

Apparently inline snapshots fail to update if Prettier v3 is installed. The existing once work fine until they are passing, only jest -u fails. See #14305 (comment)

It might be good to fix the problem before merging this PR. Seems like this is similar to what eslint-plugin-prettier was facing: TypeError: prettier.resolveConfig.sync is not a function.

@SimenB
Copy link
Member Author

SimenB commented Jul 9, 2023

Hmm, I was hoping we were still using prettier v2 with this. Might need to add a dev dep to jest-config or something? Or set prettierPath in our config

Copy link

@cristobalgvera cristobalgvera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw lots of changes related to format, maybe you should minimize the size of this PR with focus on remove the unnecessary formatting-related changes.

Also, there are files with .js extension that includes types, why is that?

Thanks for the changes!

package.json Outdated Show resolved Hide resolved
Co-authored-by: Cristóbal Gajardo Vera <[email protected]>
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 25, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@SimenB
Copy link
Member Author

SimenB commented Jul 25, 2023

Played around some more with using @prettier/sync (see latest commit 536a80a (#14311)), but since we use a custom parser, I don't think we can use it: prettier/prettier-synchronized#4 (comment)

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants