Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests to ensure cross-workspace reloading works ok #175

Merged
merged 3 commits into from
Dec 4, 2024

Conversation

airhorns
Copy link
Contributor

@airhorns airhorns commented Dec 3, 2024

This fixes 3 issues introduced in the ESM rewrite:

  • the ESM changes meant that we accidentally stopped watching the workspace root, and only started watching the folder that the first invoked script was in. Oops! Now we climb up to the workspace root for both pnpm and yarn.
  • The ignore globs support was sketchy and wasn't correctly re-using the ignore globs for both the search for files to compile and the watcher's list of files to watch. This switches us around to centralize where we build the globs and ensure we respect them as actual globs in the watcher, relative to the project root dir they came from
  • The ignore glob processing was super slow, using globby to check again if a file was ignored every time! Oops, too slow! This fixes that to use an in-memory glob match to see if a file is ignored, instead of re-globbing.

@airhorns airhorns marked this pull request as ready for review December 4, 2024 00:20
@airhorns airhorns force-pushed the fix-workspace-watches branch 2 times, most recently from f564ec9 to 28c3b6c Compare December 4, 2024 01:13
@airhorns airhorns force-pushed the fix-workspace-watches branch 5 times, most recently from d51a024 to d2ceeac Compare December 4, 2024 01:29
@airhorns airhorns force-pushed the fix-workspace-watches branch from d2ceeac to 373ec4c Compare December 4, 2024 01:31
@airhorns airhorns merged commit c723f7c into main Dec 4, 2024
2 checks passed
@airhorns airhorns deleted the fix-workspace-watches branch December 4, 2024 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant