Remove deprecated --type flag from shopify app generate extension#7523
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
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.
87d0d25 to
ad69d29
Compare
2529e74 to
38ce793
Compare
|
| Changeset | Package |
|---|---|
remove-app-deploy-force-flag.md |
'@shopify/app': major |
remove-app-generate-extension-type-flag.md |
'@shopify/app': major |
remove-app-release-force-flag.md |
'@shopify/app': major |
remove-webhook-trigger-shared-secret-flag.md |
'@shopify/app': major |
thin-webs-notice.md |
'@shopify/plugin-did-you-mean': major |
thin-webs-notice.md |
'@shopify/plugin-cloudflare': major |
thin-webs-notice.md |
'@shopify/create-app': major |
thin-webs-notice.md |
'@shopify/cli-kit': major |
thin-webs-notice.md |
'@shopify/store': major |
thin-webs-notice.md |
'@shopify/theme': major |
thin-webs-notice.md |
'@shopify/app': major |
thin-webs-notice.md |
'@shopify/cli': major |
thin-webs-notice.md |
'@shopify/e2e': major |
🏳️ Removed Flags
The following flags were removed from existing commands:
| Command | Flag |
|---|---|
app:generate:extension |
--type |
🔧 Removed Environment Variables
The following env vars are no longer referenced in command flags:
| Env Var | Previously Used By |
|---|---|
SHOPIFY_FLAG_EXTENSION_TYPE |
app:generate:extension --type |

WHY are these changes introduced?
The
--type(-t) flag andSHOPIFY_FLAG_EXTENSION_TYPEenvironment variable onshopify app generate extensionhave been deprecated for some time in favor of--template(SHOPIFY_FLAG_EXTENSION_TEMPLATE). The command currently renders a deprecation warning and exits with code 2 when--typeis used. This PR removes the deprecated flag in preparation for the next major release.Part of the deprecated-flag-removal stack: #7522 ← this PR → #7524.
WHAT is this pull request doing?
--type/-tflag definition and theSHOPIFY_FLAG_EXTENSION_TYPEenv binding fromshopify app generate extension.process.exit(2)it triggered.-tshort alias now maps to--template. Previously both flags declaredchar: 't'and--type's registration shadowed--template, so-teffectively meant--type. After this change,-tconsistently maps to--template.packages/cli/oclif.manifest.json,packages/cli/README.md, anddocs-shopify.dev/commands/interfaces/app-generate-extension.interface.ts.How to test your changes?
pnpm shopify app generate extension --type ui-extensionand confirm it now fails with an unknown-flag error.pnpm shopify app generate extension --helpand confirm--typeis no longer listed.pnpm shopify app generate extension --template <template>and confirm it works.pnpm shopify app generate extension -t <template>and confirm-tnow maps to--template(it would previously have mapped to--typeand shown the deprecation warning).Checklist
patchfor bug fixes ·minorfor new features ·majorfor breaking changes) and added a changeset withpnpm changeset add