Skip to content

Remove deprecated --type flag from shopify app generate extension#7523

Open
alfonso-noriega wants to merge 1 commit into
03-remove-webhook-trigger-shared-secret-flagfrom
04-remove-app-generate-extension-type-flag
Open

Remove deprecated --type flag from shopify app generate extension#7523
alfonso-noriega wants to merge 1 commit into
03-remove-webhook-trigger-shared-secret-flagfrom
04-remove-app-generate-extension-type-flag

Conversation

@alfonso-noriega
Copy link
Copy Markdown
Contributor

@alfonso-noriega alfonso-noriega commented May 11, 2026

WHY are these changes introduced?

The --type (-t) flag and SHOPIFY_FLAG_EXTENSION_TYPE environment variable on shopify app generate extension have 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 --type is 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?

  • Removes the --type/-t flag definition and the SHOPIFY_FLAG_EXTENSION_TYPE env binding from shopify app generate extension.
  • Removes the runtime deprecation warning and the process.exit(2) it triggered.
  • Side-effect: the -t short alias now maps to --template. Previously both flags declared char: 't' and --type's registration shadowed --template, so -t effectively meant --type. After this change, -t consistently maps to --template.
  • Regenerates packages/cli/oclif.manifest.json, packages/cli/README.md, and docs-shopify.dev/commands/interfaces/app-generate-extension.interface.ts.

How to test your changes?

  1. Run pnpm shopify app generate extension --type ui-extension and confirm it now fails with an unknown-flag error.
  2. Run pnpm shopify app generate extension --help and confirm --type is no longer listed.
  3. Run pnpm shopify app generate extension --template <template> and confirm it works.
  4. Run pnpm shopify app generate extension -t <template> and confirm -t now maps to --template (it would previously have mapped to --type and shown the deprecation warning).

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing — I've identified the correct bump type (patch for bug fixes · minor for new features · major for breaking changes) and added a changeset with pnpm changeset add

Copy link
Copy Markdown
Contributor Author

alfonso-noriega commented May 11, 2026

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.
@alfonso-noriega alfonso-noriega force-pushed the 04-remove-app-generate-extension-type-flag branch from 87d0d25 to ad69d29 Compare May 11, 2026 12:52
@alfonso-noriega alfonso-noriega force-pushed the 03-remove-webhook-trigger-shared-secret-flag branch from 2529e74 to 38ce793 Compare May 11, 2026 12:52
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Potential Breaking Changes Detected

This PR contains changes that may break the existing contract.

@shopify/dev_experience — this PR contains breaking changes that require coordination for the next major release. This check will remain failed until a member of the team approves the workflow run.

💬 Head to #help-dev-platform to discuss timing and plan the release.

📦 Major Version Changesets

The following changesets request a major version bump:

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

@alfonso-noriega alfonso-noriega temporarily deployed to breaking-change-approval May 11, 2026 12:53 — with GitHub Actions Inactive
@alfonso-noriega alfonso-noriega marked this pull request as ready for review May 11, 2026 15:15
@alfonso-noriega alfonso-noriega requested review from a team as code owners May 11, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: @shopify/app @shopify/app package issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants