@stencil/core 2.19.2 → 2.20.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/config-flags.d.ts +31 -19
- package/cli/index.cjs +359 -188
- package/cli/index.js +359 -188
- package/cli/package.json +1 -1
- package/compiler/lib.dom.d.ts +130 -185
- package/compiler/lib.dom.iterable.d.ts +1 -11
- package/compiler/lib.es2015.collection.d.ts +62 -1
- package/compiler/lib.es2015.proxy.d.ts +91 -2
- package/compiler/lib.es2017.intl.d.ts +16 -1
- package/compiler/lib.es2020.intl.d.ts +30 -5
- package/compiler/lib.es2021.intl.d.ts +11 -3
- package/compiler/lib.es2022.d.ts +1 -0
- package/compiler/lib.es2022.error.d.ts +2 -2
- package/compiler/lib.es2022.sharedmemory.d.ts +27 -0
- package/compiler/lib.es5.d.ts +13 -1
- package/compiler/lib.esnext.intl.d.ts +5 -1
- package/compiler/lib.webworker.d.ts +56 -29
- package/compiler/lib.webworker.iterable.d.ts +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +22740 -22830
- package/compiler/stencil.min.js +2 -2
- package/dependencies.json +2 -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/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 +16 -16
- package/screenshot/package.json +1 -1
- package/sys/node/autoprefixer.js +2 -2
- 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 +13 -11
- package/testing/package.json +1 -1
package/cli/config-flags.d.ts
CHANGED
|
@@ -2,22 +2,23 @@ import type { LogLevel, TaskCommand } from '../internal/index';
|
|
|
2
2
|
/**
|
|
3
3
|
* All the Boolean options supported by the Stencil CLI
|
|
4
4
|
*/
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const BOOLEAN_CLI_FLAGS: readonly ["build", "cache", "checkVersion", "ci", "compare", "debug", "dev", "devtools", "docs", "e2e", "es5", "esm", "headless", "help", "log", "open", "prerender", "prerenderExternal", "prod", "profile", "serviceWorker", "screenshot", "serve", "skipNodeCheck", "spec", "ssr", "stats", "updateScreenshot", "verbose", "version", "watch", "all", "automock", "bail", "changedFilesWithAncestor", "clearCache", "clearMocks", "collectCoverage", "color", "colors", "coverage", "detectLeaks", "detectOpenHandles", "errorOnDeprecated", "expand", "findRelatedTests", "forceExit", "init", "injectGlobals", "json", "lastCommit", "listTests", "logHeapUsage", "noStackTrace", "notify", "onlyChanged", "onlyFailures", "passWithNoTests", "resetMocks", "resetModules", "restoreMocks", "runInBand", "runTestsByPath", "showConfig", "silent", "skipFilter", "testLocationInResults", "updateSnapshot", "useStderr", "watchAll", "watchman"];
|
|
6
6
|
/**
|
|
7
7
|
* All the Number options supported by the Stencil CLI
|
|
8
8
|
*/
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const NUMBER_CLI_FLAGS: readonly ["port", "maxConcurrency", "testTimeout"];
|
|
10
10
|
/**
|
|
11
11
|
* All the String options supported by the Stencil CLI
|
|
12
12
|
*/
|
|
13
|
-
export declare const
|
|
13
|
+
export declare const STRING_CLI_FLAGS: readonly ["address", "config", "docsApi", "docsJson", "emulate", "root", "screenshotConnector", "cacheDirectory", "changedSince", "collectCoverageFrom", "coverageDirectory", "coverageThreshold", "env", "filter", "globalSetup", "globalTeardown", "globals", "haste", "moduleNameMapper", "notifyMode", "outputFile", "preset", "prettierPath", "resolver", "rootDir", "runner", "testEnvironment", "testEnvironmentOptions", "testFailureExitCode", "testNamePattern", "testResultsProcessor", "testRunner", "testSequencer", "testURL", "timers", "transform"];
|
|
14
|
+
export declare const STRING_ARRAY_CLI_FLAGS: readonly ["collectCoverageOnlyFrom", "coveragePathIgnorePatterns", "coverageReporters", "moduleDirectories", "moduleFileExtensions", "modulePathIgnorePatterns", "modulePaths", "projects", "reporters", "roots", "selectProjects", "setupFiles", "setupFilesAfterEnv", "snapshotSerializers", "testMatch", "testPathIgnorePatterns", "testPathPattern", "testRegex", "transformIgnorePatterns", "unmockedModulePathPatterns", "watchPathIgnorePatterns"];
|
|
14
15
|
/**
|
|
15
16
|
* All the CLI arguments which may have string or number values
|
|
16
17
|
*
|
|
17
18
|
* `maxWorkers` is an argument which is used both by Stencil _and_ by Jest,
|
|
18
19
|
* which means that we need to support parsing both string and number values.
|
|
19
20
|
*/
|
|
20
|
-
export declare const
|
|
21
|
+
export declare const STRING_NUMBER_CLI_FLAGS: readonly ["maxWorkers"];
|
|
21
22
|
/**
|
|
22
23
|
* All the LogLevel-type options supported by the Stencil CLI
|
|
23
24
|
*
|
|
@@ -25,24 +26,30 @@ export declare const STRING_NUMBER_CLI_ARGS: readonly ["maxWorkers"];
|
|
|
25
26
|
* but this approach lets us make sure that we're handling all
|
|
26
27
|
* our arguments in a type-safe way.
|
|
27
28
|
*/
|
|
28
|
-
export declare const
|
|
29
|
+
export declare const LOG_LEVEL_CLI_FLAGS: readonly ["logLevel"];
|
|
29
30
|
/**
|
|
30
31
|
* A type which gives the members of a `ReadonlyArray<string>` as
|
|
31
32
|
* an enum-like type which can be used for e.g. keys in a `Record`
|
|
32
33
|
* (as in the `AliasMap` type below)
|
|
33
34
|
*/
|
|
34
35
|
declare type ArrayValuesAsUnion<T extends ReadonlyArray<string>> = T[number];
|
|
35
|
-
export declare type
|
|
36
|
-
export declare type
|
|
37
|
-
export declare type
|
|
38
|
-
export declare type
|
|
39
|
-
export declare type
|
|
40
|
-
declare type
|
|
41
|
-
declare type
|
|
36
|
+
export declare type BooleanCLIFlag = ArrayValuesAsUnion<typeof BOOLEAN_CLI_FLAGS>;
|
|
37
|
+
export declare type StringCLIFlag = ArrayValuesAsUnion<typeof STRING_CLI_FLAGS>;
|
|
38
|
+
export declare type StringArrayCLIFlag = ArrayValuesAsUnion<typeof STRING_ARRAY_CLI_FLAGS>;
|
|
39
|
+
export declare type NumberCLIFlag = ArrayValuesAsUnion<typeof NUMBER_CLI_FLAGS>;
|
|
40
|
+
export declare type StringNumberCLIFlag = ArrayValuesAsUnion<typeof STRING_NUMBER_CLI_FLAGS>;
|
|
41
|
+
export declare type LogCLIFlag = ArrayValuesAsUnion<typeof LOG_LEVEL_CLI_FLAGS>;
|
|
42
|
+
export declare type KnownCLIFlag = BooleanCLIFlag | StringCLIFlag | StringArrayCLIFlag | NumberCLIFlag | StringNumberCLIFlag | LogCLIFlag;
|
|
43
|
+
declare type AliasMap = Partial<Record<string, KnownCLIFlag>>;
|
|
42
44
|
/**
|
|
43
45
|
* For a small subset of CLI options we support a short alias e.g. `'h'` for `'help'`
|
|
44
46
|
*/
|
|
45
|
-
export declare const
|
|
47
|
+
export declare const CLI_FLAG_ALIASES: AliasMap;
|
|
48
|
+
/**
|
|
49
|
+
* A regular expression which can be used to match a CLI flag for one of our
|
|
50
|
+
* short aliases.
|
|
51
|
+
*/
|
|
52
|
+
export declare const CLI_FLAG_REGEX: RegExp;
|
|
46
53
|
/**
|
|
47
54
|
* Given two types `K` and `T` where `K` extends `ReadonlyArray<string>`,
|
|
48
55
|
* construct a type which maps the strings in `K` as keys to values of type `T`.
|
|
@@ -58,27 +65,32 @@ declare type ObjectFromKeys<K extends ReadonlyArray<string>, T> = {
|
|
|
58
65
|
* Type containing the possible Boolean configuration flags, to be included
|
|
59
66
|
* in ConfigFlags, below
|
|
60
67
|
*/
|
|
61
|
-
declare type BooleanConfigFlags = ObjectFromKeys<typeof
|
|
68
|
+
declare type BooleanConfigFlags = ObjectFromKeys<typeof BOOLEAN_CLI_FLAGS, boolean>;
|
|
62
69
|
/**
|
|
63
70
|
* Type containing the possible String configuration flags, to be included
|
|
64
71
|
* in ConfigFlags, below
|
|
65
72
|
*/
|
|
66
|
-
declare type StringConfigFlags = ObjectFromKeys<typeof
|
|
73
|
+
declare type StringConfigFlags = ObjectFromKeys<typeof STRING_CLI_FLAGS, string>;
|
|
74
|
+
/**
|
|
75
|
+
* Type containing the possible String Array configuration flags. This is
|
|
76
|
+
* one of the 'constituent types' for `ConfigFlags`.
|
|
77
|
+
*/
|
|
78
|
+
declare type StringArrayConfigFlags = ObjectFromKeys<typeof STRING_ARRAY_CLI_FLAGS, string[]>;
|
|
67
79
|
/**
|
|
68
80
|
* Type containing the possible numeric configuration flags, to be included
|
|
69
81
|
* in ConfigFlags, below
|
|
70
82
|
*/
|
|
71
|
-
declare type NumberConfigFlags = ObjectFromKeys<typeof
|
|
83
|
+
declare type NumberConfigFlags = ObjectFromKeys<typeof NUMBER_CLI_FLAGS, number>;
|
|
72
84
|
/**
|
|
73
85
|
* Type containing the configuration flags which may be set to either string
|
|
74
86
|
* or number values.
|
|
75
87
|
*/
|
|
76
|
-
declare type StringNumberConfigFlags = ObjectFromKeys<typeof
|
|
88
|
+
declare type StringNumberConfigFlags = ObjectFromKeys<typeof STRING_NUMBER_CLI_FLAGS, string | number>;
|
|
77
89
|
/**
|
|
78
90
|
* Type containing the possible LogLevel configuration flags, to be included
|
|
79
91
|
* in ConfigFlags, below
|
|
80
92
|
*/
|
|
81
|
-
declare type LogLevelFlags = ObjectFromKeys<typeof
|
|
93
|
+
declare type LogLevelFlags = ObjectFromKeys<typeof LOG_LEVEL_CLI_FLAGS, LogLevel>;
|
|
82
94
|
/**
|
|
83
95
|
* The configuration flags which can be set by the user on the command line.
|
|
84
96
|
* This interface captures both known arguments (which are enumerated and then
|
|
@@ -93,7 +105,7 @@ declare type LogLevelFlags = ObjectFromKeys<typeof LOG_LEVEL_CLI_ARGS, LogLevel>
|
|
|
93
105
|
* options we support and a runtime list of strings which can be used to match
|
|
94
106
|
* on actual flags passed by the user.
|
|
95
107
|
*/
|
|
96
|
-
export interface ConfigFlags extends BooleanConfigFlags, StringConfigFlags, NumberConfigFlags, StringNumberConfigFlags, LogLevelFlags {
|
|
108
|
+
export interface ConfigFlags extends BooleanConfigFlags, StringConfigFlags, StringArrayConfigFlags, NumberConfigFlags, StringNumberConfigFlags, LogLevelFlags {
|
|
97
109
|
task: TaskCommand | null;
|
|
98
110
|
args: string[];
|
|
99
111
|
knownArgs: string[];
|