@office-iss/react-native-win32 0.71.18 → 0.71.19
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/CHANGELOG.json +16 -1
- package/CHANGELOG.md +12 -4
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/LogBox/Data/LogBoxData.js +3 -2
- package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
- package/Libraries/ReactNative/AppContainer.js +28 -6
- package/Libraries/promiseRejectionTrackingOptions.js +26 -7
- package/overrides.json +1 -1
- package/package.json +9 -6
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,22 @@
|
|
|
2
2
|
"name": "@office-iss/react-native-win32",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Mon,
|
|
5
|
+
"date": "Mon, 27 May 2024 15:13:13 GMT",
|
|
6
|
+
"tag": "@office-iss/react-native-win32_v0.71.19",
|
|
7
|
+
"version": "0.71.19",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "email not defined",
|
|
12
|
+
"package": "@office-iss/react-native-win32",
|
|
13
|
+
"commit": "cbfeca1bf8402bb8615d899328329d2690534f08",
|
|
14
|
+
"comment": "integrate react-native 0.71.19"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Mon, 23 Oct 2023 15:14:24 GMT",
|
|
6
21
|
"tag": "@office-iss/react-native-win32_v0.71.18",
|
|
7
22
|
"version": "0.71.18",
|
|
8
23
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,25 @@
|
|
|
1
1
|
# Change Log - @office-iss/react-native-win32
|
|
2
2
|
|
|
3
|
-
This log was last generated on Mon,
|
|
3
|
+
This log was last generated on Mon, 27 May 2024 15:13:13 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## 0.71.
|
|
7
|
+
## 0.71.19
|
|
8
8
|
|
|
9
|
-
Mon,
|
|
9
|
+
Mon, 27 May 2024 15:13:13 GMT
|
|
10
10
|
|
|
11
11
|
### Patches
|
|
12
12
|
|
|
13
|
-
-
|
|
13
|
+
- integrate react-native 0.71.19 (email not defined)
|
|
14
14
|
|
|
15
|
+
## 0.71.18
|
|
16
|
+
|
|
17
|
+
Mon, 23 Oct 2023 15:14:24 GMT
|
|
18
|
+
|
|
19
|
+
### Patches
|
|
20
|
+
|
|
21
|
+
- add support for announceForAccessibilityWithOptions (krsiler@microsoft.com)
|
|
22
|
+
|
|
15
23
|
## 0.71.17
|
|
16
24
|
|
|
17
25
|
Tue, 03 Oct 2023 02:37:00 GMT
|
|
@@ -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 = (
|
|
@@ -154,7 +155,7 @@ function appendNewLog(newLog: LogBoxLog) {
|
|
|
154
155
|
if (newLog.level === 'fatal') {
|
|
155
156
|
// If possible, to avoid jank, we don't want to open the error before
|
|
156
157
|
// it's symbolicated. To do that, we optimistically wait for
|
|
157
|
-
//
|
|
158
|
+
// symbolication for up to a second before adding the log.
|
|
158
159
|
const OPTIMISTIC_WAIT_TIME = 1000;
|
|
159
160
|
|
|
160
161
|
let addPendingLog: ?() => void = () => {
|
|
@@ -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({
|
|
@@ -192,7 +192,7 @@ export function parseComponentStack(message: string): ComponentStack {
|
|
|
192
192
|
if (!s) {
|
|
193
193
|
return null;
|
|
194
194
|
}
|
|
195
|
-
const match = s.match(/(.*) \(at (.*\.js):([\d]+)\)/);
|
|
195
|
+
const match = s.match(/(.*) \(at (.*\.(?:js|jsx|ts|tsx)):([\d]+)\)/);
|
|
196
196
|
if (!match) {
|
|
197
197
|
return null;
|
|
198
198
|
}
|
|
@@ -17,6 +17,8 @@ import {type EventSubscription} from '../vendor/emitter/EventEmitter';
|
|
|
17
17
|
import {RootTagContext, createRootTag} from './RootTag';
|
|
18
18
|
import * as React from 'react';
|
|
19
19
|
|
|
20
|
+
const reactDevToolsHook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
21
|
+
|
|
20
22
|
type Props = $ReadOnly<{|
|
|
21
23
|
children?: React.Node,
|
|
22
24
|
fabric?: boolean,
|
|
@@ -45,9 +47,17 @@ class AppContainer extends React.Component<Props, State> {
|
|
|
45
47
|
};
|
|
46
48
|
_mainRef: ?React.ElementRef<typeof View>;
|
|
47
49
|
_subscription: ?EventSubscription = null;
|
|
50
|
+
_reactDevToolsAgentListener: ?() => void = null;
|
|
48
51
|
|
|
49
52
|
static getDerivedStateFromError: any = undefined;
|
|
50
53
|
|
|
54
|
+
mountReactDevToolsOverlays(): void {
|
|
55
|
+
const DevtoolsOverlay = require('../Inspector/DevtoolsOverlay').default;
|
|
56
|
+
const devtoolsOverlay = <DevtoolsOverlay inspectedView={this._mainRef} />;
|
|
57
|
+
|
|
58
|
+
this.setState({devtoolsOverlay});
|
|
59
|
+
}
|
|
60
|
+
|
|
51
61
|
componentDidMount(): void {
|
|
52
62
|
if (__DEV__) {
|
|
53
63
|
if (!this.props.internal_excludeInspector) {
|
|
@@ -69,13 +79,21 @@ class AppContainer extends React.Component<Props, State> {
|
|
|
69
79
|
this.setState({inspector});
|
|
70
80
|
},
|
|
71
81
|
);
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
82
|
+
|
|
83
|
+
if (reactDevToolsHook != null) {
|
|
84
|
+
if (reactDevToolsHook.reactDevtoolsAgent) {
|
|
85
|
+
// In case if this is not the first AppContainer rendered and React DevTools are already attached
|
|
86
|
+
this.mountReactDevToolsOverlays();
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
this._reactDevToolsAgentListener = () =>
|
|
91
|
+
this.mountReactDevToolsOverlays();
|
|
92
|
+
|
|
93
|
+
reactDevToolsHook.on(
|
|
94
|
+
'react-devtools',
|
|
95
|
+
this._reactDevToolsAgentListener,
|
|
77
96
|
);
|
|
78
|
-
this.setState({devtoolsOverlay});
|
|
79
97
|
}
|
|
80
98
|
}
|
|
81
99
|
}
|
|
@@ -85,6 +103,10 @@ class AppContainer extends React.Component<Props, State> {
|
|
|
85
103
|
if (this._subscription != null) {
|
|
86
104
|
this._subscription.remove();
|
|
87
105
|
}
|
|
106
|
+
|
|
107
|
+
if (reactDevToolsHook != null && this._reactDevToolsAgentListener != null) {
|
|
108
|
+
reactDevToolsHook.off('react-devtools', this._reactDevToolsAgentListener);
|
|
109
|
+
}
|
|
88
110
|
}
|
|
89
111
|
|
|
90
112
|
render(): React.Node {
|
|
@@ -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
|
type ExtractOptionsType = <P>(((options?: ?P) => void)) => P;
|
|
14
16
|
|
|
15
17
|
let rejectionTrackingOptions: $Call<ExtractOptionsType, enable> = {
|
|
@@ -34,19 +36,36 @@ let rejectionTrackingOptions: $Call<ExtractOptionsType, enable> = {
|
|
|
34
36
|
? rejection
|
|
35
37
|
: JSON.stringify((rejection: $FlowFixMe));
|
|
36
38
|
}
|
|
39
|
+
// It could although this object is not a standard error, it still has stack information to unwind
|
|
40
|
+
// $FlowFixMe ignore types just check if stack is there
|
|
41
|
+
if (rejection.stack && typeof rejection.stack === 'string') {
|
|
42
|
+
stack = rejection.stack;
|
|
43
|
+
}
|
|
37
44
|
}
|
|
38
45
|
|
|
39
|
-
const warning =
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
46
|
+
const warning = `Possible unhandled promise rejection (id: ${id}):\n${
|
|
47
|
+
message ?? ''
|
|
48
|
+
}`;
|
|
49
|
+
if (__DEV__) {
|
|
50
|
+
LogBox.addLog({
|
|
51
|
+
level: 'warn',
|
|
52
|
+
message: {
|
|
53
|
+
content: warning,
|
|
54
|
+
substitutions: [],
|
|
55
|
+
},
|
|
56
|
+
componentStack: [],
|
|
57
|
+
stack,
|
|
58
|
+
category: 'possible_unhandled_promise_rejection',
|
|
59
|
+
});
|
|
60
|
+
} else {
|
|
61
|
+
console.warn(warning);
|
|
62
|
+
}
|
|
44
63
|
},
|
|
45
64
|
onHandled: id => {
|
|
46
65
|
const warning =
|
|
47
|
-
`Promise
|
|
66
|
+
`Promise rejection handled (id: ${id})\n` +
|
|
48
67
|
'This means you can ignore any previous messages of the form ' +
|
|
49
|
-
`"Possible
|
|
68
|
+
`"Possible unhandled promise rejection (id: ${id}):"`;
|
|
50
69
|
console.warn(warning);
|
|
51
70
|
},
|
|
52
71
|
};
|
package/overrides.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@office-iss/react-native-win32",
|
|
3
|
-
"version": "0.71.
|
|
3
|
+
"version": "0.71.19",
|
|
4
4
|
"description": "Implementation of react native on top of Office's Win32 platform.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./index.win32.js",
|
|
@@ -21,20 +21,22 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.0.0",
|
|
23
23
|
"@jest/create-cache-key-function": "^29.2.1",
|
|
24
|
-
"@react-native-community/cli": "10.2.
|
|
24
|
+
"@react-native-community/cli": "10.2.7",
|
|
25
25
|
"@react-native-community/cli-platform-android": "10.2.0",
|
|
26
|
-
"@react-native-community/cli-platform-ios": "10.2.
|
|
26
|
+
"@react-native-community/cli-platform-ios": "10.2.5",
|
|
27
27
|
"@react-native/assets": "1.0.0",
|
|
28
28
|
"@react-native/normalize-color": "2.1.0",
|
|
29
29
|
"@react-native/polyfills": "2.0.0",
|
|
30
30
|
"abort-controller": "^3.0.0",
|
|
31
31
|
"anser": "^1.4.9",
|
|
32
|
+
"ansi-regex": "^5.0.0",
|
|
32
33
|
"art": "^0.10.0",
|
|
33
34
|
"base64-js": "^1.1.2",
|
|
34
35
|
"deprecated-react-native-prop-types": "^3.0.1",
|
|
35
36
|
"event-target-shim": "^5.0.1",
|
|
36
37
|
"invariant": "^2.2.4",
|
|
37
38
|
"jest-environment-node": "^29.2.1",
|
|
39
|
+
"jsc-android": "^250231.0.0",
|
|
38
40
|
"memoize-one": "^5.0.0",
|
|
39
41
|
"metro-react-native-babel-transformer": "0.73.10",
|
|
40
42
|
"metro-runtime": "0.73.10",
|
|
@@ -45,7 +47,8 @@
|
|
|
45
47
|
"promise": "^8.3.0",
|
|
46
48
|
"react-clone-referenced-element": "^1.0.1",
|
|
47
49
|
"react-devtools-core": "^4.26.1",
|
|
48
|
-
"react-native-codegen": "^0.71.
|
|
50
|
+
"react-native-codegen": "^0.71.6",
|
|
51
|
+
"react-native-gradle-plugin": "^0.71.19",
|
|
49
52
|
"react-refresh": "^0.4.0",
|
|
50
53
|
"react-shallow-renderer": "^16.15.0",
|
|
51
54
|
"regenerator-runtime": "^0.13.2",
|
|
@@ -69,11 +72,11 @@
|
|
|
69
72
|
"@types/react": "^18.0.18",
|
|
70
73
|
"eslint": "^8.19.0",
|
|
71
74
|
"flow-bin": "^0.191.0",
|
|
72
|
-
"jscodeshift": "^0.
|
|
75
|
+
"jscodeshift": "^0.14.0",
|
|
73
76
|
"just-scripts": "^1.3.3",
|
|
74
77
|
"prettier": "^2.4.1",
|
|
75
78
|
"react": "18.2.0",
|
|
76
|
-
"react-native": "0.71.
|
|
79
|
+
"react-native": "0.71.19",
|
|
77
80
|
"react-native-platform-override": "^1.8.3",
|
|
78
81
|
"typescript": "^4.9.5"
|
|
79
82
|
},
|