react-native-windows 0.73.0-preview.2 → 0.73.0

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.
@@ -13,5 +13,5 @@ exports.version = {
13
13
  major: 0,
14
14
  minor: 73,
15
15
  patch: 0,
16
- prerelease: 'rc.1',
16
+ prerelease: 'rc.3',
17
17
  };
@@ -30,6 +30,7 @@ export type LogData = $ReadOnly<{|
30
30
  message: Message,
31
31
  category: Category,
32
32
  componentStack: ComponentStack,
33
+ stack?: string,
33
34
  |}>;
34
35
 
35
36
  export type Observer = (
@@ -198,7 +199,7 @@ export function addLog(log: LogData): void {
198
199
  // otherwise spammy logs would pause rendering.
199
200
  setImmediate(() => {
200
201
  try {
201
- const stack = parseErrorStack(errorForStackTrace?.stack);
202
+ const stack = parseErrorStack(log.stack ?? errorForStackTrace?.stack);
202
203
 
203
204
  appendNewLog(
204
205
  new LogBoxLog({
@@ -55,14 +55,20 @@ export function get<Config>(
55
55
  ): HostComponent<Config> {
56
56
  ReactNativeViewConfigRegistry.register(name, () => {
57
57
  const {native, strict, verify} = getRuntimeConfig?.(name) ?? {
58
- native: true,
58
+ native: !global.RN$Bridgeless,
59
59
  strict: false,
60
60
  verify: false,
61
61
  };
62
62
 
63
- const viewConfig = native
64
- ? getNativeComponentAttributes(name)
65
- : createViewConfig(viewConfigProvider());
63
+ let viewConfig;
64
+ if (native) {
65
+ viewConfig = getNativeComponentAttributes(name);
66
+ } else {
67
+ viewConfig = createViewConfig(viewConfigProvider());
68
+ if (viewConfig == null) {
69
+ viewConfig = getNativeComponentAttributes(name);
70
+ }
71
+ }
66
72
 
67
73
  if (verify) {
68
74
  const nativeViewConfig = native
@@ -10,6 +10,8 @@
10
10
 
11
11
  import typeof {enable} from 'promise/setimmediate/rejection-tracking';
12
12
 
13
+ import LogBox from './LogBox/LogBox';
14
+
13
15
  let rejectionTrackingOptions: $NonMaybeType<Parameters<enable>[0]> = {
14
16
  allRejections: true,
15
17
  onUnhandled: (id, rejection = {}) => {
@@ -34,17 +36,29 @@ let rejectionTrackingOptions: $NonMaybeType<Parameters<enable>[0]> = {
34
36
  }
35
37
  }
36
38
 
37
- const warning =
38
- `Possible Unhandled Promise Rejection (id: ${id}):\n` +
39
- `${message ?? ''}\n` +
40
- (stack == null ? '' : stack);
41
- console.warn(warning);
39
+ const warning = `Possible unhandled promise rejection (id: ${id}):\n${
40
+ message ?? ''
41
+ }`;
42
+ if (__DEV__) {
43
+ LogBox.addLog({
44
+ level: 'warn',
45
+ message: {
46
+ content: warning,
47
+ substitutions: [],
48
+ },
49
+ componentStack: [],
50
+ stack,
51
+ category: 'possible_unhandled_promise_rejection',
52
+ });
53
+ } else {
54
+ console.warn(warning);
55
+ }
42
56
  },
43
57
  onHandled: id => {
44
58
  const warning =
45
- `Promise Rejection Handled (id: ${id})\n` +
59
+ `Promise rejection handled (id: ${id})\n` +
46
60
  'This means you can ignore any previous messages of the form ' +
47
- `"Possible Unhandled Promise Rejection (id: ${id}):"`;
61
+ `"Possible unhandled promise rejection (id: ${id}):"`;
48
62
  console.warn(warning);
49
63
  },
50
64
  };
@@ -10,11 +10,11 @@
10
10
  -->
11
11
  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
12
12
  <PropertyGroup>
13
- <ReactNativeWindowsVersion>0.73.0-preview.2</ReactNativeWindowsVersion>
13
+ <ReactNativeWindowsVersion>0.73.0</ReactNativeWindowsVersion>
14
14
  <ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
15
15
  <ReactNativeWindowsMinor>73</ReactNativeWindowsMinor>
16
16
  <ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
17
17
  <ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
18
- <ReactNativeWindowsCommitId>6ad09bc5154e17cb11a8d7b4411eff91ebaf8195</ReactNativeWindowsCommitId>
18
+ <ReactNativeWindowsCommitId>249ca7cf3d3f9aa5682d0506f7404e9e75e8a907</ReactNativeWindowsCommitId>
19
19
  </PropertyGroup>
20
20
  </Project>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-windows",
3
- "version": "0.73.0-preview.2",
3
+ "version": "0.73.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,11 +30,11 @@
30
30
  "@react-native/assets": "1.0.0",
31
31
  "@react-native/assets-registry": "^0.73.1",
32
32
  "@react-native/codegen": "^0.73.1",
33
- "@react-native/community-cli-plugin": "^0.73.6",
34
- "@react-native/gradle-plugin": "^0.73.1",
33
+ "@react-native/community-cli-plugin": "^0.73.7",
34
+ "@react-native/gradle-plugin": "^0.73.2",
35
35
  "@react-native/js-polyfills": "^0.73.1",
36
36
  "@react-native/normalize-colors": "^0.73.2",
37
- "@react-native/virtualized-lists": "^0.73.1",
37
+ "@react-native/virtualized-lists": "^0.73.2",
38
38
  "abort-controller": "^3.0.0",
39
39
  "anser": "^1.4.9",
40
40
  "ansi-regex": "^5.0.0",
@@ -81,14 +81,14 @@
81
81
  "just-scripts": "^1.3.3",
82
82
  "prettier": "^2.4.1",
83
83
  "react": "18.2.0",
84
- "react-native": "0.73.0-rc.1",
84
+ "react-native": "0.73.0-rc.3",
85
85
  "react-native-platform-override": "^1.9.16",
86
86
  "react-refresh": "^0.4.0",
87
87
  "typescript": "^4.9.5"
88
88
  },
89
89
  "peerDependencies": {
90
90
  "react": "18.2.0",
91
- "react-native": "0.73.0-rc.1"
91
+ "react-native": "^0.73.0-rc.3"
92
92
  },
93
93
  "beachball": {
94
94
  "defaultNpmTag": "preview",
@@ -1,9 +1,5 @@
1
- /**
2
- * Metro configuration for React Native
3
- * https://github.com/facebook/react-native
4
- *
5
- * @format
6
- */
1
+ const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
2
+
7
3
  const fs = require('fs');
8
4
  const path = require('path');
9
5
  const exclusionList = require('metro-config/src/defaults/exclusionList');
@@ -12,7 +8,14 @@ const rnwPath = fs.realpathSync(
12
8
  path.resolve(require.resolve('react-native-windows/package.json'), '..'),
13
9
  );
14
10
 
15
- module.exports = {
11
+ /**
12
+ * Metro configuration
13
+ * https://facebook.github.io/metro/docs/configuration
14
+ *
15
+ * @type {import('metro-config').MetroConfig}
16
+ */
17
+
18
+ const config = {
16
19
  resolver: {
17
20
  blockList: exclusionList([
18
21
  // This stops "react-native run-windows" from causing the metro server to crash if its already running
@@ -36,3 +39,5 @@ module.exports = {
36
39
  assetRegistryPath: 'react-native/Libraries/Image/AssetRegistry',
37
40
  },
38
41
  };
42
+
43
+ module.exports = mergeConfig(getDefaultConfig(__dirname), config);
@@ -1,9 +1,5 @@
1
- /**
2
- * Metro configuration for React Native
3
- * https://github.com/facebook/react-native
4
- *
5
- * @format
6
- */
1
+ const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
2
+
7
3
  const fs = require('fs');
8
4
  const path = require('path');
9
5
  const exclusionList = require('metro-config/src/defaults/exclusionList');
@@ -17,7 +13,14 @@ const rnwRootNodeModules = path.resolve(rnwPath, '..', 'node_modules');
17
13
  const rnwPackages = path.resolve(rnwPath, '..', 'packages');
18
14
  // devMode]
19
15
 
20
- module.exports = {
16
+ /**
17
+ * Metro configuration
18
+ * https://facebook.github.io/metro/docs/configuration
19
+ *
20
+ * @type {import('metro-config').MetroConfig}
21
+ */
22
+
23
+ const config = {
21
24
  // [devMode
22
25
  watchFolders: [rnwPath, rnwRootNodeModules, rnwPackages],
23
26
  // devMode]
@@ -45,5 +48,9 @@ module.exports = {
45
48
  inlineRequires: true,
46
49
  },
47
50
  }),
51
+ // This fixes the 'missing-asset-registry-path` error (see https://github.com/microsoft/react-native-windows/issues/11437)
52
+ assetRegistryPath: 'react-native/Libraries/Image/AssetRegistry',
48
53
  },
49
54
  };
55
+
56
+ module.exports = mergeConfig(getDefaultConfig(__dirname), config);
@@ -1,9 +1,5 @@
1
- /**
2
- * Metro configuration for React Native
3
- * https://github.com/facebook/react-native
4
- *
5
- * @format
6
- */
1
+ const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
2
+
7
3
  const fs = require('fs');
8
4
  const path = require('path');
9
5
  const exclusionList = require('metro-config/src/defaults/exclusionList');
@@ -17,7 +13,14 @@ const rnwRootNodeModules = path.resolve(rnwPath, '..', 'node_modules');
17
13
  const rnwPackages = path.resolve(rnwPath, '..', 'packages');
18
14
  // devMode]{{/devMode}}
19
15
 
20
- module.exports = {
16
+ /**
17
+ * Metro configuration
18
+ * https://facebook.github.io/metro/docs/configuration
19
+ *
20
+ * @type {import('metro-config').MetroConfig}
21
+ */
22
+
23
+ const config = {
21
24
  //{{#devMode}} [devMode
22
25
  watchFolders: [rnwPath, rnwRootNodeModules, rnwPackages],
23
26
  // devMode]{{/devMode}}
@@ -49,3 +52,5 @@ module.exports = {
49
52
  assetRegistryPath: 'react-native/Libraries/Image/AssetRegistry',
50
53
  },
51
54
  };
55
+
56
+ module.exports = mergeConfig(getDefaultConfig(__dirname), config);