Skip to content

Commit 960dcf7

Browse files
committed
Split jest related patch to fix a bug while adding new ones in react-navigation
1 parent 8fb6fe9 commit 960dcf7

8 files changed

Lines changed: 48 additions & 42 deletions

patches/react-navigation/@react-navigation+core+7.10.0+001+fix-failing-jest-by-disabling-esmodule.patch

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -5,45 +5,3 @@ index 089153b..0967ef4 100644
55
@@ -1 +1 @@
66
-{"type":"module"}
77
+{}
8-
diff --git a/node_modules/@react-navigation/material-top-tabs/lib/module/package.json b/node_modules/@react-navigation/material-top-tabs/lib/module/package.json
9-
index 089153b..0967ef4 100644
10-
--- a/node_modules/@react-navigation/material-top-tabs/lib/module/package.json
11-
+++ b/node_modules/@react-navigation/material-top-tabs/lib/module/package.json
12-
@@ -1 +1 @@
13-
-{"type":"module"}
14-
+{}
15-
diff --git a/node_modules/@react-navigation/native-stack/lib/module/package.json b/node_modules/@react-navigation/native-stack/lib/module/package.json
16-
index 089153b..0967ef4 100644
17-
--- a/node_modules/@react-navigation/native-stack/lib/module/package.json
18-
+++ b/node_modules/@react-navigation/native-stack/lib/module/package.json
19-
@@ -1 +1 @@
20-
-{"type":"module"}
21-
+{}
22-
diff --git a/node_modules/@react-navigation/native/lib/module/package.json b/node_modules/@react-navigation/native/lib/module/package.json
23-
index 089153b..0967ef4 100644
24-
--- a/node_modules/@react-navigation/native/lib/module/package.json
25-
+++ b/node_modules/@react-navigation/native/lib/module/package.json
26-
@@ -1 +1 @@
27-
-{"type":"module"}
28-
+{}
29-
diff --git a/node_modules/@react-navigation/routers/lib/module/package.json b/node_modules/@react-navigation/routers/lib/module/package.json
30-
index 089153b..0967ef4 100644
31-
--- a/node_modules/@react-navigation/routers/lib/module/package.json
32-
+++ b/node_modules/@react-navigation/routers/lib/module/package.json
33-
@@ -1 +1 @@
34-
-{"type":"module"}
35-
+{}
36-
diff --git a/node_modules/@react-navigation/stack/lib/module/package.json b/node_modules/@react-navigation/stack/lib/module/package.json
37-
index 089153b..0967ef4 100644
38-
--- a/node_modules/@react-navigation/stack/lib/module/package.json
39-
+++ b/node_modules/@react-navigation/stack/lib/module/package.json
40-
@@ -1 +1 @@
41-
-{"type":"module"}
42-
+{}
43-
diff --git a/node_modules/@react-navigation/elements/lib/module/package.json b/node_modules/@react-navigation/elements/lib/module/package.json
44-
index 089153b..0967ef4 100644
45-
--- a/node_modules/@react-navigation/elements/lib/module/package.json
46-
+++ b/node_modules/@react-navigation/elements/lib/module/package.json
47-
@@ -1 +1 @@
48-
-{"type":"module"}
49-
+{}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
diff --git a/node_modules/@react-navigation/elements/lib/module/package.json b/node_modules/@react-navigation/elements/lib/module/package.json
2+
index 089153b..0967ef4 100644
3+
--- a/node_modules/@react-navigation/elements/lib/module/package.json
4+
+++ b/node_modules/@react-navigation/elements/lib/module/package.json
5+
@@ -1 +1 @@
6+
-{"type":"module"}
7+
+{}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
diff --git a/node_modules/@react-navigation/material-top-tabs/lib/module/package.json b/node_modules/@react-navigation/material-top-tabs/lib/module/package.json
2+
index 089153b..0967ef4 100644
3+
--- a/node_modules/@react-navigation/material-top-tabs/lib/module/package.json
4+
+++ b/node_modules/@react-navigation/material-top-tabs/lib/module/package.json
5+
@@ -1 +1 @@
6+
-{"type":"module"}
7+
+{}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
diff --git a/node_modules/@react-navigation/native/lib/module/package.json b/node_modules/@react-navigation/native/lib/module/package.json
2+
index 089153b..0967ef4 100644
3+
--- a/node_modules/@react-navigation/native/lib/module/package.json
4+
+++ b/node_modules/@react-navigation/native/lib/module/package.json
5+
@@ -1 +1 @@
6+
-{"type":"module"}
7+
+{}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
diff --git a/node_modules/@react-navigation/native-stack/lib/module/package.json b/node_modules/@react-navigation/native-stack/lib/module/package.json
2+
index 089153b..0967ef4 100644
3+
--- a/node_modules/@react-navigation/native-stack/lib/module/package.json
4+
+++ b/node_modules/@react-navigation/native-stack/lib/module/package.json
5+
@@ -1 +1 @@
6+
-{"type":"module"}
7+
+{}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
diff --git a/node_modules/@react-navigation/routers/lib/module/package.json b/node_modules/@react-navigation/routers/lib/module/package.json
2+
index 089153b..0967ef4 100644
3+
--- a/node_modules/@react-navigation/routers/lib/module/package.json
4+
+++ b/node_modules/@react-navigation/routers/lib/module/package.json
5+
@@ -1 +1 @@
6+
-{"type":"module"}
7+
+{}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
diff --git a/node_modules/@react-navigation/stack/lib/module/package.json b/node_modules/@react-navigation/stack/lib/module/package.json
2+
index 089153b..0967ef4 100644
3+
--- a/node_modules/@react-navigation/stack/lib/module/package.json
4+
+++ b/node_modules/@react-navigation/stack/lib/module/package.json
5+
@@ -1 +1 @@
6+
-{"type":"module"}
7+
+{}

