[Catalyst-1744] Write additional variables to project config#2876
[Catalyst-1744] Write additional variables to project config#2876jamesqquick wants to merge 4 commits intoalphafrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 27b856b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
c100e14 to
0ff8bd7
Compare
0ff8bd7 to
fd93337
Compare
matthewvolk
left a comment
There was a problem hiding this comment.
A couple changes please!
| 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; |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Since you removed makeOptionMandatory from the options.storeHash, you might be sending an undefined identifier when you get to this line
What/Why?
Write additional config variables to project.json file so that we have a centralized place for all required variables.
projectUuidframeworkstoreHashaccessTokenTesting
pnpm build --filter @bigcommerce/catalystcompiles without errorspnpm --filter @bigcommerce/catalyst test— all 44 tests passManually, you can run a
project createcommand and verify that the 4 properties above are written to theproject.jsonfile.