Skip to content

[Catalyst-1744] Write additional variables to project config#2876

Open
jamesqquick wants to merge 4 commits intoalphafrom
CATALYST-1744-write-variables-to-project-config
Open

[Catalyst-1744] Write additional variables to project config#2876
jamesqquick wants to merge 4 commits intoalphafrom
CATALYST-1744-write-variables-to-project-config

Conversation

@jamesqquick
Copy link
Contributor

@jamesqquick jamesqquick commented Feb 11, 2026

What/Why?

Write additional config variables to project.json file so that we have a centralized place for all required variables.

projectUuid
framework
storeHash
accessToken

Testing

pnpm build --filter @bigcommerce/catalyst compiles without errors
pnpm --filter @bigcommerce/catalyst test — all 44 tests pass

Manually, you can run a project create command and verify that the 4 properties above are written to the project.json file.

@vercel
Copy link

vercel bot commented Feb 11, 2026

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

Project Deployment Actions Updated (UTC)
catalyst Ready Ready Preview, Comment Feb 11, 2026 9:29pm

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Feb 11, 2026

🦋 Changeset detected

Latest commit: 27b856b

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 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

@jamesqquick jamesqquick changed the base branch from canary to CATALYST-1744-rename-env-variables February 11, 2026 17:28
Base automatically changed from CATALYST-1744-rename-env-variables to alpha February 11, 2026 18:12
@jamesqquick jamesqquick force-pushed the CATALYST-1744-write-variables-to-project-config branch from c100e14 to 0ff8bd7 Compare February 11, 2026 18:15
@jamesqquick jamesqquick marked this pull request as ready for review February 11, 2026 21:28
@jamesqquick jamesqquick requested a review from a team as a code owner February 11, 2026 21:28
Copy link
Contributor

@matthewvolk matthewvolk left a comment

Choose a reason for hiding this comment

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

A couple changes please!

Comment on lines +337 to +343
const savedStoreHash = process.env.CATALYST_STORE_HASH;

delete process.env.CATALYST_STORE_HASH;

await program.parseAsync(['node', 'catalyst', 'deploy']);

if (savedStoreHash !== undefined) process.env.CATALYST_STORE_HASH = savedStoreHash;
Copy link
Contributor

Choose a reason for hiding this comment

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

This pattern (here and in the test below) seems a little clumsy to me... can you look into https://vitest.dev/api/vi.html#vi-stubenv and https://vitest.dev/api/vi.html#vi-unstuballenvs ? IMO that's the correct way we should be setting/unsetting env vars in these tests

const accessToken = options.accessToken ?? config.get('accessToken');

await telemetry.identify(options.storeHash);
await telemetry.identify(storeHash);
Copy link
Contributor

Choose a reason for hiding this comment

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

Since you removed makeOptionMandatory from the options.storeHash, you might be sending an undefined identifier when you get to this line

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