From 51b65cc7e9279252ecec7adfaf185b7bd24a7774 Mon Sep 17 00:00:00 2001 From: Ale Mercado Date: Wed, 10 Jun 2026 14:09:46 -0400 Subject: [PATCH 1/8] test(cli-test): remove --app global flag from create command tests --- packages/cli-test/src/cli/cli-process.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/cli-test/src/cli/cli-process.ts b/packages/cli-test/src/cli/cli-process.ts index 32cc5ba45..ef5e5c63b 100644 --- a/packages/cli-test/src/cli/cli-process.ts +++ b/packages/cli-test/src/cli/cli-process.ts @@ -132,10 +132,12 @@ export class SlackCLIProcess { cmd = cmd.concat(['--team', opts.team]); } // App instance; defaults to `deployed` - if (opts.app) { - cmd = cmd.concat(['--app', opts.app]); - } else { - cmd = cmd.concat(['--app', 'deployed']); + if (this.command[0] !== 'create') { + if (opts.app) { + cmd = cmd.concat(['--app', opts.app]); + } else { + cmd = cmd.concat(['--app', 'deployed']); + } } // Ignore warnings via --force; defaults to true if (opts.force || typeof opts.force === 'undefined') { @@ -149,9 +151,13 @@ export class SlackCLIProcess { cmd = cmd.concat(['--verbose']); } } else { - cmd = cmd.concat(['--skip-update', '--force', '--app', 'deployed']); + cmd = cmd.concat(['--skip-update', '--force']); + if (this.command[0] !== 'create') { + cmd = cmd.concat(['--app', 'deployed']); + } } cmd = cmd.concat(this.command); + if (this.commandOptions) { for (const [key, value] of Object.entries(this.commandOptions)) { if (key && value) { From 9c25b8e4db48c0926792f7ecf2630931631b74af Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Wed, 10 Jun 2026 11:37:22 -0700 Subject: [PATCH 2/8] chore: chagneset --- .changeset/silver-papers-lick.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/silver-papers-lick.md diff --git a/.changeset/silver-papers-lick.md b/.changeset/silver-papers-lick.md new file mode 100644 index 000000000..b37283891 --- /dev/null +++ b/.changeset/silver-papers-lick.md @@ -0,0 +1,5 @@ +--- +"@slack/cli-test": patch +--- + +fix: remove default --app global flag from create command tests From 978731a5947871106dec05d28edb0f3f616f387a Mon Sep 17 00:00:00 2001 From: Ale Mercado <104795114+srtaalej@users.noreply.github.com> Date: Wed, 10 Jun 2026 15:00:42 -0400 Subject: [PATCH 3/8] Update packages/cli-test/src/cli/cli-process.ts Co-authored-by: Eden Zimbelman --- packages/cli-test/src/cli/cli-process.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli-test/src/cli/cli-process.ts b/packages/cli-test/src/cli/cli-process.ts index ef5e5c63b..fabfc0b15 100644 --- a/packages/cli-test/src/cli/cli-process.ts +++ b/packages/cli-test/src/cli/cli-process.ts @@ -131,7 +131,7 @@ export class SlackCLIProcess { if (opts.team) { cmd = cmd.concat(['--team', opts.team]); } - // App instance; defaults to `deployed` + // App instance; defaults to `deployed` - TODO(semver:major): remove fallback to "deployed" app if (this.command[0] !== 'create') { if (opts.app) { cmd = cmd.concat(['--app', opts.app]); From 8dda1e23949a56f7d1789935ab35cf46e3962c50 Mon Sep 17 00:00:00 2001 From: Ale Mercado Date: Wed, 10 Jun 2026 16:31:04 -0400 Subject: [PATCH 4/8] remove app defaults and update test --- packages/cli-test/src/cli/cli-process.test.ts | 10 +++++++--- packages/cli-test/src/cli/cli-process.ts | 13 +++---------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/packages/cli-test/src/cli/cli-process.test.ts b/packages/cli-test/src/cli/cli-process.test.ts index 2c8ade63a..501376f93 100644 --- a/packages/cli-test/src/cli/cli-process.test.ts +++ b/packages/cli-test/src/cli/cli-process.test.ts @@ -98,18 +98,22 @@ describe('SlackCLIProcess class', () => { await cmd.execAsync(); sandbox.assert.calledWith(spawnProcessSpy, sinon.match.string, sinon.match.array.contains(['--skip-update'])); }); - it('should default to `--app deployed` but allow overriding that via the `app` parameter', async () => { + it('should only pass `--app` when explicitly provided via the `app` parameter', async () => { let cmd = new SlackCLIProcess(['help']); await cmd.execAsync(); - sandbox.assert.calledWith( + sandbox.assert.neverCalledWith( spawnProcessSpy, sinon.match.string, - sinon.match.array.contains(['--app', 'deployed']), + sinon.match.array.contains(['--app']), ); spawnProcessSpy.resetHistory(); cmd = new SlackCLIProcess(['help'], { app: 'local' }); await cmd.execAsync(); sandbox.assert.calledWith(spawnProcessSpy, sinon.match.string, sinon.match.array.contains(['--app', 'local'])); + spawnProcessSpy.resetHistory(); + cmd = new SlackCLIProcess(['help'], { app: 'deployed' }); + await cmd.execAsync(); + sandbox.assert.calledWith(spawnProcessSpy, sinon.match.string, sinon.match.array.contains(['--app', 'deployed'])); }); it('should default to `--force` but allow overriding that via the `force` parameter', async () => { let cmd = new SlackCLIProcess(['help']); diff --git a/packages/cli-test/src/cli/cli-process.ts b/packages/cli-test/src/cli/cli-process.ts index fabfc0b15..0b59d6293 100644 --- a/packages/cli-test/src/cli/cli-process.ts +++ b/packages/cli-test/src/cli/cli-process.ts @@ -131,13 +131,9 @@ export class SlackCLIProcess { if (opts.team) { cmd = cmd.concat(['--team', opts.team]); } - // App instance; defaults to `deployed` - TODO(semver:major): remove fallback to "deployed" app - if (this.command[0] !== 'create') { - if (opts.app) { - cmd = cmd.concat(['--app', opts.app]); - } else { - cmd = cmd.concat(['--app', 'deployed']); - } + // App instance - TODO(semver:major): remove fallback to "deployed" app + if (opts.app) { + cmd = cmd.concat(['--app', opts.app]); } // Ignore warnings via --force; defaults to true if (opts.force || typeof opts.force === 'undefined') { @@ -152,9 +148,6 @@ export class SlackCLIProcess { } } else { cmd = cmd.concat(['--skip-update', '--force']); - if (this.command[0] !== 'create') { - cmd = cmd.concat(['--app', 'deployed']); - } } cmd = cmd.concat(this.command); From 95b50b2019c6c11c9cb60b2dfa64164df43ff775 Mon Sep 17 00:00:00 2001 From: Ale Mercado Date: Wed, 10 Jun 2026 16:41:59 -0400 Subject: [PATCH 5/8] fix: lint formatting --- packages/cli-test/src/cli/cli-process.test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/cli-test/src/cli/cli-process.test.ts b/packages/cli-test/src/cli/cli-process.test.ts index 501376f93..cf411a380 100644 --- a/packages/cli-test/src/cli/cli-process.test.ts +++ b/packages/cli-test/src/cli/cli-process.test.ts @@ -101,11 +101,7 @@ describe('SlackCLIProcess class', () => { it('should only pass `--app` when explicitly provided via the `app` parameter', async () => { let cmd = new SlackCLIProcess(['help']); await cmd.execAsync(); - sandbox.assert.neverCalledWith( - spawnProcessSpy, - sinon.match.string, - sinon.match.array.contains(['--app']), - ); + sandbox.assert.neverCalledWith(spawnProcessSpy, sinon.match.string, sinon.match.array.contains(['--app'])); spawnProcessSpy.resetHistory(); cmd = new SlackCLIProcess(['help'], { app: 'local' }); await cmd.execAsync(); @@ -113,7 +109,11 @@ describe('SlackCLIProcess class', () => { spawnProcessSpy.resetHistory(); cmd = new SlackCLIProcess(['help'], { app: 'deployed' }); await cmd.execAsync(); - sandbox.assert.calledWith(spawnProcessSpy, sinon.match.string, sinon.match.array.contains(['--app', 'deployed'])); + sandbox.assert.calledWith( + spawnProcessSpy, + sinon.match.string, + sinon.match.array.contains(['--app', 'deployed']), + ); }); it('should default to `--force` but allow overriding that via the `force` parameter', async () => { let cmd = new SlackCLIProcess(['help']); From 593c88ac8df55492a34d095a7f4436fd9c01cb89 Mon Sep 17 00:00:00 2001 From: Ale Mercado <104795114+srtaalej@users.noreply.github.com> Date: Thu, 11 Jun 2026 10:52:09 -0400 Subject: [PATCH 6/8] Update .changeset/silver-papers-lick.md Co-authored-by: Eden Zimbelman --- .changeset/silver-papers-lick.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/silver-papers-lick.md b/.changeset/silver-papers-lick.md index b37283891..60d6441e5 100644 --- a/.changeset/silver-papers-lick.md +++ b/.changeset/silver-papers-lick.md @@ -1,5 +1,5 @@ --- -"@slack/cli-test": patch +"@slack/cli-test": major --- fix: remove default --app global flag from create command tests From c625cbe4b9dc05aedc9370bafe2b5627ded4d760 Mon Sep 17 00:00:00 2001 From: Ale Mercado <104795114+srtaalej@users.noreply.github.com> Date: Thu, 11 Jun 2026 10:52:40 -0400 Subject: [PATCH 7/8] Update .changeset/silver-papers-lick.md Co-authored-by: Eden Zimbelman --- .changeset/silver-papers-lick.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.changeset/silver-papers-lick.md b/.changeset/silver-papers-lick.md index 60d6441e5..b96ae1a21 100644 --- a/.changeset/silver-papers-lick.md +++ b/.changeset/silver-papers-lick.md @@ -2,4 +2,16 @@ "@slack/cli-test": major --- -fix: remove default --app global flag from create command tests +fix: remove default "--app deployed" global flag from commands + +Commands running for a specific app must now provide the "app" argument: + +```diff + await SlackCLI.app.delete({ + appPath: "my-app", + team: "T0123456789", ++ app: "deployed", + }); +``` + +The options "local" or "deployed" or app ID all remain available to use. From 16ed1ef304112ef8bfe59d5a9ce087650d422781 Mon Sep 17 00:00:00 2001 From: Ale Mercado <104795114+srtaalej@users.noreply.github.com> Date: Thu, 11 Jun 2026 10:53:06 -0400 Subject: [PATCH 8/8] Update packages/cli-test/src/cli/cli-process.ts Co-authored-by: Eden Zimbelman --- packages/cli-test/src/cli/cli-process.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli-test/src/cli/cli-process.ts b/packages/cli-test/src/cli/cli-process.ts index 0b59d6293..1ca61954f 100644 --- a/packages/cli-test/src/cli/cli-process.ts +++ b/packages/cli-test/src/cli/cli-process.ts @@ -131,7 +131,7 @@ export class SlackCLIProcess { if (opts.team) { cmd = cmd.concat(['--team', opts.team]); } - // App instance - TODO(semver:major): remove fallback to "deployed" app + // App instance if (opts.app) { cmd = cmd.concat(['--app', opts.app]); }