@stencil/core 4.4.0-dev.1696395716.cd91c3e → 4.4.0-dev.1696568523.8d03606
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 +10 -2
- package/cli/index.cjs.map +1 -1
- package/cli/index.js +10 -2
- package/cli/index.js.map +1 -1
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +4 -4
- package/compiler/stencil.min.js +2 -2
- package/dev-server/client/hmr-components.d.ts +12 -1
- package/dev-server/client/index.js +40 -12
- 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 +33 -5
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/client/shadow-css.js +1 -1
- package/internal/hydrate/index.js +3 -2
- package/internal/hydrate/package.json +1 -1
- package/internal/package.json +1 -1
- package/internal/stencil-private.d.ts +3 -0
- package/internal/testing/index.js +3 -2
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +1 -1
- package/mock-doc/index.js +1 -1
- package/mock-doc/package.json +1 -1
- package/package.json +1 -1
- package/screenshot/package.json +1 -1
- package/sys/node/index.js +1 -1
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +16 -13
- package/testing/jest/jest-27-and-under/jest-setup-test-framework.d.ts +1 -1
- package/testing/package.json +1 -1
package/sys/node/package.json
CHANGED
package/sys/node/worker.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Node System Worker v4.4.0-dev.
|
|
2
|
+
Stencil Node System Worker v4.4.0-dev.1696568523.8d03606 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
function _interopNamespace(e) {
|
|
5
5
|
if (e && e.__esModule) return e;
|
package/testing/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Testing v4.4.0-dev.
|
|
2
|
+
Stencil Testing v4.4.0-dev.1696568523.8d03606 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
function _lazyRequire(e) {
|
|
5
5
|
return new Proxy({}, {
|
|
@@ -211,12 +211,13 @@ async function runJest(e, t) {
|
|
|
211
211
|
let r = !1;
|
|
212
212
|
try {
|
|
213
213
|
const n = function n(e, t) {
|
|
214
|
-
|
|
214
|
+
var r, n;
|
|
215
|
+
let s = null !== (n = null === (r = e.emulate) || void 0 === r ? void 0 : r.slice()) && void 0 !== n ? n : [];
|
|
215
216
|
if ("string" == typeof t.emulate) {
|
|
216
217
|
const e = t.emulate.toLowerCase();
|
|
217
|
-
|
|
218
|
+
s = s.filter((t => "string" == typeof t.device && t.device.toLowerCase() === e || !("string" != typeof t.userAgent || !t.userAgent.toLowerCase().includes(e))));
|
|
218
219
|
}
|
|
219
|
-
return
|
|
220
|
+
return s;
|
|
220
221
|
}(e.testing, e.flags);
|
|
221
222
|
t.__STENCIL_EMULATE_CONFIGS__ = JSON.stringify(n), t.__STENCIL_ENV__ = JSON.stringify(e.env),
|
|
222
223
|
t.__STENCIL_TRANSPILE_PATHS__ = e.transformAliasedImportPaths ? "true" : "false",
|
|
@@ -1556,15 +1557,16 @@ const FETCH_DEFAULT_PATH = "/mock-fetch-data", HtmlSerializer = {
|
|
|
1556
1557
|
return compareHtml(e, t, !1);
|
|
1557
1558
|
},
|
|
1558
1559
|
toEqualText: function toEqualText(e, t) {
|
|
1560
|
+
var r;
|
|
1559
1561
|
if (null == e) throw new Error(`expect toEqualText() value is "${e}"`);
|
|
1560
1562
|
if ("function" == typeof e.then) throw new Error("element must be a resolved value, not a promise, before it can be tested");
|
|
1561
|
-
let
|
|
1562
|
-
1 === e.nodeType ? r = e.textContent.replace(/\s\s+/g, " ").trim() :
|
|
1563
|
+
let n;
|
|
1564
|
+
n = 1 === e.nodeType ? (null !== (r = e.textContent) && void 0 !== r ? r : "").replace(/\s\s+/g, " ").trim() : String(e).replace(/\s\s+/g, " ").trim(),
|
|
1563
1565
|
"string" == typeof t && (t = t.replace(/\s\s+/g, " ").trim());
|
|
1564
|
-
const
|
|
1566
|
+
const s = n === t;
|
|
1565
1567
|
return {
|
|
1566
|
-
message: () => `expected textContent "${t}" to ${
|
|
1567
|
-
pass:
|
|
1568
|
+
message: () => `expected textContent "${t}" to ${s ? "not " : ""}equal "${n}"`,
|
|
1569
|
+
pass: s
|
|
1568
1570
|
};
|
|
1569
1571
|
},
|
|
1570
1572
|
toHaveAttribute: function toHaveAttribute(e, t) {
|
|
@@ -1652,7 +1654,8 @@ const FETCH_DEFAULT_PATH = "/mock-fetch-data", HtmlSerializer = {
|
|
|
1652
1654
|
toMatchScreenshot: function toMatchScreenshot(e, t = {}) {
|
|
1653
1655
|
if (!e) throw new Error("expect toMatchScreenshot value is null");
|
|
1654
1656
|
if ("function" == typeof e.then) throw new Error("expect(compare).toMatchScreenshot() must be a resolved value, not a promise, before it can be tested");
|
|
1655
|
-
if ("number" != typeof e.mismatchedPixels) throw new Error(
|
|
1657
|
+
if ("number" != typeof e.mismatchedPixels) throw new Error(`expect toMatchScreenshot() value is not a valid screenshot compare object - 'mismatchedPixels' has type '${typeof e.mismatchedPixels}', but should be a number`);
|
|
1658
|
+
if ("number" != typeof e.deviceScaleFactor) throw new Error(`expect toMatchScreenshot() value is not a valid screenshot compare object - 'deviceScaleFactor' has type '${typeof e.deviceScaleFactor}', but should be a number`);
|
|
1656
1659
|
const r = e.device || e.userAgent;
|
|
1657
1660
|
if ("number" == typeof t.allowableMismatchedRatio) {
|
|
1658
1661
|
if (t.allowableMismatchedRatio < 0 || t.allowableMismatchedRatio > 1) throw new Error("expect toMatchScreenshot() allowableMismatchedRatio must be a value ranging from 0 to 1");
|
|
@@ -3784,7 +3787,7 @@ const getPackageDirPath = (e, t) => {
|
|
|
3784
3787
|
u("/");
|
|
3785
3788
|
const S = {
|
|
3786
3789
|
name: "in-memory",
|
|
3787
|
-
version: "4.4.0-dev.
|
|
3790
|
+
version: "4.4.0-dev.1696568523.8d03606",
|
|
3788
3791
|
events: a,
|
|
3789
3792
|
access: async e => c(e),
|
|
3790
3793
|
accessSync: c,
|
|
@@ -4386,7 +4389,7 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
4386
4389
|
if (e = e.filter((e => function t(e, r) {
|
|
4387
4390
|
const n = (e = e.toLowerCase().replace(/\\/g, "/")).includes(".e2e.") || e.includes("/e2e.");
|
|
4388
4391
|
return !("true" !== r.__STENCIL_E2E_TESTS__ || !n) || "true" === r.__STENCIL_SPEC_TESTS__ && !n;
|
|
4389
|
-
}(e.path, i))), "true" === i.__STENCIL_SCREENSHOT__) {
|
|
4392
|
+
}(e.path, i))), "true" === i.__STENCIL_SCREENSHOT__ && i.__STENCIL_EMULATE_CONFIGS__) {
|
|
4390
4393
|
const a = JSON.parse(i.__STENCIL_EMULATE_CONFIGS__);
|
|
4391
4394
|
for (let l = 0; l < a.length; l++) setScreenshotEmulateData(a[l], i), await super.runTests(e, t, r, n, s, o);
|
|
4392
4395
|
} else await super.runTests(e, t, r, n, s, o);
|
|
@@ -4463,7 +4466,7 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
4463
4466
|
rootDir: e.rootDir,
|
|
4464
4467
|
cacheDir: e.cacheDir,
|
|
4465
4468
|
packageDir: path$2.join(e.sys.getCompilerExecutingPath(), "..", ".."),
|
|
4466
|
-
updateMaster: e.flags.updateScreenshot,
|
|
4469
|
+
updateMaster: !!e.flags.updateScreenshot,
|
|
4467
4470
|
logger: e.logger,
|
|
4468
4471
|
allowableMismatchedPixels: e.testing.allowableMismatchedPixels,
|
|
4469
4472
|
allowableMismatchedRatio: e.testing.allowableMismatchedRatio,
|
|
@@ -6,4 +6,4 @@ export declare function jestSetupTestFramework(): void;
|
|
|
6
6
|
*
|
|
7
7
|
* @param node The mocked DOM node that will be removed from the DOM
|
|
8
8
|
*/
|
|
9
|
-
export declare function removeDomNodes(node: MockNode): void;
|
|
9
|
+
export declare function removeDomNodes(node: MockNode | undefined | null): void;
|