Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update_RN_0.76.3 #1820

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from
Draft

update_RN_0.76.3 #1820

wants to merge 23 commits into from

Conversation

ElenaDiachenko
Copy link
Contributor

@ElenaDiachenko ElenaDiachenko commented Dec 9, 2024

Description

  • Platforms that works:
  • ios
  • android
  • androidtv
  • firetv
  • androidwear
  • web
  • tizen
  • tvos
  • webos
  • macos
  • tizenwatch
  • kaios
  • chromecast
  • linux
  • windows
System:
  OS: macOS 15.2
  CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  Memory: 1.22 GB / 32.00 GB
  Shell: 5.9 - /bin/zsh
Binaries:
  Node: 22.0.0 - ~/.asdf/installs/nodejs/22.0.0/bin/node
  Yarn: 3.6.4 - ~/.asdf/installs/nodejs/22.0.0/bin/yarn              <====== REQUIRED FOR RN
  npm: 10.5.1 - ~/.asdf/plugins/nodejs/shims/npm
  Watchman: 2024.12.02.00 - /usr/local/bin/watchman
Managers:
  CocoaPods: 1.15.2 - ../../.asdf/shims/pod
SDKs:
  iOS SDK:
    Platforms: DriverKit 24.1, iOS 18.1, macOS 15.1, tvOS 18.1, visionOS 2.1, watchOS 11.1
IDEs:
  Android Studio: 2022.3 AI-223.8836.35.2231.11005911
  Xcode: 16.1/16B40 - /usr/bin/xcodebuild
Languages:
  Java: 17.0.10 - /usr/bin/javac
  Ruby: 3.1.1 - ../../.asdf/shims/ruby
npmGlobalPackages:
  lerna: 8.1.9                 <====== REQUIRED FOR YARN
  rnv: 1.9.0-rc.0
CLI:
  TIZEN CLI: 2.5.25 - ../../tizen-studio/tools/ide/bin/tizen

Related issues

Npm releases

n/a

@ElenaDiachenko ElenaDiachenko marked this pull request as draft December 9, 2024 10:38
@Marius456 Marius456 added this to the 2.0 milestone Dec 16, 2024
@locksten
Copy link
Collaborator

It seems like building tvos now requires brew install cmake, so that should be added to the setup guide when merging this.

Comment on lines +60 to +62
`node ${doResolve(c.runtime.runtimeExtraProps?.reactNativePackageName || 'react-native')}/cli.js ${args.join(
' '
)} --config=${c.runtime.runtimeExtraProps?.reactNativeMetroConfigName || 'metro.config.js'}`,

Check warning

Code scanning / CodeQL

Unsafe shell command constructed from library input Medium

This string concatenation which depends on
library input
is later used in a
shell command
.

Copilot Autofix AI 18 days ago

To fix the problem, we should avoid constructing the shell command using string concatenation and instead use a safer method to pass arguments to the command. The child_process.execFile method is a safer alternative as it allows us to pass arguments as an array, avoiding shell interpretation.

  • Replace the executeAsync call with child_process.execFile to execute the command.
  • Construct the command and its arguments as separate elements in an array.
  • Ensure all dynamic inputs are properly escaped or validated.
Suggested changeset 1
packages/sdk-react-native/src/iosRunner.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/packages/sdk-react-native/src/iosRunner.ts b/packages/sdk-react-native/src/iosRunner.ts
--- a/packages/sdk-react-native/src/iosRunner.ts
+++ b/packages/sdk-react-native/src/iosRunner.ts
@@ -58,7 +58,10 @@
     }
-    return executeAsync(
-        `node ${doResolve(c.runtime.runtimeExtraProps?.reactNativePackageName || 'react-native')}/cli.js ${args.join(
-            ' '
-        )} --config=${c.runtime.runtimeExtraProps?.reactNativeMetroConfigName || 'metro.config.js'}`,
-        {
+    const command = 'node';
+    const commandArgs = [
+        `${doResolve(c.runtime.runtimeExtraProps?.reactNativePackageName || 'react-native')}/cli.js`,
+        ...args,
+        `--config=${c.runtime.runtimeExtraProps?.reactNativeMetroConfigName || 'metro.config.js'}`
+    ];
+    return new Promise((resolve, reject) => {
+        child_process.execFile(command, commandArgs, {
             env: {
@@ -70,4 +73,10 @@
             },
-        }
-    );
+        }, (error, stdout, stderr) => {
+            if (error) {
+                reject(error);
+            } else {
+                resolve(stdout);
+            }
+        });
+    });
 };
EOF
@@ -58,7 +58,10 @@
}
return executeAsync(
`node ${doResolve(c.runtime.runtimeExtraProps?.reactNativePackageName || 'react-native')}/cli.js ${args.join(
' '
)} --config=${c.runtime.runtimeExtraProps?.reactNativeMetroConfigName || 'metro.config.js'}`,
{
const command = 'node';
const commandArgs = [
`${doResolve(c.runtime.runtimeExtraProps?.reactNativePackageName || 'react-native')}/cli.js`,
...args,
`--config=${c.runtime.runtimeExtraProps?.reactNativeMetroConfigName || 'metro.config.js'}`
];
return new Promise((resolve, reject) => {
child_process.execFile(command, commandArgs, {
env: {
@@ -70,4 +73,10 @@
},
}
);
}, (error, stdout, stderr) => {
if (error) {
reject(error);
} else {
resolve(stdout);
}
});
});
};
Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
@Marius456 Marius456 added e2e and removed e2e labels Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants