@stencil/core 2.17.2-0 → 2.17.2
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 +94 -67
- package/cli/index.d.ts +1 -1
- package/cli/index.js +94 -67
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +292 -54
- 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 +16 -1
- package/mock-doc/index.d.ts +5 -0
- package/mock-doc/index.js +16 -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 +28 -21
- package/testing/mocks.d.ts +7 -6
- package/testing/package.json +1 -1
package/sys/node/worker.js
CHANGED
package/testing/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Testing v2.17.2
|
|
2
|
+
Stencil Testing v2.17.2 | 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: createConfigFlags(),
|
|
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.2
|
|
2898
|
+
version: "2.17.2",
|
|
2897
2899
|
events: i,
|
|
2898
2900
|
access: async e => c(e),
|
|
2899
2901
|
accessSync: c,
|
|
@@ -3838,11 +3840,16 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
3838
3840
|
hasVdomText: !1,
|
|
3839
3841
|
hasVdomXlink: !1,
|
|
3840
3842
|
...e
|
|
3841
|
-
}), exports.mockValidatedConfig = function mockValidatedConfig(e) {
|
|
3843
|
+
}), exports.mockValidatedConfig = function mockValidatedConfig(e = {}) {
|
|
3844
|
+
var t;
|
|
3845
|
+
const r = mockConfig(e);
|
|
3842
3846
|
return {
|
|
3843
|
-
...
|
|
3847
|
+
...r,
|
|
3844
3848
|
flags: createConfigFlags(),
|
|
3845
|
-
logger: mockLogger()
|
|
3849
|
+
logger: mockLogger(),
|
|
3850
|
+
outputTargets: null !== (t = r.outputTargets) && void 0 !== t ? t : [],
|
|
3851
|
+
sys: createTestingSystem(),
|
|
3852
|
+
...e
|
|
3846
3853
|
};
|
|
3847
3854
|
}, exports.mockWindow = function mockWindow(e = null) {
|
|
3848
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
|
*
|