Skip to content

Commit 87d0d25

Browse files
Remove deprecated --type flag from shopify app generate extension
The --type (-t) flag and SHOPIFY_FLAG_EXTENSION_TYPE env var on `shopify app generate extension` were deprecated in favor of --template (SHOPIFY_FLAG_EXTENSION_TEMPLATE). This change removes them along with the deprecation warning. The -t short flag now maps to --template, which was previously shadowed by the --type registration.
1 parent 2529e74 commit 87d0d25

5 files changed

Lines changed: 6 additions & 33 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/app': major
3+
---
4+
5+
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.

docs-shopify.dev/commands/interfaces/app-generate-extension.interface.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@ export interface appgenerateextension {
5252
*/
5353
'-t, --template <value>'?: string
5454

55-
/**
56-
* Deprecated. Please use --template
57-
* @environment SHOPIFY_FLAG_EXTENSION_TYPE
58-
*/
59-
'-t, --type <value>'?: string
60-
6155
/**
6256
* Increase the verbosity of the output.
6357
* @environment SHOPIFY_FLAG_VERBOSE

packages/app/src/cli/commands/app/generate/extension.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import AppLinkedCommand, {AppLinkedCommandOutput} from '../../../utilities/app-l
66
import {linkedAppContext} from '../../../services/app-context.js'
77
import {Flags} from '@oclif/core'
88
import {globalFlags} from '@shopify/cli-kit/node/cli'
9-
import {renderWarning} from '@shopify/cli-kit/node/ui'
109

1110
export default class AppGenerateExtension extends AppLinkedCommand {
1211
static summary = 'Generate a new app Extension.'
@@ -21,12 +20,6 @@ export default class AppGenerateExtension extends AppLinkedCommand {
2120
static flags = {
2221
...globalFlags,
2322
...appFlags,
24-
type: Flags.string({
25-
char: 't',
26-
hidden: false,
27-
description: `Deprecated. Please use --template`,
28-
env: 'SHOPIFY_FLAG_EXTENSION_TYPE',
29-
}),
3023
template: Flags.string({
3124
char: 't',
3225
hidden: false,
@@ -67,14 +60,6 @@ export default class AppGenerateExtension extends AppLinkedCommand {
6760
cmd_scaffold_type_owner: '@shopify/app',
6861
}))
6962

70-
if (flags.type) {
71-
renderWarning({
72-
headline: ['The flag --type has been deprecated in favor of --template.'],
73-
body: ['Please use --template instead.'],
74-
})
75-
process.exit(2)
76-
}
77-
7863
await checkFolderIsValidApp(flags.path)
7964

8065
const {app, project, specifications, remoteApp, developerPlatformClient} = await linkedAppContext({

packages/cli/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -722,13 +722,12 @@ Generate a new app Extension.
722722
USAGE
723723
$ shopify app generate extension [--client-id <value> | -c <value>] [--flavor
724724
vanilla-js|react|typescript|typescript-react|wasm|rust] [-n <value>] [--no-color] [--path <value>] [--reset | ] [-t
725-
<value>] [-t <value>] [--verbose]
725+
<value>] [--verbose]
726726
727727
FLAGS
728728
-c, --config=<value> [env: SHOPIFY_FLAG_APP_CONFIG] The name of the app configuration.
729729
-n, --name=<value> [env: SHOPIFY_FLAG_NAME] name of your Extension
730730
-t, --template=<value> [env: SHOPIFY_FLAG_EXTENSION_TEMPLATE] Extension template
731-
-t, --type=<value> [env: SHOPIFY_FLAG_EXTENSION_TYPE] Deprecated. Please use --template
732731
--client-id=<value> [env: SHOPIFY_FLAG_CLIENT_ID] The Client ID of your app.
733732
--flavor=<option> [env: SHOPIFY_FLAG_FLAVOR] Choose a starting template for your extension, where applicable
734733
<options: vanilla-js|react|typescript|typescript-react|wasm|rust>

packages/cli/oclif.manifest.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2124,16 +2124,6 @@
21242124
"name": "template",
21252125
"type": "option"
21262126
},
2127-
"type": {
2128-
"char": "t",
2129-
"description": "Deprecated. Please use --template",
2130-
"env": "SHOPIFY_FLAG_EXTENSION_TYPE",
2131-
"hasDynamicHelp": false,
2132-
"hidden": false,
2133-
"multiple": false,
2134-
"name": "type",
2135-
"type": "option"
2136-
},
21372127
"verbose": {
21382128
"allowNo": false,
21392129
"description": "Increase the verbosity of the output.",

0 commit comments

Comments
 (0)