Skip to content

feat: TRAC-926 upgrade: project resolution, download, and base ref - #3065

Merged
chanceaclark merged 4 commits into
alphafrom
chancellorclark/ltrac-959-upgrade-project-resolution-download
Jun 26, 2026
Merged

feat: TRAC-926 upgrade: project resolution, download, and base ref#3065
chanceaclark merged 4 commits into
alphafrom
chancellorclark/ltrac-959-upgrade-project-resolution-download

Conversation

@chanceaclark

@chanceaclark chanceaclark commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Jira: TRAC-926

PR 3 of 4 for catalyst upgrade (LTRAC-956). Stacks on TRAC-925 (#3064).

What/Why?

Adds project layout detection, tarball download/cache, and base ref resolution — the infrastructure the CLI command action (PR 4) builds on.

Non-obvious decisions:

resolveProject: probes <gitRoot>/core → <gitRoot> → <cwd>/core → <cwd> in that order, preferring the package.json that already has catalyst.ref. A JSON.parse guard is added so a malformed candidate file is skipped rather than crashing the whole probe.

downloadCore: cache key uses repo__ref (double underscore) so bigcommerce/catalyst and a hypothetical bigcommerce_catalyst fork don't collide. Moving tags (latest, canary, alpha) are never cached. The core/ extraction has a flat-tarball fallback (insurance — all current tags are monorepo-shaped).

resolveBaseRef: the confirm() error is swallowed (.catch(() => false)) so a closed TTY in CI fails cleanly with the --from hint rather than a stack trace. Always pass --yes in non-interactive environments.

Testing

pnpm test upgrade.spec upgrade.action

upgrade.spec.ts additions: resolveProject (flat, nested, outside-git-repo), resolveBaseRef (catalyst.ref present, --from wins, inferred under --yes, unknown name defaults to catalyst-core family).

upgrade.action.spec.ts (new): action-level tests via upgrade.parseAsync() with mocked telemetry/logger/spinner. Covers: already-up-to-date short-circuit, dirty worktree rejects, invalid tag 404, --dry-run leaves project unchanged, missing ref with --yes, run-from-core/, dirty + --dry-run proceeds, staged-but-uncommitted rejects, --from bypasses prompt, --ref makeswift family.

Migration

No user-visible changes yet.

@vercel

vercel Bot commented Jun 25, 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 26, 2026 7:02pm

Request Review

@changeset-bot

changeset-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4d381b2

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 Minor

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 25, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Report

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

No bundle size changes detected.

@chanceaclark
chanceaclark force-pushed the chancellorclark/ltrac-958-upgrade-whole-tree-index-staging branch from 8130e49 to 1c9aa30 Compare June 25, 2026 20:50
@chanceaclark
chanceaclark force-pushed the chancellorclark/ltrac-959-upgrade-project-resolution-download branch from 4f7b90b to 666048e Compare June 25, 2026 20:52
@github-actions

github-actions Bot commented Jun 25, 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 87 83 98
Accessibility 95 92 95 98
Best Practices 100 100 100 100
SEO 88 100 100 100

Core Web Vitals

Metric Prod Desktop Prod Mobile Preview Desktop Preview Mobile
LCP 3.5 s 4.0 s 2.5 s 2.3 s
CLS 0.001 0 0.001 0
FCP 1.2 s 1.1 s 1.1 s 1.2 s
TBT 0 ms 0 ms 20 ms 0 ms
Max Potential FID 40 ms 30 ms 70 ms 50 ms
Time to Interactive 3.5 s 4.0 s 6.0 s 3.8 s

Full Unlighthouse report →

@chanceaclark
chanceaclark force-pushed the chancellorclark/ltrac-958-upgrade-whole-tree-index-staging branch from 1c9aa30 to cceeb22 Compare June 25, 2026 21:03
@chanceaclark
chanceaclark force-pushed the chancellorclark/ltrac-959-upgrade-project-resolution-download branch from 666048e to 0b71de1 Compare June 25, 2026 21:04
@chanceaclark
chanceaclark force-pushed the chancellorclark/ltrac-959-upgrade-project-resolution-download branch from 0b71de1 to 553fbbf Compare June 25, 2026 21:10
@chanceaclark
chanceaclark force-pushed the chancellorclark/ltrac-958-upgrade-whole-tree-index-staging branch from cceeb22 to da9ca32 Compare June 25, 2026 21:14
@chanceaclark
chanceaclark force-pushed the chancellorclark/ltrac-959-upgrade-project-resolution-download branch from 553fbbf to e5f27fd Compare June 25, 2026 21:14
@chanceaclark
chanceaclark force-pushed the chancellorclark/ltrac-958-upgrade-whole-tree-index-staging branch from e5aa299 to 85368ef Compare June 25, 2026 22:51
@chanceaclark
chanceaclark force-pushed the chancellorclark/ltrac-959-upgrade-project-resolution-download branch from cb51038 to 11a56c8 Compare June 25, 2026 22:51
@chanceaclark
chanceaclark marked this pull request as ready for review June 25, 2026 22:53
@chanceaclark
chanceaclark requested a review from a team as a code owner June 25, 2026 22:53
@chanceaclark
chanceaclark force-pushed the chancellorclark/ltrac-958-upgrade-whole-tree-index-staging branch from 85368ef to 39f5903 Compare June 26, 2026 16:15
@chanceaclark
chanceaclark force-pushed the chancellorclark/ltrac-959-upgrade-project-resolution-download branch from 11a56c8 to 2957611 Compare June 26, 2026 16:15
@chanceaclark
chanceaclark force-pushed the chancellorclark/ltrac-958-upgrade-whole-tree-index-staging branch from 39f5903 to 1ed7139 Compare June 26, 2026 18:29
@chanceaclark
chanceaclark force-pushed the chancellorclark/ltrac-959-upgrade-project-resolution-download branch from 1644903 to ecded38 Compare June 26, 2026 18:29
@chanceaclark
chanceaclark force-pushed the chancellorclark/ltrac-958-upgrade-whole-tree-index-staging branch from 1ed7139 to 127c5ac Compare June 26, 2026 19:00
Base automatically changed from chancellorclark/ltrac-958-upgrade-whole-tree-index-staging to alpha June 26, 2026 19:00
chanceaclark and others added 4 commits June 26, 2026 13:01
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@chanceaclark
chanceaclark force-pushed the chancellorclark/ltrac-959-upgrade-project-resolution-download branch from c815131 to 4d381b2 Compare June 26, 2026 19:01
@chanceaclark
chanceaclark merged commit 683f228 into alpha Jun 26, 2026
14 of 15 checks passed
@chanceaclark
chanceaclark deleted the chancellorclark/ltrac-959-upgrade-project-resolution-download branch June 26, 2026 19:01
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