react-native 0.75.4 → 0.75.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/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Image/RCTImageLoader.mm +9 -1
- package/Libraries/Network/FormData.js +11 -3
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +6 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/jsi/jsi/decorator.h +49 -0
- package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.cpp +1 -4
- package/ReactCommon/react/renderer/animations/utils.h +45 -0
- package/gradle/libs.versions.toml +1 -1
- package/package.json +8 -8
- package/scripts/cocoapods/utils.rb +2 -9
- package/sdks/.hermesversion +1 -1
- package/sdks/hermes-engine/utils/build-apple-framework.sh +0 -12
- package/sdks/hermesc/linux64-bin/hermesc +0 -0
- package/sdks/hermesc/osx-bin/hermes +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/sdks/hermesc/win64-bin/msvcp140.dll +0 -0
- package/sdks/hermesc/win64-bin/vcruntime140.dll +0 -0
- package/sdks/hermesc/win64-bin/vcruntime140_1.dll +0 -0
|
@@ -470,7 +470,15 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image, CGSize size, CGFloat scal
|
|
|
470
470
|
|
|
471
471
|
// Add missing png extension
|
|
472
472
|
if (request.URL.fileURL && request.URL.pathExtension.length == 0) {
|
|
473
|
-
|
|
473
|
+
// Check if there exists a file with that url on disk already
|
|
474
|
+
// This should fix issue https://github.com/facebook/react-native/issues/46870
|
|
475
|
+
if ([[NSFileManager defaultManager] fileExistsAtPath:request.URL.path]) {
|
|
476
|
+
mutableRequest.URL = request.URL;
|
|
477
|
+
} else {
|
|
478
|
+
// This is the default behavior in case there is no file on disk with no extension.
|
|
479
|
+
// We assume that the extension is `png`.
|
|
480
|
+
mutableRequest.URL = [request.URL URLByAppendingPathExtension:@"png"];
|
|
481
|
+
}
|
|
474
482
|
}
|
|
475
483
|
if (_redirectDelegate != nil) {
|
|
476
484
|
mutableRequest.URL = [_redirectDelegate redirectAssetsURL:mutableRequest.URL];
|
|
@@ -28,6 +28,15 @@ type FormDataPart =
|
|
|
28
28
|
...
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Encode a FormData filename compliant with RFC 2183
|
|
33
|
+
*
|
|
34
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition#directives
|
|
35
|
+
*/
|
|
36
|
+
function encodeFilename(filename: string): string {
|
|
37
|
+
return encodeURIComponent(filename.replace(/\//g, '_'));
|
|
38
|
+
}
|
|
39
|
+
|
|
31
40
|
/**
|
|
32
41
|
* Polyfill for XMLHttpRequest2 FormData API, allowing multipart POST requests
|
|
33
42
|
* with mixed data (string, native files) to be submitted via XMLHttpRequest.
|
|
@@ -82,9 +91,8 @@ class FormData {
|
|
|
82
91
|
// content type (cf. web Blob interface.)
|
|
83
92
|
if (typeof value === 'object' && !Array.isArray(value) && value) {
|
|
84
93
|
if (typeof value.name === 'string') {
|
|
85
|
-
headers['content-disposition'] +=
|
|
86
|
-
value.name
|
|
87
|
-
}"; filename*=utf-8''${encodeURI(value.name)}`;
|
|
94
|
+
headers['content-disposition'] +=
|
|
95
|
+
`; filename="${encodeFilename(value.name)}"`;
|
|
88
96
|
}
|
|
89
97
|
if (typeof value.type === 'string') {
|
|
90
98
|
headers['content-type'] = value.type;
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -1035,12 +1035,18 @@ public class ReactEditText extends AppCompatEditText {
|
|
|
1035
1035
|
public void onAttachedToWindow() {
|
|
1036
1036
|
super.onAttachedToWindow();
|
|
1037
1037
|
|
|
1038
|
+
int selectionStart = getSelectionStart();
|
|
1039
|
+
int selectionEnd = getSelectionEnd();
|
|
1040
|
+
|
|
1038
1041
|
// Used to ensure that text is selectable inside of removeClippedSubviews
|
|
1039
1042
|
// See https://github.com/facebook/react-native/issues/6805 for original
|
|
1040
1043
|
// fix that was ported to here.
|
|
1041
1044
|
|
|
1042
1045
|
super.setTextIsSelectable(true);
|
|
1043
1046
|
|
|
1047
|
+
// Restore the selection since `setTextIsSelectable` changed it.
|
|
1048
|
+
setSelection(selectionStart, selectionEnd);
|
|
1049
|
+
|
|
1044
1050
|
if (mContainsImages) {
|
|
1045
1051
|
Spanned text = getText();
|
|
1046
1052
|
TextInlineImageSpan[] spans = text.getSpans(0, text.length(), TextInlineImageSpan.class);
|
|
@@ -582,6 +582,10 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> {
|
|
|
582
582
|
Around around{with_};
|
|
583
583
|
return RD::cloneSymbol(pv);
|
|
584
584
|
};
|
|
585
|
+
Runtime::PointerValue* cloneBigInt(const Runtime::PointerValue* pv) override {
|
|
586
|
+
Around around{with_};
|
|
587
|
+
return RD::cloneBigInt(pv);
|
|
588
|
+
};
|
|
585
589
|
Runtime::PointerValue* cloneString(const Runtime::PointerValue* pv) override {
|
|
586
590
|
Around around{with_};
|
|
587
591
|
return RD::cloneString(pv);
|
|
@@ -610,6 +614,10 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> {
|
|
|
610
614
|
Around around{with_};
|
|
611
615
|
return RD::createPropNameIDFromString(str);
|
|
612
616
|
};
|
|
617
|
+
PropNameID createPropNameIDFromSymbol(const Symbol& sym) override {
|
|
618
|
+
Around around{with_};
|
|
619
|
+
return RD::createPropNameIDFromSymbol(sym);
|
|
620
|
+
};
|
|
613
621
|
std::string utf8(const PropNameID& id) override {
|
|
614
622
|
Around around{with_};
|
|
615
623
|
return RD::utf8(id);
|
|
@@ -624,6 +632,31 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> {
|
|
|
624
632
|
return RD::symbolToString(sym);
|
|
625
633
|
};
|
|
626
634
|
|
|
635
|
+
BigInt createBigIntFromInt64(int64_t i) override {
|
|
636
|
+
Around around{with_};
|
|
637
|
+
return RD::createBigIntFromInt64(i);
|
|
638
|
+
};
|
|
639
|
+
BigInt createBigIntFromUint64(uint64_t i) override {
|
|
640
|
+
Around around{with_};
|
|
641
|
+
return RD::createBigIntFromUint64(i);
|
|
642
|
+
};
|
|
643
|
+
bool bigintIsInt64(const BigInt& bi) override {
|
|
644
|
+
Around around{with_};
|
|
645
|
+
return RD::bigintIsInt64(bi);
|
|
646
|
+
};
|
|
647
|
+
bool bigintIsUint64(const BigInt& bi) override {
|
|
648
|
+
Around around{with_};
|
|
649
|
+
return RD::bigintIsUint64(bi);
|
|
650
|
+
};
|
|
651
|
+
uint64_t truncate(const BigInt& bi) override {
|
|
652
|
+
Around around{with_};
|
|
653
|
+
return RD::truncate(bi);
|
|
654
|
+
};
|
|
655
|
+
String bigintToString(const BigInt& bi, int i) override {
|
|
656
|
+
Around around{with_};
|
|
657
|
+
return RD::bigintToString(bi, i);
|
|
658
|
+
};
|
|
659
|
+
|
|
627
660
|
String createStringFromAscii(const char* str, size_t length) override {
|
|
628
661
|
Around around{with_};
|
|
629
662
|
return RD::createStringFromAscii(str, length);
|
|
@@ -637,6 +670,11 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> {
|
|
|
637
670
|
return RD::utf8(s);
|
|
638
671
|
}
|
|
639
672
|
|
|
673
|
+
Value createValueFromJsonUtf8(const uint8_t* json, size_t length) override {
|
|
674
|
+
Around around{with_};
|
|
675
|
+
return RD::createValueFromJsonUtf8(json, length);
|
|
676
|
+
};
|
|
677
|
+
|
|
640
678
|
Object createObject() override {
|
|
641
679
|
Around around{with_};
|
|
642
680
|
return RD::createObject();
|
|
@@ -797,6 +835,11 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> {
|
|
|
797
835
|
Around around{with_};
|
|
798
836
|
return RD::strictEquals(a, b);
|
|
799
837
|
};
|
|
838
|
+
bool strictEquals(const BigInt& a, const BigInt& b) const override {
|
|
839
|
+
Around around{with_};
|
|
840
|
+
return RD::strictEquals(a, b);
|
|
841
|
+
};
|
|
842
|
+
|
|
800
843
|
bool strictEquals(const String& a, const String& b) const override {
|
|
801
844
|
Around around{with_};
|
|
802
845
|
return RD::strictEquals(a, b);
|
|
@@ -811,6 +854,12 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> {
|
|
|
811
854
|
return RD::instanceOf(o, f);
|
|
812
855
|
};
|
|
813
856
|
|
|
857
|
+
void setExternalMemoryPressure(const jsi::Object& obj, size_t amount)
|
|
858
|
+
override {
|
|
859
|
+
Around around{with_};
|
|
860
|
+
RD::setExternalMemoryPressure(obj, amount);
|
|
861
|
+
};
|
|
862
|
+
|
|
814
863
|
private:
|
|
815
864
|
// Wrap an RAII type around With& to guarantee after always happens.
|
|
816
865
|
struct Around {
|
|
@@ -794,10 +794,7 @@ LayoutAnimationKeyFrameManager::pullTransaction(
|
|
|
794
794
|
finalConflictingMutations.end(),
|
|
795
795
|
&shouldFirstComeBeforeSecondMutation);
|
|
796
796
|
|
|
797
|
-
|
|
798
|
-
immediateMutations.begin(),
|
|
799
|
-
immediateMutations.end(),
|
|
800
|
-
&shouldFirstComeBeforeSecondRemovesOnly);
|
|
797
|
+
handleShouldFirstComeBeforeSecondRemovesOnly(immediateMutations);
|
|
801
798
|
|
|
802
799
|
animation.keyFrames = keyFramesToAnimate;
|
|
803
800
|
inflightAnimations_.push_back(std::move(animation));
|
|
@@ -24,6 +24,40 @@ static inline bool shouldFirstComeBeforeSecondRemovesOnly(
|
|
|
24
24
|
(lhs.index > rhs.index);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
static inline void handleShouldFirstComeBeforeSecondRemovesOnly(
|
|
28
|
+
ShadowViewMutation::List& list) noexcept {
|
|
29
|
+
std::unordered_map<std::string, std::vector<ShadowViewMutation>>
|
|
30
|
+
removeMutationsByTag;
|
|
31
|
+
ShadowViewMutation::List finalList;
|
|
32
|
+
for (auto& mutation : list) {
|
|
33
|
+
if (mutation.type == ShadowViewMutation::Type::Remove) {
|
|
34
|
+
auto key = std::to_string(mutation.parentShadowView.tag);
|
|
35
|
+
removeMutationsByTag[key].push_back(mutation);
|
|
36
|
+
} else {
|
|
37
|
+
finalList.push_back(mutation);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (removeMutationsByTag.size() == 0) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
for (auto& mutationsPair : removeMutationsByTag) {
|
|
46
|
+
if (mutationsPair.second.size() > 1) {
|
|
47
|
+
std::stable_sort(
|
|
48
|
+
mutationsPair.second.begin(),
|
|
49
|
+
mutationsPair.second.end(),
|
|
50
|
+
&shouldFirstComeBeforeSecondRemovesOnly);
|
|
51
|
+
}
|
|
52
|
+
finalList.insert(
|
|
53
|
+
finalList.begin(),
|
|
54
|
+
mutationsPair.second.begin(),
|
|
55
|
+
mutationsPair.second.end());
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
list = finalList;
|
|
59
|
+
}
|
|
60
|
+
|
|
27
61
|
static inline bool shouldFirstComeBeforeSecondMutation(
|
|
28
62
|
const ShadowViewMutation& lhs,
|
|
29
63
|
const ShadowViewMutation& rhs) noexcept {
|
|
@@ -55,6 +89,17 @@ static inline bool shouldFirstComeBeforeSecondMutation(
|
|
|
55
89
|
lhs.type == ShadowViewMutation::Type::Insert) {
|
|
56
90
|
return false;
|
|
57
91
|
}
|
|
92
|
+
|
|
93
|
+
// Remove comes before Update
|
|
94
|
+
if (lhs.type == ShadowViewMutation::Type::Remove &&
|
|
95
|
+
rhs.type == ShadowViewMutation::Type::Update) {
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
if (rhs.type == ShadowViewMutation::Type::Remove &&
|
|
99
|
+
lhs.type == ShadowViewMutation::Type::Update) {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
|
|
58
103
|
} else {
|
|
59
104
|
// Make sure that removes on the same level are sorted - highest indices
|
|
60
105
|
// must come first.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.75.
|
|
3
|
+
"version": "0.75.5",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -112,13 +112,13 @@
|
|
|
112
112
|
"@react-native-community/cli": "14.1.0",
|
|
113
113
|
"@react-native-community/cli-platform-android": "14.1.0",
|
|
114
114
|
"@react-native-community/cli-platform-ios": "14.1.0",
|
|
115
|
-
"@react-native/assets-registry": "0.75.
|
|
116
|
-
"@react-native/codegen": "0.75.
|
|
117
|
-
"@react-native/community-cli-plugin": "0.75.
|
|
118
|
-
"@react-native/gradle-plugin": "0.75.
|
|
119
|
-
"@react-native/js-polyfills": "0.75.
|
|
120
|
-
"@react-native/normalize-colors": "0.75.
|
|
121
|
-
"@react-native/virtualized-lists": "0.75.
|
|
115
|
+
"@react-native/assets-registry": "0.75.5",
|
|
116
|
+
"@react-native/codegen": "0.75.5",
|
|
117
|
+
"@react-native/community-cli-plugin": "0.75.5",
|
|
118
|
+
"@react-native/gradle-plugin": "0.75.5",
|
|
119
|
+
"@react-native/js-polyfills": "0.75.5",
|
|
120
|
+
"@react-native/normalize-colors": "0.75.5",
|
|
121
|
+
"@react-native/virtualized-lists": "0.75.5",
|
|
122
122
|
"abort-controller": "^3.0.0",
|
|
123
123
|
"anser": "^1.4.9",
|
|
124
124
|
"ansi-regex": "^5.0.0",
|
|
@@ -235,16 +235,9 @@ class ReactNativePodsUtils
|
|
|
235
235
|
if !file_manager.exist?("#{file_path}.local")
|
|
236
236
|
# When installing pods with a yarn alias, yarn creates a fake yarn and node executables
|
|
237
237
|
# in a temporary folder.
|
|
238
|
-
# Using `
|
|
239
|
-
# exclude the temporary ones.
|
|
238
|
+
# Using `node --print "process.argv[0]";` we are able to retrieve the actual path from which node is running.
|
|
240
239
|
# see https://github.com/facebook/react-native/issues/43285 for more info
|
|
241
|
-
node_binary = `
|
|
242
|
-
path.gsub!("node is ", "")
|
|
243
|
-
}.select { |b|
|
|
244
|
-
!b.start_with?("/var")
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
node_binary = node_binary[0]
|
|
240
|
+
node_binary = `node --print "process.argv[0]";`
|
|
248
241
|
system("echo 'export NODE_BINARY=#{node_binary}' > #{file_path}.local")
|
|
249
242
|
end
|
|
250
243
|
end
|
package/sdks/.hermesversion
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
hermes-
|
|
1
|
+
hermes-2025-02-06-RNv0.75.5-53ff6df3af18e250c29a74f34273f50dbfa410dc
|
|
@@ -198,19 +198,7 @@ function create_universal_framework {
|
|
|
198
198
|
for i in "${!platforms[@]}"; do
|
|
199
199
|
local platform="${platforms[$i]}"
|
|
200
200
|
local hermes_framework_path="${platform}/hermes.framework"
|
|
201
|
-
local dSYM_path="$hermes_framework_path"
|
|
202
|
-
local dSYM_base_path="$HERMES_PATH/destroot/Library/Frameworks"
|
|
203
|
-
|
|
204
|
-
# If the dSYM rename has failed, the dSYM are generated as 0.dSYM
|
|
205
|
-
# (Apple default name) rather then hermes.framework.dSYM.
|
|
206
|
-
if [[ -e "$dSYM_base_path/${platform}/0.dSYM" ]]; then
|
|
207
|
-
dSYM_path="${platform}/0"
|
|
208
|
-
fi
|
|
209
|
-
|
|
210
201
|
args+="-framework $hermes_framework_path "
|
|
211
|
-
|
|
212
|
-
# Path to dSYM must be absolute
|
|
213
|
-
args+="-debug-symbols $dSYM_base_path/$dSYM_path.dSYM "
|
|
214
202
|
done
|
|
215
203
|
|
|
216
204
|
mkdir -p universal
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|