-
-
Notifications
You must be signed in to change notification settings - Fork 460
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
Support Prettier v3 #2947
Support Prettier v3 #2947
Conversation
I found the problem of not being able to read ESM format configuration files... |
Prettier issue? |
Maybe No, and maybe it happens only with this test. When I actually ran it on VSCode, it worked fine. |
I have found it difficult to test the loading of the configuration file with the way prettier-vscode testing now. We will need to find a better way to test this in the future, for now I think we are good to go. |
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.
Lgtm.
This one didn't awaited https://github.com/sosukesuzuki/prettier-vscode/blob/ab1b4ecfa540c634ddf2b2faaba1a60ab0a9ec57/src/ModuleResolver.ts#L327 I reviewed on cellphone, please double check Prettier api calls. |
@@ -4,6 +4,10 @@ All notable changes to the "prettier-vscode" extension will be documented in thi | |||
|
|||
<!-- Check [Keep a Changelog](https://keepachangelog.com/) for recommendations on how to structure this file. --> | |||
|
|||
## [9.12.0] |
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 should be a major release. 10.0.0
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.
Maybe we should release v10 after Prettier releases v3? This PR is not breaking anything, just add support for v3 alpha.
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.
@ntotten I agree with fisker. If you too can agree with this, please merge and release.
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.
Seems there is a release workflow. So I guess we can create a v9.12.0
tag to trigger release?
prettier-vscode/.github/workflows/main.yml
Lines 70 to 73 in 8bd9176
release: | |
runs-on: ubuntu-latest | |
needs: package | |
if: startsWith(github.ref, 'refs/tags/v') |
But let's wait for ntotten to respond first.
Let me know if you need help on the tests. |
@sosukesuzuki You are right, even after I fix the |
Oh... So we must find the way execute import expr in prettier vscode... |
Maybe this will work? LinqLover/downstream-repository-mining@9f57b01 |
Change to var prettierPromise = new Function("x", "return import(x)")("./index.mjs");
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Our problem is maybe caused by vscode-loader (ref: microsoft/vscode#130367 (comment)). It uses Or vscode/src/vs/loader.js ? https://github.com/microsoft/vscode/blob/main/src/vs/loader.js#L797 |
This is my guess: the reason why ESLint's Flat Config works fine may be because it is the Language Server that is doing the dynamic import. The client may not be able to do dynamic imports. |
We may need to adopt that same architecture... Separating the server that runs Prettier and client reflects values to the editor. |
I also found an issue seems related to esm linked to vscode iteration plan, but looks like not useful. |
I tried VS Code Insiders, but it did not help:
|
I don't have other plan. |
Starting April 29th, my university and work will have 9 days off, so I'll try to implement it there. |
I'm working on https://github.com/sosukesuzuki/prettier-language-server. It will still take time. This is a more difficult task than I thought. |
Is it possible for us to start a subprocess to handle it? |
Sorry, what do you mean? |
microsoft/vscode#130367 (comment) |
Oh.. I'll try it later. thank you |
|
CHANGELOG.md
with a summary of your changesSupports Prettier v3. Failed tests are not related to this PR. It also fails in
main
.