cli icon indicating copy to clipboard operation
cli copied to clipboard

Update the theme selector to no longer match partial theme names

Open karreiro opened this issue 1 year ago β€’ 2 comments

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

karreiro avatar Aug 15 '24 07:08 karreiro

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

github-actions[bot] avatar Aug 15 '24 07:08 github-actions[bot]

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

github-actions[bot] avatar Aug 15 '24 07:08 github-actions[bot]