expo 58.0.5 → 58.0.6

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.
@@ -10,7 +10,7 @@ buildscript {
10
10
  }
11
11
 
12
12
  group = 'host.exp.exponent'
13
- version = '58.0.5'
13
+ version = '58.0.6'
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 "58.0.5"
24
+ versionName "58.0.6"
25
25
  consumerProguardFiles("proguard-rules.pro")
26
26
  }
27
27
  testOptions {
@@ -1,25 +1,21 @@
1
1
  // Based on https://github.com/facebook/react-native/blob/9ab95dd2b5746e8323ad1d65591d5a4ec7718790/packages/react-native/Libraries/Utilities/HMRClient.js
2
- import LogBox from 'react-native/Libraries/LogBox/LogBox';
3
- // @ts-expect-error missing types
4
- import NativeRedBox from 'react-native/Libraries/NativeModules/specs/NativeRedBox';
5
- import DevSettings from 'react-native/Libraries/Utilities/DevSettings';
2
+ import { DevSettings, LogBox } from 'react-native';
3
+ import { NativeRedBox } from 'react-native/unstable-internals-do-not-use';
6
4
  import getDevServer from '../utils/getDevServer';
7
5
  import { HMRMetroBuildError } from './buildErrors';
8
6
  export function showLoading(message, type) {
9
- const DevLoadingView = require('react-native/Libraries/Utilities/DevLoadingView').default;
7
+ const { DevLoadingView } = require('react-native/unstable-internals-do-not-use');
10
8
  DevLoadingView.showMessage(message, type);
11
9
  }
12
10
  export function hideLoading() {
13
- const DevLoadingView = require('react-native/Libraries/Utilities/DevLoadingView').default;
11
+ const { DevLoadingView } = require('react-native/unstable-internals-do-not-use');
14
12
  DevLoadingView.hide();
15
13
  }
16
14
  export function resetErrorOverlay() {
17
15
  dismissRedbox();
18
- // @ts-expect-error clearAllLogs exists, but ts types are missing
19
16
  LogBox.clearAllLogs();
20
17
  }
21
18
  export function reload() {
22
- // @ts-expect-error missing types
23
19
  DevSettings.reload('Bundle Splitting – Metro disconnected');
24
20
  }
25
21
  export function getFullBundlerUrl({ serverScheme, serverHost, bundleEntry, platform }) {
@@ -46,7 +42,7 @@ function dismissRedbox() {
46
42
  if (process.env.EXPO_OS === 'ios' && NativeRedBox != null && NativeRedBox.dismiss != null) {
47
43
  NativeRedBox.dismiss();
48
44
  } else {
49
- const NativeExceptionsManager = require('react-native/Libraries/Core/NativeExceptionsManager').default;
45
+ const { NativeExceptionsManager } = require('react-native/unstable-internals-do-not-use');
50
46
  NativeExceptionsManager && NativeExceptionsManager.dismissRedbox && NativeExceptionsManager.dismissRedbox();
51
47
  }
52
48
  }
@@ -57,11 +53,11 @@ export function handleCompileError(cause) {
57
53
  // Even if there is already a redbox, syntax errors are more important.
58
54
  // Otherwise you risk seeing a stale runtime error while a syntax error is more recent.
59
55
  dismissRedbox();
60
- const LogBox = require('react-native/Libraries/LogBox/LogBox').default;
61
56
  // The error is passed thru LogBox APIs directly to the parsing function.
62
57
  // Won't log the error in devtools console
63
58
  // (using throw would mangle the error message and print with ANSI
64
59
  // because throw on native is processed as console.error)
60
+ // @ts-expect-error Metro build errors are parsed by LogBox, not RN ExceptionData
65
61
  LogBox.addException(new HMRMetroBuildError(cause.message, cause.type, cause.cause));
66
62
  }
67
63
 
@@ -1 +1 @@
1
- {"version":3,"sources":["async-require/hmrUtils.native.ts"],"sourcesContent":[null],"names":["LogBox","NativeRedBox","DevSettings","getDevServer","HMRMetroBuildError","showLoading","message","type","DevLoadingView","require","default","showMessage","hideLoading","hide","resetErrorOverlay","dismissRedbox","clearAllLogs","reload","getFullBundlerUrl","serverScheme","serverHost","bundleEntry","platform","fullBundleUrl","getConnectionError","e","error","process","env","EXPO_OS","dismiss","NativeExceptionsManager","handleCompileError","cause","addException"],"mappings":"AAAA,yJAAyJ;AAEzJ,OAAOA,YAAY,uCAAuC;AAC1D,iCAAiC;AACjC,OAAOC,kBAAkB,0DAA0D;AACnF,OAAOC,iBAAiB,+CAA+C;AAEvE,OAAOC,kBAAkB,wBAAwB;AACjD,SAASC,kBAAkB,QAAQ,gBAAgB;AAEnD,OAAO,SAASC,YAAYC,OAAe,EAAEC,IAAwB;IACnE,MAAMC,iBAAiBC,QAAQ,mDAAmDC,OAAO;IACzFF,eAAeG,WAAW,CAACL,SAASC;AACtC;AAEA,OAAO,SAASK;IACd,MAAMJ,iBAAiBC,QAAQ,mDAAmDC,OAAO;IACzFF,eAAeK,IAAI;AACrB;AAEA,OAAO,SAASC;IACdC;IACA,iEAAiE;IACjEf,OAAOgB,YAAY;AACrB;AAEA,OAAO,SAASC;IACd,iCAAiC;IACjCf,YAAYe,MAAM,CAAC;AACrB;AAEA,OAAO,SAASC,kBAAkB,EAChCC,YAAY,EACZC,UAAU,EACVC,WAAW,EACXC,QAAQ,EAMT;IACC,OACEnB,eAAeoB,aAAa,IAC5B,GAAGJ,aAAa,GAAG,EAAEC,WAAW,iBAAiB,EAAEC,YAAY,UAAU,EAAEC,UAAU;AAEzF;AAEA,OAAO,SAASE,mBAAmBJ,UAAkB,EAAEK,CAAQ;IAC7D,IAAIC,QAAQ,CAAC;;;0EAG2D,CAAC;IAEzE,IAAIC,QAAQC,GAAG,CAACC,OAAO,KAAK,WAAW;QACrCH,SAAS,CAAC;;wIAE0H,CAAC;IACvI;IAEAA,SAAS,CAAC;;KAEP,EAAEN,WAAW;;OAEX,EAAEK,EAAEnB,OAAO,EAAE;IAClB,OAAOoB;AACT;AAEA,SAASX;IACP,IAAIY,QAAQC,GAAG,CAACC,OAAO,KAAK,SAAS5B,gBAAgB,QAAQA,aAAa6B,OAAO,IAAI,MAAM;QACzF7B,aAAa6B,OAAO;IACtB,OAAO;QACL,MAAMC,0BACJtB,QAAQ,uDAAuDC,OAAO;QACxEqB,2BACEA,wBAAwBhB,aAAa,IACrCgB,wBAAwBhB,aAAa;IACzC;AACF;AAEA,OAAO,SAASiB,mBAAmBC,KAAU;IAC3C,IAAIA,UAAU,MAAM;QAClB;IACF;IAEA,uEAAuE;IACvE,uFAAuF;IACvFlB;IAEA,MAAMf,SAASS,QAAQ,wCAAwCC,OAAO;IACtE,yEAAyE;IACzE,0CAA0C;IAC1C,kEAAkE;IAClE,yDAAyD;IACzDV,OAAOkC,YAAY,CAAC,IAAI9B,mBAAmB6B,MAAM3B,OAAO,EAAE2B,MAAM1B,IAAI,EAAE0B,MAAMA,KAAK;AACnF"}
1
+ {"version":3,"sources":["async-require/hmrUtils.native.ts"],"sourcesContent":[null],"names":["DevSettings","LogBox","NativeRedBox","getDevServer","HMRMetroBuildError","showLoading","message","type","DevLoadingView","require","showMessage","hideLoading","hide","resetErrorOverlay","dismissRedbox","clearAllLogs","reload","getFullBundlerUrl","serverScheme","serverHost","bundleEntry","platform","fullBundleUrl","getConnectionError","e","error","process","env","EXPO_OS","dismiss","NativeExceptionsManager","handleCompileError","cause","addException"],"mappings":"AAAA,yJAAyJ;AAEzJ,SAASA,WAAW,EAAEC,MAAM,QAAQ,eAAe;AACnD,SAASC,YAAY,QAAQ,6CAA6C;AAE1E,OAAOC,kBAAkB,wBAAwB;AACjD,SAASC,kBAAkB,QAAQ,gBAAgB;AAEnD,OAAO,SAASC,YAAYC,OAAe,EAAEC,IAAwB;IACnE,MAAM,EAAEC,cAAc,EAAE,GAAGC,QAAQ;IACnCD,eAAeE,WAAW,CAACJ,SAASC;AACtC;AAEA,OAAO,SAASI;IACd,MAAM,EAAEH,cAAc,EAAE,GAAGC,QAAQ;IACnCD,eAAeI,IAAI;AACrB;AAEA,OAAO,SAASC;IACdC;IACAb,OAAOc,YAAY;AACrB;AAEA,OAAO,SAASC;IACdhB,YAAYgB,MAAM,CAAC;AACrB;AAEA,OAAO,SAASC,kBAAkB,EAChCC,YAAY,EACZC,UAAU,EACVC,WAAW,EACXC,QAAQ,EAMT;IACC,OACElB,eAAemB,aAAa,IAC5B,GAAGJ,aAAa,GAAG,EAAEC,WAAW,iBAAiB,EAAEC,YAAY,UAAU,EAAEC,UAAU;AAEzF;AAEA,OAAO,SAASE,mBAAmBJ,UAAkB,EAAEK,CAAQ;IAC7D,IAAIC,QAAQ,CAAC;;;0EAG2D,CAAC;IAEzE,IAAIC,QAAQC,GAAG,CAACC,OAAO,KAAK,WAAW;QACrCH,SAAS,CAAC;;wIAE0H,CAAC;IACvI;IAEAA,SAAS,CAAC;;KAEP,EAAEN,WAAW;;OAEX,EAAEK,EAAElB,OAAO,EAAE;IAClB,OAAOmB;AACT;AAEA,SAASX;IACP,IAAIY,QAAQC,GAAG,CAACC,OAAO,KAAK,SAAS1B,gBAAgB,QAAQA,aAAa2B,OAAO,IAAI,MAAM;QACzF3B,aAAa2B,OAAO;IACtB,OAAO;QACL,MAAM,EAAEC,uBAAuB,EAAE,GAAGrB,QAAQ;QAC5CqB,2BACEA,wBAAwBhB,aAAa,IACrCgB,wBAAwBhB,aAAa;IACzC;AACF;AAEA,OAAO,SAASiB,mBAAmBC,KAAU;IAC3C,IAAIA,UAAU,MAAM;QAClB;IACF;IAEA,uEAAuE;IACvE,uFAAuF;IACvFlB;IAEA,yEAAyE;IACzE,0CAA0C;IAC1C,kEAAkE;IAClE,yDAAyD;IACzD,iFAAiF;IACjFb,OAAOgC,YAAY,CAAC,IAAI7B,mBAAmB4B,MAAM1B,OAAO,EAAE0B,MAAMzB,IAAI,EAAEyB,MAAMA,KAAK;AACnF"}
@@ -1,10 +1,3 @@
1
- declare module 'react-native/Libraries/NativeModules/specs/NativeSourceCode' {
2
- namespace SourceCode {
3
- function getConstants(): { scriptURL: string };
4
- }
5
- export default SourceCode;
6
- }
7
-
8
1
  declare module 'react-native/Libraries/Network/FormData' {
9
2
  type FormDataValue = string | { name?: string; type?: string; uri: string };
10
3
 
@@ -1,11 +1,9 @@
1
1
  // Copyright 2015-present 650 Industries. All rights reserved.
2
- /// <reference path="../ts-declarations/react-native.d.ts" />
3
2
  export function getBundleUrl() {
4
3
  // NOTE(@kitten): Requiring this initialises module bridge, which may not be available server-side
5
4
  let scriptURL;
6
5
  try {
7
- const __nativeSourceCode = require('react-native/Libraries/NativeModules/specs/NativeSourceCode');
8
- const NativeSourceCode = __nativeSourceCode.default ?? __nativeSourceCode;
6
+ const { NativeSourceCode } = require('react-native/unstable-internals-do-not-use');
9
7
  scriptURL = NativeSourceCode.getConstants().scriptURL;
10
8
  } catch {
11
9
  return null;
@@ -1 +1 @@
1
- {"version":3,"sources":["utils/getBundleUrl.native.ts"],"sourcesContent":[null],"names":["getBundleUrl","scriptURL","__nativeSourceCode","require","NativeSourceCode","default","getConstants","startsWith","url","URL","toString"],"mappings":"AAAA,8DAA8D;AAE9D,6DAA6D;AAK7D,OAAO,SAASA;IACd,kGAAkG;IAClG,IAAIC;IACJ,IAAI;QACF,MAAMC,qBAAqBC,QAAQ;QACnC,MAAMC,mBAAqCF,mBAAmBG,OAAO,IAAIH;QACzED,YAAYG,iBAAiBE,YAAY,GAAGL,SAAS;IACvD,EAAE,OAAM;QACN,OAAO;IACT;IACA,IAAIA,aAAa,MAAM;QACrB,OAAO;IACT;IACA,IAAIA,UAAUM,UAAU,CAAC,MAAM;QAC7BN,YAAY,CAAC,OAAO,EAAEA,WAAW;IACnC;IACA,MAAMO,MAAM,IAAIC,IAAIR;IACpB,OAAOO,IAAIE,QAAQ;AACrB"}
1
+ {"version":3,"sources":["utils/getBundleUrl.native.ts"],"sourcesContent":[null],"names":["getBundleUrl","scriptURL","NativeSourceCode","require","getConstants","startsWith","url","URL","toString"],"mappings":"AAAA,8DAA8D;AAE9D,OAAO,SAASA;IACd,kGAAkG;IAClG,IAAIC;IACJ,IAAI;QACF,MAAM,EAAEC,gBAAgB,EAAE,GAAGC,QAAQ;QACrCF,YAAYC,iBAAiBE,YAAY,GAAGH,SAAS;IACvD,EAAE,OAAM;QACN,OAAO;IACT;IACA,IAAIA,aAAa,MAAM;QACrB,OAAO;IACT;IACA,IAAIA,UAAUI,UAAU,CAAC,MAAM;QAC7BJ,YAAY,CAAC,OAAO,EAAEA,WAAW;IACnC;IACA,MAAMK,MAAM,IAAIC,IAAIN;IACpB,OAAOK,IAAIE,QAAQ;AACrB"}
@@ -1 +1 @@
1
- import 'react-native/setup-env';
1
+ export {};
@@ -1,5 +1,10 @@
1
1
  // Platform variants of this file pick the entry
2
2
  // that the host React Native package for that platform ships.
3
- import 'react-native/setup-env';
3
+ try {
4
+ require('react-native/setup-env');
5
+ } catch {
6
+ // NOTE: Fallback preserved for out-of-tree platforms on React Native < 0.87
7
+ require('react-native/Libraries/Core/InitializeCore');
8
+ }
4
9
 
5
10
  //# sourceMappingURL=setupReactNativeEnvironment.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["winter/setupReactNativeEnvironment.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA,gDAAgD;AAChD,8DAA8D;AAC9D,OAAO,yBAAyB"}
1
+ {"version":3,"sources":["winter/setupReactNativeEnvironment.ts"],"sourcesContent":[null],"names":["require"],"mappings":"AAAA,gDAAgD;AAChD,8DAA8D;AAC9D,IAAI;IACFA,QAAQ;AACV,EAAE,OAAM;IACN,4EAA4E;IAC5EA,QAAQ;AACV"}
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "@expo/dom-webview": "~58.0.2",
3
3
  "@expo/fingerprint": "~0.21.3",
4
- "@expo/metro-runtime": "~58.0.12",
4
+ "@expo/metro-runtime": "~58.0.13",
5
5
  "@expo/vector-icons": "^15.0.2",
6
- "@expo/ui": "~58.0.13",
6
+ "@expo/ui": "~58.0.14",
7
7
  "@react-native-async-storage/async-storage": "2.2.0",
8
8
  "@react-native-community/datetimepicker": "9.2.1",
9
9
  "@react-native-masked-view/masked-view": "0.3.2",
@@ -16,13 +16,13 @@
16
16
  "eslint-config-expo": "~58.0.4",
17
17
  "expo-analytics-amplitude": "~11.3.0",
18
18
  "expo-app-auth": "~11.1.0",
19
- "expo-app-intents": "~0.5.2",
19
+ "expo-app-intents": "~0.5.3",
20
20
  "expo-app-loader-provider": "~8.0.0",
21
21
  "expo-app-metrics": "~58.0.11",
22
22
  "expo-apple-authentication": "~58.0.2",
23
23
  "expo-application": "~58.0.4",
24
- "expo-asset": "~58.0.12",
25
- "expo-audio": "~58.0.6",
24
+ "expo-asset": "~58.0.13",
25
+ "expo-audio": "~58.0.7",
26
26
  "expo-auth-session": "~58.0.9",
27
27
  "expo-background-fetch": "~58.0.10",
28
28
  "expo-background-task": "~58.0.10",
@@ -43,14 +43,14 @@
43
43
  "expo-device": "~58.0.5",
44
44
  "expo-document-picker": "~58.0.4",
45
45
  "expo-eas-client": "~58.0.2",
46
- "expo-file-system": "~58.0.6",
46
+ "expo-file-system": "~58.0.7",
47
47
  "expo-font": "~58.0.7",
48
48
  "expo-gl": "~58.0.3",
49
49
  "expo-glass-effect": "~58.0.3",
50
50
  "expo-google-app-auth": "~8.3.0",
51
51
  "expo-haptics": "~58.0.5",
52
52
  "expo-hinge": "~58.0.0",
53
- "expo-image": "~58.0.12",
53
+ "expo-image": "~58.0.13",
54
54
  "expo-image-loader": "~58.0.3",
55
55
  "expo-image-manipulator": "~58.0.13",
56
56
  "expo-image-picker": "~58.0.10",
@@ -64,19 +64,19 @@
64
64
  "expo-location": "~58.0.12",
65
65
  "expo-mail-composer": "~58.0.3",
66
66
  "expo-manifests": "~58.0.1",
67
- "expo-maps": "~58.0.6",
67
+ "expo-maps": "~58.0.7",
68
68
  "expo-mcp": "~0.2.1",
69
69
  "expo-media-library": "~58.0.7",
70
70
  "expo-mesh-gradient": "~58.0.3",
71
71
  "expo-module-template": "~58.0.5",
72
- "expo-modules-core": "~58.0.13",
72
+ "expo-modules-core": "~58.0.14",
73
73
  "expo-navigation-bar": "~58.0.4",
74
74
  "expo-network": "~58.0.3",
75
75
  "expo-notifications": "~58.1.1",
76
76
  "expo-observe": "~58.0.13",
77
77
  "expo-print": "~58.0.5",
78
78
  "expo-live-photo": "~58.0.4",
79
- "expo-router": "~58.0.15",
79
+ "expo-router": "~58.0.16",
80
80
  "expo-screen-capture": "~58.0.5",
81
81
  "expo-screen-orientation": "~58.0.2",
82
82
  "expo-secure-store": "~58.0.2",
@@ -95,10 +95,10 @@
95
95
  "expo-tracking-transparency": "~58.0.2",
96
96
  "expo-updates": "~58.0.15",
97
97
  "expo-video-thumbnails": "~58.0.2",
98
- "expo-video": "~58.0.7",
98
+ "expo-video": "~58.0.8",
99
99
  "expo-web-browser": "~58.0.6",
100
- "expo-widgets": "~58.0.13",
101
- "jest-expo": "~58.0.7",
100
+ "expo-widgets": "~58.0.14",
101
+ "jest-expo": "~58.0.8",
102
102
  "lottie-react-native": "~7.5.0",
103
103
  "react": "19.3.0",
104
104
  "react-dom": "19.3.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo",
3
- "version": "58.0.5",
3
+ "version": "58.0.6",
4
4
  "description": "The Expo SDK",
5
5
  "keywords": [
6
6
  "expo"
@@ -202,32 +202,32 @@
202
202
  },
203
203
  "dependencies": {
204
204
  "@babel/runtime": "^7.20.0",
205
- "@expo/cli": "^58.1.4",
205
+ "@expo/cli": "^58.1.5",
206
206
  "@expo/config": "~58.0.3",
207
207
  "@expo/config-plugins": "~58.0.6",
208
208
  "@expo/devtools": "~58.0.2",
209
209
  "@expo/dom-webview": "~58.0.2",
210
210
  "@expo/fingerprint": "^0.21.3",
211
211
  "@expo/local-build-cache-provider": "^58.0.3",
212
- "@expo/log-box": "^58.0.10",
212
+ "@expo/log-box": "^58.0.11",
213
213
  "@expo/log-box-utils": "^58.0.1",
214
214
  "@expo/metro": "~58.0.0-rc.0",
215
- "@expo/metro-config": "~58.0.9",
215
+ "@expo/metro-config": "~58.0.10",
216
216
  "@ungap/structured-clone": "^1.3.0",
217
- "babel-preset-expo": "~58.0.10",
218
- "expo-asset": "~58.0.12",
217
+ "babel-preset-expo": "~58.0.11",
218
+ "expo-asset": "~58.0.13",
219
219
  "expo-constants": "~58.0.10",
220
- "expo-file-system": "~58.0.6",
220
+ "expo-file-system": "~58.0.7",
221
221
  "expo-font": "~58.0.7",
222
222
  "expo-keep-awake": "~58.0.3",
223
- "expo-modules-autolinking": "~58.0.9",
224
- "expo-modules-core": "~58.0.13",
223
+ "expo-modules-autolinking": "~58.0.10",
224
+ "expo-modules-core": "~58.0.14",
225
225
  "pretty-format": "^29.7.0",
226
226
  "react-refresh": "^0.14.2",
227
227
  "whatwg-url-minimum": "^0.2.0"
228
228
  },
229
229
  "devDependencies": {
230
- "@expo/metro-runtime": "58.0.12",
230
+ "@expo/metro-runtime": "58.0.13",
231
231
  "@types/node": "^22.14.0",
232
232
  "@types/react": "~19.3.0",
233
233
  "expo-updates": "58.0.15",
@@ -1,31 +1,27 @@
1
1
  // Based on https://github.com/facebook/react-native/blob/9ab95dd2b5746e8323ad1d65591d5a4ec7718790/packages/react-native/Libraries/Utilities/HMRClient.js
2
2
 
3
- import LogBox from 'react-native/Libraries/LogBox/LogBox';
4
- // @ts-expect-error missing types
5
- import NativeRedBox from 'react-native/Libraries/NativeModules/specs/NativeRedBox';
6
- import DevSettings from 'react-native/Libraries/Utilities/DevSettings';
3
+ import { DevSettings, LogBox } from 'react-native';
4
+ import { NativeRedBox } from 'react-native/unstable-internals-do-not-use';
7
5
 
8
6
  import getDevServer from '../utils/getDevServer';
9
7
  import { HMRMetroBuildError } from './buildErrors';
10
8
 
11
9
  export function showLoading(message: string, type: 'load' | 'refresh') {
12
- const DevLoadingView = require('react-native/Libraries/Utilities/DevLoadingView').default;
10
+ const { DevLoadingView } = require('react-native/unstable-internals-do-not-use');
13
11
  DevLoadingView.showMessage(message, type);
14
12
  }
15
13
 
16
14
  export function hideLoading() {
17
- const DevLoadingView = require('react-native/Libraries/Utilities/DevLoadingView').default;
15
+ const { DevLoadingView } = require('react-native/unstable-internals-do-not-use');
18
16
  DevLoadingView.hide();
19
17
  }
20
18
 
21
19
  export function resetErrorOverlay() {
22
20
  dismissRedbox();
23
- // @ts-expect-error clearAllLogs exists, but ts types are missing
24
21
  LogBox.clearAllLogs();
25
22
  }
26
23
 
27
24
  export function reload() {
28
- // @ts-expect-error missing types
29
25
  DevSettings.reload('Bundle Splitting – Metro disconnected');
30
26
  }
31
27
 
@@ -70,8 +66,7 @@ function dismissRedbox() {
70
66
  if (process.env.EXPO_OS === 'ios' && NativeRedBox != null && NativeRedBox.dismiss != null) {
71
67
  NativeRedBox.dismiss();
72
68
  } else {
73
- const NativeExceptionsManager =
74
- require('react-native/Libraries/Core/NativeExceptionsManager').default;
69
+ const { NativeExceptionsManager } = require('react-native/unstable-internals-do-not-use');
75
70
  NativeExceptionsManager &&
76
71
  NativeExceptionsManager.dismissRedbox &&
77
72
  NativeExceptionsManager.dismissRedbox();
@@ -87,10 +82,10 @@ export function handleCompileError(cause: any) {
87
82
  // Otherwise you risk seeing a stale runtime error while a syntax error is more recent.
88
83
  dismissRedbox();
89
84
 
90
- const LogBox = require('react-native/Libraries/LogBox/LogBox').default;
91
85
  // The error is passed thru LogBox APIs directly to the parsing function.
92
86
  // Won't log the error in devtools console
93
87
  // (using throw would mangle the error message and print with ANSI
94
88
  // because throw on native is processed as console.error)
89
+ // @ts-expect-error Metro build errors are parsed by LogBox, not RN ExceptionData
95
90
  LogBox.addException(new HMRMetroBuildError(cause.message, cause.type, cause.cause));
96
91
  }
@@ -1,10 +1,3 @@
1
- declare module 'react-native/Libraries/NativeModules/specs/NativeSourceCode' {
2
- namespace SourceCode {
3
- function getConstants(): { scriptURL: string };
4
- }
5
- export default SourceCode;
6
- }
7
-
8
1
  declare module 'react-native/Libraries/Network/FormData' {
9
2
  type FormDataValue = string | { name?: string; type?: string; uri: string };
10
3
 
@@ -1,16 +1,10 @@
1
1
  // Copyright 2015-present 650 Industries. All rights reserved.
2
2
 
3
- /// <reference path="../ts-declarations/react-native.d.ts" />
4
-
5
- type NativeSourceCode =
6
- typeof import('react-native/Libraries/NativeModules/specs/NativeSourceCode').default;
7
-
8
3
  export function getBundleUrl(): string | null {
9
4
  // NOTE(@kitten): Requiring this initialises module bridge, which may not be available server-side
10
5
  let scriptURL: string | null;
11
6
  try {
12
- const __nativeSourceCode = require('react-native/Libraries/NativeModules/specs/NativeSourceCode');
13
- const NativeSourceCode: NativeSourceCode = __nativeSourceCode.default ?? __nativeSourceCode;
7
+ const { NativeSourceCode } = require('react-native/unstable-internals-do-not-use');
14
8
  scriptURL = NativeSourceCode.getConstants().scriptURL;
15
9
  } catch {
16
10
  return null;
@@ -1,3 +1,8 @@
1
1
  // Platform variants of this file pick the entry
2
2
  // that the host React Native package for that platform ships.
3
- import 'react-native/setup-env';
3
+ try {
4
+ require('react-native/setup-env');
5
+ } catch {
6
+ // NOTE: Fallback preserved for out-of-tree platforms on React Native < 0.87
7
+ require('react-native/Libraries/Core/InitializeCore');
8
+ }
package/template.tgz CHANGED
Binary file
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- // `react-native/setup-env` was added in React Native 0.87. Remove when bumping `react-native-macos`
2
- require('react-native/Libraries/Core/InitializeCore');
3
-
4
- //# sourceMappingURL=setupReactNativeEnvironment.macos.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["winter/setupReactNativeEnvironment.macos.ts"],"sourcesContent":[null],"names":["require"],"mappings":"AAAA,oGAAoG;AACpGA,QAAQ"}
@@ -1,2 +0,0 @@
1
- // `react-native/setup-env` was added in React Native 0.87. Remove when bumping `react-native-macos`
2
- require('react-native/Libraries/Core/InitializeCore');