Skip to content

Commit 2e0d5c8

Browse files
rafecafacebook-github-bot
authored andcommitted
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
1 parent 4af4da9 commit 2e0d5c8

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

jest/preprocessor.js

-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ module.exports = {
4949

5050
const {ast} = transformer.transform({
5151
filename: file,
52-
localPath: file,
5352
options: {
5453
ast: true, // needed for open source (?) https://github.com/facebook/react-native/commit/f8d6b97140cffe8d18b2558f94570c8d1b410d5c#r28647044
5554
dev: true,

0 commit comments

Comments
 (0)