-
Notifications
You must be signed in to change notification settings - Fork 98
Chore/upgrade prettier v3 #365
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
Chore/upgrade prettier v3 #365
Conversation
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 4.1.0 to 4.1.1. - [Release notes](https://github.com/chalk/ansi-regex/releases) - [Commits](chalk/ansi-regex@v4.1.0...v4.1.1) --- updated-dependencies: - dependency-name: ansi-regex dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [trim-off-newlines](https://github.com/stevemao/trim-off-newlines) from 1.0.1 to 1.0.3. - [Release notes](https://github.com/stevemao/trim-off-newlines/releases) - [Commits](stevemao/trim-off-newlines@v1.0.1...v1.0.3) --- updated-dependencies: - dependency-name: trim-off-newlines dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2. - [Release notes](https://github.com/isaacs/minimatch/releases) - [Commits](isaacs/minimatch@v3.0.4...v3.1.2) --- updated-dependencies: - dependency-name: minimatch dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1. - [Release notes](https://github.com/kornelski/http-cache-semantics/releases) - [Commits](kornelski/http-cache-semantics@v4.1.0...v4.1.1) --- updated-dependencies: - dependency-name: http-cache-semantics dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.8. - [Release notes](https://github.com/minimistjs/minimist/releases) - [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md) - [Commits](minimistjs/minimist@v1.2.5...v1.2.8) --- updated-dependencies: - dependency-name: minimist dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Fix attributeRegex so that it correctly matches attributes that are not enclosed in quotes. fix sveltejs#344 --------- Co-authored-by: Simon Holthausen <[email protected]>
@carmanchris31 now that Prettier version 3 is out officially, do you want to continue working on this PR or should I pick it up? |
package.json
Outdated
"ava": "3.15.0", | ||
"prettier": "^2.7.1", | ||
"prettier": "^3.0.0-alpha.11", |
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.
this can be updated to ^3.0.0
now
src/embed.ts
Outdated
const embedScript = (isTopLevel: boolean) => | ||
embedType( | ||
'script', | ||
// Use babel-ts as fallback because the absence does not mean the content is not TS, |
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.
we no longer support default language. you must now specify it explicitly in the script
block. the comment on isTypeScript
can be updated as well
…lwindcss with VS code (sveltejs#371) see sveltejs#370
Please do, thanks! 🙏 |
Hmm so I think I found one reason for the The preprocess snips the content in the
But then when the svelte compiler parses the string, we don't get the attributes property on the
Later when trying to extract the prettier-plugin-svelte/src/embed.ts Line 129 in 9dcc594
We get an empty string, and this breaks the AstPath iteration, as the error stackTrace says.
I hope this can help, will keep looking |
Follow up: Ok just checked on the previous behavior and it seems that the top level nodes aren't recognized as such here, due to the prettier-plugin-svelte/src/print/index.ts Line 97 in 8530863
So we don't get to extract the prettier:content attributes, and fail later |
Interesting. It sounds like that could be responsible for a vast number of the failures! |
Specifically, stuck behind sveltejs/prettier-plugin-svelte/pull/365 skip-checks: true
Found the reason for all the breakage - |
finally! 🥳 |
WIP of upgrading to prettier v3
There are currently 153 failing tests, most of which are because of thrown errors. Any help with troubleshooting these errors is welcome and appreciated.
Current output of
npm test
:test-results.txt