react-native 0.75.0-rc.5 → 0.75.0-rc.7

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.
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(75),
26
26
  RCTVersionPatch: @(0),
27
- RCTVersionPrerelease: @"rc.5",
27
+ RCTVersionPrerelease: @"rc.7",
28
28
  };
29
29
  });
30
30
  return __rnVersion;
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.75.0-rc.5
1
+ VERSION_NAME=0.75.0-rc.7
2
2
  react.internal.publishingGroup=com.facebook.react
3
3
 
4
4
  android.useAndroidX=true
@@ -18,5 +18,5 @@ public class ReactNativeVersion {
18
18
  "major", 0,
19
19
  "minor", 75,
20
20
  "patch", 0,
21
- "prerelease", "rc.5");
21
+ "prerelease", "rc.7");
22
22
  }
@@ -24,7 +24,6 @@ target_link_libraries(
24
24
  rninstance
25
25
  fabricjni
26
26
  react_featureflagsjni
27
- react_render_runtimescheduler
28
27
  turbomodulejsijni
29
28
  fb
30
29
  jsi
@@ -18,7 +18,7 @@ constexpr struct {
18
18
  int32_t Major = 0;
19
19
  int32_t Minor = 75;
20
20
  int32_t Patch = 0;
21
- std::string_view Prerelease = "rc.5";
21
+ std::string_view Prerelease = "rc.7";
22
22
  } ReactNativeVersion;
23
23
 
24
24
  } // namespace facebook::react
