@@ -15,8 +15,6 @@ export const BOOLEAN_CLI_FLAGS = [
1515 'dev' ,
1616 'devtools' ,
1717 'docs' ,
18- // @deprecated - integrated testing will be removed in Stencil v5. See https://github.com/stenciljs/core/issues/6584.
19- 'e2e' ,
2018 'esm' ,
2119 'help' ,
2220 'log' ,
@@ -26,81 +24,18 @@ export const BOOLEAN_CLI_FLAGS = [
2624 'prod' ,
2725 'profile' ,
2826 'serviceWorker' ,
29- // @deprecated - screenshot testing will be removed in Stencil v5. See https://github.com/stenciljs/core/issues/6584.
30- 'screenshot' ,
3127 'serve' ,
3228 'skipNodeCheck' ,
33- // @deprecated - integrated testing will be removed in Stencil v5. See https://github.com/stenciljs/core/issues/6584.
34- 'spec' ,
3529 'ssr' ,
36- // @deprecated - screenshot testing will be removed in Stencil v5. See https://github.com/stenciljs/core/issues/6584.
37- 'updateScreenshot' ,
3830 'verbose' ,
3931 'version' ,
4032 'watch' ,
41-
42- // @deprecated - all JEST CLI options below are only used by integrated testing, which will be removed in Stencil v5.
43- // See https://github.com/stenciljs/core/issues/6584.
44- // JEST CLI OPTIONS
45- 'all' ,
46- 'automock' ,
47- 'bail' ,
48- // 'cache', Stencil already supports this argument
49- 'changedFilesWithAncestor' ,
50- // 'ci', Stencil already supports this argument
51- 'clearCache' ,
52- 'clearMocks' ,
53- 'collectCoverage' ,
54- 'color' ,
55- 'colors' ,
56- 'coverage' ,
57- // 'debug', Stencil already supports this argument
58- 'detectLeaks' ,
59- 'detectOpenHandles' ,
60- 'errorOnDeprecated' ,
61- 'expand' ,
62- 'findRelatedTests' ,
63- 'forceExit' ,
64- 'init' ,
65- 'injectGlobals' ,
66- 'json' ,
67- 'lastCommit' ,
68- 'listTests' ,
69- 'logHeapUsage' ,
70- 'noStackTrace' ,
71- 'notify' ,
72- 'onlyChanged' ,
73- 'onlyFailures' ,
74- 'passWithNoTests' ,
75- 'resetMocks' ,
76- 'resetModules' ,
77- 'restoreMocks' ,
78- 'runInBand' ,
79- 'runTestsByPath' ,
80- 'showConfig' ,
81- 'silent' ,
82- 'skipFilter' ,
83- 'testLocationInResults' ,
84- 'updateSnapshot' ,
85- 'useStderr' ,
86- // 'verbose', Stencil already supports this argument
87- // 'version', Stencil already supports this argument
88- // 'watch', Stencil already supports this argument
89- 'watchAll' ,
90- 'watchman' ,
9133] as const ;
9234
9335/**
9436 * All the Number options supported by the Stencil CLI
9537 */
96- export const NUMBER_CLI_FLAGS = [
97- 'port' ,
98- // @deprecated - all JEST CLI args below are only used by integrated testing, which will be removed in Stencil v5.
99- // See https://github.com/stenciljs/core/issues/6584.
100- // JEST CLI ARGS
101- 'maxConcurrency' ,
102- 'testTimeout' ,
103- ] as const ;
38+ export const NUMBER_CLI_FLAGS = [ 'port' ] as const ;
10439
10540/**
10641 * All the String options supported by the Stencil CLI
@@ -112,88 +47,22 @@ export const STRING_CLI_FLAGS = [
11247 'docsJson' ,
11348 'emulate' ,
11449 'root' ,
115- // @deprecated - screenshot testing will be removed in Stencil v5. See https://github.com/stenciljs/core/issues/6584.
116- 'screenshotConnector' ,
117-
118- // @deprecated - all JEST CLI args below are only used by integrated testing, which will be removed in Stencil v5.
119- // See https://github.com/stenciljs/core/issues/6584.
120- // JEST CLI ARGS
121- 'cacheDirectory' ,
122- 'changedSince' ,
123- 'collectCoverageFrom' ,
124- // 'config', Stencil already supports this argument
125- 'coverageDirectory' ,
126- 'coverageThreshold' ,
127- 'env' ,
128- 'filter' ,
129- 'globalSetup' ,
130- 'globalTeardown' ,
131- 'globals' ,
132- 'haste' ,
133- 'moduleNameMapper' ,
134- 'notifyMode' ,
135- 'outputFile' ,
136- 'preset' ,
137- 'prettierPath' ,
138- 'resolver' ,
139- 'rootDir' ,
140- 'runner' ,
141- 'testEnvironment' ,
142- 'testEnvironmentOptions' ,
143- 'testFailureExitCode' ,
144- 'testNamePattern' ,
145- 'testResultsProcessor' ,
146- 'testRunner' ,
147- 'testSequencer' ,
148- 'testURL' ,
149- 'timers' ,
150- 'transform' ,
15150] as const ;
15251
153- // @deprecated - all entries below are JEST CLI args only used by integrated testing, which will be removed in Stencil v5.
154- // See https://github.com/stenciljs/core/issues/6584.
155- export const STRING_ARRAY_CLI_FLAGS = [
156- 'collectCoverageOnlyFrom' ,
157- 'coveragePathIgnorePatterns' ,
158- 'coverageReporters' ,
159- 'moduleDirectories' ,
160- 'moduleFileExtensions' ,
161- 'modulePathIgnorePatterns' ,
162- 'modulePaths' ,
163- 'projects' ,
164- 'reporters' ,
165- 'roots' ,
166- 'selectProjects' ,
167- 'setupFiles' ,
168- 'setupFilesAfterEnv' ,
169- 'snapshotSerializers' ,
170- 'testMatch' ,
171- 'testPathIgnorePatterns' ,
172- 'testPathPattern' ,
173- 'testRegex' ,
174- 'transformIgnorePatterns' ,
175- 'unmockedModulePathPatterns' ,
176- 'watchPathIgnorePatterns' ,
177- ] as const ;
52+ export const STRING_ARRAY_CLI_FLAGS = [ ] as const ;
17853
17954/**
18055 * All the CLI arguments which may have string or number values
18156 *
182- * `maxWorkers` is an argument which is used both by Stencil _and_ by Jest,
183- * which means that we need to support parsing both string and number values.
57+ * `maxWorkers` controls the number of concurrent workers for Stencil builds.
58+ * Supports both string (e.g., "50%") and number values.
18459 */
18560export const STRING_NUMBER_CLI_FLAGS = [ 'maxWorkers' ] as const ;
18661
18762/**
18863 * All the CLI arguments which may have boolean or string values.
18964 */
19065export const BOOLEAN_STRING_CLI_FLAGS = [
191- /**
192- * `headless` is an argument passed through to Puppeteer (which is passed to Chrome) for end-to-end testing.
193- *
194- * {@see https://developer.chrome.com/blog/chrome-headless-shell/}
195- */
196- 'headless' ,
19766 /**
19867 * `stats` is an argument that can optionally accept a file path where stats should be written.
19968 * When used as a boolean (--stats), it defaults to 'stencil-stats.json'.
@@ -245,25 +114,13 @@ export const CLI_FLAG_ALIASES: AliasMap = {
245114 h : 'help' ,
246115 p : 'port' ,
247116 v : 'version' ,
248-
249- // JEST SPECIFIC CLI FLAGS
250- // these are defined in
251- // https://github.com/facebook/jest/blob/4156f86/packages/jest-cli/src/args.ts
252- b : 'bail' ,
253- e : 'expand' ,
254- f : 'onlyFailures' ,
255- i : 'runInBand' ,
256- o : 'onlyChanged' ,
257- t : 'testNamePattern' ,
258- u : 'updateSnapshot' ,
259- w : 'maxWorkers' ,
260117} ;
261118
262119/**
263120 * A regular expression which can be used to match a CLI flag for one of our
264121 * short aliases.
265122 */
266- export const CLI_FLAG_REGEX = new RegExp ( `^-[chpvbewofitu ]{1}$` ) ;
123+ export const CLI_FLAG_REGEX = new RegExp ( `^-[chpv ]{1}$` ) ;
267124
268125/**
269126 * Given two types `K` and `T` where `K` extends `ReadonlyArray<string>`,
0 commit comments