Skip to content

Commit 674bf51

Browse files
alicewriteswrongsrwaskiewicz
authored andcommitted
chore(cli): remove sys param from parseFlags (#3489)
This removes the `sys` parameter from the `parseFlags` function in `src/cli/parse-flags.ts`. This parameter was more or less deprecated in #3486 but was not removed at the time because `parseFlags` is part of Stencil's public API, so we need to wait for a major version change to change the type signature of the function. STENCIL-509: remove _sys param from cli/parse_flags.ts::parseFlags
1 parent be94ac6 commit 674bf51

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

src/cli/parse-flags.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { readOnlyArrayHasStringMember, toCamelCase } from '@utils';
22

3-
import { CompilerSystem, LOG_LEVELS, LogLevel, TaskCommand } from '../declarations';
3+
import { LOG_LEVELS, LogLevel, TaskCommand } from '../declarations';
44
import {
55
BOOLEAN_CLI_FLAGS,
66
CLI_FLAG_ALIASES,
@@ -18,11 +18,9 @@ import {
1818
* Parse command line arguments into a structured `ConfigFlags` object
1919
*
2020
* @param args an array of CLI flags
21-
* @param _sys an optional compiler system
2221
* @returns a structured ConfigFlags object
2322
*/
24-
export const parseFlags = (args: string[], _sys?: CompilerSystem): ConfigFlags => {
25-
// TODO(STENCIL-509): remove the _sys parameter here ^^ (for v3)
23+
export const parseFlags = (args: string[]): ConfigFlags => {
2624
const flags: ConfigFlags = createConfigFlags();
2725

2826
// cmd line has more priority over npm scripts cmd

src/cli/public.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { CliInitOptions, CompilerSystem, Config, Logger, TaskCommand } from '@stencil/core/internal';
1+
import type { CliInitOptions, Config, Logger, TaskCommand } from '@stencil/core/internal';
22

33
import type { ConfigFlags } from './config-flags';
44

@@ -19,7 +19,6 @@ export declare function run(init: CliInitOptions): Promise<void>;
1919
*/
2020
export declare function runTask(coreCompiler: any, config: Config, task: TaskCommand): Promise<void>;
2121

22-
// TODO(STENCIL-509): remove the _sys parameter here (for v3)
23-
export declare function parseFlags(args: string[], _sys?: CompilerSystem): ConfigFlags;
22+
export declare function parseFlags(args: string[]): ConfigFlags;
2423

25-
export { CompilerSystem, Config, ConfigFlags, Logger, TaskCommand };
24+
export { Config, ConfigFlags, Logger, TaskCommand };

0 commit comments

Comments
 (0)