expo 52.0.35 → 52.0.36

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.
@@ -33,7 +33,7 @@ def getRNVersion() {
33
33
  ensureDependeciesWereEvaluated(project)
34
34
 
35
35
  group = 'host.exp.exponent'
36
- version = '52.0.35'
36
+ version = '52.0.36'
37
37
 
38
38
  buildscript {
39
39
  // Simple helper that allows the root project to override versions declared by this library.
@@ -46,7 +46,7 @@ android {
46
46
  namespace "expo.core"
47
47
  defaultConfig {
48
48
  versionCode 1
49
- versionName "52.0.35"
49
+ versionName "52.0.36"
50
50
  consumerProguardFiles("proguard-rules.pro")
51
51
  }
52
52
  testOptions {
@@ -67,7 +67,7 @@ class ExpoFetchModule : Module() {
67
67
  return@AsyncFunction response.startStreaming()
68
68
  }
69
69
 
70
- AsyncFunction("cancelStreaming") { response: NativeResponse ->
70
+ AsyncFunction("cancelStreaming") { response: NativeResponse, _: String ->
71
71
  response.cancelStreaming()
72
72
  }
73
73
 
@@ -78,7 +78,6 @@ internal class NativeResponse(appContext: AppContext, private val coroutineScope
78
78
  emit("didFailWithError", error)
79
79
  }
80
80
  state = ResponseState.ERROR_RECEIVED
81
- emit("readyForJSFinalization")
82
81
  }
83
82
 
84
83
  fun waitForStates(states: List<ResponseState>, callback: (ResponseState) -> Unit) {
@@ -1,6 +1,6 @@
1
1
  import { type ViewProps } from 'react-native';
2
2
  import { type DOMProps, type WebViewProps } from '../dom.types';
3
- type UseDebugZeroHeightType = (dom: DOMProps) => {
3
+ type UseDebugZeroHeightType = (dom?: DOMProps) => {
4
4
  debugZeroHeightStyle: WebViewProps['containerStyle'] | undefined;
5
5
  debugOnLayout: ViewProps['onLayout'];
6
6
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useDebugZeroHeight.d.ts","sourceRoot":"","sources":["../../../src/dom/webview/useDebugZeroHeight.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAEhE,KAAK,sBAAsB,GAAG,CAAC,GAAG,EAAE,QAAQ,KAAK;IAC/C,oBAAoB,EAAE,YAAY,CAAC,gBAAgB,CAAC,GAAG,SAAS,CAAC;IACjE,aAAa,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;CACtC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,sBAgD3B,CAAC"}
1
+ {"version":3,"file":"useDebugZeroHeight.d.ts","sourceRoot":"","sources":["../../../src/dom/webview/useDebugZeroHeight.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAEhE,KAAK,sBAAsB,GAAG,CAAC,GAAG,CAAC,EAAE,QAAQ,KAAK;IAChD,oBAAoB,EAAE,YAAY,CAAC,gBAAgB,CAAC,GAAG,SAAS,CAAC;IACjE,aAAa,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;CACtC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,sBAgD3B,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { DOMProps } from './dom.types';
3
3
  interface Props {
4
- dom: DOMProps;
4
+ dom?: DOMProps;
5
5
  filePath: string;
6
6
  }
7
7
  declare const RawWebView: React.ForwardRefExoticComponent<Props & React.RefAttributes<object>>;
@@ -1 +1 @@
1
- {"version":3,"file":"webview-wrapper.d.ts","sourceRoot":"","sources":["../../src/dom/webview-wrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAiB,QAAQ,EAA4B,MAAM,aAAa,CAAC;AAcrF,UAAU,KAAK;IACb,GAAG,EAAE,QAAQ,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,QAAA,MAAM,UAAU,sEAoLd,CAAC;AAaH,wBAAgB,cAAc,CAAC,iBAAiB,EAAE,OAAO,OASxD;AAED,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"webview-wrapper.d.ts","sourceRoot":"","sources":["../../src/dom/webview-wrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAiB,QAAQ,EAA4B,MAAM,aAAa,CAAC;AAcrF,UAAU,KAAK;IACb,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,QAAA,MAAM,UAAU,sEAoLd,CAAC;AAaH,wBAAgB,cAAc,CAAC,iBAAiB,EAAE,OAAO,OASxD;AAED,eAAe,UAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"FetchResponse.d.ts","sourceRoot":"","sources":["../../../src/winter/fetch/FetchResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,QAAA,MAAM,sBAAsB,uBAA0D,CAAC;AAEvF,MAAM,MAAM,gCAAgC,GAAG,MAAM,IAAI,CAAC;AAE1D;;GAEG;AACH,qBAAa,aAAc,SAAQ,sBAAuB,YAAW,QAAQ;IAI/D,OAAO,CAAC,QAAQ,CAAC,oBAAoB;IAHjD,OAAO,CAAC,cAAc,CAA4C;IAClE,OAAO,CAAC,UAAU,CAA2C;gBAEhC,oBAAoB,EAAE,gCAAgC;IAKnF,IAAI,IAAI,IAAI,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,CAwC5C;IAED,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,IAAI,EAAE,IAAI,OAAO,CAEhB;IAED,SAAgB,IAAI,aAAa;IAE3B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAKrB,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC;IAY7B,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC;IAK1B,QAAQ,IAAI,MAAM;IAIlB,MAAM,IAAI,MAAM;IAShB,KAAK,IAAI,aAAa;IAItB,OAAO,CAAC,QAAQ,CAQd;CACH"}
1
+ {"version":3,"file":"FetchResponse.d.ts","sourceRoot":"","sources":["../../../src/winter/fetch/FetchResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,QAAA,MAAM,sBAAsB,uBAA0D,CAAC;AAEvF,MAAM,MAAM,gCAAgC,GAAG,MAAM,IAAI,CAAC;AAE1D;;GAEG;AACH,qBAAa,aAAc,SAAQ,sBAAuB,YAAW,QAAQ;IAI/D,OAAO,CAAC,QAAQ,CAAC,oBAAoB;IAHjD,OAAO,CAAC,cAAc,CAA4C;IAClE,OAAO,CAAC,UAAU,CAA2C;gBAEhC,oBAAoB,EAAE,gCAAgC;IAKnF,IAAI,IAAI,IAAI,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,CAuD5C;IAED,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,IAAI,EAAE,IAAI,OAAO,CAEhB;IAED,SAAgB,IAAI,aAAa;IAE3B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAKrB,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC;IAY7B,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC;IAK1B,QAAQ,IAAI,MAAM;IAIlB,MAAM,IAAI,MAAM;IAShB,KAAK,IAAI,aAAa;IAItB,OAAO,CAAC,QAAQ,CAQd;CACH"}
@@ -16,8 +16,8 @@
16
16
  "expo-app-loader-provider": "~8.0.0",
17
17
  "expo-apple-authentication": "~7.1.3",
18
18
  "expo-application": "~6.0.2",
19
- "expo-asset": "~11.0.3",
20
- "expo-audio": "~0.3.4",
19
+ "expo-asset": "~11.0.4",
20
+ "expo-audio": "~0.3.5",
21
21
  "expo-auth-session": "~6.0.3",
22
22
  "expo-av": "~15.0.2",
23
23
  "expo-background-fetch": "~13.0.5",
@@ -27,34 +27,34 @@
27
27
  "expo-brightness": "~13.0.3",
28
28
  "expo-build-properties": "~0.13.2",
29
29
  "expo-calendar": "~14.0.6",
30
- "expo-camera": "~16.0.16",
30
+ "expo-camera": "~16.0.17",
31
31
  "expo-cellular": "~7.0.2",
32
32
  "expo-checkbox": "~4.0.1",
33
33
  "expo-clipboard": "~7.0.1",
34
- "expo-constants": "~17.0.6",
34
+ "expo-constants": "~17.0.7",
35
35
  "expo-contacts": "~14.0.5",
36
36
  "expo-crypto": "~14.0.2",
37
37
  "expo-dev-client": "~5.0.12",
38
38
  "expo-device": "~7.0.2",
39
39
  "expo-document-picker": "~13.0.3",
40
40
  "expo-face-detector": "~13.0.2",
41
- "expo-file-system": "~18.0.10",
42
- "expo-font": "~13.0.3",
41
+ "expo-file-system": "~18.0.11",
42
+ "expo-font": "~13.0.4",
43
43
  "expo-gl": "~15.0.4",
44
44
  "expo-google-app-auth": "~8.3.0",
45
45
  "expo-haptics": "~14.0.1",
46
- "expo-image": "~2.0.5",
46
+ "expo-image": "~2.0.6",
47
47
  "expo-image-loader": "~5.0.0",
48
48
  "expo-image-manipulator": "~13.0.6",
49
49
  "expo-image-picker": "~16.0.6",
50
50
  "expo-intent-launcher": "~12.0.2",
51
51
  "expo-insights": "~0.8.2",
52
- "expo-keep-awake": "~14.0.2",
52
+ "expo-keep-awake": "~14.0.3",
53
53
  "expo-linear-gradient": "~14.0.2",
54
54
  "expo-linking": "~7.0.5",
55
55
  "expo-local-authentication": "~15.0.2",
56
56
  "expo-localization": "~16.0.1",
57
- "expo-location": "~18.0.6",
57
+ "expo-location": "~18.0.7",
58
58
  "expo-mail-composer": "~14.0.2",
59
59
  "expo-media-library": "~17.0.6",
60
60
  "expo-module-template": "~10.15.13",
@@ -79,7 +79,7 @@
79
79
  "expo-system-ui": "~4.0.8",
80
80
  "expo-task-manager": "~12.0.5",
81
81
  "expo-tracking-transparency": "~5.1.1",
82
- "expo-updates": "~0.26.18",
82
+ "expo-updates": "~0.26.19",
83
83
  "expo-video-thumbnails": "~9.0.3",
84
84
  "expo-video": "~2.0.5",
85
85
  "expo-web-browser": "~14.0.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo",
3
- "version": "52.0.35",
3
+ "version": "52.0.36",
4
4
  "description": "The Expo SDK",
5
5
  "main": "src/Expo.ts",
6
6
  "module": "src/Expo.ts",
@@ -68,19 +68,19 @@
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": "0.22.16",
71
+ "@expo/cli": "0.22.17",
72
72
  "@expo/config": "~10.0.10",
73
73
  "@expo/config-plugins": "~9.0.15",
74
- "@expo/fingerprint": "0.11.10",
75
- "@expo/metro-config": "0.19.10",
74
+ "@expo/fingerprint": "0.11.11",
75
+ "@expo/metro-config": "0.19.11",
76
76
  "@expo/vector-icons": "^14.0.0",
77
77
  "babel-preset-expo": "~12.0.8",
78
- "expo-asset": "~11.0.3",
79
- "expo-constants": "~17.0.6",
80
- "expo-file-system": "~18.0.10",
81
- "expo-font": "~13.0.3",
82
- "expo-keep-awake": "~14.0.2",
83
- "expo-modules-autolinking": "2.0.7",
78
+ "expo-asset": "~11.0.4",
79
+ "expo-constants": "~17.0.7",
80
+ "expo-file-system": "~18.0.11",
81
+ "expo-font": "~13.0.4",
82
+ "expo-keep-awake": "~14.0.3",
83
+ "expo-modules-autolinking": "2.0.8",
84
84
  "expo-modules-core": "2.2.2",
85
85
  "fbemitter": "^3.0.0",
86
86
  "web-streams-polyfill": "^3.3.2",
@@ -112,5 +112,5 @@
112
112
  "optional": true
113
113
  }
114
114
  },
115
- "gitHead": "13972cd80b8b652a2ca6a2c45e03f7a0b3915ce1"
115
+ "gitHead": "c01c449a1d6e6e8690bfcc88a778b46781a59674"
116
116
  }
@@ -3,7 +3,7 @@ import { type ViewProps } from 'react-native';
3
3
 
4
4
  import { type DOMProps, type WebViewProps } from '../dom.types';
5
5
 
6
- type UseDebugZeroHeightType = (dom: DOMProps) => {
6
+ type UseDebugZeroHeightType = (dom?: DOMProps) => {
7
7
  debugZeroHeightStyle: WebViewProps['containerStyle'] | undefined;
8
8
  debugOnLayout: ViewProps['onLayout'];
9
9
  };
@@ -20,8 +20,8 @@ export const useDebugZeroHeight: UseDebugZeroHeightType = __DEV__
20
20
 
21
21
  const debugOnLayout = useCallback<NonNullable<ViewProps['onLayout']>>(
22
22
  (event) => {
23
- dom.onLayout?.(event);
24
- if (dom.matchContents) {
23
+ dom?.onLayout?.(event);
24
+ if (dom?.matchContents) {
25
25
  return;
26
26
  }
27
27
  if (debugZeroHeightStyle !== undefined) {
@@ -51,12 +51,12 @@ You can remove this style by using the \`matchContents\` prop or explicitly add
51
51
  setDebugZeroHeightStyle({});
52
52
  }
53
53
  },
54
- [dom.matchContents, dom.onLayout, debugZeroHeightStyle, hasLoggedWarning]
54
+ [dom?.matchContents, dom?.onLayout, debugZeroHeightStyle, hasLoggedWarning]
55
55
  );
56
56
 
57
57
  return { debugZeroHeightStyle, debugOnLayout };
58
58
  }
59
59
  : (dom) => ({
60
60
  debugZeroHeightStyle: undefined,
61
- debugOnLayout: dom.onLayout,
61
+ debugOnLayout: dom?.onLayout,
62
62
  });
@@ -18,7 +18,7 @@ import RNWebView from './webview/RNWebView';
18
18
  import { useDebugZeroHeight } from './webview/useDebugZeroHeight';
19
19
 
20
20
  interface Props {
21
- dom: DOMProps;
21
+ dom?: DOMProps;
22
22
  filePath: string;
23
23
  }
24
24
 
@@ -115,7 +115,7 @@ const RawWebView = React.forwardRef<object, Props>(({ dom, filePath, ...marshalP
115
115
  },
116
116
  ...dom,
117
117
  containerStyle: [containerStyle, debugZeroHeightStyle, dom?.containerStyle],
118
- onLayout: __DEV__ ? debugOnLayout : dom.onLayout,
118
+ onLayout: __DEV__ ? debugOnLayout : dom?.onLayout,
119
119
  injectedJavaScriptBeforeContentLoaded: [
120
120
  // On first mount, inject `$$EXPO_INITIAL_PROPS` with the initial props.
121
121
  `window.$$EXPO_INITIAL_PROPS = ${JSON.stringify(smartActions)};true;`,
@@ -22,39 +22,54 @@ export class FetchResponse extends ConcreteNativeResponse implements Response {
22
22
  get body(): ReadableStream<Uint8Array> | null {
23
23
  if (this.bodyStream == null) {
24
24
  const response = this;
25
+
26
+ // This flag prevents enqueuing data after the stream is closed or canceled.
27
+ // Because it might be too late for the multithreaded native code to stop enqueuing data,
28
+ // we cannot simply rely on the native code to stop sending `didReceiveResponseData`.
29
+ let isControllerClosed = false;
30
+
25
31
  this.bodyStream = new ReadableStream({
26
32
  start(controller) {
27
33
  if (response.streamingState === 'completed') {
28
34
  return;
29
35
  }
30
36
  response.addListener('didReceiveResponseData', (data: Uint8Array) => {
31
- controller.enqueue(data);
37
+ if (!isControllerClosed) {
38
+ controller.enqueue(data);
39
+ }
32
40
  });
33
41
 
34
42
  response.addListener('didComplete', () => {
35
43
  controller.close();
44
+ isControllerClosed = true;
36
45
  });
37
46
 
38
47
  response.addListener('didFailWithError', (error: string) => {
39
48
  controller.error(new Error(error));
49
+ isControllerClosed = true;
40
50
  });
41
51
  },
42
52
  async pull(controller) {
43
53
  if (response.streamingState === 'none') {
44
54
  const completedData = await response.startStreaming();
45
55
  if (completedData != null) {
46
- controller.enqueue(completedData);
47
- controller.close();
56
+ if (!isControllerClosed) {
57
+ controller.enqueue(completedData);
58
+ controller.close();
59
+ isControllerClosed = true;
60
+ }
48
61
  response.streamingState = 'completed';
49
62
  } else {
50
63
  response.streamingState = 'started';
51
64
  }
52
65
  } else if (response.streamingState === 'completed') {
53
66
  controller.close();
67
+ isControllerClosed = true;
54
68
  }
55
69
  },
56
70
  cancel(reason) {
57
71
  response.cancelStreaming(String(reason));
72
+ isControllerClosed = true;
58
73
  },
59
74
  });
60
75
  }