-
-
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
Merged
Merged
Support Prettier v3 #2947
Changes from 10 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
089967b
Modify to await the promise returned by `format`
sosukesuzuki d053576
Add tests for Prettier v3
sosukesuzuki a4bcffe
Add CHANGELOG
sosukesuzuki 387352c
Fix test cases
sosukesuzuki 024d3fe
Await Support info
sosukesuzuki b80302e
Remove dynmic checking
sosukesuzuki 60a1611
Fix tests
sosukesuzuki 59777d7
Fix test fixtures
sosukesuzuki 31e3ffb
Run fmt
sosukesuzuki ab1b4ec
Remove foo.txt
sosukesuzuki e766ad3
More await for Prettier API calls
sosukesuzuki 8de8bae
Address review
sosukesuzuki 77d3c11
`await` another call
fisker 54dfce9
Merge branch 'main' into support-v3
fisker 0623f3f
Update CHANGELOG.md
fisker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import * as assert from "assert"; | ||
import { format, getText } from "./format.test"; | ||
|
||
suite("Tests for Prettier v3", function () { | ||
this.timeout(10000); | ||
test("it formats by Prettier v3", async () => { | ||
const { actual } = await format("v3", "index.ts"); | ||
const expected = await getText("v3", "index.result.ts"); | ||
assert.equal(actual, expected); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,9 @@ | |
}, | ||
{ | ||
"path": "explicit-dep" | ||
}, | ||
{ | ||
"path": "v3" | ||
} | ||
], | ||
"settings": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const Counter = decorator("my-counter")((props: { | ||
initialCount?: number; | ||
label?: string; | ||
}) => { | ||
// ... | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const Counter = decorator("my-counter")( | ||
(props: { initialCount?: number; label?: string }) => { | ||
// ... | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "v3", | ||
"version": "1.0.0", | ||
"description": "Test folder for Prettier v3", | ||
"private": true, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "Prettier", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"prettier": "3.0.0-alpha.6" | ||
}, | ||
"dependencies": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
|
||
|
||
[email protected]: | ||
version "3.0.0-alpha.6" | ||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.0-alpha.6.tgz#c562f9f54966aff792c6920e6a29fbffd1ae07b6" | ||
integrity sha512-AdbQSZ6Oo+iy9Ekzmsgno05P1uX2vqPkjOMJqRfP8hTe+m6iDw4Nt7bPFpWZ/HYCU+3f0P5U0o2ghxQwwkLH7A== |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
But let's wait for ntotten to respond first.