From e35c19aa9091e6930867e225fe58fd029fefc459 Mon Sep 17 00:00:00 2001 From: Alice Pote Date: Tue, 26 Jul 2022 10:08:53 -0500 Subject: [PATCH] chore(cli): remove sys param from `parseFlags` 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 --- src/cli/parse-flags.ts | 6 ++---- src/cli/public.ts | 7 +++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/cli/parse-flags.ts b/src/cli/parse-flags.ts index 9e1a2a5c937..d4a14c07546 100644 --- a/src/cli/parse-flags.ts +++ b/src/cli/parse-flags.ts @@ -1,4 +1,4 @@ -import { CompilerSystem, LogLevel, LOG_LEVELS, TaskCommand } from '../declarations'; +import { LogLevel, LOG_LEVELS, TaskCommand } from '../declarations'; import { dashToPascalCase, toDashCase } from '@utils'; import { BOOLEAN_CLI_ARGS, @@ -20,11 +20,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 diff --git a/src/cli/public.ts b/src/cli/public.ts index 57c7526745d..dc08b626dea 100644 --- a/src/cli/public.ts +++ b/src/cli/public.ts @@ -1,4 +1,4 @@ -import type { CliInitOptions, CompilerSystem, Config, Logger, TaskCommand } from '@stencil/core/internal'; +import type { CliInitOptions, Config, Logger, TaskCommand } from '@stencil/core/internal'; import type { ConfigFlags } from './config-flags'; /** @@ -15,7 +15,6 @@ export declare function run(init: CliInitOptions): Promise; */ export declare function runTask(coreCompiler: any, config: Config, task: TaskCommand): Promise; -// 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 };