Skip to content

Commit 4d1eb41

Browse files
Fix test names, add missing --allow-deletes test, fix Organization type, 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>
1 parent eaed367 commit 4d1eb41

4 files changed

Lines changed: 28 additions & 13 deletions

File tree

packages/app/src/cli/commands/app/deploy.test.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Deploy from './deploy.js'
22
import {testAppLinked, testDeveloperPlatformClient, testOrganizationApp} from '../../models/app/app.test-data.js'
3+
import {OrganizationSource} from '../../models/organization.js'
34
import {describe, expect, test, vi, beforeEach} from 'vitest'
45
import {renderWarning} from '@shopify/cli-kit/node/ui'
56

@@ -22,7 +23,11 @@ describe('app deploy --force deprecation warning', () => {
2223
app: testAppLinked(),
2324
remoteApp: testOrganizationApp(),
2425
developerPlatformClient: testDeveloperPlatformClient(),
25-
organization: {id: '1', businessName: 'test', website: '', apps: {nodes: []}, zeroPartyData: false, appsNext: false},
26+
organization: {
27+
id: '1',
28+
businessName: 'test',
29+
source: OrganizationSource.Partners,
30+
},
2631
})
2732
vi.mocked(deploy).mockResolvedValue({app: testAppLinked()})
2833
})
@@ -59,9 +64,15 @@ describe('app deploy --force deprecation warning', () => {
5964
expect(renderWarning).not.toHaveBeenCalled()
6065
})
6166

62-
test('does not show deprecation warning when only --allow-deletes is passed', async () => {
67+
test('does not show deprecation warning when --allow-updates and --allow-deletes are passed', async () => {
6368
await Deploy.run(['--allow-updates', '--allow-deletes'])
6469

6570
expect(renderWarning).not.toHaveBeenCalled()
6671
})
72+
73+
test('does not show deprecation warning when only --allow-deletes is passed', async () => {
74+
await Deploy.run(['--allow-deletes'])
75+
76+
expect(renderWarning).not.toHaveBeenCalled()
77+
})
6778
})

packages/app/src/cli/commands/app/release.test.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Release from './release.js'
22
import {testAppLinked, testDeveloperPlatformClient, testOrganizationApp} from '../../models/app/app.test-data.js'
3+
import {OrganizationSource} from '../../models/organization.js'
34
import {describe, expect, test, vi, beforeEach} from 'vitest'
45
import {renderWarning} from '@shopify/cli-kit/node/ui'
56

@@ -22,7 +23,11 @@ describe('app release --force deprecation warning', () => {
2223
app: testAppLinked(),
2324
remoteApp: testOrganizationApp(),
2425
developerPlatformClient: testDeveloperPlatformClient(),
25-
organization: {id: '1', businessName: 'test', website: '', apps: {nodes: []}, zeroPartyData: false, appsNext: false},
26+
organization: {
27+
id: '1',
28+
businessName: 'test',
29+
source: OrganizationSource.Partners,
30+
},
2631
})
2732
vi.mocked(release).mockResolvedValue(undefined)
2833
})
@@ -59,8 +64,8 @@ describe('app release --force deprecation warning', () => {
5964
expect(renderWarning).not.toHaveBeenCalled()
6065
})
6166

62-
test('does not show deprecation warning when no force flags are passed', async () => {
63-
await Release.run(['--version', 'v1.0.0', '--allow-updates'])
67+
test('does not show deprecation warning when --allow-updates and --allow-deletes are passed', async () => {
68+
await Release.run(['--version', 'v1.0.0', '--allow-updates', '--allow-deletes'])
6469

6570
expect(renderWarning).not.toHaveBeenCalled()
6671
})

packages/cli/README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,9 @@ USAGE
318318
319319
FLAGS
320320
-c, --config=<value> [env: SHOPIFY_FLAG_APP_CONFIG] The name of the app configuration.
321-
-f, --force [env: SHOPIFY_FLAG_FORCE] Deploy without asking for confirmation. Equivalent to
322-
--allow-updates --allow-deletes. For CI/CD environments, the recommended flag is
323-
--allow-updates.
321+
-f, --force [env: SHOPIFY_FLAG_FORCE] [Deprecated] Deploy without asking for confirmation.
322+
Equivalent to --allow-updates --allow-deletes. Use --allow-updates for CI/CD
323+
environments instead.
324324
--allow-deletes [env: SHOPIFY_FLAG_ALLOW_DELETES] Allows removing extensions and configuration
325325
without requiring user confirmation. For CI/CD environments, the recommended flag is
326326
--allow-updates.
@@ -901,9 +901,8 @@ USAGE
901901
902902
FLAGS
903903
-c, --config=<value> [env: SHOPIFY_FLAG_APP_CONFIG] The name of the app configuration.
904-
-f, --force [env: SHOPIFY_FLAG_FORCE] Release without asking for confirmation. Equivalent to
905-
--allow-updates --allow-deletes. For CI/CD environments, the recommended flag is
906-
--allow-updates.
904+
-f, --force [env: SHOPIFY_FLAG_FORCE] [Deprecated] Release without asking for confirmation. Equivalent to
905+
--allow-updates --allow-deletes. Use --allow-updates for CI/CD environments instead.
907906
--allow-deletes [env: SHOPIFY_FLAG_ALLOW_DELETES] Allows removing extensions and configuration without
908907
requiring user confirmation. For CI/CD environments, the recommended flag is --allow-updates.
909908
--allow-updates [env: SHOPIFY_FLAG_ALLOW_UPDATES] Allows adding and updating extensions and configuration

packages/cli/oclif.manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@
709709
"force": {
710710
"allowNo": false,
711711
"char": "f",
712-
"description": "Deploy without asking for confirmation. Equivalent to --allow-updates --allow-deletes. For CI/CD environments, the recommended flag is --allow-updates.",
712+
"description": "[Deprecated] Deploy without asking for confirmation. Equivalent to --allow-updates --allow-deletes. Use --allow-updates for CI/CD environments instead.",
713713
"env": "SHOPIFY_FLAG_FORCE",
714714
"hidden": false,
715715
"name": "force",
@@ -2788,7 +2788,7 @@
27882788
"force": {
27892789
"allowNo": false,
27902790
"char": "f",
2791-
"description": "Release without asking for confirmation. Equivalent to --allow-updates --allow-deletes. For CI/CD environments, the recommended flag is --allow-updates.",
2791+
"description": "[Deprecated] Release without asking for confirmation. Equivalent to --allow-updates --allow-deletes. Use --allow-updates for CI/CD environments instead.",
27922792
"env": "SHOPIFY_FLAG_FORCE",
27932793
"hidden": false,
27942794
"name": "force",

0 commit comments

Comments
 (0)