Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@prettier/plugin-xml

Package Overview
Dependencies
Maintainers
12
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prettier/plugin-xml - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

test.xml

9

CHANGELOG.md

@@ -9,2 +9,8 @@ # Changelog

## [2.1.0] - 2022-04-16
### Added
- Support for the `singleAttributePerLine` option.
## [2.0.1] - 2022-03-22

@@ -183,3 +189,4 @@

[unreleased]: https://github.com/prettier/plugin-xml/compare/v2.0.1...HEAD
[unreleased]: https://github.com/prettier/plugin-xml/compare/v2.1.0...HEAD
[2.1.0]: https://github.com/prettier/plugin-xml/compare/v2.0.1...v2.1.0
[2.0.1]: https://github.com/prettier/plugin-xml/compare/v2.0.0...v2.0.1

@@ -186,0 +193,0 @@ [2.0.0]: https://github.com/prettier/plugin-xml/compare/v1.2.0...v2.0.0

@@ -189,3 +189,7 @@ "use strict";

if (attribute) {
parts.push(indent([line, join(line, path.map(print, "children", "attribute"))]));
const separator = opts.singleAttributePerLine ? hardline : line;
parts.push(indent([
line,
join(separator, path.map(print, "children", "attribute"))
]));
}

@@ -192,0 +196,0 @@ // Determine the value that will go between the <, name, and attributes

2

package.json
{
"name": "@prettier/plugin-xml",
"version": "2.0.1",
"version": "2.1.0",
"description": "prettier plugin for XML",

@@ -5,0 +5,0 @@ "main": "dist/plugin.js",

@@ -49,9 +49,10 @@ <h1 align="center">Prettier for XML</h1>

| API Option | CLI Option | Default | Description |
| -------------------------- | ------------------------------ | :--------: | ----------------------------------------------------------------------------------------------------- |
| `bracketSameLine` | `--bracket-same-line` | `true` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#bracket-same-line)) |
| `printWidth` | `--print-width` | `80` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#print-width)). |
| `tabWidth` | `--tab-width` | `2` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#tab-width)). |
| `xmlSelfClosingSpace` | `--xml-self-closing-space` | `true` | Adds a space before self-closing tags. |
| `xmlWhitespaceSensitivity` | `--xml-whitespace-sensitivity` | `"strict"` | Options are `"strict"` and `"ignore"`. You may want `"ignore"`, [see below](#whitespace). |
| API Option | CLI Option | Default | Description |
| -------------------------- | ------------------------------ | :--------: | ------------------------------------------------------------------------------------------------------------- |
| `bracketSameLine` | `--bracket-same-line` | `true` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#bracket-same-line)) |
| `printWidth` | `--print-width` | `80` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#print-width)). |
| `singleAttributePerLine` | `--single-attribute-per-line` | `false` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#single-attribute-per-line)) |
| `tabWidth` | `--tab-width` | `2` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#tab-width)). |
| `xmlSelfClosingSpace` | `--xml-self-closing-space` | `true` | Adds a space before self-closing tags. |
| `xmlWhitespaceSensitivity` | `--xml-whitespace-sensitivity` | `"strict"` | Options are `"strict"` and `"ignore"`. You may want `"ignore"`, [see below](#whitespace). |

@@ -58,0 +59,0 @@ Any of these can be added to your existing [prettier configuration

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc