cli
cli copied to clipboard
[Themes] Replace glob with chokidar when mounting the theme file system
WHY are these changes introduced?
- Part of https://github.com/Shopify/develop-advanced-edits/issues/281
WHAT is this pull request doing?
- Refactors the
mountThemeFileSystemfunction inpackages/theme/src/cli/utilities/theme-fs.tsto use Chokidar to mount the themefilesystem initially - Add some debug and error logging
How to test your changes?
- Clone the repository and checkout this branch.
-
pnpm build - Run tests
p test packages/theme - Test the theme file system mounting process by running a command that utilizes this functionality (e.g.,
shopify theme push,shopify theme dev). a. You can comparetheme pushwiththeme pullto verify that these two are consistent - there may be some differences from platform-applied changes - Verify that the file scanning process completes successfully and all theme files are properly detected
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)
- I believe
chokidarbehaves slightly differently on different platforms. This is something that we may want to keep in mind if issues arise around this implementation in the future
- I believe
- [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% πΌ) |
8109/11097 |
| π‘ | Branches | 69.35% (+0.05% πΌ) |
3944/5687 |
| π‘ | Functions | 71.77% (+0.03% πΌ) |
2118/2951 |
| π‘ | Lines | 73.41% (+0.11% πΌ) |
7668/10446 |
Test suite run success
1831 tests passing in 833 suites.
Report generated by π§ͺjest coverage report action from 5096919bee6666d93020eee8cf62ac07ae335340