@office-iss/react-native-win32 0.72.14 → 0.72.15
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/Animated/NativeAnimatedHelper.js +6 -3
- package/Libraries/Animated/NativeAnimatedHelper.win32.js +6 -3
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/LogBox/Data/LogBoxData.js +2 -1
- package/Libraries/LogBox/Data/parseLogBoxLog.js +51 -21
- package/Libraries/promiseRejectionTrackingOptions.js +26 -7
- package/flow-typed/npm/ansi-regex_v5.x.x.js +14 -0
- package/overrides.json +2 -2
- package/package.json +10 -9
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:47 GMT",
|
|
6
|
+
"tag": "@office-iss/react-native-win32_v0.72.15",
|
|
7
|
+
"version": "0.72.15",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "email not defined",
|
|
12
|
+
"package": "@office-iss/react-native-win32",
|
|
13
|
+
"commit": "64e5b314ccba2fb500617b2617ffb9930cc945ab",
|
|
14
|
+
"comment": "integrate 0.72.14"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Mon, 18 Mar 2024 20:19:30 GMT",
|
|
6
21
|
"tag": "@office-iss/react-native-win32_v0.72.14",
|
|
7
22
|
"version": "0.72.14",
|
|
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:47 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## 0.72.
|
|
7
|
+
## 0.72.15
|
|
8
8
|
|
|
9
|
-
Mon,
|
|
9
|
+
Mon, 27 May 2024 15:13:47 GMT
|
|
10
10
|
|
|
11
11
|
### Patches
|
|
12
12
|
|
|
13
|
-
-
|
|
13
|
+
- integrate 0.72.14 (email not defined)
|
|
14
14
|
|
|
15
|
+
## 0.72.14
|
|
16
|
+
|
|
17
|
+
Mon, 18 Mar 2024 20:19:30 GMT
|
|
18
|
+
|
|
19
|
+
### Patches
|
|
20
|
+
|
|
21
|
+
- Missed property when adding win32 specific text type info (30809111+acoates-ms@users.noreply.github.com)
|
|
22
|
+
|
|
15
23
|
## 0.72.13
|
|
16
24
|
|
|
17
25
|
Fri, 15 Mar 2024 22:28:10 GMT
|
|
@@ -562,10 +562,13 @@ function transformDataType(value: number | string): number | string {
|
|
|
562
562
|
if (typeof value !== 'string') {
|
|
563
563
|
return value;
|
|
564
564
|
}
|
|
565
|
-
|
|
565
|
+
|
|
566
|
+
// Normalize degrees and radians to a number expressed in radians
|
|
567
|
+
if (value.endsWith('deg')) {
|
|
566
568
|
const degrees = parseFloat(value) || 0;
|
|
567
|
-
|
|
568
|
-
|
|
569
|
+
return (degrees * Math.PI) / 180.0;
|
|
570
|
+
} else if (value.endsWith('rad')) {
|
|
571
|
+
return parseFloat(value) || 0;
|
|
569
572
|
} else {
|
|
570
573
|
return value;
|
|
571
574
|
}
|
|
@@ -564,10 +564,13 @@ function transformDataType(value: number | string): number | string {
|
|
|
564
564
|
if (typeof value !== 'string') {
|
|
565
565
|
return value;
|
|
566
566
|
}
|
|
567
|
-
|
|
567
|
+
|
|
568
|
+
// Normalize degrees and radians to a number expressed in radians
|
|
569
|
+
if (value.endsWith('deg')) {
|
|
568
570
|
const degrees = parseFloat(value) || 0;
|
|
569
|
-
|
|
570
|
-
|
|
571
|
+
return (degrees * Math.PI) / 180.0;
|
|
572
|
+
} else if (value.endsWith('rad')) {
|
|
573
|
+
return parseFloat(value) || 0;
|
|
571
574
|
} else {
|
|
572
575
|
return value;
|
|
573
576
|
}
|
|
@@ -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({
|
|
@@ -14,12 +14,38 @@ import type {LogBoxLogData} from './LogBoxLog';
|
|
|
14
14
|
import parseErrorStack from '../../Core/Devtools/parseErrorStack';
|
|
15
15
|
import UTFSequence from '../../UTFSequence';
|
|
16
16
|
import stringifySafe from '../../Utilities/stringifySafe';
|
|
17
|
+
import ansiRegex from 'ansi-regex';
|
|
18
|
+
|
|
19
|
+
const ANSI_REGEX = ansiRegex().source;
|
|
17
20
|
|
|
18
21
|
const BABEL_TRANSFORM_ERROR_FORMAT =
|
|
19
22
|
/^(?:TransformError )?(?:SyntaxError: |ReferenceError: )(.*): (.*) \((\d+):(\d+)\)\n\n([\s\S]+)/;
|
|
23
|
+
|
|
24
|
+
// https://github.com/babel/babel/blob/33dbb85e9e9fe36915273080ecc42aee62ed0ade/packages/babel-code-frame/src/index.ts#L183-L184
|
|
25
|
+
const BABEL_CODE_FRAME_MARKER_PATTERN = new RegExp(
|
|
26
|
+
[
|
|
27
|
+
// Beginning of a line (per 'm' flag)
|
|
28
|
+
'^',
|
|
29
|
+
// Optional ANSI escapes for colors
|
|
30
|
+
`(?:${ANSI_REGEX})*`,
|
|
31
|
+
// Marker
|
|
32
|
+
'>',
|
|
33
|
+
// Optional ANSI escapes for colors
|
|
34
|
+
`(?:${ANSI_REGEX})*`,
|
|
35
|
+
// Left padding for line number
|
|
36
|
+
' +',
|
|
37
|
+
// Line number
|
|
38
|
+
'[0-9]+',
|
|
39
|
+
// Gutter
|
|
40
|
+
' \\|',
|
|
41
|
+
].join(''),
|
|
42
|
+
'm',
|
|
43
|
+
);
|
|
44
|
+
|
|
20
45
|
const BABEL_CODE_FRAME_ERROR_FORMAT =
|
|
21
46
|
// eslint-disable-next-line no-control-regex
|
|
22
47
|
/^(?:TransformError )?(?:.*):? (?:.*?)(\/.*): ([\s\S]+?)\n([ >]{2}[\d\s]+ \|[\s\S]+|\u{001b}[\s\S]+)/u;
|
|
48
|
+
|
|
23
49
|
const METRO_ERROR_FORMAT =
|
|
24
50
|
/^(?:InternalError Metro has encountered an error:) (.*): (.*) \((\d+):(\d+)\)\n\n([\s\S]+)/u;
|
|
25
51
|
|
|
@@ -166,7 +192,7 @@ export function parseComponentStack(message: string): ComponentStack {
|
|
|
166
192
|
if (!s) {
|
|
167
193
|
return null;
|
|
168
194
|
}
|
|
169
|
-
const match = s.match(/(.*) \(at (.*\.js):([\d]+)\)/);
|
|
195
|
+
const match = s.match(/(.*) \(at (.*\.(?:js|jsx|ts|tsx)):([\d]+)\)/);
|
|
170
196
|
if (!match) {
|
|
171
197
|
return null;
|
|
172
198
|
}
|
|
@@ -241,27 +267,31 @@ export function parseLogBoxException(
|
|
|
241
267
|
};
|
|
242
268
|
}
|
|
243
269
|
|
|
244
|
-
|
|
270
|
+
// Perform a cheap match first before trying to parse the full message, which
|
|
271
|
+
// can get expensive for arbitrary input.
|
|
272
|
+
if (BABEL_CODE_FRAME_MARKER_PATTERN.test(message)) {
|
|
273
|
+
const babelCodeFrameError = message.match(BABEL_CODE_FRAME_ERROR_FORMAT);
|
|
245
274
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
275
|
+
if (babelCodeFrameError) {
|
|
276
|
+
// Codeframe errors are thrown from any use of buildCodeFrameError.
|
|
277
|
+
const [fileName, content, codeFrame] = babelCodeFrameError.slice(1);
|
|
278
|
+
return {
|
|
279
|
+
level: 'syntax',
|
|
280
|
+
stack: [],
|
|
281
|
+
isComponentError: false,
|
|
282
|
+
componentStack: [],
|
|
283
|
+
codeFrame: {
|
|
284
|
+
fileName,
|
|
285
|
+
location: null, // We are not given the location.
|
|
286
|
+
content: codeFrame,
|
|
287
|
+
},
|
|
288
|
+
message: {
|
|
289
|
+
content,
|
|
290
|
+
substitutions: [],
|
|
291
|
+
},
|
|
292
|
+
category: `${fileName}-${1}-${1}`,
|
|
293
|
+
};
|
|
294
|
+
}
|
|
265
295
|
}
|
|
266
296
|
|
|
267
297
|
if (message.match(/^TransformError /)) {
|
|
@@ -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
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @flow strict
|
|
3
|
+
* @format
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
declare module 'ansi-regex' {
|
|
7
|
+
declare export type Options = {
|
|
8
|
+
/**
|
|
9
|
+
* Match only the first ANSI escape.
|
|
10
|
+
*/
|
|
11
|
+
+onlyFirst?: boolean,
|
|
12
|
+
};
|
|
13
|
+
declare export default function ansiRegex(options?: Options): RegExp;
|
|
14
|
+
}
|
package/overrides.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"**/__snapshots__/**",
|
|
8
8
|
"src/rntypes/**"
|
|
9
9
|
],
|
|
10
|
-
"baseVersion": "0.72.
|
|
10
|
+
"baseVersion": "0.72.14",
|
|
11
11
|
"overrides": [
|
|
12
12
|
{
|
|
13
13
|
"type": "derived",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"type": "derived",
|
|
36
36
|
"file": "src/Libraries/Animated/NativeAnimatedHelper.win32.js",
|
|
37
37
|
"baseFile": "packages/react-native/Libraries/Animated/NativeAnimatedHelper.js",
|
|
38
|
-
"baseHash": "
|
|
38
|
+
"baseHash": "ae83fb31990e1d572d743909f5bdd36589c86939",
|
|
39
39
|
"issue": 11041
|
|
40
40
|
},
|
|
41
41
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@office-iss/react-native-win32",
|
|
3
|
-
"version": "0.72.
|
|
3
|
+
"version": "0.72.15",
|
|
4
4
|
"description": "Implementation of react native on top of Office's Win32 platform.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,29 +26,30 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@babel/runtime": "^7.0.0",
|
|
28
28
|
"@jest/create-cache-key-function": "^29.2.1",
|
|
29
|
-
"@react-native-community/cli": "11.
|
|
30
|
-
"@react-native-community/cli-platform-android": "11.
|
|
31
|
-
"@react-native-community/cli-platform-ios": "11.
|
|
29
|
+
"@react-native-community/cli": "^11.4.1",
|
|
30
|
+
"@react-native-community/cli-platform-android": "^11.4.1",
|
|
31
|
+
"@react-native-community/cli-platform-ios": "^11.4.1",
|
|
32
32
|
"@react-native/assets": "1.0.0",
|
|
33
33
|
"@react-native/assets-registry": "^0.72.0",
|
|
34
|
-
"@react-native/codegen": "^0.72.
|
|
34
|
+
"@react-native/codegen": "^0.72.8",
|
|
35
35
|
"@react-native/gradle-plugin": "^0.72.11",
|
|
36
36
|
"@react-native/js-polyfills": "^0.72.1",
|
|
37
37
|
"@react-native/normalize-colors": "^0.72.0",
|
|
38
38
|
"@react-native/virtualized-lists": "^0.72.8",
|
|
39
39
|
"abort-controller": "^3.0.0",
|
|
40
40
|
"anser": "^1.4.9",
|
|
41
|
+
"ansi-regex": "^5.0.0",
|
|
41
42
|
"art": "^0.10.0",
|
|
42
43
|
"base64-js": "^1.1.2",
|
|
43
|
-
"deprecated-react-native-prop-types": "4.
|
|
44
|
+
"deprecated-react-native-prop-types": "^4.2.3",
|
|
44
45
|
"event-target-shim": "^5.0.1",
|
|
45
46
|
"flow-enums-runtime": "^0.0.5",
|
|
46
47
|
"invariant": "^2.2.4",
|
|
47
48
|
"jest-environment-node": "^29.2.1",
|
|
48
49
|
"jsc-android": "^250231.0.0",
|
|
49
50
|
"memoize-one": "^5.0.0",
|
|
50
|
-
"metro-runtime": "0.76.
|
|
51
|
-
"metro-source-map": "0.76.
|
|
51
|
+
"metro-runtime": "^0.76.9",
|
|
52
|
+
"metro-source-map": "^0.76.9",
|
|
52
53
|
"mkdirp": "^0.5.1",
|
|
53
54
|
"nullthrows": "^1.1.1",
|
|
54
55
|
"pretty-format": "^26.5.2",
|
|
@@ -83,7 +84,7 @@
|
|
|
83
84
|
"just-scripts": "^1.3.3",
|
|
84
85
|
"prettier": "^2.4.1",
|
|
85
86
|
"react": "18.2.0",
|
|
86
|
-
"react-native": "0.72.
|
|
87
|
+
"react-native": "0.72.14",
|
|
87
88
|
"react-native-platform-override": "^1.9.4",
|
|
88
89
|
"typescript": "^4.9.5"
|
|
89
90
|
},
|