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

[prettierx] include Prettier 2.3.2 & PostCSS 8 updates #630

Merged
merged 2,045 commits into from
Jul 6, 2021

Conversation

brodybits
Copy link
Owner

@brodybits brodybits commented Jun 28, 2021

updated:

The intermediate "version branches" with the multiple merge commits were made to help keep the changes in not-too-large commits as much as I think was reasonably practical. I think the major crux of the challenge was the amount of refactoring that has occurred between Prettier 2.0.5 and 2.3.x.

/cc @adalinesimonian

thorn0 and others added 30 commits May 10, 2021 00:15
* Start 2.3 blog post

* Apply suggestions from code review

Co-authored-by: Alex Rattray <rattray.alex@gmail.com>

* Regenerate the post

* Regenerate blog post

* Regenerate post

* Edit changelog entries

* Regenerate blog post

Co-authored-by: Alex Rattray <rattray.alex@gmail.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
* Use async API in CLI

* Remove `synchronous-promise`
Fix #5599, long yaml keys trigger explicit mapping
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.14.1 to 7.14.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.14.2/packages/babel-preset-env)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…893)

Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.22.1 to 2.23.2.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](import-js/eslint-plugin-import@v2.22.1...v2.23.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [webpack](https://github.com/webpack/webpack) from 5.36.2 to 5.37.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](webpack/webpack@v5.36.2...v5.37.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [esm-utils](https://github.com/fisker/esm-utils) from 1.0.1 to 1.1.0.
- [Release notes](https://github.com/fisker/esm-utils/releases)
- [Commits](fisker/esm-utils@v1.0.1...v1.1.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@glimmer/syntax](https://github.com/glimmerjs/glimmer-vm) from 0.79.0 to 0.79.1.
- [Release notes](https://github.com/glimmerjs/glimmer-vm/releases)
- [Changelog](https://github.com/glimmerjs/glimmer-vm/blob/master/CHANGELOG.md)
- [Commits](glimmerjs/glimmer-vm@v0.79.0...v0.79.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [flow-parser](https://github.com/facebook/flow) from 0.150.1 to 0.151.0.
- [Release notes](https://github.com/facebook/flow/releases)
- [Changelog](https://github.com/facebook/flow/blob/master/Changelog.md)
- [Commits](facebook/flow@v0.150.1...v0.151.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
Bumps [@babel/types](https://github.com/babel/babel/tree/HEAD/packages/babel-types) from 7.14.1 to 7.14.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.14.2/packages/babel-types)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Copy link
Owner Author

@brodybits brodybits left a comment

Choose a reason for hiding this comment

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

The changes below to src/language-html/printer-html.js do not seem to trigger any test failures.

  • TODO item is to improve testing of prettierX updates to src/language-html
--- a/src/language-html/printer-html.js
+++ b/src/language-html/printer-html.js
@@ -647,5 +647,5 @@ function printAttributes(path, options, print) {
   if (!isNonEmptyArray(node.attrs)) {
     // [prettierx merge update from prettier@2.3.2] --html-void-tags option:
-    return node.isSelfClosing && !isHtmlVoidTagNeeded(node, options)
+    return node.isSelfClosing
       ? /**
          *     <br />

--- a/src/language-html/printer-html.js
+++ b/src/language-html/printer-html.js
@@ -714,5 +714,5 @@ function printAttributes(path, options, print) {
     // [prettierx merge update from prettier@2.3.2] --html-void-tags option:
     parts.push(
-      node.isSelfClosing && !isHtmlVoidTagNeeded(node, options) ? " " : ""
+      node.isSelfClosing ? " " : ""
     );
   } else {

P.S. I discovered this through manual testing of changes after using git diff to check the differences with Prettier release 2.3.2. I think it would be ideal to start using a tool such as Stryker Mutator for mutation testing.

Copy link
Owner Author

@brodybits brodybits left a comment

Choose a reason for hiding this comment

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

  • I would also like to find a way to resolve this warning message:
warning " > remark-math@1.0.6" has unmet peer dependency "remark-parse@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0".

My apologies, this was coming from 0.18.x branch.

brodybits added a commit that referenced this pull request Jul 5, 2021
add tests/format/x/html/html-tags-with-void-tags

to improve testing with --html-void-tags

as discussed in:

#630 (review)
* update tests/format/x/html/html-tags-with-void-tags/jsfmt.spec.js
  to use updated test paths

* update snapshot in tests/format/x/html/html-tags-with-void-tags
@brodybits brodybits force-pushed the rebase-updates-from-prettier-2.3.x branch 2 times, most recently from e19ad2d to de4e1e3 Compare July 5, 2021 23:17
@brodybits brodybits force-pushed the rebase-updates-from-prettier-2.3.x branch from de4e1e3 to d4e08c9 Compare July 5, 2021 23:44
Copy link
Owner Author

@brodybits brodybits left a comment

Choose a reason for hiding this comment

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

Copy link
Owner Author

@brodybits brodybits left a comment

Choose a reason for hiding this comment

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

I would also like to improve testing with mote tags, and across more parsers such as Glimmer & LWC. I just raised a couple of issues on Prettier which may be of interest:

@brodybits brodybits merged commit c1f65b8 into dev Jul 6, 2021
@brodybits brodybits deleted the rebase-updates-from-prettier-2.3.x branch July 6, 2021 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet