From 3c257fa4463d80dd705e4762c41ec678c9dddc91 Mon Sep 17 00:00:00 2001 From: Nicolas Breidinger Date: Fri, 26 Apr 2019 09:12:49 -0700 Subject: [PATCH] Fix HasteImpl Regex pluginNameReducers was not properly escaping a backslash, resulting in unintended regex behavior. --- jest/hasteImpl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jest/hasteImpl.js b/jest/hasteImpl.js index ffbb053584bc3c..eae413a937df2f 100644 --- a/jest/hasteImpl.js +++ b/jest/hasteImpl.js @@ -27,7 +27,7 @@ const pluginRoots /*: Array */ = haste.providesModuleNodeModules.map( ); const pluginNameReducers /*: Array<[RegExp, string]> */ = haste.platforms.map( - name => [new RegExp(`^(.*)\.(${name})$`), '$1'], + name => [new RegExp(`^(.*)\\.(${name})$`), '$1'], ); const ROOTS = [path.resolve(__dirname, '..') + path.sep, ...pluginRoots];