@stencil/core 2.17.1 → 2.17.3
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/config-flags.d.ts +12 -4
- package/cli/index.cjs +110 -71
- package/cli/index.d.ts +1 -1
- package/cli/index.js +110 -71
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +343 -61
- package/compiler/stencil.min.js +2 -2
- package/dependencies.json +1 -1
- 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/css-shim.js +1 -1
- package/internal/client/dom.js +1 -1
- package/internal/client/index.js +1 -1
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/client/patch-esm.js +1 -1
- package/internal/client/shadow-css.js +1 -1
- package/internal/hydrate/package.json +1 -1
- package/internal/package.json +1 -1
- package/internal/stencil-private.d.ts +12 -2
- package/internal/stencil-public-compiler.d.ts +1 -1
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +41 -3
- package/mock-doc/index.d.ts +15 -0
- package/mock-doc/index.js +41 -3
- 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 +37 -22
- package/testing/mocks.d.ts +7 -6
- package/testing/package.json +1 -1
package/mock-doc/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Mock Doc v2.17.
|
|
2
|
+
Stencil Mock Doc v2.17.3 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
const CONTENT_REF_ID = 'r';
|
|
5
5
|
const ORG_LOCATION_ID = 'o';
|
|
@@ -686,6 +686,25 @@ class MockMouseEvent extends MockEvent {
|
|
|
686
686
|
}
|
|
687
687
|
}
|
|
688
688
|
}
|
|
689
|
+
class MockUIEvent extends MockEvent {
|
|
690
|
+
constructor(type, uiEventInitDic) {
|
|
691
|
+
super(type);
|
|
692
|
+
this.detail = null;
|
|
693
|
+
this.view = null;
|
|
694
|
+
if (uiEventInitDic != null) {
|
|
695
|
+
Object.assign(this, uiEventInitDic);
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
class MockFocusEvent extends MockUIEvent {
|
|
700
|
+
constructor(type, focusEventInitDic) {
|
|
701
|
+
super(type);
|
|
702
|
+
this.relatedTarget = null;
|
|
703
|
+
if (focusEventInitDic != null) {
|
|
704
|
+
Object.assign(this, focusEventInitDic);
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
}
|
|
689
708
|
class MockEventListener {
|
|
690
709
|
constructor(type, handler) {
|
|
691
710
|
this.type = type;
|
|
@@ -1599,7 +1618,7 @@ class MockElement extends MockNode {
|
|
|
1599
1618
|
return shadowRoot;
|
|
1600
1619
|
}
|
|
1601
1620
|
blur() {
|
|
1602
|
-
|
|
1621
|
+
dispatchEvent(this, new MockFocusEvent('blur', { relatedTarget: null, bubbles: true, cancelable: true, composed: true }));
|
|
1603
1622
|
}
|
|
1604
1623
|
get shadowRoot() {
|
|
1605
1624
|
return this.__shadowRoot || null;
|
|
@@ -1669,7 +1688,9 @@ class MockElement extends MockNode {
|
|
|
1669
1688
|
get firstElementChild() {
|
|
1670
1689
|
return this.children[0] || null;
|
|
1671
1690
|
}
|
|
1672
|
-
focus(_options) {
|
|
1691
|
+
focus(_options) {
|
|
1692
|
+
dispatchEvent(this, new MockFocusEvent('focus', { relatedTarget: null, bubbles: true, cancelable: true, composed: true }));
|
|
1693
|
+
}
|
|
1673
1694
|
getAttribute(attrName) {
|
|
1674
1695
|
if (attrName === 'style') {
|
|
1675
1696
|
if (this.__style != null && this.__style.length > 0) {
|
|
@@ -2014,6 +2035,9 @@ class MockElement extends MockNode {
|
|
|
2014
2035
|
set title(value) {
|
|
2015
2036
|
this.setAttributeNS(null, 'title', value);
|
|
2016
2037
|
}
|
|
2038
|
+
animate() {
|
|
2039
|
+
/**/
|
|
2040
|
+
}
|
|
2017
2041
|
onanimationstart() {
|
|
2018
2042
|
/**/
|
|
2019
2043
|
}
|
|
@@ -2278,6 +2302,18 @@ class MockElement extends MockNode {
|
|
|
2278
2302
|
onwheel() {
|
|
2279
2303
|
/**/
|
|
2280
2304
|
}
|
|
2305
|
+
requestFullscreen() {
|
|
2306
|
+
/**/
|
|
2307
|
+
}
|
|
2308
|
+
scrollBy() {
|
|
2309
|
+
/**/
|
|
2310
|
+
}
|
|
2311
|
+
scrollTo() {
|
|
2312
|
+
/**/
|
|
2313
|
+
}
|
|
2314
|
+
scrollIntoView() {
|
|
2315
|
+
/**/
|
|
2316
|
+
}
|
|
2281
2317
|
toString(opts) {
|
|
2282
2318
|
return serializeNodeToHtml(this, opts);
|
|
2283
2319
|
}
|
|
@@ -3428,6 +3464,7 @@ const WINDOW_PROPS = [
|
|
|
3428
3464
|
'HTMLElement',
|
|
3429
3465
|
'Node',
|
|
3430
3466
|
'NodeList',
|
|
3467
|
+
'FocusEvent',
|
|
3431
3468
|
'KeyboardEvent',
|
|
3432
3469
|
'MouseEvent',
|
|
3433
3470
|
];
|
|
@@ -3435,6 +3472,7 @@ const GLOBAL_CONSTRUCTORS = [
|
|
|
3435
3472
|
['CustomEvent', MockCustomEvent],
|
|
3436
3473
|
['Event', MockEvent],
|
|
3437
3474
|
['Headers', MockHeaders],
|
|
3475
|
+
['FocusEvent', MockFocusEvent],
|
|
3438
3476
|
['KeyboardEvent', MockKeyboardEvent],
|
|
3439
3477
|
['MouseEvent', MockMouseEvent],
|
|
3440
3478
|
['Request', MockRequest],
|
package/mock-doc/package.json
CHANGED
package/package.json
CHANGED
package/screenshot/package.json
CHANGED
package/sys/node/index.js
CHANGED
package/sys/node/package.json
CHANGED
package/sys/node/worker.js
CHANGED
package/testing/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Testing v2.17.
|
|
2
|
+
Stencil Testing v2.17.3 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
function _lazyRequire(e) {
|
|
5
5
|
return new Proxy({}, {
|
|
@@ -449,38 +449,40 @@ function versionIncluded(e) {
|
|
|
449
449
|
return matchesRange(e);
|
|
450
450
|
}
|
|
451
451
|
|
|
452
|
-
function mockConfig(e) {
|
|
452
|
+
function mockConfig(e = {}) {
|
|
453
453
|
const t = path__default.default.resolve("/");
|
|
454
|
-
|
|
454
|
+
let {sys: r} = e;
|
|
455
|
+
return r || (r = createTestingSystem()), r.getCurrentDirectory = () => t, {
|
|
455
456
|
_isTesting: !0,
|
|
456
|
-
namespace: "Testing",
|
|
457
|
-
rootDir: t,
|
|
458
|
-
globalScript: null,
|
|
459
|
-
devMode: !0,
|
|
460
|
-
enableCache: !1,
|
|
461
457
|
buildAppCore: !1,
|
|
462
458
|
buildDist: !0,
|
|
463
|
-
flags: {},
|
|
464
|
-
bundles: null,
|
|
465
|
-
outputTargets: null,
|
|
466
459
|
buildEs5: !1,
|
|
460
|
+
bundles: null,
|
|
461
|
+
devMode: !0,
|
|
462
|
+
enableCache: !1,
|
|
463
|
+
extras: {},
|
|
464
|
+
flags: createConfigFlags(),
|
|
465
|
+
globalScript: null,
|
|
467
466
|
hashFileNames: !1,
|
|
468
467
|
logger: new TestingLogger,
|
|
469
468
|
maxConcurrentWorkers: 0,
|
|
470
469
|
minifyCss: !1,
|
|
471
470
|
minifyJs: !1,
|
|
472
|
-
|
|
473
|
-
testing: null,
|
|
474
|
-
validateTypes: !1,
|
|
475
|
-
extras: {},
|
|
471
|
+
namespace: "Testing",
|
|
476
472
|
nodeResolve: {
|
|
477
473
|
customResolveOptions: {}
|
|
478
474
|
},
|
|
479
|
-
|
|
475
|
+
outputTargets: null,
|
|
480
476
|
rollupPlugins: {
|
|
481
477
|
before: [],
|
|
482
478
|
after: []
|
|
483
|
-
}
|
|
479
|
+
},
|
|
480
|
+
rootDir: t,
|
|
481
|
+
sourceMap: !0,
|
|
482
|
+
sys: r,
|
|
483
|
+
testing: null,
|
|
484
|
+
validateTypes: !1,
|
|
485
|
+
...e
|
|
484
486
|
};
|
|
485
487
|
}
|
|
486
488
|
|
|
@@ -2893,7 +2895,7 @@ const createSystem = e => {
|
|
|
2893
2895
|
u("/");
|
|
2894
2896
|
const S = {
|
|
2895
2897
|
name: "in-memory",
|
|
2896
|
-
version: "2.17.
|
|
2898
|
+
version: "2.17.3",
|
|
2897
2899
|
events: i,
|
|
2898
2900
|
access: async e => c(e),
|
|
2899
2901
|
accessSync: c,
|
|
@@ -3265,6 +3267,14 @@ class TestingLogger {
|
|
|
3265
3267
|
printDiagnostics(e) {}
|
|
3266
3268
|
}
|
|
3267
3269
|
|
|
3270
|
+
const createConfigFlags = (e = {}) => ({
|
|
3271
|
+
task: null,
|
|
3272
|
+
args: [],
|
|
3273
|
+
knownArgs: [],
|
|
3274
|
+
unknownArgs: [],
|
|
3275
|
+
...e
|
|
3276
|
+
});
|
|
3277
|
+
|
|
3268
3278
|
class EventSpy {
|
|
3269
3279
|
constructor(e) {
|
|
3270
3280
|
this.eventName = e, this.events = [], this.cursor = 0, this.queuedHandler = [];
|
|
@@ -3830,11 +3840,16 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
3830
3840
|
hasVdomText: !1,
|
|
3831
3841
|
hasVdomXlink: !1,
|
|
3832
3842
|
...e
|
|
3833
|
-
}), exports.mockValidatedConfig = function mockValidatedConfig(e) {
|
|
3843
|
+
}), exports.mockValidatedConfig = function mockValidatedConfig(e = {}) {
|
|
3844
|
+
var t;
|
|
3845
|
+
const r = mockConfig(e);
|
|
3834
3846
|
return {
|
|
3835
|
-
...
|
|
3836
|
-
flags:
|
|
3837
|
-
logger: mockLogger()
|
|
3847
|
+
...r,
|
|
3848
|
+
flags: createConfigFlags(),
|
|
3849
|
+
logger: mockLogger(),
|
|
3850
|
+
outputTargets: null !== (t = r.outputTargets) && void 0 !== t ? t : [],
|
|
3851
|
+
sys: createTestingSystem(),
|
|
3852
|
+
...e
|
|
3838
3853
|
};
|
|
3839
3854
|
}, exports.mockWindow = function mockWindow(e = null) {
|
|
3840
3855
|
return new index_cjs.MockWindow(e);
|
package/testing/mocks.d.ts
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import type { BuildCtx, Cache, CompilerCtx,
|
|
1
|
+
import type { BuildCtx, Cache, CompilerCtx, Config, LoadConfigInit, ValidatedConfig, Module, UnvalidatedConfig } from '@stencil/core/internal';
|
|
2
2
|
import { TestingSystem } from './testing-sys';
|
|
3
3
|
import { TestingLogger } from './testing-logger';
|
|
4
4
|
/**
|
|
5
5
|
* Creates a mock instance of an internal, validated Stencil configuration object
|
|
6
|
-
* @param sys an optional compiler system to associate with the config. If one is not provided, one will be created for
|
|
7
6
|
* the caller
|
|
7
|
+
* @param overrides a partial implementation of `ValidatedConfig`. Any provided fields will override the defaults
|
|
8
|
+
* provided by this function.
|
|
8
9
|
* @returns the mock Stencil configuration
|
|
9
10
|
*/
|
|
10
|
-
export declare function mockValidatedConfig(
|
|
11
|
+
export declare function mockValidatedConfig(overrides?: Partial<ValidatedConfig>): ValidatedConfig;
|
|
11
12
|
/**
|
|
12
13
|
* Creates a mock instance of a Stencil configuration entity. The mocked configuration has no guarantees around the
|
|
13
14
|
* types/validity of its data.
|
|
14
|
-
* @param
|
|
15
|
-
*
|
|
15
|
+
* @param overrides a partial implementation of `UnvalidatedConfig`. Any provided fields will override the defaults
|
|
16
|
+
* provided by this function.
|
|
16
17
|
* @returns the mock Stencil configuration
|
|
17
18
|
*/
|
|
18
|
-
export declare function mockConfig(
|
|
19
|
+
export declare function mockConfig(overrides?: Partial<UnvalidatedConfig>): UnvalidatedConfig;
|
|
19
20
|
/**
|
|
20
21
|
* Creates a configuration object used to bootstrap a Stencil task invocation
|
|
21
22
|
*
|