-
Notifications
You must be signed in to change notification settings - Fork 22
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
Conversation
* Start 2.3 blog post * Apply suggestions from code review Co-authored-by: Alex Rattray <[email protected]> * Regenerate the post * Regenerate blog post * Regenerate post * Edit changelog entries * Regenerate blog post Co-authored-by: Alex Rattray <[email protected]> Co-authored-by: fisker Cheung <[email protected]>
* 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] <[email protected]> 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] <[email protected]> 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] <[email protected]> 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] <[email protected]> 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] <[email protected]> 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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Georgii Dolzhykov <[email protected]>
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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
remove some workaround code from @brodybits not needed from: - src/language-js/parse-postprocess.js was introduced by @brodybits in: a0eb2be
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.
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 [email protected]] --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 [email protected]] --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.
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.
I would also like to find a way to resolve this warning message:
warning " > [email protected]" 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.
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
with some minor updates
e19ad2d
to
de4e1e3
Compare
Merge branch 'main' of https://github.com/prettier/prettier into 0.19.0-01-update-branch
de4e1e3
to
d4e08c9
Compare
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.
I am now thinking that the --html-void-tags
option should be renamed to something like --html-void-elements
, which should be a little more consistent with common nomenclature ref:
- https://www.456bereastreet.com/archive/201005/void_empty_elements_and_self-closing_start_tags_in_html/
- https://riptutorial.com/html/topic/1449/void-elements
- https://riptutorial.com/html/example/4736/void-elements
- https://stackoverflow.com/questions/4693939/self-closing-tags-void-elements-in-html5
- maybe some other results of: https://duckduckgo.com/?q=html+void+tags&ia=web
add & update some comments
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.
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:
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