Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/ltrac-467-deprecate-integration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bigcommerce/create-catalyst": minor
---

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.
9 changes: 9 additions & 0 deletions packages/create-catalyst/src/commands/integration.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Command } from '@commander-js/extra-typings';
import { exec as execCb } from 'child_process';
import { colorize } from 'consola/utils';
import { parse } from 'dotenv';
import { outputFileSync, writeJsonSync } from 'fs-extra/esm';
import kebabCase from 'lodash.kebabcase';
Expand All @@ -22,6 +23,14 @@ export const integration = new Command('integration')
.argument('<integration-name>', 'Formatted name of the integration')
.option('--commit-hash <hash>', 'Override integration source branch with a specific commit hash')
.action(async (integrationNameRaw, options) => {
console.warn(
colorize(
'yellow',
'⚠ `create-catalyst integration` is deprecated and will be replaced by the ' +
'`catalyst upgrade` command.',
),
);

// @todo check for integration name conflicts
const integrationName = z.string().transform(kebabCase).parse(integrationNameRaw);

Expand Down
4 changes: 3 additions & 1 deletion packages/create-catalyst/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ program
.description('A command line tool to create a new Catalyst project.')
.addCommand(create, { isDefault: true })
.addCommand(init)
.addCommand(integration)
// Deprecated: hidden from help so new users don't discover it; still runnable
// (with a deprecation warning) until it's removed. See LTRAC-467.
.addCommand(integration, { hidden: true })
.addCommand(telemetry)
.hook('preAction', telemetryPreHook)
.hook('postAction', telemetryPostHook);
Expand Down
Loading