Skip to content

Commit

Permalink
patch fbjs-scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Nov 16, 2020
1 parent babb77b commit afca168
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -144,6 +144,7 @@
},
"resolutions": {
"@types/jest/jest-diff": "^25.1.0",
"@types/jest/pretty-format": "^25.1.0"
"@types/jest/pretty-format": "^25.1.0",
"fbjs-scripts": "patch:fbjs-scripts@^1.1.0#./patches/fbjs-scripts.patch"
}
}
13 changes: 13 additions & 0 deletions patches/fbjs-scripts.patch
@@ -0,0 +1,13 @@
diff --git a/jest/createCacheKeyFunction.js b/jest/createCacheKeyFunction.js
index 890918962daebefedee59a48cd02906447f9de5b..2e73413d30a9964891608eb9ec02568b981b5ba0 100644
--- a/jest/createCacheKeyFunction.js
+++ b/jest/createCacheKeyFunction.js
@@ -32,6 +32,8 @@ function getGlobalCacheKey(files, values) {

function getCacheKeyFunction(globalCacheKey) {
return (src, file, configString, options) => {
+ // Jest 27 passes a single options bag which contains `configString` rather than as a separate argument
+ options = options || configString;
const {instrument, config} = options;
const rootDir = config && config.rootDir;

20 changes: 19 additions & 1 deletion yarn.lock
Expand Up @@ -8998,7 +8998,7 @@ __metadata:
languageName: node
linkType: hard

"fbjs-scripts@npm:^1.1.0":
fbjs-scripts@^1.1.0:
version: 1.2.0
resolution: "fbjs-scripts@npm:1.2.0"
dependencies:
Expand All @@ -9016,6 +9016,24 @@ __metadata:
languageName: node
linkType: hard

"fbjs-scripts@patch:fbjs-scripts@^1.1.0#./patches/fbjs-scripts.patch::locator=%40jest%2Fmonorepo%40workspace%3A.":
version: 1.2.0
resolution: "fbjs-scripts@patch:fbjs-scripts@npm%3A1.2.0#./patches/fbjs-scripts.patch::version=1.2.0&hash=f23fdb&locator=%40jest%2Fmonorepo%40workspace%3A."
dependencies:
"@babel/core": ^7.0.0
ansi-colors: ^1.0.1
babel-preset-fbjs: ^3.2.0
core-js: ^2.4.1
cross-spawn: ^5.1.0
fancy-log: ^1.3.2
object-assign: ^4.0.1
plugin-error: ^0.1.2
semver: ^5.1.0
through2: ^2.0.0
checksum: 908b412866a6d1dd625b466153834f2f1e417f903e2c4a110840a14c2d7973e9ae9f03101be947ca01faf99dd198370cc405181a9223066ee803c84e41110190
languageName: node
linkType: hard

"fbjs@npm:^1.0.0":
version: 1.0.0
resolution: "fbjs@npm:1.0.0"
Expand Down

0 comments on commit afca168

Please sign in to comment.