fix issue for undefined sessions in theme commands#6828
fix issue for undefined sessions in theme commands#6828EvilGenius13 wants to merge 1 commit intomainfrom
Conversation
Coverage report
Show new covered files 🐣
Show files with reduced coverage 🔻
Test suite run success3718 tests passing in 1438 suites. Report generated by 🧪jest coverage report action from 5e925f9 |
There was a problem hiding this comment.
Amazing stuff! 🥇
Tophatted and everything looks great.
✅ Run commands with email/password
✅ Run commands with default environment
✅ Run commands with -e flag
✅ Run commands with multiple -e flags
Question: theme check doesn't need you to be logged in - but does take environment as a flag? What kind of configuration can you have when you pass in an env?
It lets you set a path to the theme folder you want to check. |
There was a problem hiding this comment.
Thank you for this PR, @EvilGenius13! LGTM and works as expected as well 🎩
I believe we just need to regenerate OCLIF manifests and we will be ready to merge 🚀
WHY are these changes introduced?
Fixes https://github.com/Shopify/developer-tools-team/issues/1024?reload=1
Follow up from the PR to fix default environments
CLI main is failing on commands that don't need a store flag to run such as
theme profile. A few other commands are failing with an errorCannot read properties of undefinedsuch astheme initWHAT is this pull request doing?
Two parter:
static multiEnvironmentsFlags: RequiredFlags = nullwhich is our way of telling whether these commands support multi env or not. I have added them where needed.How to test your changes?
Unfortunately we need to test this in a few configurations to make sure we caught every instance.
Run the commands using regular auth (email / password) login
shopify theme devShould passshopify theme listShould passshopify theme packageShould passshopify theme checkShould passshopify theme profileShould passRun the commands using a default environment (
[environments.default]) in yourshopify.theme.tomlNote: Using the default environment means you do not need to explicitly pass it as an environment.shopify theme devShould passshopify theme listShould passshopify theme packageShould passshopify theme checkShould passshopify theme profileShould fail (can only run using regular auth)Run the commands using an environment variable (-e my_store) from your
shopify.theme.tomlshopify theme devShould passshopify theme listShould passshopify theme packageShould fail (packagedoesn't have an environment flag)shopify theme checkShould passshopify theme profileShould fail (can only run using regular auth)Run the commands using two environment variables (-e my_store, -e my_other_store ) from your
shopify.theme.tomlshopify theme devShould fail (can't run in multi env mode)shopify theme listShould passI shortened this one since only a few commands run in multi env mode
Post-release steps
Measuring impact
How do we know this change was effective? Please choose one:
Checklist