patches/react-navigation/details.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# `@react-navigation` patches
22

33
### [@react-navigation+core+7.10.0+001+fix-failing-jest-by-disabling-esmodule.patch](@react-navigation+core+7.10.0+001+fix-failing-jest-by-disabling-esmodule.patch)
4+
### [@react-navigation+elements+7.10.0+001+fix-failing-jest-by-disabling-esmodule.patch](@react-navigation+elements+7.10.0+001+fix-failing-jest-by-disabling-esmodule.patch)
5+
### [@react-navigation+material-top-tabs+7.10.0+001+fix-failing-jest-by-disabling-esmodule.patch](@react-navigation+material-top-tabs+7.10.0+001+fix-failing-jest-by-disabling-esmodule.patch)
6+
### [@react-navigation+native-stack+7.10.0+002+fix-failing-jest-by-disabling-esmodule.patch](@react-navigation+native-stack+7.10.0+002+fix-failing-jest-by-disabling-esmodule.patch)
7+
### [@react-navigation+native+7.10.0+002+fix-failing-jest-by-disabling-esmodule.patch](@react-navigation+native+7.10.0+002+fix-failing-jest-by-disabling-esmodule.patch)
8+
### [@react-navigation+routers+7.10.0+001+fix-failing-jest-by-disabling-esmodule.patch](@react-navigation+routers+7.10.0+001+fix-failing-jest-by-disabling-esmodule.patch)
9+
### [@react-navigation+stack+7.10.0+004+fix-failing-jest-by-disabling-esmodule.patch](@react-navigation+stack+7.10.0+004+fix-failing-jest-by-disabling-esmodule.patch)
410

511
- Reason: Necessary to run Jest with the obligatory `--experimental-vm-modules` flag. Currently we transpile all the code to `commonjs`, but Jest looks up to individual `package.jsons` to see whether the package is `commonjs` or `ESModule`. That causes a conflict, which can be solved by removing `{"type":"module"}` from `lib/module/package.json`. This might be an issue with Jest, but it would require much more investigation. More: https://github.com/react-navigation/react-navigation/issues/12637
612
- Upstream PR/issue: https://github.com/react-navigation/react-navigation/issues/12637

0 commit comments

Comments
 (0)