Skip to content

LTRAC-466: feat(core) - Track Catalyst version in a dedicated package.json field#3056

Merged
jorgemoya merged 1 commit into
canaryfrom
jorgemoya/ltrac-466-add-catalyst-version-tracking-field-to-corepackagejson
Jun 22, 2026
Merged

LTRAC-466: feat(core) - Track Catalyst version in a dedicated package.json field#3056
jorgemoya merged 1 commit into
canaryfrom
jorgemoya/ltrac-466-add-catalyst-version-tracking-field-to-corepackagejson

Conversation

@jorgemoya

Copy link
Copy Markdown
Contributor

Linear: LTRAC-466

What/Why?

Adds a catalyst field to core/package.json so the true Catalyst version is tracked independently of the top-level version (merchants may repurpose version for deploy tags, Docker labels, etc.). This gives a stable source of truth for:

  • the future catalyst upgrade command (knowing which version/ref a project is based on), and
  • the backend user-agent (analytics / support debugging).
"catalyst": {
  "version": "1.7.0",
  "ref": "@bigcommerce/catalyst-core@1.7.0"  // git tag the upgrade command targets
}

Changes

  • core/package.json — adds the catalyst field (mirrors the current 1.7.0).
  • core/user-agent.tsbackendUserAgent now uses packageInfo.catalyst?.version ?? packageInfo.version. The fallback keeps it working for projects created before this field existed.
  • .github/scripts/sync-catalyst-version.mts (+ tests) — re-derives catalyst.version/catalyst.ref from version. Follows the repo's .mts script convention; idempotent (verified: re-running on core/package.json produces no diff).
  • package.jsonchangeset:version = changeset version && node .github/scripts/sync-catalyst-version.mts.
  • .github/workflows/changesets-release.yml — points the Changesets action's version: step at pnpm changeset:version, so the catalyst field is bumped in lockstep with every release (in the auto-generated Version Packages PR).
  • Changeset: @bigcommerce/catalyst-core: patch.

Testing

pnpm test:scripts139 passed (incl. 4 new for the sync script). Ran the sync script against the real core/package.json: clean, idempotent, no reformatting. core typecheck (which needs the env-gated GraphQL generate step) runs in CI; the user-agent.ts change is type-safe (catalyst?.version ?? version, both string).

Review focus

  • The release-workflow change (version:pnpm changeset:version) — please sanity-check it fits the release process. It only adds the sync step after changeset version; publish is unchanged.

Migration

None for merchants. Existing projects without the field keep working via the user-agent fallback; the field appears on their next Catalyst upgrade.

@jorgemoya jorgemoya requested a review from a team as a code owner June 18, 2026 21:07
@vercel

vercel Bot commented Jun 18, 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 18, 2026 9:30pm

Request Review

@changeset-bot

changeset-bot Bot commented Jun 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8c5a648

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

This PR includes changesets to release 1 package
Name Type
@bigcommerce/catalyst-core Patch

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

Copy link
Copy Markdown
Contributor

Bundle Size Report

Comparing against baseline from 226f2f3 (2026-06-18).

No bundle size changes detected.

….json field

Add a `catalyst` field to core/package.json (`catalyst.version` + `catalyst.ref`)
so the true Catalyst version is tracked independently of the top-level `version`,
which merchants may repurpose (deploy tags, Docker labels). The backend
user-agent now reports `catalyst.version`, falling back to `version` for projects
created before the field existed.

A release-time sync script (.github/scripts/sync-catalyst-version.mts), wired
into the Changesets `version` step via the `changeset:version` root script, keeps
`catalyst.version`/`catalyst.ref` in lockstep with each version bump.

Refs LTRAC-466
Co-Authored-By: Claude <noreply@anthropic.com>
@jorgemoya jorgemoya force-pushed the jorgemoya/ltrac-466-add-catalyst-version-tracking-field-to-corepackagejson branch from 96b4c3c to 8c5a648 Compare June 18, 2026 21:29
@github-actions

github-actions Bot commented Jun 18, 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 72 75 81
Accessibility 95 98 95 92
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.6 s 4.4 s 3.7 s 5.0 s
CLS 0.037 0.247 0 0
FCP 1.2 s 1.2 s 1.2 s 1.1 s
TBT 0 ms 10 ms 0 ms 10 ms
Max Potential FID 50 ms 60 ms 50 ms 70 ms
Time to Interactive 3.6 s 4.4 s 3.7 s 5.0 s

Full Unlighthouse report →

@jorgemoya jorgemoya added this pull request to the merge queue Jun 22, 2026
Merged via the queue into canary with commit 2c99731 Jun 22, 2026
23 of 26 checks passed
@jorgemoya jorgemoya deleted the jorgemoya/ltrac-466-add-catalyst-version-tracking-field-to-corepackagejson branch June 22, 2026 16:58
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.

2 participants