react-native-macos 0.77.3 → 0.77.5
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/Libraries/Components/TextInput/TextInputState.js +5 -1
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Inspector/NetworkOverlay.js +1 -1
- package/Libraries/Lists/FillRateHelper.js +3 -3
- package/Libraries/Lists/FlatList.d.ts +1 -1
- package/Libraries/Lists/FlatList.js +2 -2
- package/Libraries/Lists/SectionList.d.ts +1 -1
- package/Libraries/Lists/SectionList.js +2 -2
- package/Libraries/Lists/SectionListModern.js +2 -2
- package/Libraries/Lists/ViewabilityHelper.js +3 -3
- package/Libraries/Lists/VirtualizeUtils.js +2 -2
- package/Libraries/Lists/VirtualizedList.js +3 -3
- package/Libraries/Lists/VirtualizedListContext.js +2 -2
- package/Libraries/Lists/VirtualizedSectionList.js +3 -3
- package/Libraries/Modal/Modal.js +1 -1
- package/Libraries/Text/Text.d.ts +1 -0
- package/Libraries/Text/TextInput/Singleline/RCTUITextField.mm +1 -1
- package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/Views/RCTViewKeyboardEvent.m +24 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +4 -3
- package/scripts/cocoapods/utils.rb +11 -5
- package/sdks/hermes-engine/hermes-engine.podspec +3 -4
- package/sdks/hermes-engine/hermes-utils.rb +70 -18
- package/types/index.d.ts +1 -1
|
@@ -103,7 +103,11 @@ function focusTextInput(textField: ?HostInstance) {
|
|
|
103
103
|
|
|
104
104
|
if (textField != null) {
|
|
105
105
|
const fieldCanBeFocused =
|
|
106
|
-
currentlyFocusedInputRef
|
|
106
|
+
// [macOS currentlyFocusedInputRef does not account for the fact that any arbritrary view can
|
|
107
|
+
// recieve focus on desktop. https://github.com/facebook/react-native/pull/52472/ fixes this,
|
|
108
|
+
// disable the check for now
|
|
109
|
+
// currentlyFocusedInputRef !== textField &&
|
|
110
|
+
// macOS]
|
|
107
111
|
// $FlowFixMe - `currentProps` is missing in `NativeMethods`
|
|
108
112
|
textField.currentProps?.editable !== false;
|
|
109
113
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
import type {RenderItemProps} from '@react-native-
|
|
13
|
+
import type {RenderItemProps} from '@react-native-macos/virtualized-lists'; // [macOS]
|
|
14
14
|
|
|
15
15
|
const ScrollView = require('../Components/ScrollView/ScrollView');
|
|
16
16
|
const TouchableHighlight = require('../Components/Touchable/TouchableHighlight');
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
import {typeof FillRateHelper as FillRateHelperType} from '@react-native-
|
|
13
|
+
import {typeof FillRateHelper as FillRateHelperType} from '@react-native-macos/virtualized-lists'; // [macOS]
|
|
14
14
|
|
|
15
15
|
const FillRateHelper: FillRateHelperType =
|
|
16
|
-
require('@react-native-
|
|
16
|
+
require('@react-native-macos/virtualized-lists').FillRateHelper; // [macOS]
|
|
17
17
|
|
|
18
|
-
export type {FillRateInfo} from '@react-native-
|
|
18
|
+
export type {FillRateInfo} from '@react-native-macos/virtualized-lists'; // [macOS]
|
|
19
19
|
module.exports = FillRateHelper;
|
|
@@ -13,7 +13,7 @@ import type {
|
|
|
13
13
|
ViewToken,
|
|
14
14
|
VirtualizedListProps,
|
|
15
15
|
ViewabilityConfig,
|
|
16
|
-
} from '@react-native-
|
|
16
|
+
} from '@react-native-macos/virtualized-lists'; // [macOS]
|
|
17
17
|
import type {ScrollViewComponent} from '../Components/ScrollView/ScrollView';
|
|
18
18
|
import type {StyleProp} from '../StyleSheet/StyleSheet';
|
|
19
19
|
import type {ViewStyle} from '../StyleSheet/StyleSheetTypes';
|
|
@@ -15,14 +15,14 @@ import type {
|
|
|
15
15
|
RenderItemType,
|
|
16
16
|
ViewabilityConfigCallbackPair,
|
|
17
17
|
ViewToken,
|
|
18
|
-
} from '@react-native-
|
|
18
|
+
} from '@react-native-macos/virtualized-lists'; // [macOS]
|
|
19
19
|
|
|
20
20
|
import * as ReactNativeFeatureFlags from '../../src/private/featureflags/ReactNativeFeatureFlags';
|
|
21
21
|
import {type ScrollResponderType} from '../Components/ScrollView/ScrollView';
|
|
22
22
|
import {
|
|
23
23
|
VirtualizedList,
|
|
24
24
|
keyExtractor as defaultKeyExtractor,
|
|
25
|
-
} from '@react-native-
|
|
25
|
+
} from '@react-native-macos/virtualized-lists'; // [macOS]
|
|
26
26
|
import memoizeOne from 'memoize-one';
|
|
27
27
|
|
|
28
28
|
const View = require('../Components/View/View');
|
|
@@ -11,7 +11,7 @@ import type * as React from 'react';
|
|
|
11
11
|
import type {
|
|
12
12
|
ListRenderItemInfo,
|
|
13
13
|
VirtualizedListWithoutRenderItemProps,
|
|
14
|
-
} from '@react-native-
|
|
14
|
+
} from '@react-native-macos/virtualized-lists'; // [macOS]
|
|
15
15
|
import type {
|
|
16
16
|
ScrollView,
|
|
17
17
|
ScrollViewProps,
|
|
@@ -15,10 +15,10 @@ import type {
|
|
|
15
15
|
ScrollToLocationParamsType,
|
|
16
16
|
SectionBase as _SectionBase,
|
|
17
17
|
VirtualizedSectionListProps,
|
|
18
|
-
} from '@react-native-
|
|
18
|
+
} from '@react-native-macos/virtualized-lists'; // [macOS]
|
|
19
19
|
|
|
20
20
|
import Platform from '../Utilities/Platform';
|
|
21
|
-
import {VirtualizedSectionList} from '@react-native-
|
|
21
|
+
import {VirtualizedSectionList} from '@react-native-macos/virtualized-lists'; // [macOS]
|
|
22
22
|
import * as React from 'react';
|
|
23
23
|
|
|
24
24
|
type Item = any;
|
|
@@ -15,11 +15,11 @@ import type {
|
|
|
15
15
|
ScrollToLocationParamsType,
|
|
16
16
|
SectionBase as _SectionBase,
|
|
17
17
|
VirtualizedSectionListProps,
|
|
18
|
-
} from '@react-native-
|
|
18
|
+
} from '@react-native-macos/virtualized-lists'; // [macOS]
|
|
19
19
|
import type {ElementRef} from 'react';
|
|
20
20
|
|
|
21
21
|
import Platform from '../Utilities/Platform';
|
|
22
|
-
import {VirtualizedSectionList} from '@react-native-
|
|
22
|
+
import {VirtualizedSectionList} from '@react-native-macos/virtualized-lists'; // [macOS]
|
|
23
23
|
import React, {forwardRef, useImperativeHandle, useRef} from 'react';
|
|
24
24
|
|
|
25
25
|
type Item = any;
|
|
@@ -14,11 +14,11 @@ export type {
|
|
|
14
14
|
ViewToken,
|
|
15
15
|
ViewabilityConfig,
|
|
16
16
|
ViewabilityConfigCallbackPair,
|
|
17
|
-
} from '@react-native-
|
|
17
|
+
} from '@react-native-macos/virtualized-lists'; // [macOS]
|
|
18
18
|
|
|
19
|
-
import {typeof ViewabilityHelper as ViewabilityHelperType} from '@react-native-
|
|
19
|
+
import {typeof ViewabilityHelper as ViewabilityHelperType} from '@react-native-macos/virtualized-lists'; // [macOS]
|
|
20
20
|
|
|
21
21
|
const ViewabilityHelper: ViewabilityHelperType =
|
|
22
|
-
require('@react-native-
|
|
22
|
+
require('@react-native-macos/virtualized-lists').ViewabilityHelper; // [macOS]
|
|
23
23
|
|
|
24
24
|
module.exports = ViewabilityHelper;
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
import {typeof keyExtractor as KeyExtractorType} from '@react-native-
|
|
13
|
+
import {typeof keyExtractor as KeyExtractorType} from '@react-native-macos/virtualized-lists'; // [macOS]
|
|
14
14
|
|
|
15
15
|
const keyExtractor: KeyExtractorType =
|
|
16
|
-
require('@react-native-
|
|
16
|
+
require('@react-native-macos/virtualized-lists').keyExtractor; // [macOS]
|
|
17
17
|
|
|
18
18
|
module.exports = {keyExtractor};
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
import {typeof VirtualizedList as VirtualizedListType} from '@react-native-
|
|
13
|
+
import {typeof VirtualizedList as VirtualizedListType} from '@react-native-macos/virtualized-lists'; // [macOS]
|
|
14
14
|
|
|
15
15
|
const VirtualizedList: VirtualizedListType =
|
|
16
|
-
require('@react-native-
|
|
16
|
+
require('@react-native-macos/virtualized-lists').VirtualizedList; // [macOS]
|
|
17
17
|
|
|
18
18
|
export type {
|
|
19
19
|
RenderItemProps,
|
|
20
20
|
RenderItemType,
|
|
21
21
|
Separators,
|
|
22
|
-
} from '@react-native-
|
|
22
|
+
} from '@react-native-macos/virtualized-lists'; // [macOS]
|
|
23
23
|
module.exports = VirtualizedList;
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
import {typeof VirtualizedListContextResetter as VirtualizedListContextResetterType} from '@react-native-
|
|
13
|
+
import {typeof VirtualizedListContextResetter as VirtualizedListContextResetterType} from '@react-native-macos/virtualized-lists'; // [macOS]
|
|
14
14
|
|
|
15
15
|
const VirtualizedListContextResetter: VirtualizedListContextResetterType =
|
|
16
|
-
require('@react-native-
|
|
16
|
+
require('@react-native-macos/virtualized-lists').VirtualizedListContextResetter; // [macOS]
|
|
17
17
|
|
|
18
18
|
module.exports = {VirtualizedListContextResetter};
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
import {typeof VirtualizedSectionList as VirtualizedSectionListType} from '@react-native-
|
|
13
|
+
import {typeof VirtualizedSectionList as VirtualizedSectionListType} from '@react-native-macos/virtualized-lists'; // [macOS]
|
|
14
14
|
|
|
15
15
|
const VirtualizedSectionList: VirtualizedSectionListType =
|
|
16
|
-
require('@react-native-
|
|
16
|
+
require('@react-native-macos/virtualized-lists').VirtualizedSectionList; // [macOS]
|
|
17
17
|
|
|
18
18
|
export type {
|
|
19
19
|
SectionBase,
|
|
20
20
|
ScrollToLocationParamsType,
|
|
21
|
-
} from '@react-native-
|
|
21
|
+
} from '@react-native-macos/virtualized-lists'; // [macOS]
|
|
22
22
|
module.exports = VirtualizedSectionList;
|
package/Libraries/Modal/Modal.js
CHANGED
|
@@ -17,7 +17,7 @@ import {type EventSubscription} from '../vendor/emitter/EventEmitter';
|
|
|
17
17
|
import ModalInjection from './ModalInjection';
|
|
18
18
|
import NativeModalManager from './NativeModalManager';
|
|
19
19
|
import RCTModalHostView from './RCTModalHostViewNativeComponent';
|
|
20
|
-
import {VirtualizedListContextResetter} from '@react-native-
|
|
20
|
+
import {VirtualizedListContextResetter} from '@react-native-macos/virtualized-lists'; // [macOS]
|
|
21
21
|
|
|
22
22
|
const ScrollView = require('../Components/ScrollView/ScrollView');
|
|
23
23
|
const View = require('../Components/View/View');
|
package/Libraries/Text/Text.d.ts
CHANGED
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
|
|
154
154
|
- (NSArray<NSAttributedStringKey> *)validAttributesForMarkedText
|
|
155
155
|
{
|
|
156
|
-
return ((NSTextView *)self.currentEditor).validAttributesForMarkedText;
|
|
156
|
+
return ((NSTextView *)self.currentEditor).validAttributesForMarkedText ?: @[];
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
#endif // macOS]
|
|
@@ -18,7 +18,7 @@ const Switch = require('../Components/Switch/Switch').default;
|
|
|
18
18
|
const TextInput = require('../Components/TextInput/TextInput');
|
|
19
19
|
const View = require('../Components/View/View');
|
|
20
20
|
const Text = require('../Text/Text');
|
|
21
|
-
const {VirtualizedList} = require('@react-native-
|
|
21
|
+
const {VirtualizedList} = require('@react-native-macos/virtualized-lists'); // [macOS]
|
|
22
22
|
const React = require('react');
|
|
23
23
|
const ReactTestRenderer = require('react-test-renderer');
|
|
24
24
|
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -63,6 +63,30 @@
|
|
|
63
63
|
return @"PageUp";
|
|
64
64
|
} else if (code == NSPageDownFunctionKey) {
|
|
65
65
|
return @"PageDown";
|
|
66
|
+
} else if (code == NSF1FunctionKey) {
|
|
67
|
+
return @"F1";
|
|
68
|
+
} else if (code == NSF2FunctionKey) {
|
|
69
|
+
return @"F2";
|
|
70
|
+
} else if (code == NSF3FunctionKey) {
|
|
71
|
+
return @"F3";
|
|
72
|
+
} else if (code == NSF4FunctionKey) {
|
|
73
|
+
return @"F4";
|
|
74
|
+
} else if (code == NSF5FunctionKey) {
|
|
75
|
+
return @"F5";
|
|
76
|
+
} else if (code == NSF6FunctionKey) {
|
|
77
|
+
return @"F6";
|
|
78
|
+
} else if (code == NSF7FunctionKey) {
|
|
79
|
+
return @"F7";
|
|
80
|
+
} else if (code == NSF8FunctionKey) {
|
|
81
|
+
return @"F8";
|
|
82
|
+
} else if (code == NSF9FunctionKey) {
|
|
83
|
+
return @"F9";
|
|
84
|
+
} else if (code == NSF10FunctionKey) {
|
|
85
|
+
return @"F10";
|
|
86
|
+
} else if (code == NSF11FunctionKey) {
|
|
87
|
+
return @"F11";
|
|
88
|
+
} else if (code == NSF12FunctionKey) {
|
|
89
|
+
return @"F12";
|
|
66
90
|
}
|
|
67
91
|
|
|
68
92
|
return key;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-macos",
|
|
3
|
-
"version": "0.77.
|
|
3
|
+
"version": "0.77.5",
|
|
4
4
|
"description": "React Native for macOS",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -101,7 +101,8 @@
|
|
|
101
101
|
},
|
|
102
102
|
"peerDependencies": {
|
|
103
103
|
"@types/react": "^18.2.6",
|
|
104
|
-
"react": "^18.2.0"
|
|
104
|
+
"react": "^18.2.0",
|
|
105
|
+
"react-native": "0.77.2"
|
|
105
106
|
},
|
|
106
107
|
"peerDependenciesMeta": {
|
|
107
108
|
"@types/react": {
|
|
@@ -110,7 +111,7 @@
|
|
|
110
111
|
},
|
|
111
112
|
"dependencies": {
|
|
112
113
|
"@jest/create-cache-key-function": "^29.6.3",
|
|
113
|
-
"@react-native-
|
|
114
|
+
"@react-native-macos/virtualized-lists": "0.77.5",
|
|
114
115
|
"@react-native/assets-registry": "0.77.2",
|
|
115
116
|
"@react-native/codegen": "0.77.2",
|
|
116
117
|
"@react-native/community-cli-plugin": "0.77.2",
|
|
@@ -194,16 +194,22 @@ class ReactNativePodsUtils
|
|
|
194
194
|
private
|
|
195
195
|
|
|
196
196
|
def self.add_build_settings_to_pod(installer, settings_name, settings_value, target_pod_name, configuration_type)
|
|
197
|
+
# [macOS
|
|
198
|
+
# Since some RN projects might combine multiple platforms into the same Xcode project,
|
|
199
|
+
# we'll be much more forgiving with the pod name matching in react-native-macos.
|
|
200
|
+
# Could be upstreamed as part of https://github.com/microsoft/react-native-macos/issues/2526.
|
|
201
|
+
valid_suffixes = ["", "-iOS", "-macOS", "-visionOS"]
|
|
202
|
+
# macOS]
|
|
197
203
|
installer.target_installation_results.pod_target_installation_results.each do |pod_name, target_installation_result|
|
|
198
|
-
if pod_name.to_s == target_pod_name
|
|
204
|
+
if valid_suffixes.any? { |suffix| pod_name.to_s == "#{target_pod_name}#{suffix}" } # [macOS]
|
|
199
205
|
target_installation_result.native_target.build_configurations.each do |config|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
end
|
|
206
|
+
if configuration_type == nil || (configuration_type != nil && config.type == configuration_type)
|
|
207
|
+
config.build_settings[settings_name] ||= '$(inherited) '
|
|
208
|
+
config.build_settings[settings_name] << settings_value
|
|
204
209
|
end
|
|
205
210
|
end
|
|
206
211
|
end
|
|
212
|
+
end
|
|
207
213
|
end
|
|
208
214
|
|
|
209
215
|
def self.fix_library_search_path(config)
|
|
@@ -21,14 +21,13 @@ end
|
|
|
21
21
|
|
|
22
22
|
# package.json
|
|
23
23
|
package = JSON.parse(File.read(File.join(react_native_path, "package.json")))
|
|
24
|
-
# [macOS
|
|
25
|
-
rn_version = package['version']
|
|
26
|
-
version = findLastestVersionWithArtifact(rn_version) || rn_version
|
|
27
|
-
# macOS]
|
|
24
|
+
version = findMatchingHermesVersion(package) # [macOS] Use special logic instead of just package['version']
|
|
28
25
|
|
|
29
26
|
source_type = hermes_source_type(version, react_native_path)
|
|
30
27
|
source = podspec_source(source_type, version, react_native_path)
|
|
31
28
|
|
|
29
|
+
version = version || package['version'] # [macOS] If version is nil, fall back to package version so CocoaPods doesn't fail
|
|
30
|
+
|
|
32
31
|
Pod::Spec.new do |spec|
|
|
33
32
|
spec.name = "hermes-engine"
|
|
34
33
|
spec.version = version
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
require 'net/http'
|
|
7
7
|
require 'rexml/document'
|
|
8
8
|
require 'open3' # [macOS]
|
|
9
|
+
require 'json' # [macOS]
|
|
10
|
+
require 'tmpdir' # [macOS]
|
|
9
11
|
|
|
10
12
|
HERMES_GITHUB_URL = "https://github.com/facebook/hermes.git"
|
|
11
13
|
ENV_BUILD_FROM_SOURCE = "RCT_BUILD_HERMES_FROM_SOURCE"
|
|
@@ -176,8 +178,18 @@ def podspec_source_build_from_github_tag(react_native_path)
|
|
|
176
178
|
end
|
|
177
179
|
|
|
178
180
|
def podspec_source_build_from_github_main()
|
|
179
|
-
hermes_log("Using the latest commit from main.")
|
|
180
|
-
return {:git => HERMES_GITHUB_URL, :commit => `git ls-remote #{HERMES_GITHUB_URL} main | cut -f 1`.strip}
|
|
181
|
+
# hermes_log("Using the latest commit from main.")
|
|
182
|
+
# return {:git => HERMES_GITHUB_URL, :commit => `git ls-remote #{HERMES_GITHUB_URL} main | cut -f 1`.strip}
|
|
183
|
+
|
|
184
|
+
# [macOS
|
|
185
|
+
# The logic for this is a bit different on macOS.
|
|
186
|
+
# Since react-native-macos lags slightly behind facebook/react-native, we can't always use
|
|
187
|
+
# the latest Hermes commit because Hermes and JSI don't always guarantee backwards compatibility.
|
|
188
|
+
# Instead, we take the commit hash of Hermes at the time of the merge base with facebook/react-native.
|
|
189
|
+
commit = hermes_commit_at_merge_base()
|
|
190
|
+
hermes_log("Using Hermes commit from the merge base with facebook/react-native: #{commit}")
|
|
191
|
+
return {:git => HERMES_GITHUB_URL, :commit => commit}
|
|
192
|
+
# macOS]
|
|
181
193
|
end
|
|
182
194
|
|
|
183
195
|
def podspec_source_download_prebuild_release_tarball(react_native_path, version)
|
|
@@ -200,6 +212,51 @@ def artifacts_dir()
|
|
|
200
212
|
return File.join(Pod::Config.instance.project_pods_root, "hermes-engine-artifacts")
|
|
201
213
|
end
|
|
202
214
|
|
|
215
|
+
# [macOS
|
|
216
|
+
def hermes_commit_at_merge_base()
|
|
217
|
+
# We don't need ls-remote because react-native-macos is a fork of facebook/react-native
|
|
218
|
+
fetch_result = `git fetch -q https://github.com/facebook/react-native.git`
|
|
219
|
+
if $?.exitstatus != 0
|
|
220
|
+
abort <<-EOS
|
|
221
|
+
[Hermes] Failed to fetch facebook/react-native into the local repository.
|
|
222
|
+
EOS
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
merge_base = `git merge-base FETCH_HEAD HEAD`.strip
|
|
226
|
+
if merge_base.empty?
|
|
227
|
+
abort <<-EOS
|
|
228
|
+
[Hermes] Unable to find the merge base between our HEAD and upstream's HEAD.
|
|
229
|
+
EOS
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
timestamp = `git show -s --format=%ci #{merge_base}`.strip
|
|
233
|
+
if timestamp.empty?
|
|
234
|
+
abort <<-EOS
|
|
235
|
+
[Hermes] Unable to extract the timestamp for the merge base (#{merge_base}).
|
|
236
|
+
EOS
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
commit = nil
|
|
240
|
+
Dir.mktmpdir do |tmpdir|
|
|
241
|
+
hermes_git_dir = File.join(tmpdir, "hermes.git")
|
|
242
|
+
# Unfortunately we can't use git rev-list on HERMES_GITHUB_URL directly since we're not in that repo.
|
|
243
|
+
# Instead, we create a shallow clone to avoid downloading the entire history.
|
|
244
|
+
`git clone -q --bare --shallow-since="#{timestamp}" #{HERMES_GITHUB_URL} "#{hermes_git_dir}"`
|
|
245
|
+
`git --git-dir="#{hermes_git_dir}" fetch -q --deepen=1`
|
|
246
|
+
|
|
247
|
+
# If all goes well, this will be the commit hash of Hermes at the time of the merge base
|
|
248
|
+
commit = `git --git-dir="#{hermes_git_dir}" rev-list -1 --before="#{timestamp}" HEAD`.strip
|
|
249
|
+
if commit.empty?
|
|
250
|
+
abort <<-EOS
|
|
251
|
+
[Hermes] Unable to find the Hermes commit hash at time #{timestamp}.
|
|
252
|
+
EOS
|
|
253
|
+
end
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
return commit
|
|
257
|
+
end
|
|
258
|
+
# macOS]
|
|
259
|
+
|
|
203
260
|
def hermestag_file(react_native_path)
|
|
204
261
|
return File.join(react_native_path, "sdks", ".hermesversion")
|
|
205
262
|
end
|
|
@@ -239,25 +296,20 @@ def resolve_url_redirects(url)
|
|
|
239
296
|
return (`curl -Ls -o /dev/null -w %{url_effective} \"#{url}\"`)
|
|
240
297
|
end
|
|
241
298
|
|
|
242
|
-
# [macOS
|
|
243
|
-
#
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
versions = metadata.elements.to_a('//metadata/versioning/versions/version')
|
|
250
|
-
|
|
251
|
-
# Extract version numbers and sort them
|
|
252
|
-
filtered_versions = versions.select { |version| version.text.match?(/^#{versionWithoutPatch}\.\d+$/) }
|
|
253
|
-
if filtered_versions.empty?
|
|
254
|
-
return
|
|
299
|
+
# [macOS
|
|
300
|
+
# Tries to find a suitable Hermes version for a given react-native-macos package.
|
|
301
|
+
# For stable branches, we prefer this to be specified as a peer dependency.
|
|
302
|
+
def findMatchingHermesVersion(package)
|
|
303
|
+
if package['version'] == "1000.0.0"
|
|
304
|
+
# The main branch builds from source, so skip this check
|
|
305
|
+
return nil
|
|
255
306
|
end
|
|
256
307
|
|
|
257
|
-
|
|
258
|
-
|
|
308
|
+
if package['peerDependencies']
|
|
309
|
+
return package['peerDependencies']['react-native']
|
|
310
|
+
end
|
|
259
311
|
|
|
260
|
-
|
|
312
|
+
hermes_log("No matching Hermes version found. Defaulting to main branch, which may be unreliable.")
|
|
261
313
|
end
|
|
262
314
|
# macOS]
|
|
263
315
|
|
package/types/index.d.ts
CHANGED
|
@@ -116,7 +116,7 @@ export * from '../Libraries/LayoutAnimation/LayoutAnimation';
|
|
|
116
116
|
export * from '../Libraries/Linking/Linking';
|
|
117
117
|
export * from '../Libraries/Lists/FlatList';
|
|
118
118
|
export * from '../Libraries/Lists/SectionList';
|
|
119
|
-
export * from '@react-native-
|
|
119
|
+
export * from '@react-native-macos/virtualized-lists'; // [macOS]
|
|
120
120
|
export * from '../Libraries/LogBox/LogBox';
|
|
121
121
|
export * from '../Libraries/Modal/Modal';
|
|
122
122
|
export * as Systrace from '../Libraries/Performance/Systrace';
|