-
Notifications
You must be signed in to change notification settings - Fork 140
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
Make tophatting templates changes possible #5134
Conversation
Just pass `SHOPIFY_APP_TEMPLATES_JSON_PATH=/path/to/your/file` and it will draw from there instead of pulling from the live URL.
We detected some changes at packages/*/src and there are no updates in the .changeset. |
Coverage report
Show files with reduced coverage 🔻
Test suite run success1994 tests passing in 900 suites. Report generated by 🧪jest coverage report action from a8e7cd9 |
88f17c6
to
8690d6e
Compare
8690d6e
to
762cd7b
Compare
|
||
const TEMPLATE_JSON_URL = 'https://cdn.shopify.com/static/cli/extensions/templates.json' | ||
const TEMPLATE_PATH_ENV_VARIABLE = 'SHOPIFY_APP_TEMPLATES_JSON_PATH' |
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.
Let's put this in app/src/cli/constants.ts
-- there's a handful of other app-specific environment variables there.
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.
I debated about this point - it's kind of a little debugging hack, but we do have some debugging hacks there as well!
bf6e4ea
to
a8e7cd9
Compare
WHY are these changes introduced?
We should be able to tophat changes without pushing to prod.
WHAT is this pull request doing?
Makes it possible to pass a filepath and test the changes to templates locally. Run with
SHOPIFY_APP_TEMPLATES_JSON_PATH=/path/to/your/file
and it should work!How to test your changes?
app generate extension
normally, it should still work!SHOPIFY_APP_TEMPLATES_JSON_PATH=/path/to/your/file p shopify app generate extension --path /path/to/your/app
displays options that match the fileMeasuring impact
How do we know this change was effective? Please choose one:
Checklist