expo 57.0.31 → 57.0.33
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/build/winter/fetch/RequestUtils.d.ts +1 -0
- package/build/winter/fetch/RequestUtils.d.ts.map +1 -1
- package/build/winter/fetch/fetch.d.ts.map +1 -1
- package/bundledNativeModules.json +31 -31
- package/package.json +16 -16
- package/src/winter/fetch/RequestUtils.ts +8 -4
- package/src/winter/fetch/__tests__/fetch-test.native.ts +56 -0
- package/src/winter/fetch/fetch.ts +8 -2
- 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.33'
|
|
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.33"
|
|
25
25
|
consumerProguardFiles("proguard-rules.pro")
|
|
26
26
|
}
|
|
27
27
|
testOptions {
|
|
@@ -8,6 +8,7 @@ export declare function convertReadableStreamToUint8ArrayAsync(stream: ReadableS
|
|
|
8
8
|
*/
|
|
9
9
|
export declare function normalizeBodyInitAsync(body: BodyInit | null | undefined): Promise<{
|
|
10
10
|
body: Uint8Array | null;
|
|
11
|
+
defaultHeaders?: NativeHeadersType;
|
|
11
12
|
overriddenHeaders?: NativeHeadersType;
|
|
12
13
|
}>;
|
|
13
14
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestUtils.d.ts","sourceRoot":"","sources":["../../../src/winter/fetch/RequestUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAIzD;;GAEG;AACH,wBAAsB,sCAAsC,CAC1D,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,GACjC,OAAO,CAAC,UAAU,CAAC,CAsBrB;AAgBD;;GAEG;AACH,wBAAsB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"RequestUtils.d.ts","sourceRoot":"","sources":["../../../src/winter/fetch/RequestUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAIzD;;GAEG;AACH,wBAAsB,sCAAsC,CAC1D,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,GACjC,OAAO,CAAC,UAAU,CAAC,CAsBrB;AAgBD;;GAEG;AACH,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC;IACvF,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;IACxB,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC,CAAC,CA+CD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,iBAAiB,CAe/F;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,iBAAiB,EAC1B,UAAU,EAAE,iBAAiB,GAC5B,iBAAiB,CAYnB;AAED,iDAAiD;AACjD,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAatD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../src/winter/fetch/fetch.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAyC,MAAM,iBAAiB,CAAC;AAQvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAwBxE,wBAAsB,KAAK,CACzB,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,gBAAgB,EACtC,IAAI,CAAC,EAAE,gBAAgB,GACtB,OAAO,CAAC,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../src/winter/fetch/fetch.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAyC,MAAM,iBAAiB,CAAC;AAQvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAwBxE,wBAAsB,KAAK,CACzB,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,gBAAgB,EACtC,IAAI,CAAC,EAAE,gBAAgB,GACtB,OAAO,CAAC,aAAa,CAAC,CAgExB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
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.16",
|
|
4
|
+
"@expo/metro-runtime": "~57.0.18",
|
|
5
5
|
"@expo/vector-icons": "^15.0.2",
|
|
6
6
|
"@expo/ui": "~57.0.26",
|
|
7
7
|
"@react-native-async-storage/async-storage": "2.2.0",
|
|
@@ -17,85 +17,85 @@
|
|
|
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.24",
|
|
21
21
|
"expo-apple-authentication": "~57.0.2",
|
|
22
22
|
"expo-application": "~57.0.3",
|
|
23
|
-
"expo-asset": "~57.0.
|
|
23
|
+
"expo-asset": "~57.0.21",
|
|
24
24
|
"expo-audio": "~57.0.5",
|
|
25
|
-
"expo-auth-session": "~57.0.
|
|
26
|
-
"expo-background-fetch": "~57.0.
|
|
27
|
-
"expo-background-task": "~57.0.
|
|
25
|
+
"expo-auth-session": "~57.0.17",
|
|
26
|
+
"expo-background-fetch": "~57.0.23",
|
|
27
|
+
"expo-background-task": "~57.0.23",
|
|
28
28
|
"expo-battery": "~57.0.3",
|
|
29
29
|
"expo-blur": "~57.0.3",
|
|
30
30
|
"expo-brightness": "~57.0.2",
|
|
31
|
-
"expo-brownfield": "~57.0.
|
|
32
|
-
"expo-build-properties": "~57.0.
|
|
31
|
+
"expo-brownfield": "~57.0.25",
|
|
32
|
+
"expo-build-properties": "~57.0.23",
|
|
33
33
|
"expo-calendar": "~57.0.6",
|
|
34
34
|
"expo-camera": "~57.0.6",
|
|
35
35
|
"expo-cellular": "~57.0.2",
|
|
36
36
|
"expo-checkbox": "~57.0.0",
|
|
37
37
|
"expo-clipboard": "~57.0.2",
|
|
38
|
-
"expo-constants": "~57.0.
|
|
39
|
-
"expo-contacts": "~57.0.
|
|
38
|
+
"expo-constants": "~57.0.24",
|
|
39
|
+
"expo-contacts": "~57.0.9",
|
|
40
40
|
"expo-crypto": "~57.0.4",
|
|
41
|
-
"expo-dev-client": "~57.0.
|
|
41
|
+
"expo-dev-client": "~57.0.21",
|
|
42
42
|
"expo-device": "~57.0.2",
|
|
43
43
|
"expo-document-picker": "~57.0.3",
|
|
44
44
|
"expo-eas-client": "~57.0.5",
|
|
45
45
|
"expo-file-system": "~57.0.7",
|
|
46
46
|
"expo-font": "~57.0.4",
|
|
47
|
-
"expo-gl": "~57.0.
|
|
48
|
-
"expo-glass-effect": "~57.0.
|
|
47
|
+
"expo-gl": "~57.0.3",
|
|
48
|
+
"expo-glass-effect": "~57.0.5",
|
|
49
49
|
"expo-google-app-auth": "~8.3.0",
|
|
50
50
|
"expo-haptics": "~57.0.3",
|
|
51
51
|
"expo-image": "~57.0.5",
|
|
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.22",
|
|
54
|
+
"expo-image-picker": "~57.0.21",
|
|
55
55
|
"expo-intent-launcher": "~57.0.1",
|
|
56
|
-
"expo-insights": "~57.0.
|
|
56
|
+
"expo-insights": "~57.0.22",
|
|
57
57
|
"expo-keep-awake": "~57.0.2",
|
|
58
58
|
"expo-linear-gradient": "~57.0.2",
|
|
59
|
-
"expo-linking": "~57.0.
|
|
59
|
+
"expo-linking": "~57.0.14",
|
|
60
60
|
"expo-local-authentication": "~57.0.3",
|
|
61
61
|
"expo-localization": "~57.0.2",
|
|
62
|
-
"expo-location": "~57.0.
|
|
62
|
+
"expo-location": "~57.0.23",
|
|
63
63
|
"expo-mail-composer": "~57.0.2",
|
|
64
64
|
"expo-manifests": "~57.0.2",
|
|
65
65
|
"expo-maps": "~57.0.4",
|
|
66
66
|
"expo-mcp": "~0.2.1",
|
|
67
|
-
"expo-media-library": "~57.0.
|
|
67
|
+
"expo-media-library": "~57.0.6",
|
|
68
68
|
"expo-mesh-gradient": "~57.0.2",
|
|
69
|
-
"expo-module-template": "~57.0.
|
|
70
|
-
"expo-modules-core": "~57.0.
|
|
69
|
+
"expo-module-template": "~57.0.17",
|
|
70
|
+
"expo-modules-core": "~57.0.26",
|
|
71
71
|
"expo-navigation-bar": "~57.0.3",
|
|
72
72
|
"expo-network": "~57.0.3",
|
|
73
|
-
"expo-notifications": "~57.0.
|
|
74
|
-
"expo-observe": "~57.0.
|
|
73
|
+
"expo-notifications": "~57.0.25",
|
|
74
|
+
"expo-observe": "~57.0.28",
|
|
75
75
|
"expo-print": "~57.0.2",
|
|
76
76
|
"expo-live-photo": "~57.0.2",
|
|
77
|
-
"expo-router": "~57.0.
|
|
77
|
+
"expo-router": "~57.0.31",
|
|
78
78
|
"expo-screen-capture": "~57.0.4",
|
|
79
79
|
"expo-screen-orientation": "~57.0.3",
|
|
80
80
|
"expo-secure-store": "~57.0.4",
|
|
81
81
|
"expo-sensors": "~57.0.3",
|
|
82
82
|
"expo-server": "~57.0.3",
|
|
83
|
-
"expo-sharing": "~57.0.
|
|
83
|
+
"expo-sharing": "~57.0.26",
|
|
84
84
|
"expo-sms": "~57.0.2",
|
|
85
85
|
"expo-speech": "~57.0.3",
|
|
86
|
-
"expo-splash-screen": "~57.0.
|
|
87
|
-
"expo-sqlite": "~57.0.
|
|
86
|
+
"expo-splash-screen": "~57.0.11",
|
|
87
|
+
"expo-sqlite": "~57.0.5",
|
|
88
88
|
"expo-status-bar": "~57.0.1",
|
|
89
89
|
"expo-store-review": "~57.0.3",
|
|
90
90
|
"expo-symbols": "~57.0.3",
|
|
91
91
|
"expo-system-ui": "~57.0.4",
|
|
92
|
-
"expo-task-manager": "~57.0.
|
|
92
|
+
"expo-task-manager": "~57.0.23",
|
|
93
93
|
"expo-tracking-transparency": "~57.0.2",
|
|
94
|
-
"expo-updates": "~57.0.
|
|
94
|
+
"expo-updates": "~57.0.28",
|
|
95
95
|
"expo-video-thumbnails": "~57.0.2",
|
|
96
96
|
"expo-video": "~57.0.5",
|
|
97
97
|
"expo-web-browser": "~57.0.3",
|
|
98
|
-
"expo-widgets": "~57.0.
|
|
98
|
+
"expo-widgets": "~57.0.28",
|
|
99
99
|
"jest-expo": "~57.0.6",
|
|
100
100
|
"lottie-react-native": "~7.3.8",
|
|
101
101
|
"react": "19.2.3",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo",
|
|
3
|
-
"version": "57.0.
|
|
3
|
+
"version": "57.0.33",
|
|
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.34",
|
|
72
|
+
"@expo/config": "~57.0.11",
|
|
73
|
+
"@expo/config-plugins": "~57.0.13",
|
|
74
74
|
"@expo/devtools": "~57.0.1",
|
|
75
75
|
"@expo/dom-webview": "~57.0.1",
|
|
76
|
-
"@expo/fingerprint": "^0.20.
|
|
77
|
-
"@expo/local-build-cache-provider": "^57.0.
|
|
78
|
-
"@expo/log-box": "^57.0.
|
|
76
|
+
"@expo/fingerprint": "^0.20.16",
|
|
77
|
+
"@expo/local-build-cache-provider": "^57.0.10",
|
|
78
|
+
"@expo/log-box": "^57.0.5",
|
|
79
79
|
"@expo/metro": "~56.0.2",
|
|
80
|
-
"@expo/metro-config": "~57.0.
|
|
80
|
+
"@expo/metro-config": "~57.0.14",
|
|
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.17",
|
|
83
|
+
"expo-asset": "~57.0.21",
|
|
84
|
+
"expo-constants": "~57.0.24",
|
|
85
85
|
"expo-file-system": "~57.0.7",
|
|
86
86
|
"expo-font": "~57.0.4",
|
|
87
87
|
"expo-keep-awake": "~57.0.2",
|
|
88
|
-
"expo-modules-autolinking": "~57.0.
|
|
89
|
-
"expo-modules-core": "~57.0.
|
|
88
|
+
"expo-modules-autolinking": "~57.0.18",
|
|
89
|
+
"expo-modules-core": "~57.0.26",
|
|
90
90
|
"pretty-format": "^29.7.0",
|
|
91
91
|
"react-refresh": "^0.14.2",
|
|
92
92
|
"whatwg-url-minimum": "^0.1.2"
|
|
@@ -101,8 +101,8 @@
|
|
|
101
101
|
"rimraf": "^6.1.2",
|
|
102
102
|
"web-streams-polyfill": "^3.3.2",
|
|
103
103
|
"@expo/dom-webview": "57.0.1",
|
|
104
|
-
"expo-
|
|
105
|
-
"
|
|
104
|
+
"@expo/metro-runtime": "57.0.18",
|
|
105
|
+
"expo-updates": "57.0.28"
|
|
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": "968a9dcec304789b2ccc1a41ef5d301938e91478",
|
|
143
143
|
"scripts": {
|
|
144
144
|
"build": "tsc",
|
|
145
145
|
"clean": "rimraf build",
|
|
@@ -48,9 +48,11 @@ function isBlob(obj: any): obj is Blob {
|
|
|
48
48
|
/**
|
|
49
49
|
* Normalize a BodyInit object to a Uint8Array for NativeRequest
|
|
50
50
|
*/
|
|
51
|
-
export async function normalizeBodyInitAsync(
|
|
52
|
-
body:
|
|
53
|
-
|
|
51
|
+
export async function normalizeBodyInitAsync(body: BodyInit | null | undefined): Promise<{
|
|
52
|
+
body: Uint8Array | null;
|
|
53
|
+
defaultHeaders?: NativeHeadersType;
|
|
54
|
+
overriddenHeaders?: NativeHeadersType;
|
|
55
|
+
}> {
|
|
54
56
|
if (body == null) {
|
|
55
57
|
return { body: null };
|
|
56
58
|
}
|
|
@@ -69,9 +71,11 @@ export async function normalizeBodyInitAsync(
|
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
if (body instanceof Blob || isBlob(body)) {
|
|
74
|
+
// An empty type still sets the header.
|
|
75
|
+
// On iOS, URLSession sends `application/x-www-form-urlencoded` for a POST body without a Content-Type.
|
|
72
76
|
return {
|
|
73
77
|
body: new Uint8Array(await blobToArrayBufferAsync(body)),
|
|
74
|
-
|
|
78
|
+
defaultHeaders: [['Content-Type', body.type ?? '']],
|
|
75
79
|
};
|
|
76
80
|
}
|
|
77
81
|
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
|
|
3
|
+
import { fetch } from '../fetch';
|
|
4
|
+
|
|
5
|
+
globalThis.ReadableStream = require('node:stream/web').ReadableStream;
|
|
6
|
+
globalThis.TextEncoder = require('node:util').TextEncoder;
|
|
7
|
+
|
|
8
|
+
const mockStart = jest.fn(async () => {});
|
|
9
|
+
|
|
10
|
+
jest.mock('../ExpoFetchModule', () => {
|
|
11
|
+
class StubNativeResponse {
|
|
12
|
+
addListener() {}
|
|
13
|
+
removeListener() {}
|
|
14
|
+
}
|
|
15
|
+
class StubNativeRequest {
|
|
16
|
+
start = mockStart;
|
|
17
|
+
cancel() {}
|
|
18
|
+
}
|
|
19
|
+
return {
|
|
20
|
+
ExpoFetchModule: {
|
|
21
|
+
NativeRequest: StubNativeRequest,
|
|
22
|
+
NativeResponse: StubNativeResponse,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
function getStartedHeaders(): [string, string][] {
|
|
28
|
+
return (mockStart.mock.calls[0] as any[])[1].headers;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
describe('Setting the Content-Type header from the body', () => {
|
|
32
|
+
beforeEach(() => {
|
|
33
|
+
mockStart.mockClear();
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it('should keep the caller content-type header for a blob body', async () => {
|
|
37
|
+
await fetch('https://example.test/', {
|
|
38
|
+
method: 'POST',
|
|
39
|
+
headers: { Accept: '*/*', 'content-type': 'application/octet-stream' },
|
|
40
|
+
body: new Blob(['hello'], { type: 'text/plain' }),
|
|
41
|
+
});
|
|
42
|
+
expect(getStartedHeaders()).toEqual([
|
|
43
|
+
['Accept', '*/*'],
|
|
44
|
+
['content-type', 'application/octet-stream'],
|
|
45
|
+
]);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('should keep the caller content-type header for a blob body without a type', async () => {
|
|
49
|
+
await fetch('https://example.test/', {
|
|
50
|
+
method: 'POST',
|
|
51
|
+
headers: { 'Content-Type': 'image/jpeg' },
|
|
52
|
+
body: new Blob(['hello']),
|
|
53
|
+
});
|
|
54
|
+
expect(getStartedHeaders()).toEqual([['Content-Type', 'image/jpeg']]);
|
|
55
|
+
});
|
|
56
|
+
});
|
|
@@ -62,8 +62,14 @@ export async function fetch(
|
|
|
62
62
|
|
|
63
63
|
const request = new ExpoFetchModule.NativeRequest(response) as NativeRequest;
|
|
64
64
|
|
|
65
|
-
const {
|
|
66
|
-
|
|
65
|
+
const {
|
|
66
|
+
body: requestBody,
|
|
67
|
+
defaultHeaders,
|
|
68
|
+
overriddenHeaders,
|
|
69
|
+
} = await normalizeBodyInitAsync(body);
|
|
70
|
+
if (defaultHeaders) {
|
|
71
|
+
headers = overrideHeaders(defaultHeaders, headers);
|
|
72
|
+
} else if (overriddenHeaders) {
|
|
67
73
|
headers = overrideHeaders(headers, overriddenHeaders);
|
|
68
74
|
}
|
|
69
75
|
|
package/template.tgz
CHANGED
|
Binary file
|