-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Add 2.7 blog post #12966
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
Add 2.7 blog post #12966
Conversation
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.
website/blog/2022-06-04-2.7.0.md
Outdated
##### [`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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type FirstString<T> = T extends [infer extends string, ...unknown[]] | |
type FirstString<T> = T extends [infer S extends string, ...unknown[]] |
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.
Thank you! ee06ea9
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've also added support formatting for TypeScript 4.7 syntax! | |
We've also added support for formatting TypeScript 4.7 syntax! |
website/blog/2022-06-10-2.7.0.md
Outdated
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've also added support formatting for TypeScript 4.7 syntax! | |
We've also added support for formatting TypeScript 4.7 syntax! |
website/blog/2022-06-11-2.7.0.md
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
##### [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) |
website/blog/2022-06-11-2.7.0.md
Outdated
|
||
#### 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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`. |
website/blog/2022-06-11-2.7.0.md
Outdated
|
||
#### 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
website/blog/2022-06-11-2.7.0.md
Outdated
|
||
### 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#### 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)) |
website/blog/2022-06-11-2.7.0.md
Outdated
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
website/blog/2022-06-11-2.7.0.md
Outdated
|
||
#### 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. |
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.
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. |
Co-authored-by: fisker Cheung <lionkay@gmail.com>
Description
https://deploy-preview-12966--prettier.netlify.app/blog/2022/06/11/2.7.0.html
Checklist
docs/
directory).changelog_unreleased/*/XXXX.md
file followingchangelog_unreleased/TEMPLATE.md
.✨Try the playground for this PR✨