-
Notifications
You must be signed in to change notification settings - Fork 76
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
Move to prettier v3 #2184
Move to prettier v3 #2184
Conversation
as they are used in runtime to format generated code.
b19f05c
to
1da5730
Compare
@@ -144,7 +144,7 @@ export async function generateTypeScriptLibrary( | |||
|
|||
// Format the contents if necessary | |||
if (isJson || isSourceCode) { | |||
fileContents = prettier.format( | |||
fileContents = await prettier.format( |
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.
Is this introduced by upgrade?
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, v3 makes the method async.
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.
Thanks for the fix! I am good with this change, just notice that there are a lot of file format changes and wondering why upgrading would cause that because our prettierTypeScriptOptions didn't change.
Prettier v3 has some changes in options' default values, the most impactful one to us is the |
dev-tool run vendored
prefix for prettier when generating for Azure SDK for JS repo. Dependency on prettier is no longer used thus removed. Related PR: [engsys][core] switch to run prettier from dev-tool's dependency azure-sdk-for-js#28127