prettier-plugin-astro
Advanced tools
Comparing version 0.5.3 to 0.5.4
# prettier-plugin-astro | ||
## 0.5.4 | ||
### Patch Changes | ||
- 4115a8e: Support formatting expressions with elements with attributes not compatible with JSX | ||
## 0.5.3 | ||
@@ -4,0 +10,0 @@ |
@@ -98,2 +98,6 @@ 'use strict'; | ||
const serialize = synckit.createSyncFn(req$1.resolve(workerPath$1)); | ||
const openingBracketReplace = '_Pé'; | ||
const closingBracketReplace = 'èP_'; | ||
const atSignReplace = 'ΩP_'; | ||
const dotReplace = 'ωP_'; | ||
function isInlineElement(path, opts, node) { | ||
@@ -516,4 +520,6 @@ return node && node.type === 'element' && !isBlockElement(node, opts) && !isPreTagContent(path); | ||
if (typeof doc === 'string') { | ||
doc = doc.replace('_Pé', '{'); | ||
doc = doc.replace('èP_', '}'); | ||
doc = doc.replace(openingBracketReplace, '{'); | ||
doc = doc.replace(closingBracketReplace, '}'); | ||
doc = doc.replace(atSignReplace, '@'); | ||
doc = doc.replace(dotReplace, '.'); | ||
} | ||
@@ -603,4 +609,10 @@ return doc; | ||
attr.kind = 'empty'; | ||
attr.name = '_Pé' + attr.name + 'èP_'; | ||
attr.name = openingBracketReplace + attr.name + closingBracketReplace; | ||
} | ||
if (attr.name.includes('@')) { | ||
attr.name = attr.name.replace('@', atSignReplace); | ||
} | ||
if (attr.name.includes('.')) { | ||
attr.name = attr.name.replace('.', dotReplace); | ||
} | ||
}); | ||
@@ -607,0 +619,0 @@ if (isNodeWithChildren(child)) { |
{ | ||
"name": "prettier-plugin-astro", | ||
"version": "0.5.3", | ||
"version": "0.5.4", | ||
"type": "commonjs", | ||
@@ -42,25 +42,25 @@ "description": "A Prettier Plugin for formatting Astro files", | ||
"dependencies": { | ||
"@astrojs/compiler": "^0.23.3", | ||
"@astrojs/compiler": "^0.23.4", | ||
"prettier": "^2.7.1", | ||
"sass-formatter": "^0.7.2", | ||
"sass-formatter": "^0.7.5", | ||
"synckit": "^0.7.0" | ||
}, | ||
"devDependencies": { | ||
"@changesets/cli": "^2.16.0", | ||
"@rollup/plugin-commonjs": "^22.0.1", | ||
"@rollup/plugin-typescript": "^8.3.3", | ||
"@types/node": "^14.15.0", | ||
"@changesets/cli": "^2.24.3", | ||
"@rollup/plugin-commonjs": "^22.0.2", | ||
"@rollup/plugin-typescript": "^8.4.0", | ||
"@types/node": "^18.7.13", | ||
"@types/prettier": "^2.7.0", | ||
"@typescript-eslint/eslint-plugin": "^5.29.0", | ||
"@typescript-eslint/parser": "^5.29.0", | ||
"@vitest/ui": "^0.16.0", | ||
"eslint": "^8.18.0", | ||
"@typescript-eslint/eslint-plugin": "^5.35.1", | ||
"@typescript-eslint/parser": "^5.35.1", | ||
"@vitest/ui": "^0.22.1", | ||
"eslint": "^8.23.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-prettier-doc": "^1.1.0", | ||
"rollup": "^2.75.7", | ||
"rollup": "^2.78.1", | ||
"tslib": "^2.4.0", | ||
"typescript": "^4.7.4", | ||
"vitest": "^0.16.0" | ||
"typescript": "^4.8.2", | ||
"vitest": "^0.22.1" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
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
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
93941
693
Updated@astrojs/compiler@^0.23.4
Updatedsass-formatter@^0.7.5