@stencil/core 4.32.0 → 4.33.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 +21 -9
- 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/app-globals/index.d.ts +2 -0
- package/internal/app-globals/index.js +14 -0
- package/internal/app-globals/package.json +14 -0
- package/internal/client/index.js +285 -286
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +284 -293
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +53 -32
- package/internal/package.json +1 -1
- package/internal/stencil-private.d.ts +4 -1
- package/internal/stencil-public-runtime.d.ts +1 -1
- package/internal/testing/index.js +294 -288
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +28 -10
- package/mock-doc/index.d.ts +5 -4
- package/mock-doc/index.js +28 -10
- package/mock-doc/package.json +1 -1
- package/package.json +5 -1
- package/screenshot/index.js +1 -1
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/sys/node/index.js +21 -21
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +27 -24
- package/testing/package.json +1 -1
package/sys/node/package.json
CHANGED
package/sys/node/worker.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Node System Worker v4.
|
|
2
|
+
Stencil Node System Worker v4.33.0 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
"use strict";var f=Object.create;var d=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var g=(n,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of E(t))!R.call(n,e)&&e!==r&&d(n,e,{get:()=>t[e],enumerable:!(s=p(t,e))||s.enumerable});return n};var c=(n,t,r)=>(r=n!=null?f(y(n)):{},g(t||!n||!n.__esModule?d(r,"default",{value:n,enumerable:!0}):r,n));var l=c(require("../../compiler/stencil.js")),m=c(require("../../sys/node/index.js"));var a=(n,t)=>{let r=e=>{e&&e.code==="ERR_IPC_CHANNEL_CLOSED"&&n.exit(0)},s=(e,o)=>{let i={stencilId:e,stencilRtnValue:null,stencilRtnError:"Error"};typeof o=="string"?i.stencilRtnError+=": "+o:o&&(o.stack?i.stencilRtnError+=": "+o.stack:o.message&&(i.stencilRtnError+=":"+o.message)),n.send(i,r)};n.on("message",async e=>{if(e&&typeof e.stencilId=="number")try{let o={stencilId:e.stencilId,stencilRtnValue:await t(e),stencilRtnError:null};n.send(o,r)}catch(o){s(e.stencilId,o)}}),n.on("unhandledRejection",e=>{s(-1,e)})};var k=m.createNodeSys({process}),M=l.createWorkerMessageHandler(k);a(process,M);
|
package/testing/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Testing v4.
|
|
2
|
+
Stencil Testing v4.33.0 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
@@ -2438,6 +2438,9 @@ var unwrapErr = (result2) => {
|
|
|
2438
2438
|
}
|
|
2439
2439
|
};
|
|
2440
2440
|
|
|
2441
|
+
// src/utils/shadow-root.ts
|
|
2442
|
+
var import_app_data = _lazyRequire("@stencil/core/internal/app-data");
|
|
2443
|
+
|
|
2441
2444
|
// src/utils/util.ts
|
|
2442
2445
|
var lowerPathParam = (fn) => (p) => fn(p.toLowerCase());
|
|
2443
2446
|
var isDtsFile = lowerPathParam((p) => p.endsWith(".d.ts") || p.endsWith(".d.mts") || p.endsWith(".d.cts"));
|
|
@@ -3023,7 +3026,7 @@ function createBuildMessage() {
|
|
|
3023
3026
|
}
|
|
3024
3027
|
|
|
3025
3028
|
// src/testing/jest/jest-27-and-under/jest-setup-test-framework.ts
|
|
3026
|
-
var
|
|
3029
|
+
var import_app_data2 = _lazyRequire("@stencil/core/internal/app-data");
|
|
3027
3030
|
var import_testing = _lazyRequire("../internal/testing/index.js");
|
|
3028
3031
|
var import_mock_doc7 = _lazyRequire("../mock-doc/index.cjs");
|
|
3029
3032
|
|
|
@@ -3661,7 +3664,7 @@ function jestSetupTestFramework() {
|
|
|
3661
3664
|
beforeEach(() => {
|
|
3662
3665
|
(0, import_testing.resetPlatform)();
|
|
3663
3666
|
(0, import_testing.setErrorHandler)(void 0);
|
|
3664
|
-
resetBuildConditionals(
|
|
3667
|
+
resetBuildConditionals(import_app_data2.BUILD);
|
|
3665
3668
|
import_testing.modeResolutionChain.length = 0;
|
|
3666
3669
|
});
|
|
3667
3670
|
afterEach(async () => {
|
|
@@ -3694,7 +3697,7 @@ function jestSetupTestFramework() {
|
|
|
3694
3697
|
}
|
|
3695
3698
|
if (typeof env2.__STENCIL_ENV__ === "string") {
|
|
3696
3699
|
const stencilEnv = JSON.parse(env2.__STENCIL_ENV__);
|
|
3697
|
-
Object.assign(
|
|
3700
|
+
Object.assign(import_app_data2.Env, stencilEnv);
|
|
3698
3701
|
}
|
|
3699
3702
|
}
|
|
3700
3703
|
function removeDomNodes(node) {
|
|
@@ -4244,7 +4247,7 @@ function createBuildMessage2() {
|
|
|
4244
4247
|
}
|
|
4245
4248
|
|
|
4246
4249
|
// src/testing/jest/jest-28/jest-setup-test-framework.ts
|
|
4247
|
-
var
|
|
4250
|
+
var import_app_data3 = _lazyRequire("@stencil/core/internal/app-data");
|
|
4248
4251
|
var import_testing2 = _lazyRequire("../internal/testing/index.js");
|
|
4249
4252
|
var import_mock_doc12 = _lazyRequire("../mock-doc/index.cjs");
|
|
4250
4253
|
|
|
@@ -4703,7 +4706,7 @@ function jestSetupTestFramework2() {
|
|
|
4703
4706
|
beforeEach(() => {
|
|
4704
4707
|
(0, import_testing2.resetPlatform)();
|
|
4705
4708
|
(0, import_testing2.setErrorHandler)(void 0);
|
|
4706
|
-
resetBuildConditionals(
|
|
4709
|
+
resetBuildConditionals(import_app_data3.BUILD);
|
|
4707
4710
|
import_testing2.modeResolutionChain.length = 0;
|
|
4708
4711
|
});
|
|
4709
4712
|
afterEach(async () => {
|
|
@@ -4727,7 +4730,7 @@ function jestSetupTestFramework2() {
|
|
|
4727
4730
|
}
|
|
4728
4731
|
if (typeof env2.__STENCIL_ENV__ === "string") {
|
|
4729
4732
|
const stencilEnv = JSON.parse(env2.__STENCIL_ENV__);
|
|
4730
|
-
Object.assign(
|
|
4733
|
+
Object.assign(import_app_data3.Env, stencilEnv);
|
|
4731
4734
|
}
|
|
4732
4735
|
}
|
|
4733
4736
|
function removeDomNodes2(node) {
|
|
@@ -5277,7 +5280,7 @@ function createBuildMessage3() {
|
|
|
5277
5280
|
}
|
|
5278
5281
|
|
|
5279
5282
|
// src/testing/jest/jest-29/jest-setup-test-framework.ts
|
|
5280
|
-
var
|
|
5283
|
+
var import_app_data4 = _lazyRequire("@stencil/core/internal/app-data");
|
|
5281
5284
|
var import_testing3 = _lazyRequire("../internal/testing/index.js");
|
|
5282
5285
|
var import_mock_doc17 = _lazyRequire("../mock-doc/index.cjs");
|
|
5283
5286
|
|
|
@@ -5736,7 +5739,7 @@ function jestSetupTestFramework3() {
|
|
|
5736
5739
|
beforeEach(() => {
|
|
5737
5740
|
(0, import_testing3.resetPlatform)();
|
|
5738
5741
|
(0, import_testing3.setErrorHandler)(void 0);
|
|
5739
|
-
resetBuildConditionals(
|
|
5742
|
+
resetBuildConditionals(import_app_data4.BUILD);
|
|
5740
5743
|
import_testing3.modeResolutionChain.length = 0;
|
|
5741
5744
|
});
|
|
5742
5745
|
afterEach(async () => {
|
|
@@ -5760,7 +5763,7 @@ function jestSetupTestFramework3() {
|
|
|
5760
5763
|
}
|
|
5761
5764
|
if (typeof env2.__STENCIL_ENV__ === "string") {
|
|
5762
5765
|
const stencilEnv = JSON.parse(env2.__STENCIL_ENV__);
|
|
5763
|
-
Object.assign(
|
|
5766
|
+
Object.assign(import_app_data4.Env, stencilEnv);
|
|
5764
5767
|
}
|
|
5765
5768
|
}
|
|
5766
5769
|
function removeDomNodes3(node) {
|
|
@@ -10678,7 +10681,7 @@ Location: ${loc.url}`;
|
|
|
10678
10681
|
}
|
|
10679
10682
|
|
|
10680
10683
|
// src/testing/spec-page.ts
|
|
10681
|
-
var
|
|
10684
|
+
var import_app_data5 = _lazyRequire("@stencil/core/internal/app-data");
|
|
10682
10685
|
var import_testing4 = _lazyRequire("../internal/testing/index.js");
|
|
10683
10686
|
|
|
10684
10687
|
// src/compiler/app-core/app-data.ts
|
|
@@ -10747,7 +10750,7 @@ async function newSpecPage(opts) {
|
|
|
10747
10750
|
throw new Error(`NewSpecPageOptions required`);
|
|
10748
10751
|
}
|
|
10749
10752
|
(0, import_testing4.resetPlatform)((_a = opts.platform) != null ? _a : {});
|
|
10750
|
-
resetBuildConditionals(
|
|
10753
|
+
resetBuildConditionals(import_app_data5.BUILD);
|
|
10751
10754
|
if (Array.isArray(opts.components)) {
|
|
10752
10755
|
(0, import_testing4.registerComponents)(opts.components);
|
|
10753
10756
|
}
|
|
@@ -10765,7 +10768,7 @@ async function newSpecPage(opts) {
|
|
|
10765
10768
|
(0, import_testing4.setSupportsShadowDom)(true);
|
|
10766
10769
|
}
|
|
10767
10770
|
}
|
|
10768
|
-
|
|
10771
|
+
import_app_data5.BUILD.cssAnnotations = opts.includeAnnotations;
|
|
10769
10772
|
const cmpTags = /* @__PURE__ */ new Set();
|
|
10770
10773
|
import_testing4.win["__stencil_spec_options"] = opts;
|
|
10771
10774
|
const doc = import_testing4.win.document;
|
|
@@ -10773,7 +10776,7 @@ async function newSpecPage(opts) {
|
|
|
10773
10776
|
win: import_testing4.win,
|
|
10774
10777
|
doc,
|
|
10775
10778
|
body: doc.body,
|
|
10776
|
-
build:
|
|
10779
|
+
build: import_app_data5.BUILD,
|
|
10777
10780
|
styles: import_testing4.styles,
|
|
10778
10781
|
setContent: (html) => {
|
|
10779
10782
|
doc.body.innerHTML = html;
|
|
@@ -10811,25 +10814,25 @@ async function newSpecPage(opts) {
|
|
|
10811
10814
|
const cmpCompilerMeta = opts.components.filter((Cstr) => Cstr.COMPILER_META != null).map((Cstr) => Cstr.COMPILER_META);
|
|
10812
10815
|
const cmpBuild = getBuildFeatures(cmpCompilerMeta);
|
|
10813
10816
|
if (opts.strictBuild) {
|
|
10814
|
-
Object.assign(
|
|
10817
|
+
Object.assign(import_app_data5.BUILD, cmpBuild);
|
|
10815
10818
|
} else {
|
|
10816
10819
|
Object.keys(cmpBuild).forEach((key) => {
|
|
10817
10820
|
if (cmpBuild[key] === true) {
|
|
10818
|
-
|
|
10821
|
+
import_app_data5.BUILD[key] = true;
|
|
10819
10822
|
}
|
|
10820
10823
|
});
|
|
10821
10824
|
}
|
|
10822
|
-
|
|
10825
|
+
import_app_data5.BUILD.asyncLoading = true;
|
|
10823
10826
|
if (opts.hydrateClientSide) {
|
|
10824
|
-
|
|
10825
|
-
|
|
10827
|
+
import_app_data5.BUILD.hydrateClientSide = true;
|
|
10828
|
+
import_app_data5.BUILD.hydrateServerSide = false;
|
|
10826
10829
|
} else if (opts.hydrateServerSide) {
|
|
10827
|
-
|
|
10828
|
-
|
|
10830
|
+
import_app_data5.BUILD.hydrateServerSide = true;
|
|
10831
|
+
import_app_data5.BUILD.hydrateClientSide = false;
|
|
10829
10832
|
}
|
|
10830
|
-
|
|
10831
|
-
|
|
10832
|
-
|
|
10833
|
+
import_app_data5.BUILD.cloneNodeFix = false;
|
|
10834
|
+
import_app_data5.BUILD.shadowDomShim = false;
|
|
10835
|
+
import_app_data5.BUILD.attachStyles = !!opts.attachStyles;
|
|
10833
10836
|
if (typeof opts.url === "string") {
|
|
10834
10837
|
page.win.location.href = opts.url;
|
|
10835
10838
|
}
|