Skip to content

LTRAC-910: ref(cli) - Reduce create-catalyst to a thin wrapper over catalyst create#3053

Merged
jorgemoya merged 2 commits into
alphafrom
jorgemoya/ltrac-910-reduce-create-catalyst-to-a-thin-wrapper-that-delegates-to
Jun 29, 2026
Merged

LTRAC-910: ref(cli) - Reduce create-catalyst to a thin wrapper over catalyst create#3053
jorgemoya merged 2 commits into
alphafrom
jorgemoya/ltrac-910-reduce-create-catalyst-to-a-thin-wrapper-that-delegates-to

Conversation

@jorgemoya

Copy link
Copy Markdown
Contributor

Linear: LTRAC-910
Part of LTRAC-138 — consolidating create-catalyst into the catalyst CLI (Phase 2).

What/Why?

create-catalyst shipped its own full copy of the scaffolding flow (create/init/integration/telemetry + a large utils//prompts/). Now that @bigcommerce/catalyst owns create, this reduces create-catalyst to a thin wrapper that delegates to it — single source of truth, mirroring how create-next-app fronts next.

Delegation (option B — spawn): the entry resolves the @bigcommerce/catalyst bin from its own dependency tree (createRequire → the package's bin) and spawns catalyst create, forwarding all args with inherited stdio and propagating the child's exit code / signals. Because @bigcommerce/catalyst is a regular dependency, pnpm create catalyst / npx create-catalyst install it alongside the wrapper — no global catalyst needed.

  • Added @bigcommerce/catalyst (workspace:^) as a dependency; dropped ~20 runtime deps the old in-package commands required.
  • Deleted the duplicated commands/, utils/, prompts/, hooks/ (kept node-version.spec.ts, moved to src/).
  • Bumped the tsup target to node24 so esbuild preserves import.meta.url (a lower target shimmed it to {}, which broke createRequire).

Scope note (changed from the original ticket)

The ticket assumed init + integration were ported into @bigcommerce/catalyst. They weren't: integration was dropped (LTRAC-909 canceled) and init's useful behavior became catalyst channel link (LTRAC-908). So this wrapper is scaffold-onlycreate-catalyst's init/integration/telemetry subcommands are dropped. In the consolidated CLI: initcatalyst channel link, integration → dropped, telemetrycatalyst telemetry.

Testing

pnpm build, pnpm typecheck, pnpm lint, pnpm test all pass in packages/create-catalyst (the node-version gating test is retained).

End-to-end: built both packages and ran node packages/create-catalyst/dist/index.js create --help → it shows @bigcommerce/catalyst create's banner + help, confirming delegation. Exit codes/signals are mirrored from the child.

Release / rollout

create-catalyst and @bigcommerce/catalyst must now be published in lockstep — the workspace:^ is rewritten to a concrete version at publish, so the dependency range must include the published catalyst version. Changesets should bump both together.

Migration

pnpm create catalyst / npx create-catalyst UX is unchanged for scaffolding. Anyone who used create-catalyst init/integration/telemetry directly should switch to the catalyst … equivalents noted above.

@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
catalyst Ready Ready Preview, Comment Jun 17, 2026 2:10pm

Request Review

@changeset-bot

changeset-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: acbff49

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@bigcommerce/create-catalyst Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Report

Comparing against baseline from 81b88df (2026-06-29).

No bundle size changes detected.

@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Unlighthouse Performance Comparison — Vercel

Comparing PR preview deployment Unlighthouse scores vs production Unlighthouse scores.

Summary Score

Aggregate score across all categories as reported by Unlighthouse.

Prod Desktop Prod Mobile Preview Desktop Preview Mobile
Score 90 92 92 95

Category Scores

Category Prod Desktop Prod Mobile Preview Desktop Preview Mobile
Performance 77 90 75 79
Accessibility 95 95 95 98
Best Practices 100 100 100 100
SEO 88 88 100 100

Core Web Vitals

Metric Prod Desktop Prod Mobile Preview Desktop Preview Mobile
LCP 3.3 s 3.6 s 3.7 s 5.8 s
CLS 0.04 0 0 0.02
FCP 1.2 s 1.2 s 1.2 s 1.2 s
TBT 0 ms 0 ms 0 ms 10 ms
Max Potential FID 50 ms 50 ms 50 ms 60 ms
Time to Interactive 3.7 s 3.6 s 3.7 s 5.8 s

Full Unlighthouse report →

jorgemoya and others added 2 commits June 29, 2026 09:30
…catalyst create`

create-catalyst now delegates to `@bigcommerce/catalyst`: its entry resolves the
catalyst bin from its own dependency tree and spawns `catalyst create`,
forwarding all args (stdio inherited, exit code and signals propagated). All
scaffolding logic now lives in @bigcommerce/catalyst.

- Add @bigcommerce/catalyst as a workspace dependency; drop the ~20 runtime deps
  the old in-package commands needed.
- Delete the duplicated commands/, utils/, prompts/, and hooks/.
- Bump the tsup target to node24 so esbuild preserves `import.meta.url`.

Package name and `bin` are unchanged, so `pnpm create catalyst` / `npx
create-catalyst` keep working. The dropped init/integration/telemetry
subcommands are superseded by `catalyst channel link`, (integration dropped),
and `catalyst telemetry`.

Refs LTRAC-910
Co-Authored-By: Claude <noreply@anthropic.com>
Refs LTRAC-910
Co-Authored-By: Claude <noreply@anthropic.com>
@jorgemoya jorgemoya force-pushed the jorgemoya/ltrac-910-reduce-create-catalyst-to-a-thin-wrapper-that-delegates-to branch from c7e8ce0 to acbff49 Compare June 29, 2026 14:30
@jorgemoya jorgemoya marked this pull request as ready for review June 29, 2026 15:07
@jorgemoya jorgemoya requested a review from a team as a code owner June 29, 2026 15:07
@jorgemoya

Copy link
Copy Markdown
Contributor Author

Ran this locally:

◢ @bigcommerce/catalyst v1.0.0-alpha.6                                                                                                                  10:06:26 AM

✔ What do you want to name your project directory? my-catalyst-app
✔ Would you like to create a new channel? No
✔ Which channel would you like to use? Canary Catalyst Demo Site
ℹ Creating 'my-catalyst-app' at '/Users/jorge.moya/dev/catalyst/my-catalyst-app'                                                                       10:06:38 AM
ℹ Downloading bigcommerce/catalyst#@bigcommerce/catalyst-core@latest...                                                                                10:06:38 AM
ℹ Resolved @bigcommerce/eslint-config-catalyst to ^1.0.0                                                                                               10:06:40 AM
ℹ Resolved @bigcommerce/catalyst-client to ^1.0.2                                                                                                      10:06:40 AM
✔ Dependencies installed successfully.
✔ Initialized a git repository.                                                                                                                        10:07:29 AM
✔ Created 'my-catalyst-app' at '/Users/jorge.moya/dev/catalyst/my-catalyst-app'                                                                        10:07:29 AM
Next steps:                                                                                                                                             10:07:29 AM

  cd my-catalyst-app && npm run dev

@@ -0,0 +1,5 @@
---
"@bigcommerce/create-catalyst": major

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I believe major is fine, unless we think otherwise.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agreed

@jorgemoya jorgemoya merged commit 6c6b0f5 into alpha Jun 29, 2026
14 checks passed
@jorgemoya jorgemoya deleted the jorgemoya/ltrac-910-reduce-create-catalyst-to-a-thin-wrapper-that-delegates-to branch June 29, 2026 18:36
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.

3 participants