Skip to content

[Phase 0] Deprecate --force on app deploy and app release#6993

Open
alfonso-noriega wants to merge 6 commits intomainfrom
03-12-deprecate_force_flag_on_deploy_and_release
Open

[Phase 0] Deprecate --force on app deploy and app release#6993
alfonso-noriega wants to merge 6 commits intomainfrom
03-12-deprecate_force_flag_on_deploy_and_release

Conversation

@alfonso-noriega
Copy link
Contributor

Summary

Adds a deprecation warning when --force / -f is used on app deploy and app release. The flag will be removed in Shopify CLI 4.0.

  • Renders a renderWarning in run() immediately after flag parsing on both commands
  • Covers both explicit --force and SHOPIFY_FLAG_FORCE=1 env var (oclif resolves env vars into flags.force)
  • Updates flag description to note the deprecation
  • Adds a changeset (patch)
  • New command-level test files for both commands (8 tests total, all passing)

Migration path

Before After
shopify app deploy --force shopify app deploy --allow-updates --allow-deletes
shopify app deploy --force (CI, no deletes) shopify app deploy --allow-updates
SHOPIFY_FLAG_FORCE=1 SHOPIFY_FLAG_ALLOW_UPDATES=1
shopify app release --force shopify app release --allow-updates --allow-deletes

Test plan

  • pnpm vitest run src/cli/commands/app/deploy.test.ts src/cli/commands/app/release.test.ts — 8/8 pass
  • Full @shopify/app test suite — 190 files, 1894 tests, all pass

Tracking

🤖 Generated with Claude Code

Add a deprecation warning when --force / -f is used on app deploy and
app release. The flag will be removed in Shopify CLI 4.0. Users should
migrate to --allow-updates (for CI/CD) or --allow-updates --allow-deletes
(when removals are also needed). The SHOPIFY_FLAG_FORCE env var is covered
by the same check since oclif resolves it into flags.force.

Closes shop/issues-develop#22362

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@alfonso-noriega alfonso-noriega requested review from a team as code owners March 12, 2026 16:50
@github-actions
Copy link
Contributor

github-actions bot commented Mar 12, 2026

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 77.46% 14596/18843
🟡 Branches 71.11% 7240/10182
🟡 Functions 76.28% 3702/4853
🟡 Lines 78.98% 13801/17475

Test suite run success

3815 tests passing in 1466 suites.

Report generated by 🧪jest coverage report action from 0f7035f

alfonso-noriega and others added 2 commits March 12, 2026 18:16
Replace "Shopify CLI 4.0" with "a future major release" across the
deprecation warning, tests, and changeset to avoid leaking roadmap
details in the public repository.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Contributor

@dmerand dmerand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of testing notes.

@alfonso-noriega alfonso-noriega marked this pull request as draft March 13, 2026 09:02
alfonso-noriega and others added 3 commits March 13, 2026 14:46
…pe, refresh oclif manifests

- Rename 'does not show deprecation warning when only --allow-deletes is passed' to correctly
  reflect its args (--allow-updates --allow-deletes) in deploy.test.ts
- Add separate test for --allow-deletes alone in deploy.test.ts
- Fix duplicate --allow-updates test in release.test.ts (now tests --allow-updates --allow-deletes)
- Fix Organization object literal: remove non-existent fields (website, apps, zeroPartyData,
  appsNext) and add required 'source' field in both test files
- Regenerate oclif.manifest.json and README.md via pnpm refresh-manifests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
LoadedAppContextOutput requires a specifications field. Added specifications: []
to the mock in both deploy.test.ts and release.test.ts to fix the type-check CI failure.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
LoadedAppContextOutput requires a specifications field. Added specifications: []
to the mock in both deploy.test.ts and release.test.ts to fix the type-check CI failure.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@alfonso-noriega alfonso-noriega marked this pull request as ready for review March 13, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants