Skip to content

Add 2.7 blog post#12966

Merged
fisker merged 11 commits intoprettier:mainfrom
sosukesuzuki:2.7-blog
Jun 14, 2022
Merged

Add 2.7 blog post#12966
fisker merged 11 commits intoprettier:mainfrom
sosukesuzuki:2.7-blog

Conversation

@sosukesuzuki
Copy link
Copy Markdown
Contributor

@sosukesuzuki sosukesuzuki commented Jun 4, 2022

Description

https://deploy-preview-12966--prettier.netlify.app/blog/2022/06/11/2.7.0.html

Checklist

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory).
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@sosukesuzuki sosukesuzuki mentioned this pull request Jun 4, 2022
13 tasks
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.

Comment thread 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[]]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
type FirstString<T> = T extends [infer extends string, ...unknown[]]
type FirstString<T> = T extends [infer S extends string, ...unknown[]]

Copy link
Copy Markdown
Contributor Author

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!
Copy link
Copy Markdown

@thebanjomatic thebanjomatic Jun 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
We've also added support formatting for TypeScript 4.7 syntax!
We've also added support for formatting TypeScript 4.7 syntax!

@sosukesuzuki sosukesuzuki marked this pull request as ready for review June 11, 2022 14:41
Comment thread 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)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Comment thread 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`
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`.

Comment thread 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.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread 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))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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))


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.
Copy link
Copy Markdown

@Josh-Cena Josh-Cena Jun 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@sosukesuzuki sosukesuzuki requested review from fisker and kachkaev June 11, 2022 15:31
Comment thread 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.
Copy link
Copy Markdown
Member

@fisker fisker Jun 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 fisker merged commit 934068a into prettier:main Jun 14, 2022
medikoo pushed a commit to medikoo/prettier-elastic that referenced this pull request Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants