-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat(core): support prettier v3 as a formatter #18644
feat(core): support prettier v3 as a formatter #18644
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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 is a really good start 🎉, I left one nitpick but it will also likely need to be handled inside packages/devkit/src/generators/format-files.ts
930b46d
to
bcb4930
Compare
bcb4930
to
1668419
Compare
Not sure about the |
Hey @Michsior14, typescript will transpile away the dynamic import there, so it would hit the same issue I believe? Could we apply a similar patch there to import prettier.cjs if it is present? |
But this is a dynamic import of a library not a binary, isn't it? AFAIK the lib entry point stays the same. |
Good call, I think you are correct. Thanks for the contribution 🎉 |
@AgentEnder someone shared this PR with me (post merge), my comment would have been not to do heuristics about what the binary is, but instead just make use of |
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
Nx crashes when used with prettier v3.
Expected Behavior
Nx works with all prettier versions up to the newly released v3.
Related Issue(s)
Fixes #17990