diff --git a/.changeset/remove-app-generate-extension-type-flag.md b/.changeset/remove-app-generate-extension-type-flag.md new file mode 100644 index 00000000000..badcdba5894 --- /dev/null +++ b/.changeset/remove-app-generate-extension-type-flag.md @@ -0,0 +1,5 @@ +--- +'@shopify/app': major +--- + +Remove the deprecated `--type` (`-t`) flag and `SHOPIFY_FLAG_EXTENSION_TYPE` environment variable from `shopify app generate extension`. Use `--template` (`SHOPIFY_FLAG_EXTENSION_TEMPLATE`) instead. diff --git a/docs-shopify.dev/commands/interfaces/app-generate-extension.interface.ts b/docs-shopify.dev/commands/interfaces/app-generate-extension.interface.ts index f351fd32356..f5b91df900e 100644 --- a/docs-shopify.dev/commands/interfaces/app-generate-extension.interface.ts +++ b/docs-shopify.dev/commands/interfaces/app-generate-extension.interface.ts @@ -52,12 +52,6 @@ export interface appgenerateextension { */ '-t, --template '?: string - /** - * Deprecated. Please use --template - * @environment SHOPIFY_FLAG_EXTENSION_TYPE - */ - '-t, --type '?: string - /** * Increase the verbosity of the output. * @environment SHOPIFY_FLAG_VERBOSE diff --git a/packages/app/src/cli/commands/app/generate/extension.ts b/packages/app/src/cli/commands/app/generate/extension.ts index 25629eec374..3d16eab7984 100644 --- a/packages/app/src/cli/commands/app/generate/extension.ts +++ b/packages/app/src/cli/commands/app/generate/extension.ts @@ -6,7 +6,6 @@ import AppLinkedCommand, {AppLinkedCommandOutput} from '../../../utilities/app-l import {linkedAppContext} from '../../../services/app-context.js' import {Flags} from '@oclif/core' import {globalFlags} from '@shopify/cli-kit/node/cli' -import {renderWarning} from '@shopify/cli-kit/node/ui' export default class AppGenerateExtension extends AppLinkedCommand { static summary = 'Generate a new app Extension.' @@ -21,12 +20,6 @@ export default class AppGenerateExtension extends AppLinkedCommand { static flags = { ...globalFlags, ...appFlags, - type: Flags.string({ - char: 't', - hidden: false, - description: `Deprecated. Please use --template`, - env: 'SHOPIFY_FLAG_EXTENSION_TYPE', - }), template: Flags.string({ char: 't', hidden: false, @@ -67,14 +60,6 @@ export default class AppGenerateExtension extends AppLinkedCommand { cmd_scaffold_type_owner: '@shopify/app', })) - if (flags.type) { - renderWarning({ - headline: ['The flag --type has been deprecated in favor of --template.'], - body: ['Please use --template instead.'], - }) - process.exit(2) - } - await checkFolderIsValidApp(flags.path) const {app, project, specifications, remoteApp, developerPlatformClient} = await linkedAppContext({ diff --git a/packages/cli/README.md b/packages/cli/README.md index 16631104f75..d96a305ea8a 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -722,13 +722,12 @@ Generate a new app Extension. USAGE $ shopify app generate extension [--client-id | -c ] [--flavor vanilla-js|react|typescript|typescript-react|wasm|rust] [-n ] [--no-color] [--path ] [--reset | ] [-t - ] [-t ] [--verbose] + ] [--verbose] FLAGS -c, --config= [env: SHOPIFY_FLAG_APP_CONFIG] The name of the app configuration. -n, --name= [env: SHOPIFY_FLAG_NAME] name of your Extension -t, --template= [env: SHOPIFY_FLAG_EXTENSION_TEMPLATE] Extension template - -t, --type= [env: SHOPIFY_FLAG_EXTENSION_TYPE] Deprecated. Please use --template --client-id= [env: SHOPIFY_FLAG_CLIENT_ID] The Client ID of your app. --flavor=