All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
3.4.2 - 2025-07-08
- Exclude
.tsand.tsxas XML extensions.
3.4.1 - 2024-03-30
- Fix the npm publish.
3.4.0 - 2024-03-29
- Export plugin type.
- Fix printing around reference nodes.
- Trim only XML whitespace, not JS whitespace.
3.3.1 - 2024-02-10
- Allow elements to be marked as whitespace ignored even when they have reference nodes.
3.3.0 - 2024-02-09
- Support for
formatWithCursor.
- Always keep whitespace around in
xsl:texttags.
3.2.2 - 2023-10-27
- Fixed a bug with the
xmlSortAttributesByKeyoption whenxmlnsattributes are present.
3.2.1 - 2023-09-11
- Updated the documentation to reflect that you need to pass the plugin path now.
- Error messages thrown by the plugin are now much closer to the error messages thrown by prettier.
- Fixed a bug where self-closing tags that looked like embeds would throw an error.
3.2.0 - 2023-08-08
- Respect
xml:space="preserve"as an override to thexmlWhitespaceSensitivityoption.
3.1.1 - 2023-07-14
- Required
prettieras a peer dependency instead of a runtime dependency.
3.1.0 - 2023-07-07
- the
xmlSortAttributesByKey: true | falseoption has been added. See the README. - The
xmlQuoteAttributes: "preserve" | "single" | "double"option has been added. See the README.
3.0.0 - 2023-07-06
- See alpha release notes.
3.0.0-alpha.0 - 2023-06-02
- The
xmlWhitespaceSensitivity: "preserve"option has been added. See the README.
- Fixed the behavior of
bracketSameLinewhen the attributes on the parent element broke into multiple lines. - BREAKING Require prettier v3.
- BREAKING Migrate to ESM modules.
2.2.0 - 2022-05-12
- Better error messages in the case of a syntax error.
2.1.0 - 2022-04-16
- Support for the
singleAttributePerLineoption.
2.0.1 - 2022-03-22
- Better idempotency when printing long strings of text content within elements with ignored whitespace.
2.0.0 - 2022-03-22
- Require prettier
2.4.0for thebracketSameLineoption.
1.2.0 - 2021-12-23
- Support formatting
.xslfiles.
1.1.0 - 2021-09-26
- Bring back the
xmlSelfClosingSpaceoption.
1.0.2 - 2021-07-17
- Removed duplicated inner comments when
xmlWhitespaceSensitivityis set to"strict".
1.0.1 - 2021-07-14
- Fix the export to work in non-TypeScript environments.
1.0.0 - 2021-07-14
- Support for the
bracketSameLineoption to mirror the core option.
- The
xmlSelfClosingSpaceoption is now removed to make it easier to maintain.
0.13.1 - 2021-03-03
- Fixed a bug with newlines when there is empty content.
0.13.0 - 2021-01-22
- Maintain newlines if there are some in the original source.
0.12.0 - 2020-08-31
- Allow embedded parsers to handle content if element tags contain only text content and the tag name matches the name of an existing parser. For example:
<style type="text/css">
.box {
height: 100px;
width: 100px;
}
</style>- Additionally support
.inxfiles.
0.11.0 - 2020-08-14
- Support for a whole wide variety of file types, as per linguist.
0.10.0 - 2020-07-24
- Some better support for indenting mixed content when whitespace is set to ignore.
0.9.0 - 2020-07-21
- Ignored print ranges using the special
<!-- prettier-ignore-start -->and<!-- prettier-ignore-end -->comments. For example, you can now do:
<foo>
<!-- prettier-ignore-start -->
< this-content-will-not-be-formatted />
<!-- prettier-ignore-end -->
</foo>and it will maintain your formatting.
0.8.0 - 2020-07-03
- Support
.wsdlfiles.
0.7.2 - 2020-02-12
- Bump dependency on
@xml-tools/parsertov1.0.2.
0.7.1 - 2020-02-10
- Require
prettier/docinstead ofprettierto load less code in standalone mode.
0.7.0 - 2020-01-29
- Handle processing instructions inside elements.
- Properly handle mult-line CData tags.
0.6.0 - 2020-01-27
- The
xmlWhitespaceSensitivityoption, with current valid values of"strict"and"ignore"."strict"behavior maintains the current behavior, while"ignore"allows the plugin more freedom in where to place nodes.
0.5.0 - 2020-01-21
- Support for DOCTYPE nodes.
0.4.0 - 2020-01-19
- A dependency on the
@xml-tools/parserpackage to handle parsing. - We now register as supporting
.svgand.xsdfiles. - The
xmlSelfClosingSpaceoption for specifying whether or not to add spaces before self-closing element tags.
0.3.0 - 2019-11-14
- Support for cdata tags.
- Support for the
locStartandlocEndfunctions by tracking node metadata in the new parser. - Support for comment nodes.
- Support for
<?xml ... ?>and<?xml-model ... ?>tags.
- Dropped the dependency on
fast-xml-parserin favor of writing our own for better control over comments and node location.
0.2.0 - 2019-11-12
- Renamed package to
@prettier/plugin-xml.
0.1.0 - 2019-11-12
- Initial release 🎉