@@ -15,7 +15,7 @@ add_compile_options(
15
15
  -DLOG_TAG=\"Fabric\")
16
16
 
17
17
  file(GLOB rrc_textinput_SRC CONFIGURE_DEPENDS *.cpp platform/android/react/renderer/components/androidtextinput/*.cpp)
18
- add_library(rrc_textinput STATIC ${rrc_textinput_SRC})
18
+ add_library(rrc_textinput SHARED ${rrc_textinput_SRC})
19
19
 
20
20
  target_include_directories(rrc_textinput PUBLIC . ${CMAKE_CURRENT_SOURCE_DIR}/platform/android/)
21
21
 
package/cli.js CHANGED
@@ -22,6 +22,13 @@ const deprecated = () => {
22
22
  );
23
23
  };
24
24
 
25
+ function isMissingCliDependency(error) {
26
+ return (
27
+ error.code === 'MODULE_NOT_FOUND' &&
28
+ /@react-native-community\/cli/.test(error.message)
29
+ );
30
+ }
31
+
25
32
  let cli = {
26
33
  bin: '/dev/null',
27
34
  loadConfig: deprecated,
@@ -107,17 +114,30 @@ The behavior will be changed on ${chalk.white.bold(CLI_DEPRECATION_DATE.toLocale
107
114
  }
108
115
 
109
116
  function warnWithDeprecated() {
110
- if (process.argv[2] !== 'init') {
117
+ if (!isInitCommand) {
111
118
  return;
112
119
  }
113
120
 
114
121
  console.warn(`
115
- ${chalk.yellow('')}️ The \`init\` command is deprecated.
122
+ ${chalk.yellow('🚨')}️ The \`init\` command is deprecated.
116
123
 
117
124
  - Switch to ${chalk.dim('npx @react-native-community/cli init')} for the identical behavior.
118
125
  - Refer to the documentation for information about alternative tools: ${chalk.dim('https://reactnative.dev/docs/getting-started')}`);
119
126
  }
120
127
 
128
+ function warnWithExplicitDependency(version = '*') {
129
+ console.warn(`
130
+ ${chalk.yellow('⚠')}️ ${chalk.dim('react-native')} depends on ${chalk.dim('@react-native-community/cli')} for cli commands. To fix update your ${chalk.dim('package.json')} to include:
131
+
132
+ ${chalk.white.bold(`
133
+ "devDependencies": {
134
+ "@react-native-community/cli": "latest",
135
+ }
136
+ `)}
137
+
138
+ `);
139
+ }
140
+
121
141
  /**
122
142
  * npx react-native -> @react-native-community/cli
123
143
  *
@@ -157,24 +177,36 @@ async function main() {
157
177
  currentVersion.startsWith('0.76');
158
178
 
159
179
  /**
160
- * This command now fails as it's fully deprecated. It will be entirely removed in 0.77.
180
+ * This command is now deprecated. We will continue to proxy commands to @react-native-community/cli, but it
181
+ * isn't supported anymore. We'll always show the warning.
182
+ *
183
+ * WARNING: Projects will have to have an explicit dependency on @react-native-community/cli to use the CLI.
161
184
  *
162
185
  * Phase 3
163
186
  *
164
187
  * @see https://github.com/react-native-community/discussions-and-proposals/tree/main/proposals/0759-react-native-frameworks.md
165
188
  */
166
- if (currentVersion !== HEAD && isDeprecated) {
167
- warnWithDeprecated();
168
- process.exit(1);
189
+ if (isInitCommand) {
190
+ if (currentVersion !== HEAD && isDeprecated) {
191
+ warnWithDeprecated();
192
+ // We only exit if the user calls `init` and it's deprecated. All other cases should proxy to to @react-native-community/cli.
193
+ // Be careful with this as it can break a lot of users.
194
+ process.exit(1);
195
+ } else if (currentVersion.startsWith('0.75')) {
196
+ warnWithDeprecationSchedule();
197
+ }
198
+ warnWhenRunningInit();
169
199
  }
170
200
 
171
- if (currentVersion.startsWith('0.75')) {
172
- warnWithDeprecationSchedule();
201
+ try {
202
+ return require('@react-native-community/cli').run(name);
203
+ } catch (e) {
204
+ if (isMissingCliDependency(e)) {
205
+ warnWithExplicitDependency();
206
+ process.exit(1);
207
+ }
208
+ throw e;
173
209
  }
174
-
175
- warnWhenRunningInit();
176
-
177
- return require('@react-native-community/cli').run(name);
178
210
  }
179
211
 
180
212
  if (require.main === module) {
@@ -185,10 +217,7 @@ if (require.main === module) {
185
217
  } catch (e) {
186
218
  // We silence @react-native-community/cli missing as it is no
187
219
  // longer a dependency
188
- if (
189
- !e.code === 'MODULE_NOT_FOUND' &&
190
- /@react-native-community\/cli/.test(e.message)
191
- ) {
220
+ if (!isMissingCliDependency(e)) {
192
221
  throw e;
193
222
  }
194
223
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native",
3
- "version": "0.75.0-rc.5",
3
+ "version": "0.75.0-rc.7",
4
4
  "description": "A framework for building native apps using React",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -100,7 +100,7 @@
100
100
  },
101
101
  "peerDependencies": {
102
102
  "@types/react": "^18.2.6",
103
- "react": "^19.0.0-rc-fb9a90fa48-20240614"
103
+ "react": "^18.2.0"
104
104
  },
105
105
  "peerDependenciesMeta": {
106
106
  "@types/react": {
@@ -109,16 +109,16 @@
109
109
  },
110
110
  "dependencies": {
111
111
  "@jest/create-cache-key-function": "^29.6.3",
112
- "@react-native-community/cli": "14.0.0-alpha.11",
113
- "@react-native-community/cli-platform-android": "14.0.0-alpha.11",
114
- "@react-native-community/cli-platform-ios": "14.0.0-alpha.11",
115
- "@react-native/assets-registry": "0.75.0-rc.5",
116
- "@react-native/codegen": "0.75.0-rc.5",
117
- "@react-native/community-cli-plugin": "0.75.0-rc.5",
118
- "@react-native/gradle-plugin": "0.75.0-rc.5",
119
- "@react-native/js-polyfills": "0.75.0-rc.5",
120
- "@react-native/normalize-colors": "0.75.0-rc.5",
121
- "@react-native/virtualized-lists": "0.75.0-rc.5",
112
+ "@react-native-community/cli": "14.0.0",
113
+ "@react-native-community/cli-platform-android": "14.0.0",
114
+ "@react-native-community/cli-platform-ios": "14.0.0",
115
+ "@react-native/assets-registry": "0.75.0-rc.7",
116
+ "@react-native/codegen": "0.75.0-rc.7",
117
+ "@react-native/community-cli-plugin": "0.75.0-rc.7",
118
+ "@react-native/gradle-plugin": "0.75.0-rc.7",
119
+ "@react-native/js-polyfills": "0.75.0-rc.7",
120
+ "@react-native/normalize-colors": "0.75.0-rc.7",
121
+ "@react-native/virtualized-lists": "0.75.0-rc.7",
122
122
  "abort-controller": "^3.0.0",
123
123
  "anser": "^1.4.9",
124
124
  "ansi-regex": "^5.0.0",
@@ -140,7 +140,7 @@
140
140
  "react-devtools-core": "^5.3.1",
141
141
  "react-refresh": "^0.14.0",
142
142
  "regenerator-runtime": "^0.13.2",
143
- "scheduler": "0.25.0-rc-fb9a90fa48-20240614",
143
+ "scheduler": "0.24.0-canary-efb381bbf-20230505",
144
144
  "semver": "^7.1.3",
145
145
  "stacktrace-parser": "^0.1.10",
146
146
  "whatwg-fetch": "^3.0.0",
@@ -50,7 +50,7 @@ module PrivacyManifestUtils
50
50
  end
51
51
 
52
52
  def self.get_application_targets(user_project)
53
- return user_project.targets.filter { |t| t.symbol_type == :application }
53
+ return user_project.targets.filter { |t| t.respond_to?(:symbol_type) && t.symbol_type == :application }
54
54
  end
55
55
 
56
56
  def self.read_privacyinfo_file(file_path)
@@ -233,7 +233,18 @@ class ReactNativePodsUtils
233
233
  end
234
234
 
235
235
  if !file_manager.exist?("#{file_path}.local")
236
- node_binary = `command -v node`
236
+ # When installing pods with a yarn alias, yarn creates a fake yarn and node executables
237
+ # in a temporary folder.
238
+ # Using `type -a` we are able to retrieve all the paths of an executable and we can
239
+ # exclude the temporary ones.
240
+ # see https://github.com/facebook/react-native/issues/43285 for more info
241
+ node_binary = `type -a node`.split("\n").map { |path|
242
+ path.gsub!("node is ", "")
243
+ }.select { |b|
244
+ return !b.start_with?("/var")
245
+ }
246
+
247
+ node_binary = node_binary[0]
237
248
  system("echo 'export NODE_BINARY=#{node_binary}' > #{file_path}.local")
238
249
  end
239
250
  end
@@ -90,7 +90,7 @@ fi
90
90
 
91
91
  [ -z "$NODE_ARGS" ] && export NODE_ARGS=""
92
92
 
93
- [ -z "$BUNDLE_COMMAND" ] && BUNDLE_COMMAND="bundle"
93
+ [ -z "$CLI_PATH" ] && CLI_PATH="$REACT_NATIVE_DIR/scripts/bundle.js"
94
94
 
95
95
  [ -z "$COMPOSE_SOURCEMAP_PATH" ] && COMPOSE_SOURCEMAP_PATH="$REACT_NATIVE_DIR/scripts/compose-source-maps.js"
96
96
 
@@ -147,7 +147,7 @@ else
147
147
  fi
148
148
 
149
149
  # shellcheck disable=SC2086
150
- "$NODE_BINARY" $NODE_ARGS "$REACT_NATIVE_DIR/scripts/bundle.js" \
150
+ "$NODE_BINARY" $NODE_ARGS "$CLI_PATH" $BUNDLE_COMMAND \
151
151
  $CONFIG_ARG \
152
152
  --config-cmd "$CONFIG" \
153
153
  --entry-file "$ENTRY_FILE" \
Binary file
Binary file
Binary file