Skip to content

Commit 9641994

Browse files
authored
Merge branch '0.66-stable' into v8_performance_now_fix
2 parents 08532d8 + eca2f62 commit 9641994

File tree

5 files changed

+80
-43
lines changed

5 files changed

+80
-43
lines changed

.ado/templates/react-native-macos-init.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,10 @@ steps:
8181
npx beachball publish --branch origin/$(System.PullRequest.TargetBranch) --no-push --registry http://localhost:4873 --yes --access public
8282
displayName: Publish react-native-macos-init to verdaccio
8383
84-
- task: CmdLine@2
85-
displayName: Install react-native cli
86-
inputs:
87-
script: npm install -g react-native-cli
88-
8984
- task: CmdLine@2
9085
displayName: Init new project
9186
inputs:
92-
script: npx react-native init testcli
87+
script: npx --yes react-native@0.66.4 init testcli --template react-native@0.66.4
9388
workingDirectory: $(Agent.BuildDirectory)
9489

9590
- task: CmdLine@2
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/packages/rn-tester/android/app/build.gradle b/packages/rn-tester/android/app/build.gradle
2+
index 7f04213604..aeaad944c7 100644
3+
--- a/packages/rn-tester/android/app/build.gradle
4+
+++ b/packages/rn-tester/android/app/build.gradle
5+
@@ -151,6 +151,9 @@ android {
6+
jsc {
7+
dimension "vm"
8+
}
9+
+ v8 {
10+
+ dimension "vm"
11+
+ }
12+
}
13+
14+
defaultConfig {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
diff --git a/packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/RNTesterApplication.java b/packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/RNTesterApplication.java
2+
index 6d014d9dac..6c4b7663f8 100644
3+
--- a/packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/RNTesterApplication.java
4+
+++ b/packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/RNTesterApplication.java
5+
@@ -7,10 +7,14 @@
6+
7+
package com.facebook.react.uiapp;
8+
9+
+import static com.facebook.react.modules.systeminfo.AndroidInfoHelpers.getFriendlyDeviceName;
10+
+
11+
import android.app.Application;
12+
import android.content.Context;
13+
import androidx.annotation.Nullable;
14+
import com.facebook.fbreact.specs.SampleTurboModule;
15+
+import com.facebook.hermes.reactexecutor.HermesExecutorFactory;
16+
+import com.facebook.react.jscexecutor.JSCExecutorFactory;
17+
import com.facebook.react.ReactApplication;
18+
import com.facebook.react.ReactInstanceManager;
19+
import com.facebook.react.ReactNativeHost;
20+
@@ -22,6 +26,7 @@ import com.facebook.react.bridge.JSIModuleProvider;
21+
import com.facebook.react.bridge.JSIModuleSpec;
22+
import com.facebook.react.bridge.JSIModuleType;
23+
import com.facebook.react.bridge.JavaScriptContextHolder;
24+
+import com.facebook.react.bridge.JavaScriptExecutorFactory;
25+
import com.facebook.react.bridge.NativeModule;
26+
import com.facebook.react.bridge.ReactApplicationContext;
27+
import com.facebook.react.bridge.UIManager;
28+
@@ -35,6 +40,7 @@ import com.facebook.react.module.model.ReactModuleInfoProvider;
29+
import com.facebook.react.shell.MainReactPackage;
30+
import com.facebook.react.uimanager.ViewManagerRegistry;
31+
import com.facebook.react.views.text.ReactFontManager;
32+
+import com.facebook.react.v8executor.V8ExecutorFactory;
33+
import com.facebook.soloader.SoLoader;
34+
import java.lang.reflect.InvocationTargetException;
35+
import java.util.ArrayList;
36+
@@ -47,6 +53,20 @@ public class RNTesterApplication extends Application implements ReactApplication
37+
38+
private final ReactNativeHost mReactNativeHost =
39+
new ReactNativeHost(this) {
40+
+ @Override
41+
+ public JavaScriptExecutorFactory getJavaScriptExecutorFactory() {
42+
+ if (BuildConfig.FLAVOR.equals("hermes")) {
43+
+ return new HermesExecutorFactory();
44+
+ } else if (BuildConfig.FLAVOR.equals("v8")) {
45+
+ return new V8ExecutorFactory(getApplication().getPackageName(), getFriendlyDeviceName());
46+
+ } else if (BuildConfig.FLAVOR.equals("jsc")) {
47+
+ SoLoader.loadLibrary("jscexecutor");
48+
+ return new JSCExecutorFactory(getApplication().getPackageName(), getFriendlyDeviceName());
49+
+ } else {
50+
+ throw new IllegalArgumentException("Missing handler in getJavaScriptExecutorFactory for build flavor: " + BuildConfig.FLAVOR);
51+
+ }
52+
+ }
53+
+
54+
@Override
55+
public String getJSMainModuleName() {
56+
return "packages/rn-tester/js/RNTesterApp.android";

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,13 @@
214214
"resolutions": {
215215
"async": "^3.2.2",
216216
"es5-ext": "0.10.53",
217+
"shell-quote": "^1.7.3",
217218
"workspace-tools": "^0.18.4"
218219
},
219220
"_justification": {
220221
"async": "Versions of async prior to 3.2.2 are vulnerable to prototype pollution",
221222
"es5-ext": "Packages after 0.10.54 and at the moment up until 0.10.59 contain a protest message. A policy prevents us from using packages with protestware, therefore downgrading to the latest release without the message.",
223+
"shell-quote": "Versions prior to 1.7.3 have an RCE vulnerability. Should be removable once we upgrade CLI tools to ^8.0.0 with RN 0.69.",
222224
"workspace-tools": "Versions prior to 0.18.4 are vulnerable to command injection and prototype pollution attacks"
223225
}
224226
}

yarn.lock

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1778,19 +1778,14 @@ array-each@^1.0.0, array-each@^1.0.1:
17781778
resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f"
17791779
integrity sha1-p5SvDAWrF1KEbudTofIRoFugxE8=
17801780

1781-
array-filter@~0.0.0:
1782-
version "0.0.1"
1783-
resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec"
1784-
integrity sha1-fajPLiZijtcygDWB/SH2fKzS7uw=
1785-
17861781
array-includes@^3.0.3, array-includes@^3.1.1, array-includes@^3.1.4:
1787-
version "3.1.4"
1788-
resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.4.tgz#f5b493162c760f3539631f005ba2bb46acb45ba9"
1789-
integrity sha512-ZTNSQkmWumEbiHO2GF4GmWxYVTiQyJy2XOTa15sdQSrvKn7l+180egQMqlrMOUMCyLMD7pmyQe4mMDUT6Behrw==
1782+
version "3.1.5"
1783+
resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.5.tgz#2c320010db8d31031fd2a5f6b3bbd4b1aad31bdb"
1784+
integrity sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ==
17901785
dependencies:
17911786
call-bind "^1.0.2"
1792-
define-properties "^1.1.3"
1793-
es-abstract "^1.19.1"
1787+
define-properties "^1.1.4"
1788+
es-abstract "^1.19.5"
17941789
get-intrinsic "^1.1.1"
17951790
is-string "^1.0.7"
17961791

@@ -1809,16 +1804,6 @@ array-last@^1.1.1:
18091804
dependencies:
18101805
is-number "^4.0.0"
18111806

1812-
array-map@~0.0.0:
1813-
version "0.0.0"
1814-
resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662"
1815-
integrity sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=
1816-
1817-
array-reduce@~0.0.0:
1818-
version "0.0.0"
1819-
resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b"
1820-
integrity sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=
1821-
18221807
array-slice@^1.0.0:
18231808
version "1.1.0"
18241809
resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-1.1.0.tgz#e368ea15f89bc7069f7ffb89aec3a6c7d4ac22d4"
@@ -5330,11 +5315,6 @@ jsonfile@^4.0.0:
53305315
optionalDependencies:
53315316
graceful-fs "^4.1.6"
53325317

5333-
jsonify@~0.0.0:
5334-
version "0.0.0"
5335-
resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"
5336-
integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=
5337-
53385318
jsprim@^1.2.2:
53395319
version "1.4.2"
53405320
resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb"
@@ -5568,7 +5548,7 @@ lodash.truncate@^4.4.2:
55685548
resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193"
55695549
integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=
55705550

5571-
lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.21, lodash@^4.17.5, lodash@^4.7.0:
5551+
lodash@^4.17.15, lodash@^4.17.21, lodash@^4.17.5, lodash@^4.7.0:
55725552
version "4.17.21"
55735553
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
55745554
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
@@ -7441,17 +7421,7 @@ shebang-regex@^3.0.0:
74417421
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
74427422
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
74437423

7444-
shell-quote@1.6.1:
7445-
version "1.6.1"
7446-
resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767"
7447-
integrity sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=
7448-
dependencies:
7449-
array-filter "~0.0.0"
7450-
array-map "~0.0.0"
7451-
array-reduce "~0.0.0"
7452-
jsonify "~0.0.0"
7453-
7454-
shell-quote@^1.6.1, shell-quote@^1.7.2:
7424+
shell-quote@1.6.1, shell-quote@^1.6.1, shell-quote@^1.7.2, shell-quote@^1.7.3:
74557425
version "1.7.3"
74567426
resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.3.tgz#aa40edac170445b9a431e17bb62c0b881b9c4123"
74577427
integrity sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==

0 commit comments

Comments
 (0)