Skip to content

Commit

Permalink
Edit changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
thorn0 committed Aug 4, 2022
1 parent a9594dd commit 4661491
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions changelog_unreleased/api/12748.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
#### [HIGHLIGHT] Support plugins with async parsers (#12748 by @fisker, #13211 by @thorn0)
#### [HIGHLIGHT] Support plugins with async parsers (#12748 by @fisker, #13211 by @thorn0 and @fisker)

[`parse` function](https://prettier.io/docs/en/plugins.html#parsers) in a plugin can return a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) now.

In order to support async parsers, we introduced several non-breaking changes to the plugin system:

- `printer.isNode(node: object): boolean`
- `printer.detectEmbeddedLanguage(path: AstPath, options: Options): any`
- `printer.massageAstNode.ignoredProperties: Set<string>`

<!-- TODO -->
In order to support async parsers for embedded languages, we had to introduce a breaking change to the plugin API. Namely, `printer.embed` has a completely new signature, incompatible with previous versions. See the [docs](/docs/plugins.html#optional-embed) for details.

0 comments on commit 4661491

Please sign in to comment.