@stencil/core 2.11.0-0 → 2.13.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 +20 -4
- package/cli/index.js +20 -4
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +211 -483
- 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 +11 -7
- 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/index.js +2 -1
- package/internal/hydrate/package.json +1 -1
- package/internal/package.json +1 -1
- package/internal/stencil-public-compiler.d.ts +1 -1
- package/internal/stencil-public-runtime.d.ts +6 -4
- package/internal/testing/index.js +15 -13
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +20 -2
- package/mock-doc/index.d.ts +1 -0
- package/mock-doc/index.js +20 -2
- package/mock-doc/package.json +1 -1
- package/package.json +6 -6
- package/readme.md +52 -85
- package/screenshot/package.json +1 -1
- package/sys/node/autoprefixer.js +2 -2
- package/sys/node/index.js +17 -16
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +419 -390
- package/testing/jest/jest-config.d.ts +11 -0
- package/testing/jest/jest-environment.d.ts +1 -0
- package/testing/jest/jest-preprocessor.d.ts +56 -8
- package/testing/jest/jest-runner.d.ts +4 -0
- package/testing/jest-preset.js +5 -0
- package/testing/package.json +1 -1
package/cli/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil CLI (CommonJS) v2.
|
|
2
|
+
Stencil CLI (CommonJS) v2.13.0 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
@@ -33,6 +33,16 @@ const dashToPascalCase = (str) => toLowerCase(str)
|
|
|
33
33
|
const isFunction = (v) => typeof v === 'function';
|
|
34
34
|
const isString = (v) => typeof v === 'string';
|
|
35
35
|
|
|
36
|
+
/**
|
|
37
|
+
* Builds a template `Diagnostic` entity for a build error. The created `Diagnostic` is returned, and have little
|
|
38
|
+
* detail attached to it regarding the specifics of the error - it is the responsibility of the caller of this method
|
|
39
|
+
* to attach the specifics of the error message.
|
|
40
|
+
*
|
|
41
|
+
* The created `Diagnostic` is pushed to the `diagnostics` argument as a side effect of calling this method.
|
|
42
|
+
*
|
|
43
|
+
* @param diagnostics the existing diagnostics that the created template `Diagnostic` should be added to
|
|
44
|
+
* @returns the created `Diagnostic`
|
|
45
|
+
*/
|
|
36
46
|
const buildError = (diagnostics) => {
|
|
37
47
|
const diagnostic = {
|
|
38
48
|
level: 'error',
|
|
@@ -79,6 +89,12 @@ const catchError = (diagnostics, err, msg) => {
|
|
|
79
89
|
}
|
|
80
90
|
return diagnostic;
|
|
81
91
|
};
|
|
92
|
+
/**
|
|
93
|
+
* Determine if the provided diagnostics have any build errors
|
|
94
|
+
* @param diagnostics the diagnostics to inspect
|
|
95
|
+
* @returns true if any of the diagnostics in the list provided are errors that did not occur at runtime. false
|
|
96
|
+
* otherwise.
|
|
97
|
+
*/
|
|
82
98
|
const hasError = (diagnostics) => {
|
|
83
99
|
if (diagnostics == null || diagnostics.length === 0) {
|
|
84
100
|
return false;
|
|
@@ -490,7 +506,7 @@ const getNpmConfigEnvArgs = (sys) => {
|
|
|
490
506
|
const dependencies = [
|
|
491
507
|
{
|
|
492
508
|
name: "@stencil/core",
|
|
493
|
-
version: "2.
|
|
509
|
+
version: "2.13.0",
|
|
494
510
|
main: "compiler/stencil.js",
|
|
495
511
|
resources: [
|
|
496
512
|
"package.json",
|
|
@@ -1689,7 +1705,7 @@ const runTask = async (coreCompiler, config, task, sys) => {
|
|
|
1689
1705
|
await taskGenerate(coreCompiler, config);
|
|
1690
1706
|
break;
|
|
1691
1707
|
case 'help':
|
|
1692
|
-
taskHelp(config, config.logger, sys);
|
|
1708
|
+
await taskHelp(config, config.logger, sys);
|
|
1693
1709
|
break;
|
|
1694
1710
|
case 'prerender':
|
|
1695
1711
|
await taskPrerender(coreCompiler, config);
|
|
@@ -1711,7 +1727,7 @@ const runTask = async (coreCompiler, config, task, sys) => {
|
|
|
1711
1727
|
break;
|
|
1712
1728
|
default:
|
|
1713
1729
|
config.logger.error(`${config.logger.emoji('❌ ')}Invalid stencil command, please see the options below:`);
|
|
1714
|
-
taskHelp(config, config.logger, sys);
|
|
1730
|
+
await taskHelp(config, config.logger, sys);
|
|
1715
1731
|
return config.sys.exit(1);
|
|
1716
1732
|
}
|
|
1717
1733
|
};
|
package/cli/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil CLI v2.
|
|
2
|
+
Stencil CLI v2.13.0 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
const toLowerCase = (str) => str.toLowerCase();
|
|
5
5
|
const dashToPascalCase = (str) => toLowerCase(str)
|
|
@@ -9,6 +9,16 @@ const dashToPascalCase = (str) => toLowerCase(str)
|
|
|
9
9
|
const isFunction = (v) => typeof v === 'function';
|
|
10
10
|
const isString = (v) => typeof v === 'string';
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Builds a template `Diagnostic` entity for a build error. The created `Diagnostic` is returned, and have little
|
|
14
|
+
* detail attached to it regarding the specifics of the error - it is the responsibility of the caller of this method
|
|
15
|
+
* to attach the specifics of the error message.
|
|
16
|
+
*
|
|
17
|
+
* The created `Diagnostic` is pushed to the `diagnostics` argument as a side effect of calling this method.
|
|
18
|
+
*
|
|
19
|
+
* @param diagnostics the existing diagnostics that the created template `Diagnostic` should be added to
|
|
20
|
+
* @returns the created `Diagnostic`
|
|
21
|
+
*/
|
|
12
22
|
const buildError = (diagnostics) => {
|
|
13
23
|
const diagnostic = {
|
|
14
24
|
level: 'error',
|
|
@@ -55,6 +65,12 @@ const catchError = (diagnostics, err, msg) => {
|
|
|
55
65
|
}
|
|
56
66
|
return diagnostic;
|
|
57
67
|
};
|
|
68
|
+
/**
|
|
69
|
+
* Determine if the provided diagnostics have any build errors
|
|
70
|
+
* @param diagnostics the diagnostics to inspect
|
|
71
|
+
* @returns true if any of the diagnostics in the list provided are errors that did not occur at runtime. false
|
|
72
|
+
* otherwise.
|
|
73
|
+
*/
|
|
58
74
|
const hasError = (diagnostics) => {
|
|
59
75
|
if (diagnostics == null || diagnostics.length === 0) {
|
|
60
76
|
return false;
|
|
@@ -466,7 +482,7 @@ const getNpmConfigEnvArgs = (sys) => {
|
|
|
466
482
|
const dependencies = [
|
|
467
483
|
{
|
|
468
484
|
name: "@stencil/core",
|
|
469
|
-
version: "2.
|
|
485
|
+
version: "2.13.0",
|
|
470
486
|
main: "compiler/stencil.js",
|
|
471
487
|
resources: [
|
|
472
488
|
"package.json",
|
|
@@ -1665,7 +1681,7 @@ const runTask = async (coreCompiler, config, task, sys) => {
|
|
|
1665
1681
|
await taskGenerate(coreCompiler, config);
|
|
1666
1682
|
break;
|
|
1667
1683
|
case 'help':
|
|
1668
|
-
taskHelp(config, config.logger, sys);
|
|
1684
|
+
await taskHelp(config, config.logger, sys);
|
|
1669
1685
|
break;
|
|
1670
1686
|
case 'prerender':
|
|
1671
1687
|
await taskPrerender(coreCompiler, config);
|
|
@@ -1687,7 +1703,7 @@ const runTask = async (coreCompiler, config, task, sys) => {
|
|
|
1687
1703
|
break;
|
|
1688
1704
|
default:
|
|
1689
1705
|
config.logger.error(`${config.logger.emoji('❌ ')}Invalid stencil command, please see the options below:`);
|
|
1690
|
-
taskHelp(config, config.logger, sys);
|
|
1706
|
+
await taskHelp(config, config.logger, sys);
|
|
1691
1707
|
return config.sys.exit(1);
|
|
1692
1708
|
}
|
|
1693
1709
|
};
|
package/cli/package.json
CHANGED