Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/remove-app-generate-extension-type-flag.md
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ export interface appgenerateextension {
*/
'-t, --template <value>'?: string

/**
* Deprecated. Please use --template
* @environment SHOPIFY_FLAG_EXTENSION_TYPE
*/
'-t, --type <value>'?: string

/**
* Increase the verbosity of the output.
* @environment SHOPIFY_FLAG_VERBOSE
Expand Down
15 changes: 0 additions & 15 deletions packages/app/src/cli/commands/app/generate/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
Expand All @@ -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,
Expand Down Expand Up @@ -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({
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -722,13 +722,12 @@ Generate a new app Extension.
USAGE
$ shopify app generate extension [--client-id <value> | -c <value>] [--flavor
vanilla-js|react|typescript|typescript-react|wasm|rust] [-n <value>] [--no-color] [--path <value>] [--reset | ] [-t
<value>] [-t <value>] [--verbose]
<value>] [--verbose]

FLAGS
-c, --config=<value> [env: SHOPIFY_FLAG_APP_CONFIG] The name of the app configuration.
-n, --name=<value> [env: SHOPIFY_FLAG_NAME] name of your Extension
-t, --template=<value> [env: SHOPIFY_FLAG_EXTENSION_TEMPLATE] Extension template
-t, --type=<value> [env: SHOPIFY_FLAG_EXTENSION_TYPE] Deprecated. Please use --template
--client-id=<value> [env: SHOPIFY_FLAG_CLIENT_ID] The Client ID of your app.
--flavor=<option> [env: SHOPIFY_FLAG_FLAVOR] Choose a starting template for your extension, where applicable
<options: vanilla-js|react|typescript|typescript-react|wasm|rust>
Expand Down
10 changes: 0 additions & 10 deletions packages/cli/oclif.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2124,16 +2124,6 @@
"name": "template",
"type": "option"
},
"type": {
"char": "t",
"description": "Deprecated. Please use --template",
"env": "SHOPIFY_FLAG_EXTENSION_TYPE",
"hasDynamicHelp": false,
"hidden": false,
"multiple": false,
"name": "type",
"type": "option"
},
"verbose": {
"allowNo": false,
"description": "Increase the verbosity of the output.",
Expand Down
Loading