Enable password flag for theme dev#953
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
Test suite run success871 tests passing in 443 suites. Report generated by 🧪jest coverage report action from 3b37c67 |
| if (!packageManager || packageManager === 'unknown') return versionMessage | ||
|
|
||
| const updateCommand = token.packagejsonScript(packageManager, 'shopify', 'upgrade') | ||
| const updateCommand = token.packagejsonScript(packageManager, 'shopify upgrade') |
There was a problem hiding this comment.
This was showing something like Run npm run shopify -- upgrade for npm.
There was a problem hiding this comment.
If I'm not wrong I think that's necessary with npm because otherwise it treats those flags and arguments as npm's
There was a problem hiding this comment.
Not sure what you mean. In this case, upgrade is not a flag, but part of the command, so we don't need the -- separator. The third argument is used for flags, which do need the separator for npm.
We are doing the same in other places: https://github.com/Shopify/cli/blob/upgrade-cli2/packages/cli-hydrogen/src/cli/services/preview.ts#L23
|
@shainaraskas could you please update the documentation here to add the password flag (like the one in the list command, for example)? 🙏 |
WHY are these changes introduced?
Related to https://github.com/Shopify/internal-cli-foundations/issues/332
Since #325, most theme commands were already working with Theme Access passwords, but the
dev themecommand required additional work. Now it's ready and we can enable the password flag for that command it as well.WHAT is this pull request doing?
theme devcommandHow to test your changes?
pnpm shopify theme dev --store your-store --password your-password --path /your/theme/pathSHOPIFY_FLAG_STORE=your-store SHOPIFY_CLI_THEME_TOKEN=your-password pnpm shopify theme devMeasuring impact
How do we know this change was effective? Please choose one:
Checklist
devordeployhave been reflected in the internal flowchart.