@prettier/plugin-xml
Advanced tools
Comparing version 2.2.0 to 3.0.0-alpha.0
@@ -9,2 +9,14 @@ # Changelog | ||
## [3.0.0-alpha.0] - 2023-06-02 | ||
### Added | ||
- The `xmlWhitespaceSensitivity: "preserve"` option has been added. See the README. | ||
### Changed | ||
- Fixed the behavior of `bracketSameLine` when 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 | ||
@@ -195,3 +207,4 @@ | ||
[unreleased]: https://github.com/prettier/plugin-xml/compare/v2.2.0...HEAD | ||
[unreleased]: https://github.com/prettier/plugin-xml/compare/v3.0.0-alpha.0...HEAD | ||
[3.0.0-alpha.0]: https://github.com/prettier/plugin-xml/compare/v2.2.0...v3.0.0-alpha.0 | ||
[2.2.0]: https://github.com/prettier/plugin-xml/compare/v2.1.0...v2.2.0 | ||
@@ -198,0 +211,0 @@ [2.1.0]: https://github.com/prettier/plugin-xml/compare/v2.0.1...v2.1.0 |
{ | ||
"name": "@prettier/plugin-xml", | ||
"version": "2.2.0", | ||
"version": "3.0.0-alpha.0", | ||
"description": "prettier plugin for XML", | ||
"main": "dist/plugin.js", | ||
"type": "module", | ||
"main": "src/plugin.js", | ||
"scripts": { | ||
"lint": "eslint --cache .", | ||
"prepublishOnly": "tsc -p tsconfig.build.json", | ||
"prepare": "node bin/languages.js", | ||
"print": "prettier --plugin=.", | ||
"test": "jest" | ||
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js" | ||
}, | ||
@@ -24,16 +25,9 @@ "repository": { | ||
"@xml-tools/parser": "^1.0.11", | ||
"prettier": ">=2.4.0" | ||
"prettier": ">=3.0.0-alpha.3" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^27.5.1", | ||
"@types/node": "^17.0.22", | ||
"@types/prettier": "^2.3.0", | ||
"@typescript-eslint/eslint-plugin": "^5.16.0", | ||
"@typescript-eslint/parser": "^5.16.0", | ||
"eslint": "^8.5.0", | ||
"eslint-config-prettier": "^8.0.0", | ||
"jest": "^28.1.0", | ||
"ts-jest": "^28.0.2", | ||
"ts-node": "^10.0.0", | ||
"typescript": "^4.3.2" | ||
"jest": "^29.2.1", | ||
"linguist-languages": "^7.21.0" | ||
}, | ||
@@ -43,26 +37,27 @@ "eslintConfig": { | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier" | ||
], | ||
"env": { | ||
"es6": true, | ||
"jest": true, | ||
"node": true | ||
}, | ||
"parser": "@typescript-eslint/parser", | ||
"rules": { | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-non-null-assertion": "off" | ||
"no-unused-vars": "off" | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 2020, | ||
"sourceType": "module" | ||
} | ||
}, | ||
"eslintIgnore": [ | ||
"bin/languages.js", | ||
"dist" | ||
], | ||
"jest": { | ||
"preset": "ts-jest", | ||
"testRegex": ".test.ts$" | ||
"testRegex": ".test.js$", | ||
"transform": {} | ||
}, | ||
"prettier": { | ||
"plugins": [ | ||
"." | ||
"./src/plugin.js" | ||
], | ||
@@ -69,0 +64,0 @@ "trailingComma": "none" |
@@ -8,3 +8,3 @@ <h1 align="center">Prettier for XML</h1> | ||
<a href="https://github.com/prettier/plugin-xml/actions"> | ||
<img alt="GitHub Actions" src="https://img.shields.io/github/workflow/status/prettier/plugin-xml/Main?style=flat-square"> | ||
<img alt="GitHub Actions" src="https://img.shields.io/github/actions/workflow/status/prettier/plugin-xml/main.yml?branch=main&style=flat-square"> | ||
</a> | ||
@@ -48,12 +48,12 @@ <a href="https://www.npmjs.com/package/@prettier/plugin-xml"> | ||
Below are the options (from [`src/plugin.ts`](src/plugin.ts)) that `@prettier/plugin-xml` currently supports: | ||
Below are the options (from [`src/plugin.js`](src/plugin.js)) that `@prettier/plugin-xml` currently supports: | ||
| 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). | | ||
| 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"`, `"preserve"`, and `"ignore"`. You may want `"ignore"` or `"preserve"`, [see below](#whitespace). | | ||
@@ -81,2 +81,4 @@ Any of these can be added to your existing [prettier configuration | ||
You can also use the `"preserve"` option, if you want to preserve the whitespace of text nodes within XML elements and attributes. See [#478](https://github.com/prettier/plugin-xml/issues/478) for more detail. | ||
### Ignore ranges | ||
@@ -83,0 +85,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42565
4
932
100
Yes
10
1
1
Updatedprettier@>=3.0.0-alpha.3