expo 55.0.0-canary-20251003-7b9d7ff → 55.0.0-canary-20251008-f2d1b4a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Expo.podspec +1 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ExpoBridgelessDevSupportManager.kt +137 -0
- package/android/src/main/java/expo/modules/ExpoDevSupportManagerFactory.kt +149 -0
- package/android/src/main/java/expo/modules/ExpoReactHostFactory.kt +37 -60
- package/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt +0 -8
- package/build/async-require/hmr.d.ts +7 -7
- package/build/async-require/hmr.d.ts.map +1 -1
- package/build/dom/dom-internal.types.d.ts +11 -0
- package/build/dom/dom-internal.types.d.ts.map +1 -0
- package/build/dom/internal.d.ts +1 -0
- package/build/dom/internal.d.ts.map +1 -1
- package/build/dom/webview-wrapper.d.ts +2 -2
- package/build/dom/webview-wrapper.d.ts.map +1 -1
- package/bundledNativeModules.json +79 -79
- package/package.json +19 -18
- package/src/async-require/hmr.ts +55 -59
- package/src/dom/dom-entry.tsx +8 -8
- package/src/dom/dom-internal.types.ts +9 -0
- package/src/dom/internal.ts +2 -0
- package/src/dom/webview-wrapper.tsx +7 -4
- package/template.tgz +0 -0
- package/android/src/main/java/expo/modules/ReactNativeHostWrapper.kt +0 -51
- package/android/src/main/java/expo/modules/ReactNativeHostWrapperBase.kt +0 -107
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"@expo/fingerprint": "0.15.2-canary-
|
|
3
|
-
"@expo/metro-runtime": "6.1.3-canary-
|
|
2
|
+
"@expo/fingerprint": "0.15.2-canary-20251008-f2d1b4a",
|
|
3
|
+
"@expo/metro-runtime": "6.1.3-canary-20251008-f2d1b4a",
|
|
4
4
|
"@expo/vector-icons": "^15.0.2",
|
|
5
|
-
"@expo/ui": "0.2.0-canary-
|
|
5
|
+
"@expo/ui": "0.2.0-canary-20251008-f2d1b4a",
|
|
6
6
|
"@react-native-async-storage/async-storage": "2.2.0",
|
|
7
7
|
"@react-native-community/datetimepicker": "8.4.4",
|
|
8
8
|
"@react-native-masked-view/masked-view": "0.3.2",
|
|
@@ -12,84 +12,84 @@
|
|
|
12
12
|
"@react-native-picker/picker": "2.11.2",
|
|
13
13
|
"@react-native-segmented-control/segmented-control": "2.5.7",
|
|
14
14
|
"@stripe/stripe-react-native": "0.50.3",
|
|
15
|
-
"eslint-config-expo": "10.0.1-canary-
|
|
15
|
+
"eslint-config-expo": "10.0.1-canary-20251008-f2d1b4a",
|
|
16
16
|
"expo-analytics-amplitude": "~11.3.0",
|
|
17
17
|
"expo-app-auth": "~11.1.0",
|
|
18
18
|
"expo-app-loader-provider": "~8.0.0",
|
|
19
|
-
"expo-apple-authentication": "8.0.8-canary-
|
|
20
|
-
"expo-application": "7.0.8-canary-
|
|
21
|
-
"expo-asset": "12.0.10-canary-
|
|
22
|
-
"expo-audio": "1.1.0-canary-
|
|
23
|
-
"expo-auth-session": "7.0.9-canary-
|
|
24
|
-
"expo-av": "16.0.8-canary-
|
|
25
|
-
"expo-background-fetch": "14.0.8-canary-
|
|
26
|
-
"expo-background-task": "1.0.9-canary-
|
|
27
|
-
"expo-battery": "10.0.8-canary-
|
|
28
|
-
"expo-blur": "15.0.8-canary-
|
|
29
|
-
"expo-brightness": "
|
|
30
|
-
"expo-build-properties": "1.0.10-canary-
|
|
31
|
-
"expo-calendar": "15.0.8-canary-
|
|
32
|
-
"expo-camera": "17.0.9-canary-
|
|
33
|
-
"expo-cellular": "8.0.8-canary-
|
|
34
|
-
"expo-checkbox": "5.0.8-canary-
|
|
35
|
-
"expo-clipboard": "8.0.8-canary-
|
|
36
|
-
"expo-constants": "18.0.10-canary-
|
|
37
|
-
"expo-contacts": "15.0.10-canary-
|
|
38
|
-
"expo-crypto": "15.0.8-canary-
|
|
39
|
-
"expo-dev-client": "6.0.14-canary-
|
|
40
|
-
"expo-device": "8.0.10-canary-
|
|
41
|
-
"expo-document-picker": "14.0.8-canary-
|
|
42
|
-
"expo-file-system": "19.0.17-canary-
|
|
43
|
-
"expo-font": "14.0.9-canary-
|
|
44
|
-
"expo-gl": "16.0.8-canary-
|
|
45
|
-
"expo-glass-effect": "0.1.5-canary-
|
|
19
|
+
"expo-apple-authentication": "8.0.8-canary-20251008-f2d1b4a",
|
|
20
|
+
"expo-application": "7.0.8-canary-20251008-f2d1b4a",
|
|
21
|
+
"expo-asset": "12.0.10-canary-20251008-f2d1b4a",
|
|
22
|
+
"expo-audio": "1.1.0-canary-20251008-f2d1b4a",
|
|
23
|
+
"expo-auth-session": "7.0.9-canary-20251008-f2d1b4a",
|
|
24
|
+
"expo-av": "16.0.8-canary-20251008-f2d1b4a",
|
|
25
|
+
"expo-background-fetch": "14.0.8-canary-20251008-f2d1b4a",
|
|
26
|
+
"expo-background-task": "1.0.9-canary-20251008-f2d1b4a",
|
|
27
|
+
"expo-battery": "10.0.8-canary-20251008-f2d1b4a",
|
|
28
|
+
"expo-blur": "15.0.8-canary-20251008-f2d1b4a",
|
|
29
|
+
"expo-brightness": "15.0.0-canary-20251008-f2d1b4a",
|
|
30
|
+
"expo-build-properties": "1.0.10-canary-20251008-f2d1b4a",
|
|
31
|
+
"expo-calendar": "15.0.8-canary-20251008-f2d1b4a",
|
|
32
|
+
"expo-camera": "17.0.9-canary-20251008-f2d1b4a",
|
|
33
|
+
"expo-cellular": "8.0.8-canary-20251008-f2d1b4a",
|
|
34
|
+
"expo-checkbox": "5.0.8-canary-20251008-f2d1b4a",
|
|
35
|
+
"expo-clipboard": "8.0.8-canary-20251008-f2d1b4a",
|
|
36
|
+
"expo-constants": "18.0.10-canary-20251008-f2d1b4a",
|
|
37
|
+
"expo-contacts": "15.0.10-canary-20251008-f2d1b4a",
|
|
38
|
+
"expo-crypto": "15.0.8-canary-20251008-f2d1b4a",
|
|
39
|
+
"expo-dev-client": "6.0.14-canary-20251008-f2d1b4a",
|
|
40
|
+
"expo-device": "8.0.10-canary-20251008-f2d1b4a",
|
|
41
|
+
"expo-document-picker": "14.0.8-canary-20251008-f2d1b4a",
|
|
42
|
+
"expo-file-system": "19.0.17-canary-20251008-f2d1b4a",
|
|
43
|
+
"expo-font": "14.0.9-canary-20251008-f2d1b4a",
|
|
44
|
+
"expo-gl": "16.0.8-canary-20251008-f2d1b4a",
|
|
45
|
+
"expo-glass-effect": "0.1.5-canary-20251008-f2d1b4a",
|
|
46
46
|
"expo-google-app-auth": "~8.3.0",
|
|
47
|
-
"expo-haptics": "15.0.8-canary-
|
|
48
|
-
"expo-image": "3.1.0-canary-
|
|
49
|
-
"expo-image-loader": "6.0.1-canary-
|
|
50
|
-
"expo-image-manipulator": "14.0.8-canary-
|
|
51
|
-
"expo-image-picker": "17.0.9-canary-
|
|
52
|
-
"expo-intent-launcher": "13.0.8-canary-
|
|
53
|
-
"expo-insights": "0.10.8-canary-
|
|
54
|
-
"expo-keep-awake": "15.0.8-canary-
|
|
55
|
-
"expo-linear-gradient": "15.0.8-canary-
|
|
56
|
-
"expo-linking": "8.0.9-canary-
|
|
57
|
-
"expo-local-authentication": "17.0.8-canary-
|
|
58
|
-
"expo-localization": "17.0.8-canary-
|
|
59
|
-
"expo-location": "19.0.8-canary-
|
|
60
|
-
"expo-mail-composer": "15.0.8-canary-
|
|
61
|
-
"expo-manifests": "1.0.9-canary-
|
|
62
|
-
"expo-maps": "0.12.9-canary-
|
|
63
|
-
"expo-media-library": "18.3.0-canary-
|
|
64
|
-
"expo-mesh-gradient": "0.4.8-canary-
|
|
65
|
-
"expo-module-template": "11.0.16-canary-
|
|
66
|
-
"expo-modules-core": "3.1.0-canary-
|
|
67
|
-
"expo-navigation-bar": "5.0.9-canary-
|
|
68
|
-
"expo-network": "8.0.8-canary-
|
|
69
|
-
"expo-notifications": "1.0.0-canary-
|
|
70
|
-
"expo-print": "15.0.8-canary-
|
|
71
|
-
"expo-live-photo": "1.0.8-canary-
|
|
72
|
-
"expo-router": "6.1.0-canary-
|
|
73
|
-
"expo-screen-capture": "8.0.9-canary-
|
|
74
|
-
"expo-screen-orientation": "9.0.8-canary-
|
|
75
|
-
"expo-secure-store": "15.0.8-canary-
|
|
76
|
-
"expo-sensors": "15.0.8-canary-
|
|
77
|
-
"expo-sharing": "14.0.8-canary-
|
|
78
|
-
"expo-sms": "14.0.8-canary-
|
|
79
|
-
"expo-speech": "14.0.8-canary-
|
|
80
|
-
"expo-splash-screen": "31.0.11-canary-
|
|
81
|
-
"expo-sqlite": "16.0.9-canary-
|
|
82
|
-
"expo-status-bar": "3.0.9-canary-
|
|
83
|
-
"expo-store-review": "9.0.9-canary-
|
|
84
|
-
"expo-symbols": "1.1.0-canary-
|
|
85
|
-
"expo-system-ui": "6.0.8-canary-
|
|
86
|
-
"expo-task-manager": "14.0.8-canary-
|
|
87
|
-
"expo-tracking-transparency": "6.0.8-canary-
|
|
88
|
-
"expo-updates": "29.1.0-canary-
|
|
89
|
-
"expo-video-thumbnails": "10.0.8-canary-
|
|
90
|
-
"expo-video": "3.0.12-canary-
|
|
91
|
-
"expo-web-browser": "15.0.9-canary-
|
|
92
|
-
"jest-expo": "55.0.0-canary-
|
|
47
|
+
"expo-haptics": "15.0.8-canary-20251008-f2d1b4a",
|
|
48
|
+
"expo-image": "3.1.0-canary-20251008-f2d1b4a",
|
|
49
|
+
"expo-image-loader": "6.0.1-canary-20251008-f2d1b4a",
|
|
50
|
+
"expo-image-manipulator": "14.0.8-canary-20251008-f2d1b4a",
|
|
51
|
+
"expo-image-picker": "17.0.9-canary-20251008-f2d1b4a",
|
|
52
|
+
"expo-intent-launcher": "13.0.8-canary-20251008-f2d1b4a",
|
|
53
|
+
"expo-insights": "0.10.8-canary-20251008-f2d1b4a",
|
|
54
|
+
"expo-keep-awake": "15.0.8-canary-20251008-f2d1b4a",
|
|
55
|
+
"expo-linear-gradient": "15.0.8-canary-20251008-f2d1b4a",
|
|
56
|
+
"expo-linking": "8.0.9-canary-20251008-f2d1b4a",
|
|
57
|
+
"expo-local-authentication": "17.0.8-canary-20251008-f2d1b4a",
|
|
58
|
+
"expo-localization": "17.0.8-canary-20251008-f2d1b4a",
|
|
59
|
+
"expo-location": "19.0.8-canary-20251008-f2d1b4a",
|
|
60
|
+
"expo-mail-composer": "15.0.8-canary-20251008-f2d1b4a",
|
|
61
|
+
"expo-manifests": "1.0.9-canary-20251008-f2d1b4a",
|
|
62
|
+
"expo-maps": "0.12.9-canary-20251008-f2d1b4a",
|
|
63
|
+
"expo-media-library": "18.3.0-canary-20251008-f2d1b4a",
|
|
64
|
+
"expo-mesh-gradient": "0.4.8-canary-20251008-f2d1b4a",
|
|
65
|
+
"expo-module-template": "11.0.16-canary-20251008-f2d1b4a",
|
|
66
|
+
"expo-modules-core": "3.1.0-canary-20251008-f2d1b4a",
|
|
67
|
+
"expo-navigation-bar": "5.0.9-canary-20251008-f2d1b4a",
|
|
68
|
+
"expo-network": "8.0.8-canary-20251008-f2d1b4a",
|
|
69
|
+
"expo-notifications": "1.0.0-canary-20251008-f2d1b4a",
|
|
70
|
+
"expo-print": "15.0.8-canary-20251008-f2d1b4a",
|
|
71
|
+
"expo-live-photo": "1.0.8-canary-20251008-f2d1b4a",
|
|
72
|
+
"expo-router": "6.1.0-canary-20251008-f2d1b4a",
|
|
73
|
+
"expo-screen-capture": "8.0.9-canary-20251008-f2d1b4a",
|
|
74
|
+
"expo-screen-orientation": "9.0.8-canary-20251008-f2d1b4a",
|
|
75
|
+
"expo-secure-store": "15.0.8-canary-20251008-f2d1b4a",
|
|
76
|
+
"expo-sensors": "15.0.8-canary-20251008-f2d1b4a",
|
|
77
|
+
"expo-sharing": "14.0.8-canary-20251008-f2d1b4a",
|
|
78
|
+
"expo-sms": "14.0.8-canary-20251008-f2d1b4a",
|
|
79
|
+
"expo-speech": "14.0.8-canary-20251008-f2d1b4a",
|
|
80
|
+
"expo-splash-screen": "31.0.11-canary-20251008-f2d1b4a",
|
|
81
|
+
"expo-sqlite": "16.0.9-canary-20251008-f2d1b4a",
|
|
82
|
+
"expo-status-bar": "3.0.9-canary-20251008-f2d1b4a",
|
|
83
|
+
"expo-store-review": "9.0.9-canary-20251008-f2d1b4a",
|
|
84
|
+
"expo-symbols": "1.1.0-canary-20251008-f2d1b4a",
|
|
85
|
+
"expo-system-ui": "6.0.8-canary-20251008-f2d1b4a",
|
|
86
|
+
"expo-task-manager": "14.0.8-canary-20251008-f2d1b4a",
|
|
87
|
+
"expo-tracking-transparency": "6.0.8-canary-20251008-f2d1b4a",
|
|
88
|
+
"expo-updates": "29.1.0-canary-20251008-f2d1b4a",
|
|
89
|
+
"expo-video-thumbnails": "10.0.8-canary-20251008-f2d1b4a",
|
|
90
|
+
"expo-video": "3.0.12-canary-20251008-f2d1b4a",
|
|
91
|
+
"expo-web-browser": "15.0.9-canary-20251008-f2d1b4a",
|
|
92
|
+
"jest-expo": "55.0.0-canary-20251008-f2d1b4a",
|
|
93
93
|
"lottie-react-native": "~7.3.1",
|
|
94
94
|
"react": "19.1.1",
|
|
95
95
|
"react-dom": "19.1.1",
|
|
@@ -108,10 +108,10 @@
|
|
|
108
108
|
"react-native-view-shot": "4.0.3",
|
|
109
109
|
"react-native-webview": "13.15.0",
|
|
110
110
|
"sentry-expo": "~7.0.0",
|
|
111
|
-
"unimodules-app-loader": "6.0.8-canary-
|
|
111
|
+
"unimodules-app-loader": "6.0.8-canary-20251008-f2d1b4a",
|
|
112
112
|
"unimodules-image-loader-interface": "~6.1.0",
|
|
113
113
|
"@shopify/react-native-skia": "2.2.12",
|
|
114
114
|
"@shopify/flash-list": "2.0.2",
|
|
115
|
-
"@sentry/react-native": "~7.
|
|
115
|
+
"@sentry/react-native": "~7.2.0",
|
|
116
116
|
"react-native-bootsplash": "^6.3.10"
|
|
117
117
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo",
|
|
3
|
-
"version": "55.0.0-canary-
|
|
3
|
+
"version": "55.0.0-canary-20251008-f2d1b4a",
|
|
4
4
|
"description": "The Expo SDK",
|
|
5
5
|
"main": "src/Expo.ts",
|
|
6
6
|
"module": "src/Expo.ts",
|
|
@@ -75,23 +75,24 @@
|
|
|
75
75
|
"homepage": "https://github.com/expo/expo/tree/main/packages/expo",
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@babel/runtime": "^7.20.0",
|
|
78
|
-
"@expo/cli": "54.1.0-canary-
|
|
79
|
-
"@expo/config": "12.0.11-canary-
|
|
80
|
-
"@expo/config-plugins": "54.0.3-canary-
|
|
81
|
-
"@expo/devtools": "0.1.8-canary-
|
|
82
|
-
"@expo/fingerprint": "0.15.2-canary-
|
|
78
|
+
"@expo/cli": "54.1.0-canary-20251008-f2d1b4a",
|
|
79
|
+
"@expo/config": "12.0.11-canary-20251008-f2d1b4a",
|
|
80
|
+
"@expo/config-plugins": "54.0.3-canary-20251008-f2d1b4a",
|
|
81
|
+
"@expo/devtools": "0.1.8-canary-20251008-f2d1b4a",
|
|
82
|
+
"@expo/fingerprint": "0.15.2-canary-20251008-f2d1b4a",
|
|
83
83
|
"@expo/metro": "~54.0.0",
|
|
84
|
-
"@expo/metro-config": "54.0.7-canary-
|
|
84
|
+
"@expo/metro-config": "54.0.7-canary-20251008-f2d1b4a",
|
|
85
85
|
"@expo/vector-icons": "^15.0.2",
|
|
86
|
+
"@expo/log-box": "0.0.13-canary-20251008-f2d1b4a",
|
|
86
87
|
"@ungap/structured-clone": "^1.3.0",
|
|
87
|
-
"babel-preset-expo": "54.0.4-canary-
|
|
88
|
-
"expo-asset": "12.0.10-canary-
|
|
89
|
-
"expo-constants": "18.0.10-canary-
|
|
90
|
-
"expo-file-system": "19.0.17-canary-
|
|
91
|
-
"expo-font": "14.0.9-canary-
|
|
92
|
-
"expo-keep-awake": "15.0.8-canary-
|
|
93
|
-
"expo-modules-autolinking": "3.1.0-canary-
|
|
94
|
-
"expo-modules-core": "3.1.0-canary-
|
|
88
|
+
"babel-preset-expo": "54.0.4-canary-20251008-f2d1b4a",
|
|
89
|
+
"expo-asset": "12.0.10-canary-20251008-f2d1b4a",
|
|
90
|
+
"expo-constants": "18.0.10-canary-20251008-f2d1b4a",
|
|
91
|
+
"expo-file-system": "19.0.17-canary-20251008-f2d1b4a",
|
|
92
|
+
"expo-font": "14.0.9-canary-20251008-f2d1b4a",
|
|
93
|
+
"expo-keep-awake": "15.0.8-canary-20251008-f2d1b4a",
|
|
94
|
+
"expo-modules-autolinking": "3.1.0-canary-20251008-f2d1b4a",
|
|
95
|
+
"expo-modules-core": "3.1.0-canary-20251008-f2d1b4a",
|
|
95
96
|
"pretty-format": "^29.7.0",
|
|
96
97
|
"react-refresh": "^0.14.2",
|
|
97
98
|
"whatwg-url-without-unicode": "8.0.0-3"
|
|
@@ -100,15 +101,15 @@
|
|
|
100
101
|
"@types/node": "^22.14.0",
|
|
101
102
|
"@types/react": "~19.1.10",
|
|
102
103
|
"@types/react-test-renderer": "~19.1.0",
|
|
103
|
-
"expo-module-scripts": "5.0.8-canary-
|
|
104
|
+
"expo-module-scripts": "5.0.8-canary-20251008-f2d1b4a",
|
|
104
105
|
"react": "19.1.1",
|
|
105
106
|
"react-dom": "19.1.1",
|
|
106
107
|
"react-native": "0.82.0-rc.5",
|
|
107
108
|
"web-streams-polyfill": "^3.3.2"
|
|
108
109
|
},
|
|
109
110
|
"peerDependencies": {
|
|
110
|
-
"@expo/dom-webview": "0.2.8-canary-
|
|
111
|
-
"@expo/metro-runtime": "6.1.3-canary-
|
|
111
|
+
"@expo/dom-webview": "0.2.8-canary-20251008-f2d1b4a",
|
|
112
|
+
"@expo/metro-runtime": "6.1.3-canary-20251008-f2d1b4a",
|
|
112
113
|
"react": "*",
|
|
113
114
|
"react-native": "*",
|
|
114
115
|
"react-native-webview": "*"
|
package/src/async-require/hmr.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* Based on this but with web support:
|
|
9
9
|
* https://github.com/facebook/react-native/blob/086714b02b0fb838dee5a66c5bcefe73b53cf3df/Libraries/Utilities/HMRClient.js
|
|
10
10
|
*/
|
|
11
|
+
import { parseWebHmrBuildErrors, type MetroBuildError } from '@expo/log-box/utils';
|
|
11
12
|
import MetroHMRClient from '@expo/metro/metro-runtime/modules/HMRClient';
|
|
12
13
|
import prettyFormat, { plugins } from 'pretty-format';
|
|
13
14
|
import { DeviceEventEmitter } from 'react-native';
|
|
@@ -28,17 +29,9 @@ const pendingEntryPoints: string[] = [];
|
|
|
28
29
|
// @ts-expect-error: Account for multiple versions of pretty-format inside of a monorepo.
|
|
29
30
|
const prettyFormatFunc = typeof prettyFormat === 'function' ? prettyFormat : prettyFormat.default;
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
send: (msg: string) => void;
|
|
33
|
-
isEnabled: () => boolean;
|
|
34
|
-
disable: () => void;
|
|
35
|
-
enable: () => void;
|
|
36
|
-
hasPendingUpdates: () => boolean;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
let hmrClient: HMRClientType | null = null;
|
|
32
|
+
let hmrClient: MetroHMRClient | null = null;
|
|
40
33
|
let hmrUnavailableReason: string | null = null;
|
|
41
|
-
|
|
34
|
+
const buildErrorQueue = new Set<MetroBuildError>();
|
|
42
35
|
let didConnect: boolean = false;
|
|
43
36
|
const pendingLogs: [LogLevel, any[]][] = [];
|
|
44
37
|
|
|
@@ -53,14 +46,6 @@ type LogLevel =
|
|
|
53
46
|
| 'groupEnd'
|
|
54
47
|
| 'debug';
|
|
55
48
|
|
|
56
|
-
export type HMRClientNativeInterface = {
|
|
57
|
-
enable(): void;
|
|
58
|
-
disable(): void;
|
|
59
|
-
registerBundle(requestUrl: string): void;
|
|
60
|
-
log(level: LogLevel, data: any[]): void;
|
|
61
|
-
setup(props: { isEnabled: boolean }): void;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
49
|
function assert(foo: any, msg: string): asserts foo {
|
|
65
50
|
if (!foo) throw new Error(msg);
|
|
66
51
|
}
|
|
@@ -69,7 +54,7 @@ function assert(foo: any, msg: string): asserts foo {
|
|
|
69
54
|
* HMR Client that receives from the server HMR updates and propagates them
|
|
70
55
|
* runtime to reflects those changes.
|
|
71
56
|
*/
|
|
72
|
-
const HMRClient
|
|
57
|
+
const HMRClient = {
|
|
73
58
|
enable() {
|
|
74
59
|
if (hmrUnavailableReason !== null) {
|
|
75
60
|
// If HMR became unavailable while you weren't using it,
|
|
@@ -181,10 +166,10 @@ const HMRClient: HMRClientNativeInterface = {
|
|
|
181
166
|
);
|
|
182
167
|
|
|
183
168
|
client.on('connection-error', (e: Error) => {
|
|
184
|
-
let error = `Cannot connect to
|
|
169
|
+
let error = `Cannot connect to Expo CLI.
|
|
185
170
|
|
|
186
171
|
Try the following to fix the issue:
|
|
187
|
-
- Ensure the
|
|
172
|
+
- Ensure the Expo dev server is running and available on the same network as this device`;
|
|
188
173
|
error += `
|
|
189
174
|
|
|
190
175
|
URL: ${window.location.host}
|
|
@@ -195,7 +180,7 @@ const HMRClient: HMRClientNativeInterface = {
|
|
|
195
180
|
});
|
|
196
181
|
|
|
197
182
|
client.on('update-start', ({ isInitialUpdate }: { isInitialUpdate?: boolean }) => {
|
|
198
|
-
|
|
183
|
+
buildErrorQueue.clear();
|
|
199
184
|
didConnect = true;
|
|
200
185
|
|
|
201
186
|
if (client.isEnabled() && !isInitialUpdate) {
|
|
@@ -205,10 +190,11 @@ const HMRClient: HMRClientNativeInterface = {
|
|
|
205
190
|
|
|
206
191
|
client.on('update', ({ isInitialUpdate }: { isInitialUpdate?: boolean }) => {
|
|
207
192
|
if (client.isEnabled() && !isInitialUpdate) {
|
|
208
|
-
dismissRedbox();
|
|
193
|
+
// dismissRedbox();
|
|
209
194
|
// @ts-expect-error
|
|
210
195
|
globalThis.__expo_dev_resetErrors?.();
|
|
211
196
|
// LogBox.clearAllLogs();
|
|
197
|
+
// dismissGlobalErrorOverlay();
|
|
212
198
|
}
|
|
213
199
|
});
|
|
214
200
|
|
|
@@ -216,22 +202,7 @@ const HMRClient: HMRClientNativeInterface = {
|
|
|
216
202
|
hideLoading();
|
|
217
203
|
});
|
|
218
204
|
|
|
219
|
-
client.on('error', (data
|
|
220
|
-
hideLoading();
|
|
221
|
-
|
|
222
|
-
if (data.type === 'GraphNotFoundError') {
|
|
223
|
-
client.close();
|
|
224
|
-
setHMRUnavailableReason('Metro has restarted since the last edit. Reload to reconnect.');
|
|
225
|
-
} else if (data.type === 'RevisionNotFoundError') {
|
|
226
|
-
client.close();
|
|
227
|
-
setHMRUnavailableReason('Metro and the client are out of sync. Reload to reconnect.');
|
|
228
|
-
} else {
|
|
229
|
-
currentCompileErrorMessage = `${data.type} ${data.message}`;
|
|
230
|
-
if (client.isEnabled()) {
|
|
231
|
-
showCompileError();
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
});
|
|
205
|
+
client.on('error', (data) => this._onMetroError(data));
|
|
235
206
|
|
|
236
207
|
client.on('close', (closeEvent: { code: number; reason: string }) => {
|
|
237
208
|
hideLoading();
|
|
@@ -242,19 +213,19 @@ const HMRClient: HMRClientNativeInterface = {
|
|
|
242
213
|
closeEvent == null ||
|
|
243
214
|
closeEvent.code === 1000 ||
|
|
244
215
|
closeEvent.code === 1005 ||
|
|
216
|
+
closeEvent.code === 1006 ||
|
|
245
217
|
closeEvent.code == null;
|
|
246
218
|
|
|
247
219
|
setHMRUnavailableReason(
|
|
248
220
|
`${
|
|
249
221
|
isNormalOrUnsetCloseReason
|
|
250
|
-
? 'Disconnected from
|
|
251
|
-
: `Disconnected from
|
|
222
|
+
? 'Disconnected from Expo CLI.'
|
|
223
|
+
: `Disconnected from Expo CLI (${closeEvent.code}: "${closeEvent.reason}").`
|
|
252
224
|
}
|
|
253
225
|
|
|
254
226
|
To reconnect:
|
|
255
|
-
-
|
|
256
|
-
- Reload
|
|
257
|
-
`
|
|
227
|
+
- Start the dev server with: npx expo
|
|
228
|
+
- Reload the ${process.env.EXPO_OS === 'web' ? 'page' : 'app'}`
|
|
258
229
|
);
|
|
259
230
|
});
|
|
260
231
|
|
|
@@ -267,6 +238,41 @@ To reconnect:
|
|
|
267
238
|
registerBundleEntryPoints(hmrClient);
|
|
268
239
|
flushEarlyLogs();
|
|
269
240
|
},
|
|
241
|
+
|
|
242
|
+
_onMetroError(data: unknown) {
|
|
243
|
+
if (!hmrClient) {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
assert(typeof data === 'object' && data != null, 'Expected data to be an object');
|
|
248
|
+
|
|
249
|
+
hideLoading();
|
|
250
|
+
|
|
251
|
+
if ('type' in data) {
|
|
252
|
+
if (data.type === 'GraphNotFoundError') {
|
|
253
|
+
hmrClient.close();
|
|
254
|
+
setHMRUnavailableReason('Expo CLI has restarted since the last edit. Reload to reconnect.');
|
|
255
|
+
return;
|
|
256
|
+
} else if (data.type === 'RevisionNotFoundError') {
|
|
257
|
+
hmrClient.close();
|
|
258
|
+
setHMRUnavailableReason(
|
|
259
|
+
`Expo CLI and the ${process.env.EXPO_OS} client are out of sync. Reload to reconnect.`
|
|
260
|
+
);
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// Fallback for resolution errors which don't return a type
|
|
266
|
+
// https://github.com/facebook/metro/blob/a3fac645dc377f78bd4182ca0ca73629b2707d5b/packages/metro/src/lib/formatBundlingError.js#L65-L73
|
|
267
|
+
// https://github.com/facebook/metro/pull/1487
|
|
268
|
+
const error = parseWebHmrBuildErrors(data);
|
|
269
|
+
|
|
270
|
+
buildErrorQueue.add(error);
|
|
271
|
+
|
|
272
|
+
if (hmrClient.isEnabled()) {
|
|
273
|
+
showCompileError();
|
|
274
|
+
}
|
|
275
|
+
},
|
|
270
276
|
};
|
|
271
277
|
|
|
272
278
|
function setHMRUnavailableReason(reason: string) {
|
|
@@ -286,7 +292,7 @@ function setHMRUnavailableReason(reason: string) {
|
|
|
286
292
|
}
|
|
287
293
|
}
|
|
288
294
|
|
|
289
|
-
function registerBundleEntryPoints(client:
|
|
295
|
+
function registerBundleEntryPoints(client: MetroHMRClient | null) {
|
|
290
296
|
if (hmrUnavailableReason != null) {
|
|
291
297
|
// "Bundle Splitting – Metro disconnected"
|
|
292
298
|
window.location.reload();
|
|
@@ -314,27 +320,17 @@ function flushEarlyLogs() {
|
|
|
314
320
|
}
|
|
315
321
|
}
|
|
316
322
|
|
|
317
|
-
function dismissRedbox() {
|
|
318
|
-
// TODO(EvanBacon): Error overlay for web.
|
|
319
|
-
}
|
|
320
|
-
|
|
321
323
|
function showCompileError() {
|
|
322
|
-
if (
|
|
324
|
+
if (buildErrorQueue.size === 0) {
|
|
323
325
|
return;
|
|
324
326
|
}
|
|
325
327
|
|
|
326
328
|
// Even if there is already a redbox, syntax errors are more important.
|
|
327
329
|
// Otherwise you risk seeing a stale runtime error while a syntax error is more recent.
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
const message = currentCompileErrorMessage;
|
|
331
|
-
currentCompileErrorMessage = null;
|
|
330
|
+
// dismissGlobalErrorOverlay();
|
|
332
331
|
|
|
333
|
-
const error =
|
|
334
|
-
|
|
335
|
-
// because the stack trace is meaningless:
|
|
336
|
-
// @ts-expect-error
|
|
337
|
-
error.preventSymbolication = true;
|
|
332
|
+
const error = buildErrorQueue.values().next().value;
|
|
333
|
+
buildErrorQueue.clear();
|
|
338
334
|
throw error;
|
|
339
335
|
}
|
|
340
336
|
|
package/src/dom/dom-entry.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Entry file for a DOM Component.
|
|
2
2
|
import '@expo/metro-runtime';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { setupLogBox } from '@expo/log-box';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
7
|
import { JSONValue } from './dom.types';
|
|
@@ -9,7 +9,7 @@ import { addEventListener, getActionsObject } from './marshal';
|
|
|
9
9
|
import registerRootComponent from '../launch/registerRootComponent';
|
|
10
10
|
|
|
11
11
|
interface MarshalledProps {
|
|
12
|
-
|
|
12
|
+
names: string[];
|
|
13
13
|
props: Record<string, JSONValue>;
|
|
14
14
|
[key: string]: undefined | JSONValue;
|
|
15
15
|
}
|
|
@@ -92,7 +92,7 @@ export function registerDOMComponent(AppModule: any) {
|
|
|
92
92
|
// Create a named map { [name: string]: ProxyFunction }
|
|
93
93
|
// TODO(@kitten): Unclear how this is typed or shaped
|
|
94
94
|
return Object.fromEntries(
|
|
95
|
-
|
|
95
|
+
marshalledProps.names.map((key: string) => {
|
|
96
96
|
return [key, ACTIONS[key]];
|
|
97
97
|
})
|
|
98
98
|
);
|
|
@@ -102,12 +102,12 @@ export function registerDOMComponent(AppModule: any) {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
try {
|
|
105
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
106
|
+
setupLogBox();
|
|
107
|
+
}
|
|
108
|
+
|
|
105
109
|
React.startTransition(() => {
|
|
106
|
-
|
|
107
|
-
registerRootComponent(withErrorOverlay(DOMComponentRoot));
|
|
108
|
-
} else {
|
|
109
|
-
registerRootComponent(DOMComponentRoot);
|
|
110
|
-
}
|
|
110
|
+
registerRootComponent(DOMComponentRoot);
|
|
111
111
|
});
|
|
112
112
|
} catch (e) {
|
|
113
113
|
const error = convertError(e);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DOMProps } from './dom.types';
|
|
2
|
+
|
|
3
|
+
export interface DOMPropsInternal extends DOMProps {
|
|
4
|
+
/**
|
|
5
|
+
* Allows dynamically redirecting a component to a different source, for example prebuilt version.
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
sourceOverride?: { uri: string };
|
|
9
|
+
}
|
package/src/dom/internal.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { default as WebView } from './webview-wrapper';
|
|
2
2
|
|
|
3
|
+
export * from './dom-internal.types';
|
|
4
|
+
|
|
3
5
|
// Skip all dom-only functions to give 'undefined is not a function' errors.
|
|
4
6
|
export const registerDOMComponent: undefined | typeof import('./dom-entry').registerDOMComponent =
|
|
5
7
|
undefined;
|
|
@@ -3,7 +3,8 @@ import React from 'react';
|
|
|
3
3
|
import { AppState } from 'react-native';
|
|
4
4
|
|
|
5
5
|
import { getBaseURL } from './base';
|
|
6
|
-
import
|
|
6
|
+
import { DOMPropsInternal } from './dom-internal.types';
|
|
7
|
+
import type { BridgeMessage, WebViewProps, WebViewRef } from './dom.types';
|
|
7
8
|
import { _emitGlobalEvent } from './global-events';
|
|
8
9
|
import {
|
|
9
10
|
getInjectBodySizeObserverScript,
|
|
@@ -22,7 +23,7 @@ type RawWebViewProps = React.ComponentProps<Exclude<typeof ExpoDomWebView, undef
|
|
|
22
23
|
|
|
23
24
|
interface Props {
|
|
24
25
|
children?: any;
|
|
25
|
-
dom?:
|
|
26
|
+
dom?: DOMPropsInternal;
|
|
26
27
|
filePath: string;
|
|
27
28
|
ref: React.Ref<object>;
|
|
28
29
|
[propName: string]: unknown;
|
|
@@ -30,6 +31,8 @@ interface Props {
|
|
|
30
31
|
|
|
31
32
|
const RawWebView = React.forwardRef<object, Props>((props, ref) => {
|
|
32
33
|
const { children, dom, filePath, ref: _ref, ...marshalProps } = props as Props;
|
|
34
|
+
const { sourceOverride, ...domProps } = dom || {};
|
|
35
|
+
|
|
33
36
|
if (__DEV__) {
|
|
34
37
|
if (children !== undefined) {
|
|
35
38
|
throw new Error(
|
|
@@ -66,7 +69,7 @@ const RawWebView = React.forwardRef<object, Props>((props, ref) => {
|
|
|
66
69
|
const webView = resolveWebView(dom?.useExpoDOMWebView ?? false);
|
|
67
70
|
const webviewRef = React.useRef<WebViewRef>(null);
|
|
68
71
|
const domImperativeHandlePropsRef = React.useRef<string[]>([]);
|
|
69
|
-
const source = { uri: `${getBaseURL()}/${filePath}` };
|
|
72
|
+
const source = sourceOverride ?? { uri: `${getBaseURL()}/${filePath}` };
|
|
70
73
|
const [containerStyle, setContainerStyle] = React.useState<WebViewProps['containerStyle']>(null);
|
|
71
74
|
|
|
72
75
|
const { debugZeroHeightStyle, debugOnLayout } = useDebugZeroHeight(dom);
|
|
@@ -129,7 +132,7 @@ const RawWebView = React.forwardRef<object, Props>((props, ref) => {
|
|
|
129
132
|
subscription.remove();
|
|
130
133
|
});
|
|
131
134
|
},
|
|
132
|
-
...
|
|
135
|
+
...domProps,
|
|
133
136
|
containerStyle: [containerStyle, debugZeroHeightStyle, dom?.containerStyle],
|
|
134
137
|
onLayout: __DEV__ ? debugOnLayout : dom?.onLayout,
|
|
135
138
|
injectedJavaScriptBeforeContentLoaded: [
|
package/template.tgz
CHANGED
|
Binary file
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
package expo.modules
|
|
2
|
-
|
|
3
|
-
import android.app.Application
|
|
4
|
-
import android.content.Context
|
|
5
|
-
import com.facebook.react.ReactHost
|
|
6
|
-
import com.facebook.react.ReactNativeHost
|
|
7
|
-
import com.facebook.react.ReactPackageTurboModuleManagerDelegate
|
|
8
|
-
import com.facebook.react.bridge.UIManagerProvider
|
|
9
|
-
import com.facebook.react.common.SurfaceDelegateFactory
|
|
10
|
-
import com.facebook.react.devsupport.DevSupportManagerFactory
|
|
11
|
-
import com.facebook.react.devsupport.interfaces.RedBoxHandler
|
|
12
|
-
|
|
13
|
-
class ReactNativeHostWrapper(
|
|
14
|
-
application: Application,
|
|
15
|
-
host: ReactNativeHost
|
|
16
|
-
) : ReactNativeHostWrapperBase(application, host) {
|
|
17
|
-
override fun getDevSupportManagerFactory(): DevSupportManagerFactory? {
|
|
18
|
-
return reactNativeHostHandlers
|
|
19
|
-
.asSequence()
|
|
20
|
-
.mapNotNull { it.devSupportManagerFactory }
|
|
21
|
-
.firstOrNull() as DevSupportManagerFactory?
|
|
22
|
-
?: invokeDelegateMethod("getDevSupportManagerFactory")
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
override fun getReactPackageTurboModuleManagerDelegateBuilder(): ReactPackageTurboModuleManagerDelegate.Builder? {
|
|
26
|
-
return invokeDelegateMethod("getReactPackageTurboModuleManagerDelegateBuilder")
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
override fun getUIManagerProvider(): UIManagerProvider? {
|
|
30
|
-
return invokeDelegateMethod("getUIManagerProvider")
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
override fun getShouldRequireActivity(): Boolean {
|
|
34
|
-
return host.shouldRequireActivity
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
override fun getSurfaceDelegateFactory(): SurfaceDelegateFactory {
|
|
38
|
-
return host.surfaceDelegateFactory
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
override fun getRedBoxHandler(): RedBoxHandler? {
|
|
42
|
-
return invokeDelegateMethod("getRedBoxHandler")
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
companion object {
|
|
46
|
-
@JvmStatic
|
|
47
|
-
fun createReactHost(context: Context, reactNativeHost: ReactNativeHost): ReactHost {
|
|
48
|
-
return ExpoReactHostFactory.createFromReactNativeHost(context, reactNativeHost)
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|