@stencil/core 4.22.3 → 4.23.0
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.
- package/cli/index.cjs +1 -1
- package/cli/index.js +1 -1
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +1610 -30
- package/dev-server/client/index.js +1 -1
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +2 -2
- package/dev-server/index.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +2 -2
- package/internal/app-data/package.json +1 -1
- package/internal/client/index.js +1213 -1019
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +1213 -1019
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +41 -35
- package/internal/package.json +1 -1
- package/internal/stencil-private.d.ts +13 -0
- package/internal/stencil-public-docs.d.ts +8 -0
- package/internal/testing/index.js +1215 -1021
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +15 -9
- package/mock-doc/index.js +15 -9
- package/mock-doc/package.json +1 -1
- package/package.json +2 -2
- package/screenshot/index.js +1 -1
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/sys/node/index.js +13 -13
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +11 -3
- package/testing/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/testing",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.23.0",
|
|
4
4
|
"description": "Stencil internal testing platform to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"private": true
|
package/mock-doc/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Mock Doc (CommonJS) v4.
|
|
2
|
+
Stencil Mock Doc (CommonJS) v4.23.0 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
"use strict";
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -6301,7 +6301,7 @@ function serializeNodeToHtml(elm, serializationOptions = {}) {
|
|
|
6301
6301
|
text: []
|
|
6302
6302
|
};
|
|
6303
6303
|
let renderedNode = "";
|
|
6304
|
-
const children = !opts.fullDocument && elm.body ? Array.from(elm.body.childNodes) : opts.outerHtml ? [elm] : Array.from(elm
|
|
6304
|
+
const children = !opts.fullDocument && elm.body ? Array.from(elm.body.childNodes) : opts.outerHtml ? [elm] : Array.from(getChildNodes(elm));
|
|
6305
6305
|
for (let i = 0, ii = children.length; i < ii; i++) {
|
|
6306
6306
|
const child = children[i];
|
|
6307
6307
|
const chunks = Array.from(streamToHtml(child, opts, output));
|
|
@@ -6334,7 +6334,7 @@ function* streamToHtml(node, opts, output) {
|
|
|
6334
6334
|
const tag = tagName === shadowRootTag ? "template" : tagName;
|
|
6335
6335
|
yield "<" + tag;
|
|
6336
6336
|
output.currentLineWidth += tag.length + 1;
|
|
6337
|
-
if (tag === "template") {
|
|
6337
|
+
if (tag === "template" && (!node.getAttribute || !node.getAttribute("shadowrootmode"))) {
|
|
6338
6338
|
const mode = ` shadowrootmode="open"`;
|
|
6339
6339
|
yield mode;
|
|
6340
6340
|
output.currentLineWidth += mode.length;
|
|
@@ -6418,7 +6418,8 @@ style="${cssText}">`;
|
|
|
6418
6418
|
output.indent = output.indent + ((_c = opts.indentSpaces) != null ? _c : 0);
|
|
6419
6419
|
yield* streamToHtml(shadowRoot, opts, output);
|
|
6420
6420
|
output.indent = output.indent - ((_d = opts.indentSpaces) != null ? _d : 0);
|
|
6421
|
-
|
|
6421
|
+
const childNodes = getChildNodes(node);
|
|
6422
|
+
if (opts.newLines && (childNodes.length === 0 || childNodes.length === 1 && childNodes[0].nodeType === 3 /* TEXT_NODE */ && ((_e = childNodes[0].nodeValue) == null ? void 0 : _e.trim()) === "")) {
|
|
6422
6423
|
yield "\n";
|
|
6423
6424
|
output.currentLineWidth = 0;
|
|
6424
6425
|
for (let i = 0; i < output.indent; i++) {
|
|
@@ -6429,7 +6430,7 @@ style="${cssText}">`;
|
|
|
6429
6430
|
}
|
|
6430
6431
|
if (opts.excludeTagContent == null || opts.excludeTagContent.includes(tagName) === false) {
|
|
6431
6432
|
const tag = tagName === shadowRootTag ? "template" : tagName;
|
|
6432
|
-
const childNodes = tagName === "template" ? node.content.childNodes : node
|
|
6433
|
+
const childNodes = tagName === "template" ? node.content.childNodes : getChildNodes(node);
|
|
6433
6434
|
const childNodeLength = childNodes.length;
|
|
6434
6435
|
if (childNodeLength > 0) {
|
|
6435
6436
|
if (childNodeLength === 1 && childNodes[0].nodeType === 3 /* TEXT_NODE */ && (typeof childNodes[0].nodeValue !== "string" || childNodes[0].nodeValue.trim() === "")) {
|
|
@@ -6602,6 +6603,9 @@ function isWithinWhitespaceSensitive(node) {
|
|
|
6602
6603
|
}
|
|
6603
6604
|
return false;
|
|
6604
6605
|
}
|
|
6606
|
+
function getChildNodes(node) {
|
|
6607
|
+
return node.__childNodes || node.childNodes;
|
|
6608
|
+
}
|
|
6605
6609
|
var NON_ESCAPABLE_CONTENT = /* @__PURE__ */ new Set([
|
|
6606
6610
|
"STYLE",
|
|
6607
6611
|
"SCRIPT",
|
|
@@ -6871,10 +6875,12 @@ var MockElement = class extends MockNode2 {
|
|
|
6871
6875
|
attachInternals() {
|
|
6872
6876
|
return new Proxy({}, {
|
|
6873
6877
|
get: function(_target, prop, _receiver) {
|
|
6874
|
-
|
|
6875
|
-
|
|
6876
|
-
|
|
6877
|
-
|
|
6878
|
+
if ("process" in globalThis && globalThis.process.env.__STENCIL_SPEC_TESTS__) {
|
|
6879
|
+
console.error(
|
|
6880
|
+
`NOTE: Property ${String(prop)} was accessed on ElementInternals, but this property is not implemented.
|
|
6881
|
+
Testing components with ElementInternals is fully supported in e2e tests.`
|
|
6882
|
+
);
|
|
6883
|
+
}
|
|
6878
6884
|
}
|
|
6879
6885
|
});
|
|
6880
6886
|
}
|
package/mock-doc/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Mock Doc v4.
|
|
2
|
+
Stencil Mock Doc v4.23.0 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
// src/runtime/runtime-constants.ts
|
|
@@ -6248,7 +6248,7 @@ function serializeNodeToHtml(elm, serializationOptions = {}) {
|
|
|
6248
6248
|
text: []
|
|
6249
6249
|
};
|
|
6250
6250
|
let renderedNode = "";
|
|
6251
|
-
const children = !opts.fullDocument && elm.body ? Array.from(elm.body.childNodes) : opts.outerHtml ? [elm] : Array.from(elm
|
|
6251
|
+
const children = !opts.fullDocument && elm.body ? Array.from(elm.body.childNodes) : opts.outerHtml ? [elm] : Array.from(getChildNodes(elm));
|
|
6252
6252
|
for (let i = 0, ii = children.length; i < ii; i++) {
|
|
6253
6253
|
const child = children[i];
|
|
6254
6254
|
const chunks = Array.from(streamToHtml(child, opts, output));
|
|
@@ -6281,7 +6281,7 @@ function* streamToHtml(node, opts, output) {
|
|
|
6281
6281
|
const tag = tagName === shadowRootTag ? "template" : tagName;
|
|
6282
6282
|
yield "<" + tag;
|
|
6283
6283
|
output.currentLineWidth += tag.length + 1;
|
|
6284
|
-
if (tag === "template") {
|
|
6284
|
+
if (tag === "template" && (!node.getAttribute || !node.getAttribute("shadowrootmode"))) {
|
|
6285
6285
|
const mode = ` shadowrootmode="open"`;
|
|
6286
6286
|
yield mode;
|
|
6287
6287
|
output.currentLineWidth += mode.length;
|
|
@@ -6365,7 +6365,8 @@ style="${cssText}">`;
|
|
|
6365
6365
|
output.indent = output.indent + ((_c = opts.indentSpaces) != null ? _c : 0);
|
|
6366
6366
|
yield* streamToHtml(shadowRoot, opts, output);
|
|
6367
6367
|
output.indent = output.indent - ((_d = opts.indentSpaces) != null ? _d : 0);
|
|
6368
|
-
|
|
6368
|
+
const childNodes = getChildNodes(node);
|
|
6369
|
+
if (opts.newLines && (childNodes.length === 0 || childNodes.length === 1 && childNodes[0].nodeType === 3 /* TEXT_NODE */ && ((_e = childNodes[0].nodeValue) == null ? void 0 : _e.trim()) === "")) {
|
|
6369
6370
|
yield "\n";
|
|
6370
6371
|
output.currentLineWidth = 0;
|
|
6371
6372
|
for (let i = 0; i < output.indent; i++) {
|
|
@@ -6376,7 +6377,7 @@ style="${cssText}">`;
|
|
|
6376
6377
|
}
|
|
6377
6378
|
if (opts.excludeTagContent == null || opts.excludeTagContent.includes(tagName) === false) {
|
|
6378
6379
|
const tag = tagName === shadowRootTag ? "template" : tagName;
|
|
6379
|
-
const childNodes = tagName === "template" ? node.content.childNodes : node
|
|
6380
|
+
const childNodes = tagName === "template" ? node.content.childNodes : getChildNodes(node);
|
|
6380
6381
|
const childNodeLength = childNodes.length;
|
|
6381
6382
|
if (childNodeLength > 0) {
|
|
6382
6383
|
if (childNodeLength === 1 && childNodes[0].nodeType === 3 /* TEXT_NODE */ && (typeof childNodes[0].nodeValue !== "string" || childNodes[0].nodeValue.trim() === "")) {
|
|
@@ -6549,6 +6550,9 @@ function isWithinWhitespaceSensitive(node) {
|
|
|
6549
6550
|
}
|
|
6550
6551
|
return false;
|
|
6551
6552
|
}
|
|
6553
|
+
function getChildNodes(node) {
|
|
6554
|
+
return node.__childNodes || node.childNodes;
|
|
6555
|
+
}
|
|
6552
6556
|
var NON_ESCAPABLE_CONTENT = /* @__PURE__ */ new Set([
|
|
6553
6557
|
"STYLE",
|
|
6554
6558
|
"SCRIPT",
|
|
@@ -6818,10 +6822,12 @@ var MockElement = class extends MockNode2 {
|
|
|
6818
6822
|
attachInternals() {
|
|
6819
6823
|
return new Proxy({}, {
|
|
6820
6824
|
get: function(_target, prop, _receiver) {
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
+
if ("process" in globalThis && globalThis.process.env.__STENCIL_SPEC_TESTS__) {
|
|
6826
|
+
console.error(
|
|
6827
|
+
`NOTE: Property ${String(prop)} was accessed on ElementInternals, but this property is not implemented.
|
|
6828
|
+
Testing components with ElementInternals is fully supported in e2e tests.`
|
|
6829
|
+
);
|
|
6830
|
+
}
|
|
6825
6831
|
}
|
|
6826
6832
|
});
|
|
6827
6833
|
}
|
package/mock-doc/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.23.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./internal/stencil-core/index.cjs",
|
|
6
6
|
"module": "./internal/stencil-core/index.js",
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
"@rollup/plugin-json": "6.1.0",
|
|
133
133
|
"@rollup/plugin-node-resolve": "9.0.0",
|
|
134
134
|
"@rollup/plugin-replace": "5.0.7",
|
|
135
|
-
"@rollup/pluginutils": "5.1.
|
|
135
|
+
"@rollup/pluginutils": "5.1.3",
|
|
136
136
|
"@types/eslint": "^8.4.6",
|
|
137
137
|
"@types/exit": "^0.1.31",
|
|
138
138
|
"@types/fs-extra": "^11.0.0",
|
package/screenshot/index.js
CHANGED
package/screenshot/package.json
CHANGED