@stencil/core 4.40.1-dev.1766639216.64f6089 → 4.40.1-dev.1766985084.e893bd1
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 +99 -84
- package/dev-server/client/index.js +12 -12
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +3 -3
- package/dev-server/index.js +2 -2
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +6 -6
- package/internal/app-data/package.json +1 -1
- package/internal/app-globals/package.json +1 -1
- package/internal/client/index.js +17 -3
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +17 -3
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +196 -135
- package/internal/package.json +1 -1
- package/internal/testing/index.js +666 -620
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +192 -135
- package/mock-doc/index.js +193 -135
- package/mock-doc/package.json +1 -1
- package/package.json +1 -1
- package/screenshot/index.js +29 -8
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/sys/node/index.js +32 -32
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +89 -68
- 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.40.1-dev.
|
|
2
|
+
Stencil Node System Worker v4.40.1-dev.1766985084.e893bd1 | 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.40.1-dev.
|
|
2
|
+
Stencil Testing v4.40.1-dev.1766985084.e893bd1 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
@@ -2032,6 +2032,8 @@ function newBrowserPage(browser) {
|
|
|
2032
2032
|
// src/testing/jest/jest-27-and-under/jest-environment.ts
|
|
2033
2033
|
function createJestPuppeteerEnvironment() {
|
|
2034
2034
|
const JestEnvironment = class extends import_jest_environment_node.default {
|
|
2035
|
+
browser;
|
|
2036
|
+
pages;
|
|
2035
2037
|
constructor(config) {
|
|
2036
2038
|
super(config);
|
|
2037
2039
|
this.browser = null;
|
|
@@ -2039,8 +2041,9 @@ function createJestPuppeteerEnvironment() {
|
|
|
2039
2041
|
}
|
|
2040
2042
|
async setup() {
|
|
2041
2043
|
if (process.env.__STENCIL_E2E_TESTS__ === "true") {
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
+
const globalContext = this.global;
|
|
2045
|
+
globalContext.__NEW_TEST_PAGE__ = this.newPuppeteerPage.bind(this);
|
|
2046
|
+
globalContext.__CLOSE_OPEN_PAGES__ = this.closeOpenPages.bind(this);
|
|
2044
2047
|
}
|
|
2045
2048
|
}
|
|
2046
2049
|
async newPuppeteerPage() {
|
|
@@ -4767,15 +4770,15 @@ var mockFetch = {
|
|
|
4767
4770
|
reset: mockFetchReset
|
|
4768
4771
|
};
|
|
4769
4772
|
var MockResponse404 = class extends import_mock_doc.MockResponse {
|
|
4773
|
+
ok = false;
|
|
4774
|
+
status = 404;
|
|
4775
|
+
statusText = "Not Found";
|
|
4770
4776
|
constructor() {
|
|
4771
4777
|
super("", {
|
|
4772
4778
|
headers: new import_mock_doc.MockHeaders({
|
|
4773
4779
|
"Content-Type": "text/plain"
|
|
4774
4780
|
})
|
|
4775
4781
|
});
|
|
4776
|
-
this.ok = false;
|
|
4777
|
-
this.status = 404;
|
|
4778
|
-
this.statusText = "Not Found";
|
|
4779
4782
|
}
|
|
4780
4783
|
async json() {
|
|
4781
4784
|
return { status: 404, statusText: "Not Found" };
|
|
@@ -5366,17 +5369,20 @@ var Jest27Stencil = class {
|
|
|
5366
5369
|
var import_jest_environment_node2 = require("jest-environment-node");
|
|
5367
5370
|
function createJestPuppeteerEnvironment2() {
|
|
5368
5371
|
const JestEnvironment = class extends import_jest_environment_node2.TestEnvironment {
|
|
5372
|
+
browser;
|
|
5373
|
+
pages;
|
|
5374
|
+
testPath;
|
|
5369
5375
|
constructor(config, context) {
|
|
5370
5376
|
super(config, context);
|
|
5371
5377
|
this.browser = null;
|
|
5372
5378
|
this.pages = [];
|
|
5373
|
-
this.testPath = null;
|
|
5374
5379
|
this.testPath = context.testPath;
|
|
5375
5380
|
}
|
|
5376
5381
|
async setup() {
|
|
5377
5382
|
if (process.env.__STENCIL_E2E_TESTS__ === "true") {
|
|
5378
|
-
|
|
5379
|
-
|
|
5383
|
+
const globalContext = this.global;
|
|
5384
|
+
globalContext.__NEW_TEST_PAGE__ = this.newPuppeteerPage.bind(this);
|
|
5385
|
+
globalContext.__CLOSE_OPEN_PAGES__ = this.closeOpenPages.bind(this);
|
|
5380
5386
|
}
|
|
5381
5387
|
}
|
|
5382
5388
|
/**
|
|
@@ -5397,7 +5403,8 @@ function createJestPuppeteerEnvironment2() {
|
|
|
5397
5403
|
fullName = `${currentParent.name} ${fullName}`;
|
|
5398
5404
|
currentParent = currentParent.parent;
|
|
5399
5405
|
}
|
|
5400
|
-
this.global
|
|
5406
|
+
const globalContext = this.global;
|
|
5407
|
+
globalContext.currentSpec = {
|
|
5401
5408
|
// the event's test's name is analogous to the original description in earlier versions of jest
|
|
5402
5409
|
description: eventTest.name,
|
|
5403
5410
|
fullName,
|
|
@@ -6399,17 +6406,20 @@ var Jest28Stencil = class {
|
|
|
6399
6406
|
var import_jest_environment_node3 = require("jest-environment-node");
|
|
6400
6407
|
function createJestPuppeteerEnvironment3() {
|
|
6401
6408
|
const JestEnvironment = class extends import_jest_environment_node3.TestEnvironment {
|
|
6409
|
+
browser;
|
|
6410
|
+
pages;
|
|
6411
|
+
testPath;
|
|
6402
6412
|
constructor(config, context) {
|
|
6403
6413
|
super(config, context);
|
|
6404
6414
|
this.browser = null;
|
|
6405
6415
|
this.pages = [];
|
|
6406
|
-
this.testPath = null;
|
|
6407
6416
|
this.testPath = context.testPath;
|
|
6408
6417
|
}
|
|
6409
6418
|
async setup() {
|
|
6410
6419
|
if (process.env.__STENCIL_E2E_TESTS__ === "true") {
|
|
6411
|
-
|
|
6412
|
-
|
|
6420
|
+
const globalContext = this.global;
|
|
6421
|
+
globalContext.__NEW_TEST_PAGE__ = this.newPuppeteerPage.bind(this);
|
|
6422
|
+
globalContext.__CLOSE_OPEN_PAGES__ = this.closeOpenPages.bind(this);
|
|
6413
6423
|
}
|
|
6414
6424
|
}
|
|
6415
6425
|
/**
|
|
@@ -6430,7 +6440,8 @@ function createJestPuppeteerEnvironment3() {
|
|
|
6430
6440
|
fullName = `${currentParent.name} ${fullName}`;
|
|
6431
6441
|
currentParent = currentParent.parent;
|
|
6432
6442
|
}
|
|
6433
|
-
this.global
|
|
6443
|
+
const globalContext = this.global;
|
|
6444
|
+
globalContext.currentSpec = {
|
|
6434
6445
|
// the event's test's name is analogous to the original description in earlier versions of jest
|
|
6435
6446
|
description: eventTest.name,
|
|
6436
6447
|
fullName,
|
|
@@ -8908,52 +8919,61 @@ var validateConfig = (userConfig = {}, bootstrapConfig) => {
|
|
|
8908
8919
|
|
|
8909
8920
|
// src/compiler/build/build-ctx.ts
|
|
8910
8921
|
var BuildContext = class {
|
|
8922
|
+
buildId = -1;
|
|
8923
|
+
buildMessages = [];
|
|
8924
|
+
buildResults = null;
|
|
8925
|
+
bundleBuildCount = 0;
|
|
8926
|
+
collections = [];
|
|
8927
|
+
completedTasks = [];
|
|
8928
|
+
compilerCtx;
|
|
8929
|
+
components = [];
|
|
8930
|
+
componentGraph = /* @__PURE__ */ new Map();
|
|
8931
|
+
config;
|
|
8932
|
+
data = {};
|
|
8933
|
+
buildStats = void 0;
|
|
8934
|
+
esmBrowserComponentBundle;
|
|
8935
|
+
esmComponentBundle;
|
|
8936
|
+
es5ComponentBundle;
|
|
8937
|
+
systemComponentBundle;
|
|
8938
|
+
commonJsComponentBundle;
|
|
8939
|
+
diagnostics = [];
|
|
8940
|
+
dirsAdded = [];
|
|
8941
|
+
dirsDeleted = [];
|
|
8942
|
+
entryModules = [];
|
|
8943
|
+
filesAdded = [];
|
|
8944
|
+
filesChanged = [];
|
|
8945
|
+
filesDeleted = [];
|
|
8946
|
+
filesUpdated = [];
|
|
8947
|
+
filesWritten = [];
|
|
8948
|
+
globalStyle = void 0;
|
|
8949
|
+
hasConfigChanges = false;
|
|
8950
|
+
hasFinished = false;
|
|
8951
|
+
hasHtmlChanges = false;
|
|
8952
|
+
hasPrintedResults = false;
|
|
8953
|
+
hasServiceWorkerChanges = false;
|
|
8954
|
+
hasScriptChanges = true;
|
|
8955
|
+
hasStyleChanges = true;
|
|
8956
|
+
hydrateAppFilePath = null;
|
|
8957
|
+
indexBuildCount = 0;
|
|
8958
|
+
indexDoc = void 0;
|
|
8959
|
+
isRebuild = false;
|
|
8960
|
+
moduleFiles = [];
|
|
8961
|
+
outputs = [];
|
|
8962
|
+
packageJson = {};
|
|
8963
|
+
packageJsonFilePath = null;
|
|
8964
|
+
pendingCopyTasks = [];
|
|
8965
|
+
requiresFullBuild = true;
|
|
8966
|
+
scriptsAdded = [];
|
|
8967
|
+
scriptsDeleted = [];
|
|
8968
|
+
startTime = Date.now();
|
|
8969
|
+
styleBuildCount = 0;
|
|
8970
|
+
stylesPromise = null;
|
|
8971
|
+
stylesUpdated = [];
|
|
8972
|
+
timeSpan = null;
|
|
8973
|
+
timestamp;
|
|
8974
|
+
transpileBuildCount = 0;
|
|
8975
|
+
validateTypesPromise;
|
|
8911
8976
|
constructor(config, compilerCtx) {
|
|
8912
|
-
this.buildId = -1;
|
|
8913
|
-
this.buildMessages = [];
|
|
8914
|
-
this.buildResults = null;
|
|
8915
|
-
this.bundleBuildCount = 0;
|
|
8916
|
-
this.collections = [];
|
|
8917
|
-
this.completedTasks = [];
|
|
8918
|
-
this.components = [];
|
|
8919
|
-
this.componentGraph = /* @__PURE__ */ new Map();
|
|
8920
|
-
this.data = {};
|
|
8921
|
-
this.buildStats = void 0;
|
|
8922
|
-
this.diagnostics = [];
|
|
8923
|
-
this.dirsAdded = [];
|
|
8924
|
-
this.dirsDeleted = [];
|
|
8925
|
-
this.entryModules = [];
|
|
8926
|
-
this.filesAdded = [];
|
|
8927
|
-
this.filesChanged = [];
|
|
8928
|
-
this.filesDeleted = [];
|
|
8929
|
-
this.filesUpdated = [];
|
|
8930
|
-
this.filesWritten = [];
|
|
8931
|
-
this.globalStyle = void 0;
|
|
8932
|
-
this.hasConfigChanges = false;
|
|
8933
|
-
this.hasFinished = false;
|
|
8934
|
-
this.hasHtmlChanges = false;
|
|
8935
|
-
this.hasPrintedResults = false;
|
|
8936
|
-
this.hasServiceWorkerChanges = false;
|
|
8937
|
-
this.hasScriptChanges = true;
|
|
8938
|
-
this.hasStyleChanges = true;
|
|
8939
|
-
this.hydrateAppFilePath = null;
|
|
8940
|
-
this.indexBuildCount = 0;
|
|
8941
|
-
this.indexDoc = void 0;
|
|
8942
|
-
this.isRebuild = false;
|
|
8943
|
-
this.moduleFiles = [];
|
|
8944
|
-
this.outputs = [];
|
|
8945
|
-
this.packageJson = {};
|
|
8946
|
-
this.packageJsonFilePath = null;
|
|
8947
|
-
this.pendingCopyTasks = [];
|
|
8948
|
-
this.requiresFullBuild = true;
|
|
8949
|
-
this.scriptsAdded = [];
|
|
8950
|
-
this.scriptsDeleted = [];
|
|
8951
|
-
this.startTime = Date.now();
|
|
8952
|
-
this.styleBuildCount = 0;
|
|
8953
|
-
this.stylesPromise = null;
|
|
8954
|
-
this.stylesUpdated = [];
|
|
8955
|
-
this.timeSpan = null;
|
|
8956
|
-
this.transpileBuildCount = 0;
|
|
8957
8977
|
this.config = validateConfig(config, {}).config;
|
|
8958
8978
|
this.compilerCtx = compilerCtx;
|
|
8959
8979
|
this.buildId = ++this.compilerCtx.activeBuildId;
|
|
@@ -9086,11 +9106,14 @@ var Cache = class {
|
|
|
9086
9106
|
constructor(config, cacheFs) {
|
|
9087
9107
|
this.config = config;
|
|
9088
9108
|
this.cacheFs = cacheFs;
|
|
9089
|
-
this.failed = 0;
|
|
9090
|
-
this.skip = false;
|
|
9091
9109
|
this.sys = config.sys;
|
|
9092
9110
|
this.logger = config.logger;
|
|
9093
9111
|
}
|
|
9112
|
+
failed = 0;
|
|
9113
|
+
skip = false;
|
|
9114
|
+
sys;
|
|
9115
|
+
logger;
|
|
9116
|
+
buildCacheDir;
|
|
9094
9117
|
async initCacheDir() {
|
|
9095
9118
|
if (this.config._isTesting || !this.config.cacheDir) {
|
|
9096
9119
|
return;
|
|
@@ -10065,9 +10088,7 @@ var stubComponentCompilerMeta = (overrides = {}) => ({
|
|
|
10065
10088
|
|
|
10066
10089
|
// src/testing/testing-logger.ts
|
|
10067
10090
|
var TestingLogger = class {
|
|
10068
|
-
|
|
10069
|
-
this.isEnabled = false;
|
|
10070
|
-
}
|
|
10091
|
+
isEnabled = false;
|
|
10071
10092
|
enable() {
|
|
10072
10093
|
this.isEnabled = true;
|
|
10073
10094
|
}
|
|
@@ -11074,10 +11095,10 @@ async function waitForEvent(page, eventName, elementHandle) {
|
|
|
11074
11095
|
var EventSpy = class {
|
|
11075
11096
|
constructor(eventName) {
|
|
11076
11097
|
this.eventName = eventName;
|
|
11077
|
-
this.events = [];
|
|
11078
|
-
this.cursor = 0;
|
|
11079
|
-
this.queuedHandler = [];
|
|
11080
11098
|
}
|
|
11099
|
+
events = [];
|
|
11100
|
+
cursor = 0;
|
|
11101
|
+
queuedHandler = [];
|
|
11081
11102
|
get length() {
|
|
11082
11103
|
return this.events.length;
|
|
11083
11104
|
}
|
|
@@ -11227,9 +11248,9 @@ var E2EElement = class extends import_mock_doc19.MockHTMLElement {
|
|
|
11227
11248
|
super(null, null);
|
|
11228
11249
|
this._page = _page;
|
|
11229
11250
|
this._elmHandle = _elmHandle;
|
|
11230
|
-
this._queuedActions = [];
|
|
11231
11251
|
_page._e2eElements.push(this);
|
|
11232
11252
|
}
|
|
11253
|
+
_queuedActions = [];
|
|
11233
11254
|
_queueAction(action) {
|
|
11234
11255
|
this._queuedActions.push(action);
|
|
11235
11256
|
}
|