expo 57.0.6 → 57.0.8
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/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/fetch/NativeResponse.kt +20 -7
- package/build/utils/getBundleUrl.web.d.ts.map +1 -1
- package/bundledNativeModules.json +36 -36
- package/package.json +15 -15
- package/src/utils/__tests__/getBundleUrl.test.web.ts +34 -0
- package/src/utils/getBundleUrl.web.ts +8 -6
- package/template.tgz +0 -0
package/android/build.gradle
CHANGED
|
@@ -10,7 +10,7 @@ buildscript {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
group = 'host.exp.exponent'
|
|
13
|
-
version = '57.0.
|
|
13
|
+
version = '57.0.8'
|
|
14
14
|
|
|
15
15
|
expoModule {
|
|
16
16
|
// We can't prebuild the module because it depends on the generated files.
|
|
@@ -21,7 +21,7 @@ android {
|
|
|
21
21
|
namespace "expo.core"
|
|
22
22
|
defaultConfig {
|
|
23
23
|
versionCode 1
|
|
24
|
-
versionName "57.0.
|
|
24
|
+
versionName "57.0.8"
|
|
25
25
|
consumerProguardFiles("proguard-rules.pro")
|
|
26
26
|
}
|
|
27
27
|
testOptions {
|
|
@@ -8,7 +8,9 @@ import expo.modules.kotlin.AppContext
|
|
|
8
8
|
import expo.modules.kotlin.sharedobjects.SharedObject
|
|
9
9
|
import kotlinx.coroutines.CoroutineScope
|
|
10
10
|
import kotlinx.coroutines.Dispatchers
|
|
11
|
+
import kotlinx.coroutines.NonCancellable
|
|
11
12
|
import kotlinx.coroutines.launch
|
|
13
|
+
import kotlinx.coroutines.withContext
|
|
12
14
|
import okhttp3.Call
|
|
13
15
|
import okhttp3.Callback
|
|
14
16
|
import okhttp3.Response
|
|
@@ -138,10 +140,17 @@ internal class NativeResponse(appContext: AppContext, private val coroutineScope
|
|
|
138
140
|
responseInit = createResponseInit(response)
|
|
139
141
|
state = ResponseState.RESPONSE_RECEIVED
|
|
140
142
|
|
|
141
|
-
coroutineScope.launch
|
|
143
|
+
coroutineScope.launch {
|
|
142
144
|
val stream = response.body?.source() ?: return@launch
|
|
143
|
-
|
|
144
|
-
|
|
145
|
+
try {
|
|
146
|
+
pumpResponseBodyStream(stream)
|
|
147
|
+
} finally {
|
|
148
|
+
// Close off the modules queue so the blocking call doesn't stall it.
|
|
149
|
+
// NonCancellable guarantees the response is released even if the scope is canceled mid-stream.
|
|
150
|
+
withContext(NonCancellable + Dispatchers.IO) {
|
|
151
|
+
response.close()
|
|
152
|
+
}
|
|
153
|
+
}
|
|
145
154
|
|
|
146
155
|
if (this@NativeResponse.state == ResponseState.BODY_STREAMING_STARTED) {
|
|
147
156
|
emit("didComplete")
|
|
@@ -182,9 +191,13 @@ internal class NativeResponse(appContext: AppContext, private val coroutineScope
|
|
|
182
191
|
)
|
|
183
192
|
}
|
|
184
193
|
|
|
185
|
-
private fun pumpResponseBodyStream(stream: BufferedSource) {
|
|
194
|
+
private suspend fun pumpResponseBodyStream(stream: BufferedSource) {
|
|
186
195
|
try {
|
|
187
|
-
while (
|
|
196
|
+
while (true) {
|
|
197
|
+
val data = withContext(Dispatchers.IO) {
|
|
198
|
+
if (stream.exhausted()) null else stream.buffer.readByteArray()
|
|
199
|
+
} ?: break
|
|
200
|
+
|
|
188
201
|
if (isInvalidState(
|
|
189
202
|
ResponseState.RESPONSE_RECEIVED,
|
|
190
203
|
ResponseState.BODY_STREAMING_STARTED,
|
|
@@ -194,9 +207,9 @@ internal class NativeResponse(appContext: AppContext, private val coroutineScope
|
|
|
194
207
|
break
|
|
195
208
|
}
|
|
196
209
|
if (state == ResponseState.RESPONSE_RECEIVED) {
|
|
197
|
-
sink.appendBufferBody(
|
|
210
|
+
sink.appendBufferBody(data)
|
|
198
211
|
} else if (state == ResponseState.BODY_STREAMING_STARTED) {
|
|
199
|
-
emit("didReceiveResponseData",
|
|
212
|
+
emit("didReceiveResponseData", data)
|
|
200
213
|
} else {
|
|
201
214
|
break
|
|
202
215
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBundleUrl.web.d.ts","sourceRoot":"","sources":["../../src/utils/getBundleUrl.web.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getBundleUrl.web.d.ts","sourceRoot":"","sources":["../../src/utils/getBundleUrl.web.ts"],"names":[],"mappings":"AAOA,wBAAgB,YAAY,IAAI,MAAM,GAAG,IAAI,CAe5C"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"@expo/dom-webview": "~57.0.1",
|
|
3
|
-
"@expo/fingerprint": "~0.20.
|
|
4
|
-
"@expo/metro-runtime": "~57.0.
|
|
3
|
+
"@expo/fingerprint": "~0.20.6",
|
|
4
|
+
"@expo/metro-runtime": "~57.0.7",
|
|
5
5
|
"@expo/vector-icons": "^15.0.2",
|
|
6
|
-
"@expo/ui": "~57.0.
|
|
6
|
+
"@expo/ui": "~57.0.7",
|
|
7
7
|
"@react-native-async-storage/async-storage": "2.2.0",
|
|
8
8
|
"@react-native-community/datetimepicker": "9.1.0",
|
|
9
9
|
"@react-native-masked-view/masked-view": "0.3.2",
|
|
@@ -17,28 +17,28 @@
|
|
|
17
17
|
"expo-analytics-amplitude": "~11.3.0",
|
|
18
18
|
"expo-app-auth": "~11.1.0",
|
|
19
19
|
"expo-app-loader-provider": "~8.0.0",
|
|
20
|
-
"expo-app-metrics": "~57.0.
|
|
20
|
+
"expo-app-metrics": "~57.0.6",
|
|
21
21
|
"expo-apple-authentication": "~57.0.1",
|
|
22
|
-
"expo-application": "~57.0.
|
|
23
|
-
"expo-asset": "~57.0.
|
|
24
|
-
"expo-audio": "~57.0.
|
|
25
|
-
"expo-auth-session": "~57.0.
|
|
26
|
-
"expo-background-fetch": "~57.0.
|
|
27
|
-
"expo-background-task": "~57.0.
|
|
22
|
+
"expo-application": "~57.0.2",
|
|
23
|
+
"expo-asset": "~57.0.7",
|
|
24
|
+
"expo-audio": "~57.0.3",
|
|
25
|
+
"expo-auth-session": "~57.0.5",
|
|
26
|
+
"expo-background-fetch": "~57.0.6",
|
|
27
|
+
"expo-background-task": "~57.0.6",
|
|
28
28
|
"expo-battery": "~57.0.1",
|
|
29
29
|
"expo-blur": "~57.0.2",
|
|
30
30
|
"expo-brightness": "~57.0.1",
|
|
31
|
-
"expo-brownfield": "~57.0.
|
|
32
|
-
"expo-build-properties": "~57.0.
|
|
31
|
+
"expo-brownfield": "~57.0.7",
|
|
32
|
+
"expo-build-properties": "~57.0.7",
|
|
33
33
|
"expo-calendar": "~57.0.1",
|
|
34
|
-
"expo-camera": "~57.0.
|
|
34
|
+
"expo-camera": "~57.0.3",
|
|
35
35
|
"expo-cellular": "~57.0.1",
|
|
36
36
|
"expo-checkbox": "~57.0.0",
|
|
37
37
|
"expo-clipboard": "~57.0.1",
|
|
38
|
-
"expo-constants": "~57.0.
|
|
39
|
-
"expo-contacts": "~57.0.
|
|
38
|
+
"expo-constants": "~57.0.7",
|
|
39
|
+
"expo-contacts": "~57.0.2",
|
|
40
40
|
"expo-crypto": "~57.0.1",
|
|
41
|
-
"expo-dev-client": "~57.0.
|
|
41
|
+
"expo-dev-client": "~57.0.8",
|
|
42
42
|
"expo-device": "~57.0.1",
|
|
43
43
|
"expo-document-picker": "~57.0.1",
|
|
44
44
|
"expo-eas-client": "~57.0.1",
|
|
@@ -50,52 +50,52 @@
|
|
|
50
50
|
"expo-haptics": "~57.0.1",
|
|
51
51
|
"expo-image": "~57.0.1",
|
|
52
52
|
"expo-image-loader": "~57.0.1",
|
|
53
|
-
"expo-image-manipulator": "~57.0.
|
|
54
|
-
"expo-image-picker": "~57.0.
|
|
53
|
+
"expo-image-manipulator": "~57.0.6",
|
|
54
|
+
"expo-image-picker": "~57.0.6",
|
|
55
55
|
"expo-intent-launcher": "~57.0.1",
|
|
56
|
-
"expo-insights": "~57.0.
|
|
56
|
+
"expo-insights": "~57.0.6",
|
|
57
57
|
"expo-keep-awake": "~57.0.1",
|
|
58
58
|
"expo-linear-gradient": "~57.0.1",
|
|
59
|
-
"expo-linking": "~57.0.
|
|
60
|
-
"expo-local-authentication": "~57.0.
|
|
59
|
+
"expo-linking": "~57.0.4",
|
|
60
|
+
"expo-local-authentication": "~57.0.2",
|
|
61
61
|
"expo-localization": "~57.0.1",
|
|
62
|
-
"expo-location": "~57.0.
|
|
62
|
+
"expo-location": "~57.0.6",
|
|
63
63
|
"expo-mail-composer": "~57.0.1",
|
|
64
64
|
"expo-manifests": "~57.0.1",
|
|
65
65
|
"expo-maps": "~57.0.1",
|
|
66
66
|
"expo-mcp": "~0.2.1",
|
|
67
|
-
"expo-media-library": "~57.0.
|
|
67
|
+
"expo-media-library": "~57.0.3",
|
|
68
68
|
"expo-mesh-gradient": "~57.0.1",
|
|
69
|
-
"expo-module-template": "~57.0.
|
|
70
|
-
"expo-modules-core": "~57.0.
|
|
69
|
+
"expo-module-template": "~57.0.4",
|
|
70
|
+
"expo-modules-core": "~57.0.7",
|
|
71
71
|
"expo-navigation-bar": "~57.0.2",
|
|
72
72
|
"expo-network": "~57.0.1",
|
|
73
|
-
"expo-notifications": "~57.0.
|
|
74
|
-
"expo-observe": "~57.0.
|
|
73
|
+
"expo-notifications": "~57.0.7",
|
|
74
|
+
"expo-observe": "~57.0.8",
|
|
75
75
|
"expo-print": "~57.0.1",
|
|
76
76
|
"expo-live-photo": "~57.0.1",
|
|
77
|
-
"expo-router": "~57.0.
|
|
77
|
+
"expo-router": "~57.0.8",
|
|
78
78
|
"expo-screen-capture": "~57.0.1",
|
|
79
79
|
"expo-screen-orientation": "~57.0.1",
|
|
80
80
|
"expo-secure-store": "~57.0.1",
|
|
81
81
|
"expo-sensors": "~57.0.2",
|
|
82
82
|
"expo-server": "~57.0.1",
|
|
83
|
-
"expo-sharing": "~57.0.
|
|
83
|
+
"expo-sharing": "~57.0.7",
|
|
84
84
|
"expo-sms": "~57.0.1",
|
|
85
85
|
"expo-speech": "~57.0.1",
|
|
86
|
-
"expo-splash-screen": "~57.0.
|
|
86
|
+
"expo-splash-screen": "~57.0.5",
|
|
87
87
|
"expo-sqlite": "~57.0.1",
|
|
88
88
|
"expo-status-bar": "~57.0.1",
|
|
89
89
|
"expo-store-review": "~57.0.1",
|
|
90
90
|
"expo-symbols": "~57.0.1",
|
|
91
91
|
"expo-system-ui": "~57.0.1",
|
|
92
|
-
"expo-task-manager": "~57.0.
|
|
92
|
+
"expo-task-manager": "~57.0.6",
|
|
93
93
|
"expo-tracking-transparency": "~57.0.1",
|
|
94
|
-
"expo-updates": "~57.0.
|
|
94
|
+
"expo-updates": "~57.0.9",
|
|
95
95
|
"expo-video-thumbnails": "~57.0.1",
|
|
96
|
-
"expo-video": "~57.0.
|
|
97
|
-
"expo-web-browser": "~57.0.
|
|
98
|
-
"expo-widgets": "~57.0.
|
|
96
|
+
"expo-video": "~57.0.2",
|
|
97
|
+
"expo-web-browser": "~57.0.2",
|
|
98
|
+
"expo-widgets": "~57.0.6",
|
|
99
99
|
"jest-expo": "~57.0.2",
|
|
100
100
|
"lottie-react-native": "~7.3.8",
|
|
101
101
|
"react": "19.2.3",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"react-native-pager-view": "8.0.2",
|
|
110
110
|
"react-native-worklets": "0.10.0",
|
|
111
111
|
"react-native-reanimated": "4.5.0",
|
|
112
|
-
"react-native-screens": "4.
|
|
112
|
+
"react-native-screens": "~4.26.0",
|
|
113
113
|
"react-native-safe-area-context": "~5.7.0",
|
|
114
114
|
"react-native-svg": "15.15.4",
|
|
115
115
|
"react-native-view-shot": "5.1.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo",
|
|
3
|
-
"version": "57.0.
|
|
3
|
+
"version": "57.0.8",
|
|
4
4
|
"description": "The Expo SDK",
|
|
5
5
|
"main": "src/Expo.ts",
|
|
6
6
|
"module": "src/Expo.ts",
|
|
@@ -68,25 +68,25 @@
|
|
|
68
68
|
"homepage": "https://github.com/expo/expo/tree/main/packages/expo",
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@babel/runtime": "^7.20.0",
|
|
71
|
-
"@expo/cli": "^57.0.
|
|
72
|
-
"@expo/config": "~57.0.
|
|
73
|
-
"@expo/config-plugins": "~57.0.
|
|
71
|
+
"@expo/cli": "^57.0.10",
|
|
72
|
+
"@expo/config": "~57.0.6",
|
|
73
|
+
"@expo/config-plugins": "~57.0.6",
|
|
74
74
|
"@expo/devtools": "~57.0.1",
|
|
75
75
|
"@expo/dom-webview": "~57.0.1",
|
|
76
|
-
"@expo/fingerprint": "^0.20.
|
|
76
|
+
"@expo/fingerprint": "^0.20.6",
|
|
77
77
|
"@expo/local-build-cache-provider": "^57.0.4",
|
|
78
78
|
"@expo/log-box": "^57.0.1",
|
|
79
79
|
"@expo/metro": "~56.0.0",
|
|
80
|
-
"@expo/metro-config": "~57.0.
|
|
80
|
+
"@expo/metro-config": "~57.0.7",
|
|
81
81
|
"@ungap/structured-clone": "^1.3.0",
|
|
82
|
-
"babel-preset-expo": "~57.0.
|
|
83
|
-
"expo-asset": "~57.0.
|
|
84
|
-
"expo-constants": "~57.0.
|
|
82
|
+
"babel-preset-expo": "~57.0.4",
|
|
83
|
+
"expo-asset": "~57.0.7",
|
|
84
|
+
"expo-constants": "~57.0.7",
|
|
85
85
|
"expo-file-system": "~57.0.1",
|
|
86
86
|
"expo-font": "~57.0.1",
|
|
87
87
|
"expo-keep-awake": "~57.0.1",
|
|
88
|
-
"expo-modules-autolinking": "~57.0.
|
|
89
|
-
"expo-modules-core": "~57.0.
|
|
88
|
+
"expo-modules-autolinking": "~57.0.9",
|
|
89
|
+
"expo-modules-core": "~57.0.7",
|
|
90
90
|
"pretty-format": "^29.7.0",
|
|
91
91
|
"react-refresh": "^0.14.2",
|
|
92
92
|
"whatwg-url-minimum": "^0.1.2"
|
|
@@ -100,9 +100,9 @@
|
|
|
100
100
|
"react-native": "0.86.0",
|
|
101
101
|
"rimraf": "^6.1.2",
|
|
102
102
|
"web-streams-polyfill": "^3.3.2",
|
|
103
|
-
"@expo/
|
|
104
|
-
"expo-updates": "57.0.
|
|
105
|
-
"@expo/
|
|
103
|
+
"@expo/dom-webview": "57.0.1",
|
|
104
|
+
"expo-updates": "57.0.9",
|
|
105
|
+
"@expo/metro-runtime": "57.0.7"
|
|
106
106
|
},
|
|
107
107
|
"peerDependencies": {
|
|
108
108
|
"@expo/dom-webview": "*",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"scripts/resolveAppEntry.js"
|
|
140
140
|
]
|
|
141
141
|
},
|
|
142
|
-
"gitHead": "
|
|
142
|
+
"gitHead": "a4789f1e53353f4929b0baddcfe5a7c622b99c71",
|
|
143
143
|
"scripts": {
|
|
144
144
|
"build": "tsc",
|
|
145
145
|
"clean": "rimraf build",
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
function setCurrentScript(src: string | null) {
|
|
6
|
+
Object.defineProperty(document, 'currentScript', {
|
|
7
|
+
configurable: true,
|
|
8
|
+
value: src == null ? null : Object.assign(document.createElement('script'), { src }),
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// The web test project runs this file in jsdom, the node project on the server.
|
|
13
|
+
// `getBundleUrl` reads `document.currentScript`, so only assert in the browser.
|
|
14
|
+
if (typeof window === 'undefined') {
|
|
15
|
+
it('noop', () => {});
|
|
16
|
+
} else {
|
|
17
|
+
afterEach(() => {
|
|
18
|
+
setCurrentScript(null);
|
|
19
|
+
jest.resetModules();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('returns the bundle URL while the script is executing synchronously', () => {
|
|
23
|
+
setCurrentScript('https://localhost:8081/index.bundle?platform=web');
|
|
24
|
+
const { getBundleUrl } = require('../getBundleUrl');
|
|
25
|
+
expect(getBundleUrl()).toBe('https://localhost:8081/index.bundle');
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('still returns the bundle URL after the script finished executing', () => {
|
|
29
|
+
setCurrentScript('https://localhost:8081/index.bundle?platform=web');
|
|
30
|
+
const { getBundleUrl } = require('../getBundleUrl');
|
|
31
|
+
setCurrentScript(null);
|
|
32
|
+
expect(getBundleUrl()).toBe('https://localhost:8081/index.bundle');
|
|
33
|
+
});
|
|
34
|
+
}
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
// Copyright 2015-present 650 Industries. All rights reserved.
|
|
2
2
|
|
|
3
|
+
// `document.currentScript` is only set during synchronous script execution, so we capture its URL
|
|
4
|
+
// at module load; reading it later (effect, async, dynamic import) would see `null`.
|
|
5
|
+
const initialScriptURL: string | null =
|
|
6
|
+
typeof window !== 'undefined' ? (document.currentScript as HTMLScriptElement)?.src : null;
|
|
7
|
+
|
|
3
8
|
export function getBundleUrl(): string | null {
|
|
4
|
-
let scriptURL: string | null
|
|
9
|
+
let scriptURL: string | null = initialScriptURL;
|
|
5
10
|
|
|
6
11
|
if (typeof window === 'undefined') {
|
|
7
12
|
// For server runtime, we use the filename of the current script
|
|
8
|
-
// @ts-
|
|
13
|
+
// @ts-expect-error The react-native tsconfig doesn't support CJS
|
|
9
14
|
scriptURL = 'file://' + __filename;
|
|
10
|
-
} else {
|
|
11
|
-
// TODO: Try to support `import.meta.url` when the ecosystem supports ESM,
|
|
12
|
-
// and jest doesn't throw SyntaxError when accessing `import.meta`.
|
|
13
|
-
scriptURL = (document.currentScript as HTMLScriptElement)?.src;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
if (scriptURL == null) {
|
|
17
18
|
return null;
|
|
18
19
|
}
|
|
20
|
+
|
|
19
21
|
const url = new URL(scriptURL);
|
|
20
22
|
return `${url.protocol}//${url.host}${url.pathname}`;
|
|
21
23
|
}
|
package/template.tgz
CHANGED
|
Binary file
|