Update angular-html-parser (#13578)
This commit is contained in:
1 parent
ec02598625
commit
b893eeefb2
7 files changed
+30
-20
No files matched your search
@@ -0,0 +1,3 @@
|
||||
#### Update angular-html-parser (#13578 by @thorn0)
|
||||
|
||||
Prettier's fork of Angular's HTML parser was synced with the upstream.
|
||||
+1
-1
@@ -34,7 +34,7 @@
|
||||
"acorn": "8.8.0",
|
||||
"acorn-jsx": "5.3.2",
|
||||
"angular-estree-parser": "2.5.1",
|
||||
"angular-html-parser": "1.8.0",
|
||||
"angular-html-parser": "2.0.0",
|
||||
"camelcase": "7.0.0",
|
||||
"chalk": "5.0.1",
|
||||
"ci-info": "3.4.0",
|
||||
|
||||
@@ -6,6 +6,10 @@ const ignoredProperties = new Set([
|
||||
"endSourceSpan",
|
||||
"nameSpan",
|
||||
"valueSpan",
|
||||
"keySpan",
|
||||
"tagDefinition",
|
||||
"tokens",
|
||||
"valueTokens",
|
||||
]);
|
||||
|
||||
function clean(ast, newNode) {
|
||||
|
||||
@@ -338,7 +338,9 @@ function addIsSelfClosing(ast /*, options */) {
|
||||
(node.type === "element" &&
|
||||
(node.tagDefinition.isVoid ||
|
||||
// self-closing
|
||||
node.startSourceSpan === node.endSourceSpan));
|
||||
(node.endSourceSpan &&
|
||||
node.startSourceSpan.start === node.endSourceSpan.start &&
|
||||
node.startSourceSpan.end === node.endSourceSpan.end)));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`unclosed_tag.vue [vue] format 1`] = `
|
||||
"Unexpected character "EOF" (2:1)
|
||||
1 | <div
|
||||
"Opening tag "div" not terminated. (1:1)
|
||||
> 1 | <div
|
||||
| ^^^^
|
||||
> 2 |
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`unclosed_tag_in_template.vue [vue] format 1`] = `
|
||||
"Unexpected character "/" (4:2)
|
||||
"Unexpected character "<" (4:1)
|
||||
2 | <p>Templates are formatted as well...
|
||||
3 | </
|
||||
> 4 | </template>
|
||||
| ^
|
||||
| ^
|
||||
5 |"
|
||||
`;
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ const astAutoFold = {
|
||||
estree:
|
||||
/^\s*"(loc|start|end|tokens|leadingComments|trailingComments|innerComments)":/,
|
||||
postcss: /^\s*"(source|input|raws|file)":/,
|
||||
html: /^\s*"(sourceSpan|valueSpan|nameSpan|startSourceSpan|endSourceSpan|tagDefinition)":/,
|
||||
html: /^\s*"(\w+Span|valueTokens|tokens|file|tagDefinition)":/,
|
||||
mdast: /^\s*"position":/,
|
||||
yaml: /^\s*"position":/,
|
||||
glimmer: /^\s*"loc":/,
|
||||
|
||||
@@ -1734,12 +1734,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"angular-html-parser@npm:1.8.0":
|
||||
version: 1.8.0
|
||||
resolution: "angular-html-parser@npm:1.8.0"
|
||||
"angular-html-parser@npm:2.0.0":
|
||||
version: 2.0.0
|
||||
resolution: "angular-html-parser@npm:2.0.0"
|
||||
dependencies:
|
||||
tslib: ^1.9.3
|
||||
checksum: 3f47a630500f76dcc36aded0d672da3de1de29e262c7bea06041d86653d00e36c1c1f133211095030e730ed9c4f0fe3415db2f2152e7135be963fd39908d69d6
|
||||
tslib: 2.4.0
|
||||
checksum: 28f815f65959202879c17f8b50287728936b18d8c0b59d48ec7d63943356cf7d9b098b36022f22dfa5baad645922ee86e4d20c7d8b88e9dd18b830f712d9db7b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -6620,7 +6620,7 @@ __metadata:
|
||||
acorn: 8.8.0
|
||||
acorn-jsx: 5.3.2
|
||||
angular-estree-parser: 2.5.1
|
||||
angular-html-parser: 1.8.0
|
||||
angular-html-parser: 2.0.0
|
||||
benchmark: 2.1.4
|
||||
browserslist-to-esbuild: 1.2.0
|
||||
c8: 7.12.0
|
||||
@@ -7882,6 +7882,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"tslib@npm:2.4.0, tslib@npm:^2.0.3, tslib@npm:^2.2.0":
|
||||
version: 2.4.0
|
||||
resolution: "tslib@npm:2.4.0"
|
||||
checksum: 8c4aa6a3c5a754bf76aefc38026134180c053b7bd2f81338cb5e5ebf96fefa0f417bff221592bf801077f5bf990562f6264fecbc42cd3309b33872cb6fc3b113
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"tslib@npm:^1.10.0, tslib@npm:^1.8.1, tslib@npm:^1.9.0, tslib@npm:^1.9.3":
|
||||
version: 1.14.1
|
||||
resolution: "tslib@npm:1.14.1"
|
||||
@@ -7889,13 +7896,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"tslib@npm:^2.0.3, tslib@npm:^2.2.0":
|
||||
version: 2.4.0
|
||||
resolution: "tslib@npm:2.4.0"
|
||||
checksum: 8c4aa6a3c5a754bf76aefc38026134180c053b7bd2f81338cb5e5ebf96fefa0f417bff221592bf801077f5bf990562f6264fecbc42cd3309b33872cb6fc3b113
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"tsutils@npm:^3.21.0":
|
||||
version: 3.21.0
|
||||
resolution: "tsutils@npm:3.21.0"
|
||||
|
||||
Reference in new issue
Block a user