Skip to content

Commit

Permalink
Add Yarn 3 patch for jest-snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
srmagura committed Aug 2, 2022
1 parent 1411859 commit a7993c2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .yarn/patches/jest-snapshot-npm-27.4.5-6ace6bf68e.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/build/InlineSnapshots.js b/build/InlineSnapshots.js
index 5f9c3d5816c5e944f6810bc42ff67ed649d84a2b..1ec2ce5d6a5a81ccd8cd898fb65be432b04cb514 100644
--- a/build/InlineSnapshots.js
+++ b/build/InlineSnapshots.js
@@ -219,7 +219,8 @@ const saveSnapshotsForFile = (snapshots, sourceFilePath, prettier) => {
filename: sourceFilePath,
plugins,
presets,
- root: path.dirname(sourceFilePath)
+ // Jest 27-28 currently can't locate our `babel.config.js` correctly, see: https://github.com/facebook/jest/issues/11741
+ // root: path.dirname(sourceFilePath)
});

if (!ast) {
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -244,5 +244,8 @@
"unified": "^6.1.6",
"webpack-bundle-analyzer": "3.3.2"
},
"packageManager": "yarn@3.2.2"
"packageManager": "yarn@3.2.2",
"resolutions": {
"jest-snapshot@27.4.5": "patch:jest-snapshot@npm:27.4.5#.yarn/patches/jest-snapshot-npm-27.4.5-6ace6bf68e.patch"
}
}

0 comments on commit a7993c2

Please sign in to comment.