Upgrading prettier 2 to 3
Breaking2.8.8 → 3.9.10Breaking12Platform1New11Changed6Fixed26
BreakingUpgrade verdict
12 breaking changes and a platform requirement change.
In plain terms
- Prettier no longer understands Flow type annotations written inside comments.
- Plugin parsers no longer receive the list of parsers as a second argument.
- The `concat` doc builder is no longer available.
- Prettier now adds trailing commas everywhere by default.
Must act Top 4 of 13 that need code or config changes
Node.js requirement changed in 3.0.0-alpha.0: >=10.13.0 → >=14.
What you must change
Breaking12
Removes support for Flow comment types.
Removes the second argument
parsers passed to parsers.parse.parsers.parseparsersRemoves
prettier.doc.builders.concat.prettier.doc.builders.concatChanges the default value of
trailingComma to "all".trailingCommaRemoves the second argument
parsers passed to parsers.parse.parsers.parseRemoves
prettier.doc.builders.concat.prettier.doc.builders.concatUpdates the package file structure and adds an
exports field to package.json.exportspackage.jsonMakes all public APIs asynchronous.
Makes
textToDoc trim trailing hard lines.textToDocMakes all public APIs asynchronous.
Changes the
embed method of a printer to a completely new signature and adds a getVisitorKeys method.embedgetVisitorKeysMakes
textToDoc trim trailing hard lines.textToDocPlatform1
Raises the minimal required Node.js version to v14.