Update the theme selector to no longer match partial theme names
WHY are these changes introduced?
Fixes https://github.com/Shopify/cli/issues/4320
WHAT is this pull request doing?
This PR updates the theme selector code to avoid implicitly considering names that contain "each." While this behavior was desired for read-only scenarios (shopify theme list), it can lead to destructive behavior in other scenarios (shopify theme push updating the wrong theme).
How to test your changes?
- Create themes with names that match.
- Notice the
shopify theme push -t <name>only selects themes by using the exact name. - Notice the
shopify theme list --name <partial>*matches names using the*.
Post-release steps
Update the shopify theme list documentation to clarify the * pattern.
Measuring impact
How do we know this change was effective? Please choose one:
- [ ] n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
- [x] Existing analytics will cater for this addition
- [ ] PR includes analytics changes to measure impact
Checklist
- [x] I've considered possible cross-platform impacts (Mac, Linux, Windows)
- [x] I've considered possible documentation changes
Thanks for your contribution!
Depending on what you are working on, you may want to request a review from a Shopify team:
- Themes: @shopify/advanced-edits
- UI extensions: @shopify/ui-extensions-cli
- Checkout UI extensions: @shopify/checkout-ui-extensions-api-stewardship
- Hydrogen: @shopify/hydrogen
- Other: @shopify/app-inner-loop
Coverage report
St.:grey_question: |
Category | Percentage | Covered / Total |
|---|---|---|---|
| π‘ | Statements | 73.07% (-0.11% π») |
8103/11090 |
| π‘ | Branches | 69.35% (-0.29% π») |
3941/5683 |
| π‘ | Functions | 71.76% (-0.05% π») |
2117/2950 |
| π‘ | Lines | 73.4% (-0.09% π») |
7662/10439 |
Show new covered files π£
St.:grey_question: |
File | Statements | Branches | Functions | Lines |
|---|---|---|---|---|---|
| π’ | ... / host-theme-manager.ts |
100% | 66.67% | 100% | 100% |
| π’ | ... / host-theme-watcher.ts |
100% | 85.71% | 100% | 100% |
Show files with reduced coverage π»
St.:grey_question: |
File | Statements | Branches | Functions | Lines |
|---|---|---|---|---|---|
| π’ | ... / app_config_privacy_compliance_webhooks.ts |
100% | 93.94% (-0.35% π») |
100% | 100% |
| π’ | ... / logs.ts |
100% | 83.33% (-6.67% π») |
100% | 100% |
| π΄ | ... / upgrade.ts |
0% | 0% (-100% π») |
0% | 0% |
| π’ | ... / conf-store.ts |
100% | 76.92% (-6.41% π») |
100% | 100% |
| π’ | ... / string.ts |
83.93% (-0.82% π») |
79.17% | 72.73% (-1.19% π») |
85.42% (-0.86% π») |
| π’ | ... / node-package-manager.ts |
85.03% (-0.44% π») |
81.82% (-0.9% π») |
85.29% (-0.42% π») |
85.03% (-0.44% π») |
| π‘ | ... / output.ts |
70.83% (-6.56% π») |
68.66% (-7.53% π») |
60% (-3.64% π») |
71.68% (-5.38% π») |
| π‘ | ... / prerun.ts |
77.27% (-0.85% π») |
100% (+7.14% πΌ) |
87.5% (-2.5% π») |
76.19% (-1.23% π») |
| π‘ | ... / api.ts |
78% (-2.7% π») |
79.17% (-2.98% π») |
75% (-1.47% π») |
78.26% (-2.87% π») |
Test suite run success
1830 tests passing in 833 suites.
Report generated by π§ͺjest coverage report action from e3483a1ed8cc8f84d482c9a09c20388f4961e869