Skip to content

Commit

Permalink
fix metro-file-map spamming watchman warnings (#1260)
Browse files Browse the repository at this point in the history
Summary:
Metro file map attempts to dedupe warnings but it doesn't correctly match against the message and instead throws all of them at once.

 {F1497196903}

This PR accounts for when there's only recrawled file to fix deduping

Changelog:

  Changelog: [Fix] watchman crawl warnings dedupe correctly now

Pull Request resolved: #1260

Test Plan: All modified and coverable lines are covered by tests ✅

Reviewed By: GijsWeterings

Differential Revision: D56595950

Pulled By: arushikesarwani94

fbshipit-source-id: 94230de83740f2c46c9cc991c622847ed99b9d1e
  • Loading branch information
EvanBacon authored and facebook-github-bot committed Apr 26, 2024
1 parent 105e222 commit 2405f2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/metro-file-map/src/watchers/RecrawlWarning.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
export default class RecrawlWarning {
static RECRAWL_WARNINGS: Array<RecrawlWarning> = [];
static REGEXP: RegExp =
/Recrawled this watch (\d+) times, most recently because:\n([^:]+)/;
/Recrawled this watch (\d+) times?, most recently because:\n([^:]+)/;

root: string;
count: number;
Expand Down

0 comments on commit 2405f2f

Please sign in to comment.