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

fix(nx): update workspace to use prettier v1.18.2 #1809

Merged
merged 1 commit into from
Sep 17, 2019
Merged

fix(nx): update workspace to use prettier v1.18.2 #1809

merged 1 commit into from
Sep 17, 2019

Conversation

whimzyLive
Copy link

Current Behavior

format:check with nx@latest fails when there is a pair of () around async pipes in HTML
Current Behavior
Currently latest nx workspace defaults to prettier version 1.16.2, whereas latest version of prettier-vscode uses 1.18.x.
In prettier 1.16.x prettier adds () around async pipes in HTML. i.e.
<div *ngIf="(isRendered | async)"></div>
In prettier 1.17 this behaviour was updated to not to have () around pipes. i.e.
<div *ngIf="isRendered | async"></div>
Current prettier-vscode uses 1.18 so it removes () around pipes, but when running format:check, nx expects () around pipes because of it using prettier 1.16.

Reference to prettier issue

Expected Behavior

This change updates prettier version to 1.18 same as prettier-vscode to resolve this conflicting behaviour.

@mehrad-rafigh
Copy link
Contributor

The commit message is not correct, thus breaking the build. I would recommend renaming your commit to build(nx): update prettier to v1.18.2.

Additionaly, the new prettier version should be used, when generating new apps.

Copy link
Contributor

@mehrad-rafigh mehrad-rafigh left a comment

Choose a reason for hiding this comment

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

Please update packages/workspace/src/utils/versions.ts accordingly

@vsavkin
Copy link
Member

vsavkin commented Sep 11, 2019

@wimzyLive Thank you very much for your PR! Could you squash the commits and change the message to chore(nx): update the version of prettier to xxx.

@mehrad-rafigh Thank you for helping out folks contributing to the repo. Just wanted to say that we use build to annotate changes only affecting the nx repo itself (e.g. scripts etc). Updating dependencies used by nx workspace should be chore/feat/fix depending on the nature of the update.

@whimzyLive
Copy link
Author

@vsavkin fixed.

@mehrad-rafigh
Copy link
Contributor

mehrad-rafigh commented Sep 12, 2019

@vsavkin thanks for the correction 👍
@wimzyLive thank you for PR 👍

@vsavkin vsavkin merged commit 754a7e5 into nrwl:master Sep 17, 2019
@vsavkin
Copy link
Member

vsavkin commented Sep 17, 2019

@wimzyLive Thank you!

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 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