-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
2 additions
and
8 deletions.
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
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 changes to the plugin system. Namely, `printer.embed` has a completely new signature, incompatible with previous versions. See the [docs](/docs/plugins.html#optional-embed) for details. |