Skip to content

Commit c1be226

Browse files
jorgemoyaclaude
andcommitted
LTRAC-467: chore(create-catalyst) - Deprecate the integration command
Print a deprecation warning when `create-catalyst integration` is invoked, and hide it from `--help` (registered with { hidden: true }). The command builds integration patches by diffing git tags, which won't work once Catalyst projects ship as tarballs (no git history); it will be replaced by `catalyst upgrade`. Still functional for now — full removal is a future major. Refs LTRAC-467 Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 1ab2c82 commit c1be226

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@bigcommerce/create-catalyst": minor
3+
---
4+
5+
Deprecate the `create-catalyst integration` command. It now prints a deprecation warning when invoked and is hidden from `--help`. The command builds integration patches by diffing git tags, which won't work once Catalyst projects are distributed as tarballs (no git history) — it will be replaced by the forthcoming `catalyst upgrade` command. The command still functions for now; full removal will follow in a future major version.

packages/create-catalyst/src/commands/integration.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Command } from '@commander-js/extra-typings';
22
import { exec as execCb } from 'child_process';
3+
import { colorize } from 'consola/utils';
34
import { parse } from 'dotenv';
45
import { outputFileSync, writeJsonSync } from 'fs-extra/esm';
56
import kebabCase from 'lodash.kebabcase';
@@ -22,6 +23,16 @@ export const integration = new Command('integration')
2223
.argument('<integration-name>', 'Formatted name of the integration')
2324
.option('--commit-hash <hash>', 'Override integration source branch with a specific commit hash')
2425
.action(async (integrationNameRaw, options) => {
26+
console.warn(
27+
colorize(
28+
'yellow',
29+
'⚠ `create-catalyst integration` is deprecated and will be removed in a future release.\n' +
30+
' It generates integration patches by diffing git tags, which will not work once Catalyst\n' +
31+
' projects are distributed as tarballs (no git history). It will be replaced by the\n' +
32+
' `catalyst upgrade` command — integrations can publish tags that merchants target with it.\n',
33+
),
34+
);
35+
2536
// @todo check for integration name conflicts
2637
const integrationName = z.string().transform(kebabCase).parse(integrationNameRaw);
2738

packages/create-catalyst/src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ program
1919
.description('A command line tool to create a new Catalyst project.')
2020
.addCommand(create, { isDefault: true })
2121
.addCommand(init)
22-
.addCommand(integration)
22+
// Deprecated: hidden from help so new users don't discover it; still runnable
23+
// (with a deprecation warning) until it's removed. See LTRAC-467.
24+
.addCommand(integration, { hidden: true })
2325
.addCommand(telemetry)
2426
.hook('preAction', telemetryPreHook)
2527
.hook('postAction', telemetryPostHook);

0 commit comments

Comments
 (0)