Skip to content

Commit 4d377e8

Browse files
committed
Remove leftover references to CLI 2
References to CLI2 have already been removed from `pull`, `push`, and `dev`. This commit removes the last remaining unused reference in `share`. `passThroughFlags` is not being used by any command so it has also been removed
1 parent 8cd7c44 commit 4d377e8

File tree

2 files changed

+6
-20
lines changed

2 files changed

+6
-20
lines changed

.changeset/light-ears-drum.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@shopify/theme': patch
3+
'@shopify/cli': patch
4+
---
5+
6+
Remove leftover references to CLI2 from theme commands

packages/theme/src/cli/utilities/theme-command.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ import type {Writable} from 'stream'
2525
export interface FlagValues {
2626
[key: string]: boolean | string | string[] | number | undefined
2727
}
28-
interface PassThroughFlagsOptions {
29-
// Only pass on flags that are relevant to CLI2
30-
allowedFlags?: string[]
31-
}
3228
interface ValidEnvironment {
3329
environment: EnvironmentName
3430
flags: FlagValues
@@ -52,22 +48,6 @@ type EnvironmentName = string
5248
export type RequiredFlags = (string | string[])[] | null
5349

5450
export default abstract class ThemeCommand extends Command {
55-
passThroughFlags(flags: FlagValues, {allowedFlags}: PassThroughFlagsOptions): string[] {
56-
const passThroughFlags: string[] = []
57-
for (const [label, value] of Object.entries(flags)) {
58-
if (!(allowedFlags ?? []).includes(label)) {
59-
continue
60-
} else if (typeof value === 'boolean') {
61-
if (value) passThroughFlags.push(`--${label}`)
62-
} else if (Array.isArray(value)) {
63-
value.forEach((element) => passThroughFlags.push(`--${label}`, element))
64-
} else {
65-
passThroughFlags.push(`--${label}`, `${value}`)
66-
}
67-
}
68-
return passThroughFlags
69-
}
70-
7151
environmentsFilename(): string {
7252
return configurationFileName
7353
}

0 commit comments

Comments
 (0)