@stencil/vitest 1.1.20 → 1.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html-serializer.d.ts","sourceRoot":"","sources":["../../src/testing/html-serializer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkCH,MAAM,WAAW,gBAAgB;IAC/B,qDAAqD;IACrD,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,qCAAqC;IACrC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,oCAAoC;IACpC,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,WAAW,GAAG,UAAU,GAAG,gBAAgB,GAAG,MAAM,EAC3D,OAAO,GAAE,gBAAqB,GAC7B,MAAM,CAWR;AAyID;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"html-serializer.d.ts","sourceRoot":"","sources":["../../src/testing/html-serializer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkCH,MAAM,WAAW,gBAAgB;IAC/B,qDAAqD;IACrD,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,qCAAqC;IACrC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,oCAAoC;IACpC,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,WAAW,GAAG,UAAU,GAAG,gBAAgB,GAAG,MAAM,EAC3D,OAAO,GAAE,gBAAqB,GAC7B,MAAM,CAWR;AAyID;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAuDjD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD"}
|
|
@@ -195,14 +195,18 @@ export function prettifyHtml(html) {
|
|
|
195
195
|
lines.push(' '.repeat(indentLevel * indentSize) + part);
|
|
196
196
|
}
|
|
197
197
|
else if (part.endsWith('/>')) {
|
|
198
|
-
// Self-closing tag
|
|
198
|
+
// Self-closing tag (XML style)
|
|
199
199
|
lines.push(' '.repeat(indentLevel * indentSize) + part);
|
|
200
200
|
}
|
|
201
201
|
else {
|
|
202
202
|
// Opening tag
|
|
203
203
|
lines.push(' '.repeat(indentLevel * indentSize) + part);
|
|
204
|
-
//
|
|
205
|
-
|
|
204
|
+
// Check if it's a void element - if so, don't increase indent
|
|
205
|
+
const tagName = part.match(/<([^\s>/]+)/)?.[1]?.toLowerCase();
|
|
206
|
+
if (!tagName || !VOID_ELEMENTS.has(tagName)) {
|
|
207
|
+
// Not a void element, increase indent for next content
|
|
208
|
+
indentLevel++;
|
|
209
|
+
}
|
|
206
210
|
}
|
|
207
211
|
}
|
|
208
212
|
else {
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "https://github.com/stenciljs/vitest"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.1.
|
|
7
|
+
"version": "1.1.21",
|
|
8
8
|
"description": "First-class testing utilities for Stencil design systems with Vitest",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"type": "module",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"dependencies": {
|
|
98
98
|
"jiti": "^2.6.1",
|
|
99
99
|
"local-pkg": "^1.1.2",
|
|
100
|
-
"vitest-environment-stencil": "1.1.
|
|
100
|
+
"vitest-environment-stencil": "1.1.21"
|
|
101
101
|
},
|
|
102
102
|
"devDependencies": {
|
|
103
103
|
"@eslint/js": "^9.39.2",
|