-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Themes][Fix] - Ensure that theme store is initialized in local storage when validating storefront password #4473
Conversation
Thanks for your contribution! Depending on what you are working on, you may want to request a review from a Shopify team:
|
Coverage report
Show files with reduced coverage 🔻
Test suite run success1889 tests passing in 857 suites. Report generated by 🧪jest coverage report action from 53459a2 |
fd46848
to
53459a2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this PR, @jamesmengo. Excellent investigation!
I believe we could proceed with a following PR to update packages/cli-kit/src/public/node/output.ts
and ensure we don't assume the presence of token
. As a debug log, it's reasonable to coerce undefined values to strings to prevent similar errors in the future.
Thanks again for this PR and your thorough investigation!
WHY are these changes introduced?
Fixes #4471
WHAT is this pull request doing?
This PR adds a call to
ensureThemeStore()
inside of theensureValidPassword()
method. This allows other packages to useensureValidPassword()
without explicitly callingensureThemeStore()
, and fixes a bug for users of theapp dev
command.Background
All commands in the
themes
package callensureThemeStore()
, which sets and persists the value of the shopFQDN
to local storage.The
app dev
command does not callensureThemeStore()
, so if a user has never called atheme
command, their system will be in a state where their local storage instance is not initialized. This is surfacing as an error here, wheregetThemeStore()
returns undefinedHow to test your changes?
Cursor.-.storefront-password-prompt.ts.cli.1.mp4
Post-release steps
3.67
Measuring impact
How do we know this change was effective? Please choose one:
Checklist