@@ -6,7 +6,7 @@ const babel = require('@babel/core');
6
6
const coffee = require ( 'coffee-script' ) ;
7
7
8
8
const tsPreprocessor = require ( './typescript/preprocessor' ) ;
9
- const createCacheKeyFunctionJest26 = require ( 'fbjs-scripts/jest/createCacheKeyFunction' ) ;
9
+ const createCacheKeyFunction = require ( 'fbjs-scripts/jest/createCacheKeyFunction' ) ;
10
10
11
11
const pathToBabel = path . join (
12
12
require . resolve ( '@babel/core' ) ,
@@ -52,20 +52,6 @@ const babelOptions = {
52
52
retainLines : true ,
53
53
} ;
54
54
55
- const getCacheKeyJest26 = createCacheKeyFunctionJest26 ( [
56
- __filename ,
57
- pathToBabel ,
58
- pathToBabelrc ,
59
- pathToTransformInfiniteLoops ,
60
- pathToTransformTestGatePragma ,
61
- pathToErrorCodes ,
62
- ] ) ;
63
-
64
- // TODO: Upstream fix for `options` being nullable
65
- function getCacheKey ( src , file , configString , options = { } ) {
66
- return getCacheKeyJest26 ( src , file , configString , options ) ;
67
- }
68
-
69
55
module . exports = {
70
56
process : function ( src , filePath ) {
71
57
if ( filePath . match ( / \. c s s $ / ) ) {
@@ -110,5 +96,12 @@ module.exports = {
110
96
return src ;
111
97
} ,
112
98
113
- getCacheKey,
99
+ getCacheKey : createCacheKeyFunction ( [
100
+ __filename ,
101
+ pathToBabel ,
102
+ pathToBabelrc ,
103
+ pathToTransformInfiniteLoops ,
104
+ pathToTransformTestGatePragma ,
105
+ pathToErrorCodes ,
106
+ ] ) ,
114
107
} ;
0 commit comments