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
mountThemeFileSystem
function inpackages/theme/src/cli/utilities/theme-fs.ts
to 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 push
withtheme pull
to 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
chokidar
behaves 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