@stencil/core 2.19.3 → 3.0.0-alpha.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/bin/stencil +3 -3
- package/cli/index.cjs +3 -5
- package/cli/index.d.ts +3 -3
- package/cli/index.js +3 -5
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +202 -314
- 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/hydrate/runner.d.ts +1 -1
- package/internal/package.json +1 -1
- package/internal/stencil-public-compiler.d.ts +31 -17
- package/internal/stencil-public-runtime.d.ts +12 -12
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +6 -6
- package/mock-doc/index.js +6 -6
- package/mock-doc/package.json +1 -1
- package/package.json +13 -13
- package/screenshot/package.json +1 -1
- package/sys/node/index.js +11 -11
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +15 -13
- package/testing/package.json +1 -1
- package/testing/puppeteer/puppeteer-declarations.d.ts +1 -27
package/mock-doc/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-alpha.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./internal/stencil-core/index.cjs",
|
|
6
6
|
"module": "./internal/stencil-core/index.js",
|
|
@@ -24,16 +24,16 @@
|
|
|
24
24
|
"testing/"
|
|
25
25
|
],
|
|
26
26
|
"scripts": {
|
|
27
|
-
"build": "
|
|
27
|
+
"build": "npm run tsc.scripts && npm run tsc.prod && npm run rollup.prod.ci",
|
|
28
28
|
"clean": "rm -rf build/ cli/ compiler/ dev-server/ internal/ mock-doc/ sys/ testing/ && npm run clean-scripts",
|
|
29
29
|
"clean-scripts": "rm -rf scripts/build",
|
|
30
|
-
"license": "node scripts --license",
|
|
30
|
+
"license": "node scripts/build --license",
|
|
31
31
|
"lint": "eslint 'bin/*' 'scripts/*.ts' 'scripts/**/*.ts' 'src/*.ts' 'src/**/*.ts' 'src/**/*.tsx'",
|
|
32
32
|
"prettier": "npm run prettier.base -- --write",
|
|
33
|
-
"prettier.base": "prettier \"./({bin,scripts,src,test}/**/*.{ts,tsx,js,jsx})|bin/stencil|.github/(**/)?*.(yml|yaml)|*.js\"",
|
|
33
|
+
"prettier.base": "prettier --cache \"./({bin,scripts,src,test}/**/*.{ts,tsx,js,jsx})|bin/stencil|.github/(**/)?*.(yml|yaml)|*.js\"",
|
|
34
34
|
"prettier.dry-run": "npm run prettier.base -- --list-different",
|
|
35
|
-
"release": "node scripts --release --publish",
|
|
36
|
-
"release.prepare": "node scripts --release --prepare",
|
|
35
|
+
"release": "npm run tsc.scripts && node scripts/build --release --publish",
|
|
36
|
+
"release.prepare": "npm run tsc.scripts && node scripts/build --release --prepare",
|
|
37
37
|
"rollup": "rollup --config",
|
|
38
38
|
"rollup.prod": "rollup --config --config-prod",
|
|
39
39
|
"rollup.prod.ci": "rollup --config --config-prod --config-ci",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"test": "jest --coverage",
|
|
43
43
|
"test.analysis": "cd test && npm run analysis.build-and-analyze",
|
|
44
44
|
"test.bundlers": "cd test && npm run bundlers",
|
|
45
|
-
"test.dist": "node scripts --validate-build",
|
|
45
|
+
"test.dist": "node scripts/build --validate-build",
|
|
46
46
|
"test.end-to-end": "cd test/end-to-end && npm ci && npm test && npm run test.dist",
|
|
47
47
|
"test.jest": "jest",
|
|
48
48
|
"test.karma": "cd test/karma && npm ci && npm run karma",
|
|
@@ -53,13 +53,13 @@
|
|
|
53
53
|
"test.watch-all": "jest --watchAll --coverage",
|
|
54
54
|
"tsc": "tsc --incremental",
|
|
55
55
|
"tsc.prod": "tsc",
|
|
56
|
-
"tsc.scripts": "tsc
|
|
56
|
+
"tsc.scripts": "tsc --build --force scripts/tsconfig.json",
|
|
57
57
|
"tsc.watch": "tsc --incremental --watch"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@ionic/prettier-config": "^2.0.0",
|
|
61
61
|
"@rollup/plugin-commonjs": "15.1.0",
|
|
62
|
-
"@rollup/plugin-json": "5.0.
|
|
62
|
+
"@rollup/plugin-json": "5.0.2",
|
|
63
63
|
"@rollup/plugin-node-resolve": "9.0.0",
|
|
64
64
|
"@rollup/plugin-replace": "2.3.4",
|
|
65
65
|
"@rollup/pluginutils": "5.0.2",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"ansi-colors": "4.1.3",
|
|
87
87
|
"autoprefixer": "10.4.13",
|
|
88
88
|
"conventional-changelog-cli": "^2.2.2",
|
|
89
|
-
"dts-bundle-generator": "~7.
|
|
89
|
+
"dts-bundle-generator": "~7.1.0",
|
|
90
90
|
"eslint": "^8.23.1",
|
|
91
91
|
"eslint-config-prettier": "^8.5.0",
|
|
92
92
|
"eslint-plugin-jest": "^27.0.4",
|
|
@@ -110,11 +110,11 @@
|
|
|
110
110
|
"node-fetch": "2.6.7",
|
|
111
111
|
"open": "^8.4.0",
|
|
112
112
|
"open-in-editor": "2.2.0",
|
|
113
|
-
"parse5": "7.1.
|
|
113
|
+
"parse5": "7.1.2",
|
|
114
114
|
"path-browserify": "^1.0.1",
|
|
115
115
|
"pixelmatch": "5.3.0",
|
|
116
116
|
"postcss": "^8.2.8",
|
|
117
|
-
"prettier": "2.
|
|
117
|
+
"prettier": "2.8.0",
|
|
118
118
|
"prompts": "2.4.2",
|
|
119
119
|
"puppeteer": "~10.0.0",
|
|
120
120
|
"rollup": "2.42.3",
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"ws": "7.4.6"
|
|
128
128
|
},
|
|
129
129
|
"engines": {
|
|
130
|
-
"node": ">=
|
|
130
|
+
"node": ">=14.10.0",
|
|
131
131
|
"npm": ">=6.0.0"
|
|
132
132
|
},
|
|
133
133
|
"repository": {
|
package/screenshot/package.json
CHANGED
package/sys/node/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Node System
|
|
2
|
+
Stencil Node System v3.0.0-alpha.0 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
function _interopDefaultLegacy(e) {
|
|
5
5
|
return e && "object" == typeof e && "default" in e ? e : {
|
|
@@ -5686,10 +5686,10 @@ exports.createNodeLogger = e => {
|
|
|
5686
5686
|
} catch (e) {}
|
|
5687
5687
|
return t;
|
|
5688
5688
|
},
|
|
5689
|
-
|
|
5689
|
+
addDestroy(e) {
|
|
5690
5690
|
n.add(e);
|
|
5691
5691
|
},
|
|
5692
|
-
|
|
5692
|
+
removeDestroy(e) {
|
|
5693
5693
|
n.delete(e);
|
|
5694
5694
|
},
|
|
5695
5695
|
applyPrerenderGlobalPatch(e) {
|
|
@@ -5992,9 +5992,9 @@ exports.createNodeLogger = e => {
|
|
|
5992
5992
|
}), n), s = () => {
|
|
5993
5993
|
i.close();
|
|
5994
5994
|
};
|
|
5995
|
-
return f.
|
|
5995
|
+
return f.addDestroy(s), {
|
|
5996
5996
|
close() {
|
|
5997
|
-
f.
|
|
5997
|
+
f.removeDestroy(s), i.close();
|
|
5998
5998
|
}
|
|
5999
5999
|
};
|
|
6000
6000
|
}, f.watchFile = (e, r) => {
|
|
@@ -6005,9 +6005,9 @@ exports.createNodeLogger = e => {
|
|
|
6005
6005
|
})), s = () => {
|
|
6006
6006
|
i.close();
|
|
6007
6007
|
};
|
|
6008
|
-
return f.
|
|
6008
|
+
return f.addDestroy(s), {
|
|
6009
6009
|
close() {
|
|
6010
|
-
f.
|
|
6010
|
+
f.removeDestroy(s), i.close();
|
|
6011
6011
|
}
|
|
6012
6012
|
};
|
|
6013
6013
|
};
|
|
@@ -6111,12 +6111,12 @@ exports.createNodeLogger = e => {
|
|
|
6111
6111
|
maxVersion: "27.0.0"
|
|
6112
6112
|
},
|
|
6113
6113
|
puppeteer: {
|
|
6114
|
-
minVersion: "
|
|
6115
|
-
recommendedVersion: "
|
|
6114
|
+
minVersion: "10.0.0",
|
|
6115
|
+
recommendedVersion: "13.5.2"
|
|
6116
6116
|
},
|
|
6117
6117
|
"puppeteer-core": {
|
|
6118
|
-
minVersion: "
|
|
6119
|
-
recommendedVersion: "5.2
|
|
6118
|
+
minVersion: "10.0.0",
|
|
6119
|
+
recommendedVersion: "13.5.2"
|
|
6120
6120
|
},
|
|
6121
6121
|
"workbox-build": {
|
|
6122
6122
|
minVersion: "4.3.1",
|
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
|
|
2
|
+
Stencil Testing v3.0.0-alpha.0 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
function _lazyRequire(e) {
|
|
5
5
|
return new Proxy({}, {
|
|
@@ -198,11 +198,13 @@ async function runJest(e, t) {
|
|
|
198
198
|
e.flags.ci || e.flags.e2e ? t.__STENCIL_DEFAULT_TIMEOUT__ = "30000" : t.__STENCIL_DEFAULT_TIMEOUT__ = "15000",
|
|
199
199
|
e.flags.devtools && (t.__STENCIL_DEFAULT_TIMEOUT__ = "300000000"), e.logger.debug(`default timeout: ${t.__STENCIL_DEFAULT_TIMEOUT__}`);
|
|
200
200
|
const n = function n(e) {
|
|
201
|
-
const t = require("yargs"), r =
|
|
201
|
+
const t = require("yargs"), r = e.flags.knownArgs.slice();
|
|
202
202
|
r.some((e => e.startsWith("--max-workers") || e.startsWith("--maxWorkers"))) || r.push(`--max-workers=${e.maxConcurrentWorkers}`),
|
|
203
|
-
e.flags.devtools && r.push("--runInBand")
|
|
204
|
-
|
|
205
|
-
|
|
203
|
+
e.flags.devtools && r.push("--runInBand");
|
|
204
|
+
const s = [ ...r, ...e.flags.unknownArgs ];
|
|
205
|
+
e.logger.info(e.logger.magenta(`jest args: ${s.join(" ")}`));
|
|
206
|
+
let n = t(s).argv;
|
|
207
|
+
if (n = {
|
|
206
208
|
detectLeaks: !1,
|
|
207
209
|
"detect-leaks": !1,
|
|
208
210
|
detectOpenHandles: !1,
|
|
@@ -221,8 +223,8 @@ async function runJest(e, t) {
|
|
|
221
223
|
"run-tests-by-path": !1,
|
|
222
224
|
testLocationInResults: !1,
|
|
223
225
|
"test-location-in-results": !1,
|
|
224
|
-
...
|
|
225
|
-
},
|
|
226
|
+
...n
|
|
227
|
+
}, n.config = function o(e) {
|
|
226
228
|
const t = e.testing, r = require("jest-config").defaults, s = Object.keys(r), n = {};
|
|
227
229
|
return Object.keys(t).forEach((e => {
|
|
228
230
|
s.includes(e) && (n[e] = t[e]);
|
|
@@ -234,10 +236,10 @@ async function runJest(e, t) {
|
|
|
234
236
|
Array.isArray(t.reporters) && (n.reporters = t.reporters), isString(t.testResultsProcessor) && (n.testResultsProcessor = t.testResultsProcessor),
|
|
235
237
|
t.transform && (n.transform = t.transform), t.verbose && (n.verbose = t.verbose),
|
|
236
238
|
n.testRunner = "jest-jasmine2", JSON.stringify(n);
|
|
237
|
-
}(e), "string" == typeof
|
|
238
|
-
|
|
239
|
+
}(e), "string" == typeof n.maxWorkers) try {
|
|
240
|
+
n.maxWorkers = parseInt(n.maxWorkers, 10);
|
|
239
241
|
} catch (e) {}
|
|
240
|
-
return "string" == typeof
|
|
242
|
+
return "string" == typeof n.ci && (n.ci = "true" === n.ci || "" === n.ci), n;
|
|
241
243
|
}(e), o = function o(e, t) {
|
|
242
244
|
const r = t.projects ? t.projects : [];
|
|
243
245
|
return r.push(e.rootDir), r;
|
|
@@ -2955,11 +2957,11 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
|
|
|
2955
2957
|
d("/");
|
|
2956
2958
|
const C = {
|
|
2957
2959
|
name: "in-memory",
|
|
2958
|
-
version: "
|
|
2960
|
+
version: "3.0.0-alpha.0",
|
|
2959
2961
|
events: a,
|
|
2960
2962
|
access: async e => u(e),
|
|
2961
2963
|
accessSync: u,
|
|
2962
|
-
|
|
2964
|
+
addDestroy: o,
|
|
2963
2965
|
copyFile: async (e, t) => (E(t, f(e)), !0),
|
|
2964
2966
|
createDir: async (e, t) => d(e, t),
|
|
2965
2967
|
createDirSync: d,
|
|
@@ -3003,7 +3005,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
|
|
|
3003
3005
|
readFileSync: f,
|
|
3004
3006
|
realpath: async e => m(e),
|
|
3005
3007
|
realpathSync: m,
|
|
3006
|
-
|
|
3008
|
+
removeDestroy: i,
|
|
3007
3009
|
rename: async (e, t) => {
|
|
3008
3010
|
const r = {
|
|
3009
3011
|
oldPath: e = normalizePath(e),
|
package/testing/package.json
CHANGED
|
@@ -1,32 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import type { EventInitDict, EventSpy, ScreenshotDiff, ScreenshotOptions } from '@stencil/core/internal';
|
|
3
|
-
import type { ClickOptions, HTTPResponse
|
|
4
|
-
/**
|
|
5
|
-
* This type helps with declaration merging as a part of Stencil's migration from Puppeteer v5.4.3 to v10.0.0. In
|
|
6
|
-
* v5.4.3, `HttpResponse` was an interface whereas v10.0.0 declares it as a class. It is redeclared here to help teams
|
|
7
|
-
* migrate to a newer minor version of Stencil without requiring a Puppeteer upgrade/major version of Stencil. This type
|
|
8
|
-
* should be removed as a part of the Stencil 3.0 release.
|
|
9
|
-
*/
|
|
10
|
-
export declare type HTTPResponse = PuppeteerHTTPResponse;
|
|
11
|
-
/**
|
|
12
|
-
* These types help with declaration merging as a part of Stencil's migration from Puppeteer v5.4.3 to v10.0.0. In
|
|
13
|
-
* v10.0.0, `WaitForOptions` is a renamed version of `NavigationOptions` from v5.4.3, who has had its type hierarchy
|
|
14
|
-
* flattened.
|
|
15
|
-
*
|
|
16
|
-
* See {@link https://github.com/DefinitelyTyped/DefinitelyTyped/blob/8290e943f6b398acf39ee1b2e486824144e15bc8/types/puppeteer/index.d.ts#L605-L622}
|
|
17
|
-
* for the v5.4.3 types.
|
|
18
|
-
*
|
|
19
|
-
* These types are redeclared here to help teams migrate to a newer minor version of Stencil without requiring a
|
|
20
|
-
* Puppeteer upgrade/major version of Stencil. These type additions should be removed as a part of the Stencil 3.0
|
|
21
|
-
* release.
|
|
22
|
-
*/
|
|
23
|
-
declare module 'puppeteer' {
|
|
24
|
-
type LifeCycleEvent = 'load' | 'domcontentloaded' | 'networkidle0' | 'networkidle2';
|
|
25
|
-
interface WaitForOptions {
|
|
26
|
-
timeout?: number;
|
|
27
|
-
waitUntil?: LifeCycleEvent | LifeCycleEvent[];
|
|
28
|
-
}
|
|
29
|
-
}
|
|
3
|
+
import type { ClickOptions, HTTPResponse, Page, ScreenshotOptions as PuppeteerScreenshotOptions, WaitForOptions } from 'puppeteer';
|
|
30
4
|
/**
|
|
31
5
|
* This type was once exported by Puppeteer, but has since moved to an object literal in (Puppeteer’s) native types.
|
|
32
6
|
* Re-create it here as a named type to use across multiple Stencil-related testing files.
|