Add 2.7 blog post#12966
Merged
fisker merged 11 commits intoprettier:mainfrom Jun 14, 2022
Merged
Conversation
sosukesuzuki
commented
Jun 4, 2022
| title: "Prettier 2.7: new --cache CLI option and TypeScript 4.7 syntax!" | ||
| --- | ||
|
|
||
| This release includes a new `--cache` CLI option. Enabling this option will use some attributes as cache keys and format files only if they have changed. This could dramatically improve CLI performance. |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Tiedye
reviewed
Jun 6, 2022
| ##### [`extends` constraints for `infer`](https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#extends-constraints-on-infer-type-variables) | ||
|
|
||
| ```ts | ||
| type FirstString<T> = T extends [infer extends string, ...unknown[]] |
There was a problem hiding this comment.
Suggested change
| type FirstString<T> = T extends [infer extends string, ...unknown[]] | |
| type FirstString<T> = T extends [infer S extends string, ...unknown[]] |
|
|
||
| This release includes a new `--cache` CLI option. Enabling this option will use some attributes as cache keys and format files only if they have changed. This could dramatically improve CLI performance. | ||
|
|
||
| We've also added support formatting for TypeScript 4.7 syntax! |
There was a problem hiding this comment.
Suggested change
| We've also added support formatting for TypeScript 4.7 syntax! | |
| We've also added support for formatting TypeScript 4.7 syntax! |
|
|
||
| This release includes a new `--cache` CLI option. Enabling this option will use some attributes as cache keys and format files only if they have changed. This could dramatically improve CLI performance. | ||
|
|
||
| We've also added support formatting for TypeScript 4.7 syntax! |
There was a problem hiding this comment.
Suggested change
| We've also added support formatting for TypeScript 4.7 syntax! | |
| We've also added support for formatting TypeScript 4.7 syntax! |
Josh-Cena
reviewed
Jun 11, 2022
| const makeWrenchBox = makeBox<Wrench>; | ||
| ``` | ||
|
|
||
| ##### [Optional Variance](https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#optional-variance-annotations-for-type-parameters) |
There was a problem hiding this comment.
Suggested change
| ##### [Optional Variance](https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#optional-variance-annotations-for-type-parameters) | |
| ##### [Optional Variance Annotations](https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#optional-variance-annotations-for-type-parameters) |
Josh-Cena
reviewed
Jun 11, 2022
|
|
||
| #### Fix comment formats in ([#12860](https://github.com/prettier/prettier/pull/12860) by [@HosokawaR](https://github.com/HosokawaR)) | ||
|
|
||
| This change fixes comments format in `exports` to algin with the comment format in `import` |
There was a problem hiding this comment.
Suggested change
| This change fixes comments format in `exports` to algin with the comment format in `import` | |
| This change fixes the comment format in `exports` to align with the comment format in `import`. |
Josh-Cena
reviewed
Jun 11, 2022
|
|
||
| #### Support Speculation Rules API formatting in HTML ([#12882](https://github.com/prettier/prettier/pull/12882) by [@sosukesuzuki](https://github.com/sosukesuzuki)) | ||
|
|
||
| Please read https://web.dev/speculative-prerendering/ for about Speculation Rules API. |
There was a problem hiding this comment.
Suggested change
| Please read https://web.dev/speculative-prerendering/ for about Speculation Rules API. | |
| Please read https://web.dev/speculative-prerendering/ for more information about the Speculation Rules API. |
Josh-Cena
reviewed
Jun 11, 2022
|
|
||
| ### CLI | ||
|
|
||
| #### Add `--cache` and `--cache-strategy` CLI option ([#12800](https://github.com/prettier/prettier/pull/12800) by [@sosukesuzuki](https://github.com/sosukesuzuki)) |
There was a problem hiding this comment.
Suggested change
| #### Add `--cache` and `--cache-strategy` CLI option ([#12800](https://github.com/prettier/prettier/pull/12800) by [@sosukesuzuki](https://github.com/sosukesuzuki)) | |
| #### Add `--cache` and `--cache-strategy` CLI options ([#12800](https://github.com/prettier/prettier/pull/12800) by [@sosukesuzuki](https://github.com/sosukesuzuki)) |
Josh-Cena
reviewed
Jun 11, 2022
|
|
||
| This change fixes the comment format in `exports` to align with the comment format in `import`. | ||
|
|
||
| Although this change does not affect the comments format in `import`, follows change log contains examples of comments in `import` for reference. |
There was a problem hiding this comment.
Suggested change
| Although this change does not affect the comments format in `import`, follows change log contains examples of comments in `import` for reference. | |
| Although this change does not affect the comments format in `import`, the following changeset still contains examples of comments in `import` for reference. |
(Skeptical about either "change log" or "changeset" being the right word, but nothing better on my mind)
fisker
reviewed
Jun 11, 2022
|
|
||
| #### Infer parser for `.importmap` files ([#12603](https://github.com/prettier/prettier/pull/12603) by [@fisker](https://github.com/fisker)) | ||
|
|
||
| Format [`.importmap`](https://github.com/WICG/import-maps#import-map-processing) files as a JSON files. |
Member
There was a problem hiding this comment.
Suggested change
| Format [`.importmap`](https://github.com/WICG/import-maps#import-map-processing) files as a JSON files. | |
| Format [`.importmap`](https://github.com/WICG/import-maps#import-map-processing) files as JSON files. |
fisker
approved these changes
Jun 11, 2022
medikoo
pushed a commit
to medikoo/prettier-elastic
that referenced
this pull request
Jan 4, 2024
Co-authored-by: fisker Cheung <[email protected]>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
https://deploy-preview-12966--prettier.netlify.app/blog/2022/06/11/2.7.0.html
Checklist
docs/directory).changelog_unreleased/*/XXXX.mdfile followingchangelog_unreleased/TEMPLATE.md.✨Try the playground for this PR✨