Skip to content

Commit

Permalink
chore(cli): remove sys param from parseFlags (#3489)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
alicewriteswrongs authored and rwaskiewicz committed Jan 23, 2023
1 parent a436ff5 commit af5bfd7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/cli/parse-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ import {
* Parse command line arguments into a structured `ConfigFlags` object
*
* @param args an array of CLI flags
* @param _sys an optional compiler system
* @returns a structured ConfigFlags object
*/
export const parseFlags = (args: string[], _sys?: CompilerSystem): ConfigFlags => {
// TODO(STENCIL-509): remove the _sys parameter here ^^ (for v3)
export const parseFlags = (args: string[]): ConfigFlags => {
const flags: ConfigFlags = createConfigFlags();

// cmd line has more priority over npm scripts cmd
Expand Down
5 changes: 2 additions & 3 deletions src/cli/public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export declare function run(init: CliInitOptions): Promise<void>;
*/
export declare function runTask(coreCompiler: any, config: Config, task: TaskCommand): Promise<void>;

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

export { CompilerSystem, Config, ConfigFlags, Logger, TaskCommand };
export { Config, ConfigFlags, Logger, TaskCommand };

0 comments on commit af5bfd7

Please sign in to comment.