Skip to content

Commit aaad748

Browse files
authored
Merge pull request Expensify#65840 from software-mansion-labs/chore/fix-pacth-package
[No QA] Chore: Split Jest-related patch to fix a bug while adding new ones in `@react-navigation`
2 parents ffb7d2b + f8ed3b9 commit aaad748

8 files changed

Lines changed: 50 additions & 43 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: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# `@react-navigation` patches
22

3-
### [@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)
3+
### @react-navigation+package-name+7+fix-failing-jest-by-disabling-esmodule.patch
4+
#### [@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)
5+
#### [@react-navigation+elements+2.4.3+001+fix-failing-jest-by-disabling-esmodule.patch](@react-navigation+elements+2.4.3+001+fix-failing-jest-by-disabling-esmodule.patch)
6+
#### [@react-navigation+material-top-tabs+7.2.13+001+fix-failing-jest-by-disabling-esmodule.patch](@react-navigation+material-top-tabs+7.2.13+001+fix-failing-jest-by-disabling-esmodule.patch)
7+
#### [@react-navigation+native-stack+7.3.14+002+fix-failing-jest-by-disabling-esmodule.patch](@react-navigation+native-stack+7.3.14+002+fix-failing-jest-by-disabling-esmodule.patch)
8+
#### [@react-navigation+native+7.1.10+002+fix-failing-jest-by-disabling-esmodule.patch](@react-navigation+native+7.1.10+002+fix-failing-jest-by-disabling-esmodule.patch)
9+
#### [@react-navigation+routers+7.4.0+001+fix-failing-jest-by-disabling-esmodule.patch](@react-navigation+routers+7.4.0+001+fix-failing-jest-by-disabling-esmodule.patch)
10+
#### [@react-navigation+stack+7.3.3+004+fix-failing-jest-by-disabling-esmodule.patch](@react-navigation+stack+7.3.3+004+fix-failing-jest-by-disabling-esmodule.patch)
411

512
- 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
613
- Upstream PR/issue: https://github.com/react-navigation/react-navigation/issues/12637

0 commit comments

Comments
 (0)