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. |
|
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. |
|
|
||
| <!-- 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.
This should be a major release. 10.0.0
There was a problem hiding this comment.
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.
@ntotten I agree with fisker. If you too can agree with this, please merge and release.
There was a problem hiding this comment.
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
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.mdwith a summary of your changesSupports Prettier v3. Failed tests are not related to this PR. It also fails in
main.