From 2405f2f6c37a1b641cc379b9c733b1eff0c1c2a1 Mon Sep 17 00:00:00 2001 From: evanbacon Date: Fri, 26 Apr 2024 12:27:34 -0700 Subject: [PATCH] fix metro-file-map spamming watchman warnings (#1260) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: https://github.com/facebook/metro/pull/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 --- packages/metro-file-map/src/watchers/RecrawlWarning.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/metro-file-map/src/watchers/RecrawlWarning.js b/packages/metro-file-map/src/watchers/RecrawlWarning.js index a9ebcf83c..4feba1187 100644 --- a/packages/metro-file-map/src/watchers/RecrawlWarning.js +++ b/packages/metro-file-map/src/watchers/RecrawlWarning.js @@ -19,7 +19,7 @@ export default class RecrawlWarning { static RECRAWL_WARNINGS: Array = []; 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;