react-native-windows 0.67.0-preview.5 → 0.67.1
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 +167 -5
- package/CHANGELOG.md +71 -5
- package/Libraries/Components/Keyboard/Keyboard.js +2 -2
- package/Libraries/Components/Pressable/Pressable.windows.js +33 -0
- package/Libraries/Core/ReactNativeVersion.js +3 -3
- package/Libraries/Pressability/HoverState.js +4 -0
- package/Microsoft.ReactNative/JsiApi.cpp +3 -3
- package/Microsoft.ReactNative/JsiApi.h +4 -4
- package/Microsoft.ReactNative/Modules/CreateModules.cpp +2 -2
- package/Microsoft.ReactNative/Modules/PaperUIManagerModule.cpp +1 -1
- package/Microsoft.ReactNative/ReactHost/ReactContext.h +2 -2
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +1 -1
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h +1 -1
- package/Microsoft.ReactNative.Cxx/NativeModules.h +1 -1
- package/PropertySheets/Generated/PackageVersion.g.props +2 -2
- package/Shared/ChakraRuntimeHolder.cpp +4 -0
- package/Shared/ChakraRuntimeHolder.h +2 -1
- package/Shared/DevSettings.h +3 -5
- package/Shared/HermesRuntimeHolder.cpp +4 -0
- package/Shared/HermesRuntimeHolder.h +2 -1
- package/Shared/IWebSocketResource.h +6 -6
- package/Shared/InspectorPackagerConnection.cpp +2 -3
- package/Shared/JSI/NapiJsiV8RuntimeHolder.cpp +6 -2
- package/Shared/JSI/NapiJsiV8RuntimeHolder.h +2 -1
- package/Shared/JSI/RuntimeHolder.h +5 -4
- package/Shared/Modules/WebSocketModule.cpp +133 -120
- package/Shared/Modules/WebSocketModule.h +22 -12
- package/Shared/OInstance.cpp +17 -4
- package/Shared/V8JSIRuntimeHolder.cpp +4 -0
- package/Shared/V8JSIRuntimeHolder.h +2 -1
- package/Shared/WinRTWebSocketResource.cpp +55 -46
- package/Shared/WinRTWebSocketResource.h +2 -9
- package/jest/preprocessor.js +7 -75
- package/package.json +8 -8
- package/template/shared-app/proj/NuGet.Config +2 -0
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,172 @@
|
|
|
2
2
|
"name": "react-native-windows",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Mon,
|
|
5
|
+
"date": "Mon, 07 Feb 2022 16:12:39 GMT",
|
|
6
|
+
"tag": "react-native-windows_v0.67.1",
|
|
7
|
+
"version": "0.67.1",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "anandrag@microsoft.com",
|
|
12
|
+
"package": "react-native-windows",
|
|
13
|
+
"commit": "81a6b931d7df9db4d5667c4961e22707d5238194",
|
|
14
|
+
"comment": "Hermes inspector is not starting when Hermes engine is used (#9426)"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "julio.rocha@microsoft.com",
|
|
18
|
+
"package": "react-native-windows",
|
|
19
|
+
"commit": "8c8248af3d324b55adce0d4e41bfc2957a3f4446",
|
|
20
|
+
"comment": "Replace __APPLE__ with __clang__ where applicable (#9461)"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "30809111+acoates-ms@users.noreply.github.com",
|
|
24
|
+
"package": "react-native-windows",
|
|
25
|
+
"commit": "d57cded6b8bef14f8a0b2d24ab978eaf8f290354",
|
|
26
|
+
"comment": "UI Manager module is not being destroyed on the UI thread"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"date": "Mon, 24 Jan 2022 16:13:22 GMT",
|
|
33
|
+
"tag": "react-native-windows_v0.67.0",
|
|
34
|
+
"version": "0.67.0",
|
|
35
|
+
"comments": {
|
|
36
|
+
"patch": [
|
|
37
|
+
{
|
|
38
|
+
"author": "jthysell@microsoft.com",
|
|
39
|
+
"package": "react-native-windows",
|
|
40
|
+
"commit": "not available",
|
|
41
|
+
"comment": "[0.67] Remove ADO NuGet feed from config for new projects"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"author": "ngerlem@microsoft.com",
|
|
45
|
+
"package": "react-native-windows",
|
|
46
|
+
"commit": "not available",
|
|
47
|
+
"comment": "Promote 0.67 to latest"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"author": "beachball",
|
|
51
|
+
"package": "react-native-windows",
|
|
52
|
+
"comment": "Bump @react-native-windows/cli to v0.67.0",
|
|
53
|
+
"commit": "f3ec055a5554558b61b538fcb405719a00249bef"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"author": "beachball",
|
|
57
|
+
"package": "react-native-windows",
|
|
58
|
+
"comment": "Bump @react-native-windows/virtualized-list to v0.67.0",
|
|
59
|
+
"commit": "f3ec055a5554558b61b538fcb405719a00249bef"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"author": "beachball",
|
|
63
|
+
"package": "react-native-windows",
|
|
64
|
+
"comment": "Bump @react-native-windows/codegen to v0.67.0",
|
|
65
|
+
"commit": "f3ec055a5554558b61b538fcb405719a00249bef"
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"date": "Mon, 24 Jan 2022 16:12:32 GMT",
|
|
72
|
+
"tag": "react-native-windows_v0.67.0",
|
|
73
|
+
"version": "0.67.0",
|
|
74
|
+
"comments": {
|
|
75
|
+
"patch": [
|
|
76
|
+
{
|
|
77
|
+
"author": "jthysell@microsoft.com",
|
|
78
|
+
"package": "react-native-windows",
|
|
79
|
+
"commit": "a1a4439e47c2a98356d7b9b1af765d3907567e16",
|
|
80
|
+
"comment": "[0.67] Remove ADO NuGet feed from config for new projects"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"author": "ngerlem@microsoft.com",
|
|
84
|
+
"package": "react-native-windows",
|
|
85
|
+
"commit": "56818ebc599aa084aa9ffc949691f1be71da169a",
|
|
86
|
+
"comment": "Promote 0.67 to latest"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"author": "beachball",
|
|
90
|
+
"package": "react-native-windows",
|
|
91
|
+
"comment": "Bump @react-native-windows/cli to v0.67.0",
|
|
92
|
+
"commit": "56818ebc599aa084aa9ffc949691f1be71da169a"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"author": "beachball",
|
|
96
|
+
"package": "react-native-windows",
|
|
97
|
+
"comment": "Bump @react-native-windows/virtualized-list to v0.67.0",
|
|
98
|
+
"commit": "56818ebc599aa084aa9ffc949691f1be71da169a"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"author": "beachball",
|
|
102
|
+
"package": "react-native-windows",
|
|
103
|
+
"comment": "Bump @react-native-windows/codegen to v0.67.0",
|
|
104
|
+
"commit": "56818ebc599aa084aa9ffc949691f1be71da169a"
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"date": "Mon, 17 Jan 2022 16:12:54 GMT",
|
|
111
|
+
"tag": "react-native-windows_v0.67.0-preview.7",
|
|
112
|
+
"version": "0.67.0-preview.7",
|
|
113
|
+
"comments": {
|
|
114
|
+
"prerelease": [
|
|
115
|
+
{
|
|
116
|
+
"author": "saadnajmi2@gmail.com",
|
|
117
|
+
"package": "react-native-windows",
|
|
118
|
+
"commit": "not available",
|
|
119
|
+
"comment": "Fork HoverState.js to allow hover events on Pressable"
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"date": "Mon, 17 Jan 2022 16:12:13 GMT",
|
|
126
|
+
"tag": "react-native-windows_v0.67.0-preview.7",
|
|
127
|
+
"version": "0.67.0-preview.7",
|
|
128
|
+
"comments": {
|
|
129
|
+
"prerelease": [
|
|
130
|
+
{
|
|
131
|
+
"author": "saadnajmi2@gmail.com",
|
|
132
|
+
"package": "react-native-windows",
|
|
133
|
+
"commit": "b58a8738eecd8a3d6a2b918fc35d9a7b93b4437a",
|
|
134
|
+
"comment": "Fork HoverState.js to allow hover events on Pressable"
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"date": "Mon, 03 Jan 2022 16:12:09 GMT",
|
|
141
|
+
"tag": "react-native-windows_v0.67.0-preview.6",
|
|
142
|
+
"version": "0.67.0-preview.6",
|
|
143
|
+
"comments": {
|
|
144
|
+
"prerelease": [
|
|
145
|
+
{
|
|
146
|
+
"author": "julio.rocha@microsoft.com",
|
|
147
|
+
"package": "react-native-windows",
|
|
148
|
+
"commit": "not available",
|
|
149
|
+
"comment": "[0.67] Avoid capturing raw this pointer in WebSocket module"
|
|
150
|
+
}
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"date": "Mon, 03 Jan 2022 16:11:53 GMT",
|
|
156
|
+
"tag": "react-native-windows_v0.67.0-preview.6",
|
|
157
|
+
"version": "0.67.0-preview.6",
|
|
158
|
+
"comments": {
|
|
159
|
+
"prerelease": [
|
|
160
|
+
{
|
|
161
|
+
"author": "julio.rocha@microsoft.com",
|
|
162
|
+
"package": "react-native-windows",
|
|
163
|
+
"commit": "372ce65125bce35713a557d7613f07148821944b",
|
|
164
|
+
"comment": "[0.67] Avoid capturing raw this pointer in WebSocket module"
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"date": "Mon, 06 Dec 2021 16:10:50 GMT",
|
|
6
171
|
"tag": "react-native-windows_v0.67.0-preview.5",
|
|
7
172
|
"version": "0.67.0-preview.5",
|
|
8
173
|
"comments": {
|
|
@@ -11,10 +176,7 @@
|
|
|
11
176
|
"author": "anandrag@microsoft.com",
|
|
12
177
|
"package": "react-native-windows",
|
|
13
178
|
"commit": "b706da95136fffa1a4deba8f95dc9edfeef1020d",
|
|
14
|
-
"comment":
|
|
15
|
-
"title": "",
|
|
16
|
-
"value": ""
|
|
17
|
-
}
|
|
179
|
+
"comment": "Bumping Hermes to v0.10"
|
|
18
180
|
}
|
|
19
181
|
]
|
|
20
182
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,83 @@
|
|
|
1
1
|
# Change Log - react-native-windows
|
|
2
2
|
|
|
3
|
-
This log was last generated on Mon,
|
|
3
|
+
This log was last generated on Mon, 07 Feb 2022 16:12:39 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## 0.67.
|
|
7
|
+
## 0.67.1
|
|
8
8
|
|
|
9
|
-
Mon,
|
|
9
|
+
Mon, 07 Feb 2022 16:12:39 GMT
|
|
10
10
|
|
|
11
|
-
###
|
|
11
|
+
### Patches
|
|
12
12
|
|
|
13
|
-
-
|
|
13
|
+
- Hermes inspector is not starting when Hermes engine is used (#9426) (anandrag@microsoft.com)
|
|
14
|
+
- Replace __APPLE__ with __clang__ where applicable (#9461) (julio.rocha@microsoft.com)
|
|
15
|
+
- UI Manager module is not being destroyed on the UI thread (30809111+acoates-ms@users.noreply.github.com)
|
|
14
16
|
|
|
17
|
+
## 0.67.0
|
|
18
|
+
|
|
19
|
+
Mon, 24 Jan 2022 16:13:22 GMT
|
|
20
|
+
|
|
21
|
+
### Patches
|
|
22
|
+
|
|
23
|
+
- [0.67] Remove ADO NuGet feed from config for new projects (jthysell@microsoft.com)
|
|
24
|
+
- Promote 0.67 to latest (ngerlem@microsoft.com)
|
|
25
|
+
- Bump @react-native-windows/cli to v0.67.0
|
|
26
|
+
- Bump @react-native-windows/virtualized-list to v0.67.0
|
|
27
|
+
- Bump @react-native-windows/codegen to v0.67.0
|
|
28
|
+
|
|
29
|
+
## 0.67.0
|
|
30
|
+
|
|
31
|
+
Mon, 24 Jan 2022 16:12:32 GMT
|
|
32
|
+
|
|
33
|
+
### Patches
|
|
34
|
+
|
|
35
|
+
- [0.67] Remove ADO NuGet feed from config for new projects (jthysell@microsoft.com)
|
|
36
|
+
- Promote 0.67 to latest (ngerlem@microsoft.com)
|
|
37
|
+
- Bump @react-native-windows/cli to v0.67.0
|
|
38
|
+
- Bump @react-native-windows/virtualized-list to v0.67.0
|
|
39
|
+
- Bump @react-native-windows/codegen to v0.67.0
|
|
40
|
+
|
|
41
|
+
## 0.67.0-preview.7
|
|
42
|
+
|
|
43
|
+
Mon, 17 Jan 2022 16:12:54 GMT
|
|
44
|
+
|
|
45
|
+
### Changes
|
|
46
|
+
|
|
47
|
+
- Fork HoverState.js to allow hover events on Pressable (saadnajmi2@gmail.com)
|
|
48
|
+
|
|
49
|
+
## 0.67.0-preview.7
|
|
50
|
+
|
|
51
|
+
Mon, 17 Jan 2022 16:12:13 GMT
|
|
52
|
+
|
|
53
|
+
### Changes
|
|
54
|
+
|
|
55
|
+
- Fork HoverState.js to allow hover events on Pressable (saadnajmi2@gmail.com)
|
|
56
|
+
|
|
57
|
+
## 0.67.0-preview.6
|
|
58
|
+
|
|
59
|
+
Mon, 03 Jan 2022 16:12:09 GMT
|
|
60
|
+
|
|
61
|
+
### Changes
|
|
62
|
+
|
|
63
|
+
- [0.67] Avoid capturing raw this pointer in WebSocket module (julio.rocha@microsoft.com)
|
|
64
|
+
|
|
65
|
+
## 0.67.0-preview.6
|
|
66
|
+
|
|
67
|
+
Mon, 03 Jan 2022 16:11:53 GMT
|
|
68
|
+
|
|
69
|
+
### Changes
|
|
70
|
+
|
|
71
|
+
- [0.67] Avoid capturing raw this pointer in WebSocket module (julio.rocha@microsoft.com)
|
|
72
|
+
|
|
73
|
+
## 0.67.0-preview.5
|
|
74
|
+
|
|
75
|
+
Mon, 06 Dec 2021 16:10:50 GMT
|
|
76
|
+
|
|
77
|
+
### Changes
|
|
78
|
+
|
|
79
|
+
- Bumping Hermes to v0.10 (anandrag@microsoft.com)
|
|
80
|
+
|
|
15
81
|
## 0.67.0-preview.4
|
|
16
82
|
|
|
17
83
|
Mon, 22 Nov 2021 16:10:24 GMT
|
|
@@ -141,9 +141,9 @@ class Keyboard {
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
/**
|
|
144
|
-
* @deprecated Use `remove` on the EventSubscription from `
|
|
144
|
+
* @deprecated Use `remove` on the EventSubscription from `addListener`.
|
|
145
145
|
*/
|
|
146
|
-
|
|
146
|
+
removeListener<K: $Keys<KeyboardEventDefinitions>>(
|
|
147
147
|
eventType: K,
|
|
148
148
|
listener: (...$ElementType<KeyboardEventDefinitions, K>) => mixed,
|
|
149
149
|
): void {
|
|
@@ -25,6 +25,7 @@ import usePressability from '../../Pressability/usePressability';
|
|
|
25
25
|
import {normalizeRect, type RectOrSize} from '../../StyleSheet/Rect';
|
|
26
26
|
import type {
|
|
27
27
|
LayoutEvent,
|
|
28
|
+
MouseEvent,
|
|
28
29
|
PressEvent,
|
|
29
30
|
// [Windows
|
|
30
31
|
BlurEvent,
|
|
@@ -72,6 +73,16 @@ type Props = $ReadOnly<{|
|
|
|
72
73
|
*/
|
|
73
74
|
children: React.Node | ((state: StateCallbackType) => React.Node),
|
|
74
75
|
|
|
76
|
+
/**
|
|
77
|
+
* Duration to wait after hover in before calling `onHoverIn`.
|
|
78
|
+
*/
|
|
79
|
+
delayHoverIn?: ?number,
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Duration to wait after hover out before calling `onHoverOut`.
|
|
83
|
+
*/
|
|
84
|
+
delayHoverOut?: ?number,
|
|
85
|
+
|
|
75
86
|
/**
|
|
76
87
|
* Duration (in milliseconds) from `onPressIn` before `onLongPress` is called.
|
|
77
88
|
*/
|
|
@@ -98,6 +109,16 @@ type Props = $ReadOnly<{|
|
|
|
98
109
|
*/
|
|
99
110
|
onLayout?: ?(event: LayoutEvent) => mixed,
|
|
100
111
|
|
|
112
|
+
/**
|
|
113
|
+
* Called when the hover is activated to provide visual feedback.
|
|
114
|
+
*/
|
|
115
|
+
onHoverIn?: ?(event: MouseEvent) => mixed,
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Called when the hover is deactivated to undo visual feedback.
|
|
119
|
+
*/
|
|
120
|
+
onHoverOut?: ?(event: MouseEvent) => mixed,
|
|
121
|
+
|
|
101
122
|
/**
|
|
102
123
|
* Called when a long-tap gesture is detected.
|
|
103
124
|
*/
|
|
@@ -201,9 +222,13 @@ function Pressable(props: Props, forwardedRef): React.Node {
|
|
|
201
222
|
android_ripple,
|
|
202
223
|
cancelable,
|
|
203
224
|
children,
|
|
225
|
+
delayHoverIn,
|
|
226
|
+
delayHoverOut,
|
|
204
227
|
delayLongPress,
|
|
205
228
|
disabled,
|
|
206
229
|
focusable,
|
|
230
|
+
onHoverIn,
|
|
231
|
+
onHoverOut,
|
|
207
232
|
onLongPress,
|
|
208
233
|
onPress,
|
|
209
234
|
onPressIn,
|
|
@@ -267,8 +292,12 @@ function Pressable(props: Props, forwardedRef): React.Node {
|
|
|
267
292
|
hitSlop,
|
|
268
293
|
pressRectOffset: pressRetentionOffset,
|
|
269
294
|
android_disableSound,
|
|
295
|
+
delayHoverIn,
|
|
296
|
+
delayHoverOut,
|
|
270
297
|
delayLongPress,
|
|
271
298
|
delayPressIn: unstable_pressDelay,
|
|
299
|
+
onHoverIn,
|
|
300
|
+
onHoverOut,
|
|
272
301
|
onLongPress,
|
|
273
302
|
onPress,
|
|
274
303
|
onPressIn(event: PressEvent): void {
|
|
@@ -301,9 +330,13 @@ function Pressable(props: Props, forwardedRef): React.Node {
|
|
|
301
330
|
android_disableSound,
|
|
302
331
|
android_rippleConfig,
|
|
303
332
|
cancelable,
|
|
333
|
+
delayHoverIn,
|
|
334
|
+
delayHoverOut,
|
|
304
335
|
delayLongPress,
|
|
305
336
|
disabled,
|
|
306
337
|
hitSlop,
|
|
338
|
+
onHoverIn,
|
|
339
|
+
onHoverOut,
|
|
307
340
|
onLongPress,
|
|
308
341
|
onPress,
|
|
309
342
|
onPressIn,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @generated by scripts/
|
|
2
|
+
* @generated by scripts/set-rn-version.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5
5
|
*
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
exports.version = {
|
|
13
13
|
major: 0,
|
|
14
14
|
minor: 67,
|
|
15
|
-
patch:
|
|
16
|
-
prerelease:
|
|
15
|
+
patch: 1,
|
|
16
|
+
prerelease: null,
|
|
17
17
|
};
|
|
@@ -49,6 +49,10 @@ if (Platform.OS === 'web') {
|
|
|
49
49
|
document.addEventListener('touchmove', disableHover, true);
|
|
50
50
|
document.addEventListener('mousemove', enableHover, true);
|
|
51
51
|
}
|
|
52
|
+
// [Windows
|
|
53
|
+
} else if (Platform.OS === 'windows') {
|
|
54
|
+
isEnabled = true;
|
|
55
|
+
// Windows]
|
|
52
56
|
}
|
|
53
57
|
|
|
54
58
|
export function isHoverEnabled(): boolean {
|
|
@@ -395,7 +395,7 @@ facebook::jsi::JSError const &jsError) { \
|
|
|
395
395
|
}
|
|
396
396
|
|
|
397
397
|
/*static*/ ReactNative::JsiRuntime JsiRuntime::GetOrCreate(
|
|
398
|
-
std::shared_ptr
|
|
398
|
+
std::shared_ptr<::Microsoft::JSI::RuntimeHolderLazyInit> const &jsiRuntimeHolder,
|
|
399
399
|
std::shared_ptr<facebook::jsi::Runtime> const &jsiRuntime) noexcept {
|
|
400
400
|
{
|
|
401
401
|
std::scoped_lock lock{s_mutex};
|
|
@@ -409,7 +409,7 @@ facebook::jsi::JSError const &jsError) { \
|
|
|
409
409
|
}
|
|
410
410
|
|
|
411
411
|
/*static*/ ReactNative::JsiRuntime JsiRuntime::Create(
|
|
412
|
-
std::shared_ptr
|
|
412
|
+
std::shared_ptr<::Microsoft::JSI::RuntimeHolderLazyInit> const &jsiRuntimeHolder,
|
|
413
413
|
std::shared_ptr<facebook::jsi::Runtime> const &jsiRuntime) noexcept {
|
|
414
414
|
// There are some functions that we cannot do using JSI such as
|
|
415
415
|
// defining a property or using Symbol as a key.
|
|
@@ -445,7 +445,7 @@ ReactNative::JsiRuntime JsiRuntime::MakeChakraRuntime() {
|
|
|
445
445
|
}
|
|
446
446
|
|
|
447
447
|
JsiRuntime::JsiRuntime(
|
|
448
|
-
std::shared_ptr
|
|
448
|
+
std::shared_ptr<::Microsoft::JSI::RuntimeHolderLazyInit> &&runtimeHolder,
|
|
449
449
|
std::shared_ptr<facebook::jsi::Runtime> &&runtime) noexcept
|
|
450
450
|
: m_runtimeHolder{std::move(runtimeHolder)},
|
|
451
451
|
m_runtime{std::move(runtime)},
|
|
@@ -58,16 +58,16 @@ struct RuntimeAccessor;
|
|
|
58
58
|
|
|
59
59
|
struct JsiRuntime : JsiRuntimeT<JsiRuntime> {
|
|
60
60
|
JsiRuntime(
|
|
61
|
-
std::shared_ptr
|
|
61
|
+
std::shared_ptr<::Microsoft::JSI::RuntimeHolderLazyInit> &&runtimeHolder,
|
|
62
62
|
std::shared_ptr<facebook::jsi::Runtime> &&runtime) noexcept;
|
|
63
63
|
~JsiRuntime() noexcept;
|
|
64
64
|
|
|
65
65
|
static ReactNative::JsiRuntime FromRuntime(facebook::jsi::Runtime &runtime) noexcept;
|
|
66
66
|
static ReactNative::JsiRuntime GetOrCreate(
|
|
67
|
-
std::shared_ptr
|
|
67
|
+
std::shared_ptr<::Microsoft::JSI::RuntimeHolderLazyInit> const &jsiRuntimeHolder,
|
|
68
68
|
std::shared_ptr<facebook::jsi::Runtime> const &jsiRuntime) noexcept;
|
|
69
69
|
static ReactNative::JsiRuntime Create(
|
|
70
|
-
std::shared_ptr
|
|
70
|
+
std::shared_ptr<::Microsoft::JSI::RuntimeHolderLazyInit> const &jsiRuntimeHolder,
|
|
71
71
|
std::shared_ptr<facebook::jsi::Runtime> const &jsiRuntime) noexcept;
|
|
72
72
|
|
|
73
73
|
public: // JsiRuntime
|
|
@@ -168,7 +168,7 @@ struct JsiRuntime : JsiRuntimeT<JsiRuntime> {
|
|
|
168
168
|
void SetError(facebook::jsi::JSINativeException const &nativeException) noexcept;
|
|
169
169
|
|
|
170
170
|
private:
|
|
171
|
-
std::shared_ptr
|
|
171
|
+
std::shared_ptr<::Microsoft::JSI::RuntimeHolderLazyInit> m_runtimeHolder;
|
|
172
172
|
std::shared_ptr<facebook::jsi::Runtime> m_runtime;
|
|
173
173
|
RuntimeAccessor *m_runtimeAccessor{};
|
|
174
174
|
std::mutex m_mutex;
|
|
@@ -19,9 +19,9 @@ using winrt::Microsoft::ReactNative::implementation::QuirkSettings;
|
|
|
19
19
|
|
|
20
20
|
namespace Microsoft::React {
|
|
21
21
|
|
|
22
|
-
std::shared_ptr<IWebSocketResource> IWebSocketResource::Make(
|
|
22
|
+
std::shared_ptr<IWebSocketResource> IWebSocketResource::Make() {
|
|
23
23
|
std::vector<winrt::Windows::Security::Cryptography::Certificates::ChainValidationResult> certExceptions;
|
|
24
|
-
return std::make_shared<WinRTWebSocketResource>(std::move(
|
|
24
|
+
return std::make_shared<WinRTWebSocketResource>(std::move(certExceptions));
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
} // namespace Microsoft::React
|
|
@@ -530,7 +530,7 @@ UIManager::UIManager() : m_module(std::make_shared<UIManagerModule>()) {}
|
|
|
530
530
|
UIManager::~UIManager() {
|
|
531
531
|
// To make sure that we destroy UI components in UI thread.
|
|
532
532
|
if (!m_context.UIDispatcher().HasThreadAccess()) {
|
|
533
|
-
m_context.UIDispatcher().Post([module = std::move(m_module)]() {});
|
|
533
|
+
m_context.UIDispatcher().Post([module = std::move(m_module)]() mutable { module = nullptr; });
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
536
|
|
|
@@ -899,7 +899,7 @@ void ReactInstanceWin::DispatchEvent(int64_t viewTag, std::string &&eventName, f
|
|
|
899
899
|
}
|
|
900
900
|
|
|
901
901
|
winrt::Microsoft::ReactNative::JsiRuntime ReactInstanceWin::JsiRuntime() noexcept {
|
|
902
|
-
std::shared_ptr<
|
|
902
|
+
std::shared_ptr<Microsoft::JSI::RuntimeHolderLazyInit> jsiRuntimeHolder;
|
|
903
903
|
{
|
|
904
904
|
std::scoped_lock lock{m_mutex};
|
|
905
905
|
if (m_jsiRuntime) {
|
|
@@ -184,7 +184,7 @@ class ReactInstanceWin final : public Mso::ActiveObject<IReactInstanceInternal>
|
|
|
184
184
|
Mso::CntPtr<Mso::React::IDispatchQueue2> m_uiQueue;
|
|
185
185
|
std::deque<JSCallEntry> m_jsCallQueue;
|
|
186
186
|
|
|
187
|
-
std::shared_ptr<
|
|
187
|
+
std::shared_ptr<Microsoft::JSI::RuntimeHolderLazyInit> m_jsiRuntimeHolder;
|
|
188
188
|
winrt::Microsoft::ReactNative::JsiRuntime m_jsiRuntime{nullptr};
|
|
189
189
|
};
|
|
190
190
|
|
|
@@ -301,7 +301,7 @@ constexpr void ValidateCoroutineArg() noexcept {
|
|
|
301
301
|
static_assert(
|
|
302
302
|
!std::is_reference_v<TArg> && !std::is_pointer_v<TArg>,
|
|
303
303
|
"Coroutine parameter must be passed by value for safe access"
|
|
304
|
-
#ifndef
|
|
304
|
+
#ifndef __clang__
|
|
305
305
|
": " __FUNCSIG__
|
|
306
306
|
#endif
|
|
307
307
|
);
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
-->
|
|
11
11
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
12
12
|
<PropertyGroup>
|
|
13
|
-
<ReactNativeWindowsVersion>0.67.
|
|
13
|
+
<ReactNativeWindowsVersion>0.67.1</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
15
|
<ReactNativeWindowsMinor>67</ReactNativeWindowsMinor>
|
|
16
|
-
<ReactNativeWindowsPatch>
|
|
16
|
+
<ReactNativeWindowsPatch>1</ReactNativeWindowsPatch>
|
|
17
17
|
<ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
|
|
18
18
|
</PropertyGroup>
|
|
19
19
|
</Project>
|
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
|
|
10
10
|
namespace Microsoft::JSI {
|
|
11
11
|
|
|
12
|
+
facebook::react::JSIEngineOverride ChakraRuntimeHolder::getRuntimeType() noexcept {
|
|
13
|
+
return facebook::react::JSIEngineOverride::Chakra;
|
|
14
|
+
}
|
|
15
|
+
|
|
12
16
|
std::shared_ptr<facebook::jsi::Runtime> ChakraRuntimeHolder::getRuntime() noexcept {
|
|
13
17
|
std::call_once(once_flag_, [this]() { initRuntime(); });
|
|
14
18
|
|
|
@@ -12,9 +12,10 @@
|
|
|
12
12
|
|
|
13
13
|
namespace Microsoft::JSI {
|
|
14
14
|
|
|
15
|
-
class ChakraRuntimeHolder final : public
|
|
15
|
+
class ChakraRuntimeHolder final : public Microsoft::JSI::RuntimeHolderLazyInit {
|
|
16
16
|
public:
|
|
17
17
|
std::shared_ptr<facebook::jsi::Runtime> getRuntime() noexcept override;
|
|
18
|
+
facebook::react::JSIEngineOverride getRuntimeType() noexcept override;
|
|
18
19
|
|
|
19
20
|
ChakraRuntimeHolder(
|
|
20
21
|
std::shared_ptr<facebook::react::DevSettings> devSettings,
|
package/Shared/DevSettings.h
CHANGED
|
@@ -14,11 +14,9 @@
|
|
|
14
14
|
#define STRING_(s) #s
|
|
15
15
|
#define STRING(s) STRING_(s)
|
|
16
16
|
|
|
17
|
-
namespace
|
|
18
|
-
namespace jsi {
|
|
17
|
+
namespace Microsoft::JSI {
|
|
19
18
|
struct RuntimeHolderLazyInit;
|
|
20
|
-
}
|
|
21
|
-
} // namespace facebook
|
|
19
|
+
} // namespace Microsoft::JSI
|
|
22
20
|
|
|
23
21
|
namespace facebook {
|
|
24
22
|
namespace react {
|
|
@@ -81,7 +79,7 @@ struct DevSettings {
|
|
|
81
79
|
/// instance. This object should in general be used only from the JS engine
|
|
82
80
|
/// thread, unless the specific runtime implementation explicitly guarantees
|
|
83
81
|
/// reentrancy.
|
|
84
|
-
std::shared_ptr<
|
|
82
|
+
std::shared_ptr<Microsoft::JSI::RuntimeHolderLazyInit> jsiRuntimeHolder;
|
|
85
83
|
|
|
86
84
|
// Until the ABI story is addressed we'll use this instead of the above for
|
|
87
85
|
// the purposes of selecting a JSI Runtime to use.
|
|
@@ -72,6 +72,10 @@ class HermesExecutorRuntimeAdapter final : public facebook::hermes::inspector::R
|
|
|
72
72
|
|
|
73
73
|
} // namespace
|
|
74
74
|
|
|
75
|
+
facebook::react::JSIEngineOverride HermesRuntimeHolder::getRuntimeType() noexcept {
|
|
76
|
+
return facebook::react::JSIEngineOverride::Hermes;
|
|
77
|
+
}
|
|
78
|
+
|
|
75
79
|
std::shared_ptr<jsi::Runtime> HermesRuntimeHolder::getRuntime() noexcept {
|
|
76
80
|
std::call_once(m_once_flag, [this]() { initRuntime(); });
|
|
77
81
|
|
|
@@ -12,9 +12,10 @@
|
|
|
12
12
|
namespace facebook {
|
|
13
13
|
namespace react {
|
|
14
14
|
|
|
15
|
-
class HermesRuntimeHolder : public
|
|
15
|
+
class HermesRuntimeHolder : public Microsoft::JSI::RuntimeHolderLazyInit {
|
|
16
16
|
public:
|
|
17
17
|
std::shared_ptr<facebook::jsi::Runtime> getRuntime() noexcept override;
|
|
18
|
+
facebook::react::JSIEngineOverride getRuntimeType() noexcept override;
|
|
18
19
|
|
|
19
20
|
HermesRuntimeHolder(
|
|
20
21
|
std::shared_ptr<facebook::react::DevSettings> devSettings,
|
|
@@ -79,17 +79,17 @@ struct IWebSocketResource {
|
|
|
79
79
|
/// <summary>
|
|
80
80
|
/// Creates an <c>IWebSocketResource</c> instance.
|
|
81
81
|
/// </summary>
|
|
82
|
-
|
|
83
|
-
/// WebSocket URL address the instance will connect to.
|
|
84
|
-
/// The address's scheme can be either ws:// or wss://.
|
|
85
|
-
/// </param>
|
|
86
|
-
static std::shared_ptr<IWebSocketResource> Make(std::string &&url);
|
|
82
|
+
static std::shared_ptr<IWebSocketResource> Make();
|
|
87
83
|
|
|
88
84
|
virtual ~IWebSocketResource() noexcept {}
|
|
89
85
|
|
|
90
86
|
/// <summary>
|
|
91
87
|
/// Establishes a continuous connection with the remote endpoint.
|
|
92
88
|
/// </summary>
|
|
89
|
+
/// <param name="url">
|
|
90
|
+
/// WebSocket URL address the instance will connect to.
|
|
91
|
+
/// The address's scheme can be either ws:// or wss://.
|
|
92
|
+
/// </param>
|
|
93
93
|
/// <param name="protocols">
|
|
94
94
|
/// Currently unused
|
|
95
95
|
/// </param>
|
|
@@ -97,7 +97,7 @@ struct IWebSocketResource {
|
|
|
97
97
|
/// HTTP header fields passed by the remote endpoint, to be used in the
|
|
98
98
|
/// handshake process.
|
|
99
99
|
/// </param>
|
|
100
|
-
virtual void Connect(const Protocols &protocols = {}, const Options &options = {}) noexcept = 0;
|
|
100
|
+
virtual void Connect(std::string &&url, const Protocols &protocols = {}, const Options &options = {}) noexcept = 0;
|
|
101
101
|
|
|
102
102
|
/// <summary>
|
|
103
103
|
/// Sends a ping frame to the remote endpoint.
|
|
@@ -204,8 +204,7 @@ winrt::fire_and_forget InspectorPackagerConnection::connectAsync() {
|
|
|
204
204
|
co_await winrt::resume_background();
|
|
205
205
|
|
|
206
206
|
std::vector<winrt::Windows::Security::Cryptography::Certificates::ChainValidationResult> certExceptions;
|
|
207
|
-
m_packagerWebSocketConnection =
|
|
208
|
-
std::make_shared<Microsoft::React::WinRTWebSocketResource>(m_url, std::move(certExceptions));
|
|
207
|
+
m_packagerWebSocketConnection = std::make_shared<Microsoft::React::WinRTWebSocketResource>(std::move(certExceptions));
|
|
209
208
|
|
|
210
209
|
m_packagerWebSocketConnection->SetOnError([](const Microsoft::React::IWebSocketResource::Error &err) {
|
|
211
210
|
facebook::react::tracing::error(err.Message.c_str());
|
|
@@ -270,7 +269,7 @@ winrt::fire_and_forget InspectorPackagerConnection::connectAsync() {
|
|
|
270
269
|
|
|
271
270
|
Microsoft::React::IWebSocketResource::Protocols protocols;
|
|
272
271
|
Microsoft::React::IWebSocketResource::Options options;
|
|
273
|
-
m_packagerWebSocketConnection->Connect(protocols, options);
|
|
272
|
+
m_packagerWebSocketConnection->Connect(std::string{m_url}, protocols, options);
|
|
274
273
|
|
|
275
274
|
co_return;
|
|
276
275
|
}
|