From 2e0d5c87e93bb970ef1c8864ca44b47b36d6ae2e Mon Sep 17 00:00:00 2001 From: Rafael Oleza Date: Mon, 24 Sep 2018 10:06:24 -0700 Subject: [PATCH] Remove absolute path parameter from transformers Summary: Up until now, transformers in Metro received the absolute path of a file, the relative path of a file and the projectRoot. This diff gets rid of the absolute path sent to the worker, since by having the projectRoot and the relative path, the absolute path can be easily calculated. This has been done to avoid having absolute paths as transform options, since we need to have custom logic to filter them out from the cache key generation, which is dangerous. Reviewed By: mjesun Differential Revision: D9195147 fbshipit-source-id: e95c5c29272eec7f1a48af7cede4c6d6b4a8ffb7 --- jest/preprocessor.js | 1 - 1 file changed, 1 deletion(-) diff --git a/jest/preprocessor.js b/jest/preprocessor.js index e4772399e..158c604eb 100644 --- a/jest/preprocessor.js +++ b/jest/preprocessor.js @@ -49,7 +49,6 @@ module.exports = { const {ast} = transformer.transform({ filename: file, - localPath: file, options: { ast: true, // needed for open source (?) https://github.com/facebook/react-native/commit/f8d6b97140cffe8d18b2558f94570c8d1b410d5c#r28647044 dev: true,