You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "ljmotta (via GitHub)" <gi...@apache.org> on 2024/06/05 21:06:34 UTC
[PR] kie-issues#467: Upgrade prettier from `2.x.x` to `3.x.x` on kie-tools [incubator-kie-tools]
ljmotta opened a new pull request, #2406:
URL: https://github.com/apache/incubator-kie-tools/pull/2406
Closes: https://github.com/apache/incubator-kie-issues/issues/467
## Description
### pnpm-lock.yaml
This PR removes the `pnpm-lock.yaml` auto formating.
### Husky
To update the git hook, preventing the `pnpm-lock.yaml` auto formating, run `pnpm prepare` to re-install the git hook.
### VS Code extension
Troubleshooting the Prettier VS Code extension:
- Update the Prettier VS Code extension;
- Change the config file to `prettier.config.mjs` on the settings;
- Disable/enable the VS Code extension;
### Uniforms Codegen packages
Both packages uses the `prettier.format` function. Starting from version `3.x.x` the `prettier` libraries uses ESM instead of CJS, making it incompatible with `jest` `29.x`. Due to this incompatibility issue, an execption for the `prettier` package was added to the `.syncpackrc.json` file, enabling two different versions of `prettier` on the monorepo.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#467: Upgrade prettier from `2.x.x` to `3.x.x` on kie-tools [incubator-kie-tools]
Posted by "ljmotta (via GitHub)" <gi...@apache.org>.
ljmotta commented on code in PR #2406:
URL: https://github.com/apache/incubator-kie-tools/pull/2406#discussion_r1645037792
##########
.prettierignore:
##########
Review Comment:
actually, it wasn't... @prettier/parser-xml doesn't support DTD!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#467: Upgrade prettier from `2.x.x` to `3.x.x` on kie-tools [incubator-kie-tools]
Posted by "ljmotta (via GitHub)" <gi...@apache.org>.
ljmotta commented on code in PR #2406:
URL: https://github.com/apache/incubator-kie-tools/pull/2406#discussion_r1643584552
##########
.prettierignore:
##########
Review Comment:
Prettier is wrongfully formatting XSDs, but I'll add a rule to format it as a `xml` file.
##########
.syncpackrc.json:
##########
@@ -1 +1,12 @@
-{}
+{
+ "versionGroups": [
+ {
+ "dependencies": ["prettier"],
+ "packages": [
+ "@kie-tools/uniforms-bootstrap4-codegen",
+ "@kie-tools/uniforms-patternfly-codegen",
+ "@kie-tools/yaml-language-server"
+ ]
+ }
+ ]
+}
Review Comment:
Sure!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#467: Upgrade prettier from `2.x.x` to `3.x.x` on kie-tools [incubator-kie-tools]
Posted by "tiagobento (via GitHub)" <gi...@apache.org>.
tiagobento commented on PR #2406:
URL: https://github.com/apache/incubator-kie-tools/pull/2406#issuecomment-2159103233
Hi @ljmotta, thank you so much for addressing this.
In addition to reviewing the `,` at the end of function calls that I mentioned to you in private chat, can you please also split this PR's commits in
1. The code base changes
2. Formatting with the new version of Prettier?
This will make reviewing much easier, as right now it's kind of impossible to go through all the changes that this PR brings.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#467: Upgrade prettier from `2.x.x` to `3.x.x` on kie-tools [incubator-kie-tools]
Posted by "tiagobento (via GitHub)" <gi...@apache.org>.
tiagobento commented on code in PR #2406:
URL: https://github.com/apache/incubator-kie-tools/pull/2406#discussion_r1643561488
##########
.syncpackrc.json:
##########
@@ -1 +1,12 @@
-{}
+{
+ "versionGroups": [
+ {
+ "dependencies": ["prettier"],
+ "packages": [
+ "@kie-tools/uniforms-bootstrap4-codegen",
+ "@kie-tools/uniforms-patternfly-codegen",
+ "@kie-tools/yaml-language-server"
+ ]
+ }
+ ]
+}
Review Comment:
Would be great to make those already be mapped by an issue, so we don't loose track of this version discrepancy.
##########
packages/sonataflow-operator/package.json:
##########
@@ -22,17 +22,17 @@
"bump-version": "run-script-os",
"bump-version:darwin:linux": "./hack/bump-version.sh",
"bump-version:win32": "echo 'Bumping version not supported on Windows'",
- "format": "prettier --write .",
+ "format": "prettier --write . --ignore-path=../../.prettierignore --ignore-path=../../.gitignore",
Review Comment:
There are other packages doing the same thing, but you didn't add the `--ignore-path` argument to them. Why?
##########
.prettierignore:
##########
Review Comment:
Why ignore XSDs?
##########
package.json:
##########
@@ -23,23 +23,18 @@
"@kie-tools-scripts/update-kogito-version": "workspace:*",
"@kie-tools-scripts/update-stream-name": "workspace:*",
"@kie-tools-scripts/update-version": "workspace:*",
- "@nice-move/prettier-plugin-package-json": "^0.6.1",
- "@prettier/plugin-xml": "^2",
+ "@nice-move/prettier-plugin-package-json": "^0.8.0",
+ "@prettier/plugin-xml": "^3.4.1",
Review Comment:
Still no change do XMLs... I wonder if this is working, to be honest. Maybe we leave that for
- https://github.com/apache/incubator-kie-issues/issues/1156
?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#467: Upgrade prettier from `2.x.x` to `3.x.x` on kie-tools [incubator-kie-tools]
Posted by "ljmotta (via GitHub)" <gi...@apache.org>.
ljmotta commented on code in PR #2406:
URL: https://github.com/apache/incubator-kie-tools/pull/2406#discussion_r1645047265
##########
package.json:
##########
@@ -23,23 +23,18 @@
"@kie-tools-scripts/update-kogito-version": "workspace:*",
"@kie-tools-scripts/update-stream-name": "workspace:*",
"@kie-tools-scripts/update-version": "workspace:*",
- "@nice-move/prettier-plugin-package-json": "^0.6.1",
- "@prettier/plugin-xml": "^2",
+ "@nice-move/prettier-plugin-package-json": "^0.8.0",
+ "@prettier/plugin-xml": "^3.4.1",
Review Comment:
It's working, just not identing, I'll change that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#467: Upgrade prettier from `2.x.x` to `3.x.x` on kie-tools [incubator-kie-tools]
Posted by "ljmotta (via GitHub)" <gi...@apache.org>.
ljmotta commented on code in PR #2406:
URL: https://github.com/apache/incubator-kie-tools/pull/2406#discussion_r1643583471
##########
packages/sonataflow-operator/package.json:
##########
@@ -22,17 +22,17 @@
"bump-version": "run-script-os",
"bump-version:darwin:linux": "./hack/bump-version.sh",
"bump-version:win32": "echo 'Bumping version not supported on Windows'",
- "format": "prettier --write .",
+ "format": "prettier --write . --ignore-path=../../.prettierignore --ignore-path=../../.gitignore",
Review Comment:
I still need to revisit all packages, running the format on the package folder don't take into account the `.prettierignore` on the monorepo root, which causes the formatting to break
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#467: Upgrade prettier from `2.x.x` to `3.x.x` on kie-tools [incubator-kie-tools]
Posted by "tiagobento (via GitHub)" <gi...@apache.org>.
tiagobento commented on PR #2406:
URL: https://github.com/apache/incubator-kie-tools/pull/2406#issuecomment-2177205641
Thanks! Love to see the XMLs properly indented 🙏
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org