Skip to content

Commit d4caba5

Browse files
Merge branch 'main' into dependabot/npm_and_yarn/ts-jest-29.4.4
2 parents fa799ab + d1a9535 commit d4caba5

File tree

381 files changed

+3898
-1874
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

381 files changed

+3898
-1874
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "fix for watson",
4+
"packageName": "react-native-windows",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
/**
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @flow
8+
* @format
9+
*/
10+
11+
'use strict';
12+
13+
type Handler = {
14+
onIterate?: () => void,
15+
onStall: (params: {lastInterval: number, busyTime: number, ...}) => ?string,
16+
...
17+
};
18+
19+
/**
20+
* A utility for tracking stalls in the JS event loop that prevent timers and
21+
* other events from being processed in a timely manner.
22+
*
23+
* The "stall" time is defined as the amount of time in access of the acceptable
24+
* threshold, which is typically around 100-200ms. So if the threshold is set to
25+
* 100 and a timer fires 150 ms later than it was scheduled because the event
26+
* loop was tied up, that would be considered a 50ms stall.
27+
*
28+
* By default, logs stall events to the console when installed. Can also be
29+
* queried with `getStats`.
30+
*/
31+
const JSEventLoopWatchdog = {
32+
getStats: function (): Object {
33+
return {stallCount, totalStallTime, longestStall, acceptableBusyTime};
34+
},
35+
reset: function () {
36+
console.log('JSEventLoopWatchdog: reset');
37+
totalStallTime = 0;
38+
stallCount = 0;
39+
longestStall = 0;
40+
lastInterval = global.performance.now();
41+
},
42+
addHandler: function (handler: Handler) {
43+
handlers.push(handler);
44+
},
45+
install: function ({thresholdMS}: {thresholdMS: number, ...}) {
46+
acceptableBusyTime = thresholdMS;
47+
if (installed) {
48+
return;
49+
}
50+
installed = true;
51+
lastInterval = global.performance.now();
52+
function iteration() {
53+
const now = global.performance.now();
54+
const busyTime = now - lastInterval;
55+
if (busyTime >= thresholdMS) {
56+
const stallTime = busyTime - thresholdMS;
57+
stallCount++;
58+
totalStallTime += stallTime;
59+
longestStall = Math.max(longestStall, stallTime);
60+
let msg =
61+
`JSEventLoopWatchdog: JS thread busy for ${busyTime}ms. ` +
62+
`${totalStallTime}ms in ${stallCount} stalls so far. `;
63+
handlers.forEach(handler => {
64+
msg += handler.onStall({lastInterval, busyTime}) || '';
65+
});
66+
console.log(msg);
67+
}
68+
handlers.forEach(handler => {
69+
handler.onIterate && handler.onIterate();
70+
});
71+
lastInterval = now;
72+
setTimeout(iteration, thresholdMS / 5);
73+
}
74+
iteration();
75+
},
76+
};
77+
78+
let acceptableBusyTime = 0;
79+
let installed = false;
80+
let totalStallTime = 0;
81+
let stallCount = 0;
82+
let longestStall = 0;
83+
let lastInterval = 0;
84+
const handlers: Array<Handler> = [];
85+
86+
export default JSEventLoopWatchdog;

packages/@office-iss/react-native-win32-tester/overrides.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
"excludePatterns": [
66
"src/js/examples-win32/**"
77
],
8-
"baseVersion": "0.81.0-nightly-20250521-3cb70bb6a",
8+
"baseVersion": "0.81.0-nightly-20250604-1a6d466f1",
99
"overrides": [
1010
{
1111
"type": "patch",
1212
"file": "src/js/components/ListExampleShared.win32.js",
1313
"baseFile": "packages/rn-tester/js/components/ListExampleShared.js",
14-
"baseHash": "eb604f3c06468e8aaa2671985a772b26f666e5de"
14+
"baseHash": "885ca16a7587f79d6404679ee1b1309d3844afe9"
1515
},
1616
{
1717
"type": "patch",
1818
"file": "src/js/components/RNTesterExampleFilter.win32.js",
1919
"baseFile": "packages/rn-tester/js/components/RNTesterExampleFilter.js",
20-
"baseHash": "2b12495e7371031510b53ebcccdad627363c36ad"
20+
"baseHash": "142194524dd3dfc8d28f2b77fb26cd819ce0236c"
2121
},
2222
{
2323
"type": "platform",
@@ -35,14 +35,14 @@
3535
"type": "copy",
3636
"file": "src/js/RNTesterApp.win32.js",
3737
"baseFile": "packages/rn-tester/js/RNTesterApp.android.js",
38-
"baseHash": "5e73edb50a1156756f2d1bec70d95a92f701ec22",
38+
"baseHash": "987893a4df686425670b7897881b61e485960191",
3939
"issue": 4586
4040
},
4141
{
4242
"type": "derived",
4343
"file": "src/js/utils/RNTesterList.win32.js",
4444
"baseFile": "packages/rn-tester/js/utils/RNTesterList.android.js",
45-
"baseHash": "aded9dd37f3ac325aa1cc095f6d217114c45a8b9"
45+
"baseHash": "faa6a65524adb312817e96d511649edd81e38262"
4646
}
4747
]
4848
}

