cli icon indicating copy to clipboard operation
cli copied to clipboard

[Themes] Replace glob with chokidar when mounting the theme file system

Open jamesmengo opened this issue 6 months ago • 2 comments

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 in packages/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?

  1. Clone the repository and checkout this branch.
  2. pnpm build
  3. Run tests p test packages/theme
  4. 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 compare theme push with theme pull to verify that these two are consistent - there may be some differences from platform-applied changes
  5. 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
  • [x] I've considered possible documentation changes

jamesmengo avatar Aug 15 '24 19:08 jamesmengo