packages/@office-iss/react-native-win32-tester/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@
1717
"flow-enums-runtime": "^0.0.6"
1818
},
1919
"peerDependencies": {
20-
"@office-iss/react-native-win32": "^0.0.0-canary.297",
20+
"@office-iss/react-native-win32": "^0.0.0-canary.298",
2121
"react": "19.1.0",
22-
"react-native": "0.81.0-nightly-20250521-3cb70bb6a"
22+
"react-native": "0.81.0-nightly-20250604-1a6d466f1"
2323
},
2424
"devDependencies": {
25-
"@office-iss/react-native-win32": "^0.0.0-canary.297",
25+
"@office-iss/react-native-win32": "^0.0.0-canary.298",
2626
"@rnw-scripts/babel-react-native-config": "0.0.0",
2727
"@rnw-scripts/eslint-config": "1.2.37",
28-
"@rnw-scripts/just-task": "2.3.55",
28+
"@rnw-scripts/just-task": "2.3.56",
2929
"@rnw-scripts/ts-config": "2.0.6",
3030
"@types/node": "^22.14.0",
3131
"eslint": "^8.19.0",
3232
"just-scripts": "^1.3.3",
33-
"react-native": "0.81.0-nightly-20250521-3cb70bb6a",
34-
"react-native-platform-override": "^1.9.58",
33+
"react-native": "0.81.0-nightly-20250604-1a6d466f1",
34+
"react-native-platform-override": "^1.9.59",
3535
"typescript": "5.0.4"
3636
},
3737
"engines": {

packages/@office-iss/react-native-win32-tester/src/js/RNTesterApp.win32.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @format
87
* @flow strict-local
8+
* @format
99
*/
1010

1111
import RNTesterApp from './RNTesterAppShared';

packages/@office-iss/react-native-win32-tester/src/js/components/ListExampleShared.win32.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @format
87
* @flow
8+
* @format
99
*/
1010

1111
'use strict';

packages/@office-iss/react-native-win32-tester/src/js/components/RNTesterExampleFilter.win32.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @format
87
* @flow
8+
* @format
99
*/
1010

1111
import type {SectionData} from '../types/RNTesterTypes';

packages/@office-iss/react-native-win32-tester/src/js/utils/RNTesterList.win32.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @format
87
* @flow
8+
* @format
99
*/
1010

1111
'use strict';

packages/@office-iss/react-native-win32/.flowconfig

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110

111111
[libs]
112112
interface.js
113-
flow/
113+
../../../node_modules/.flow/flow/
114114
../../../node_modules/.flow/flow-typed/
115115
../../../node_modules/react-native/src/types
116116
src/types/
@@ -143,6 +143,8 @@ module.name_mapper='^@office-iss/react-native-win32/\(.*\)$' -> '<PROJECT_ROOT>\
143143
module.name_mapper='^@react-native/dev-middleware$' -> '<PROJECT_ROOT>/\1'
144144
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\|xml\)$' -> '<PROJECT_ROOT>/Libraries/Image/RelativeImageStub'
145145

146+
module.system.haste.module_ref_prefix=m#
147+
146148
react.runtime=automatic
147149

148150
suppress_type=$FlowIssue
@@ -176,4 +178,4 @@ untyped-import
176178
untyped-type-import
177179

178180
[version]
179-
^0.271.0
181+
^0.272.2

packages/@office-iss/react-native-win32/CHANGELOG.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,33 @@
11
{
22
"name": "@office-iss/react-native-win32",
33
"entries": [
4+
{
5+
"date": "Tue, 07 Oct 2025 05:27:27 GMT",
6+
"version": "0.0.0-canary.298",
7+
"tag": "@office-iss/react-native-win32_v0.0.0-canary.298",
8+
"comments": {
9+
"prerelease": [
10+
{
11+
"author": "[email protected]",
12+
"package": "@office-iss/react-native-win32",
13+
"commit": "bcce2736db9d50987e9c3b5a614e527f871d22a9",
14+
"comment": "Update tester files"
15+
},
16+
{
17+
"author": "beachball",
18+
"package": "@office-iss/react-native-win32",
19+
"comment": "Bump @rnw-scripts/just-task to v2.3.56",
20+
"commit": "not available"
21+
},
22+
{
23+
"author": "beachball",
24+
"package": "@office-iss/react-native-win32",
25+
"comment": "Bump react-native-platform-override to v1.9.59",
26+
"commit": "not available"
27+
}
28+
]
29+
}
30+
},
431
{
532
"date": "Fri, 19 Sep 2025 05:29:13 GMT",
633
"version": "0.0.0-canary.297",

0 commit comments

Comments
 (0)