react-native 0.82.0-rc.3 → 0.82.0-rc.4

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.
@@ -264,7 +264,7 @@ const Switch: component(
264
264
  disabled,
265
265
  onTintColor: trackColorForTrue,
266
266
  style: StyleSheet.compose(
267
- {height: 31, width: 51},
267
+ {alignSelf: 'flex-start' as const},
268
268
  StyleSheet.compose(
269
269
  style,
270
270
  ios_backgroundColor == null
@@ -29,7 +29,7 @@ export default class ReactNativeVersion {
29
29
  static major: number = 0;
30
30
  static minor: number = 82;
31
31
  static patch: number = 0;
32
- static prerelease: string | null = 'rc.3';
32
+ static prerelease: string | null = 'rc.4';
33
33
 
34
34
  static getVersionString(): string {
35
35
  return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(82),
26
26
  RCTVersionPatch: @(0),
27
- RCTVersionPrerelease: @"rc.3",
27
+ RCTVersionPrerelease: @"rc.4",
28
28
  };
29
29
  });
30
30
  return __rnVersion;
@@ -21,7 +21,6 @@ registry->add(concreteComponentDescriptorProvider<AndroidDrawerLayoutComponentDe
21
21
  registry->add(concreteComponentDescriptorProvider<AndroidSwipeRefreshLayoutComponentDescriptor>());
22
22
  registry->add(concreteComponentDescriptorProvider<DebuggingOverlayComponentDescriptor>());
23
23
  registry->add(concreteComponentDescriptorProvider<PullToRefreshViewComponentDescriptor>());
24
- registry->add(concreteComponentDescriptorProvider<SwitchComponentDescriptor>());
25
24
  registry->add(concreteComponentDescriptorProvider<UnimplementedNativeViewComponentDescriptor>());
26
25
  }
27
26
 
@@ -21,7 +21,6 @@ using AndroidDrawerLayoutComponentDescriptor = ConcreteComponentDescriptor<Andro
21
21
  using AndroidSwipeRefreshLayoutComponentDescriptor = ConcreteComponentDescriptor<AndroidSwipeRefreshLayoutShadowNode>;
22
22
  using DebuggingOverlayComponentDescriptor = ConcreteComponentDescriptor<DebuggingOverlayShadowNode>;
23
23
  using PullToRefreshViewComponentDescriptor = ConcreteComponentDescriptor<PullToRefreshViewShadowNode>;
24
- using SwitchComponentDescriptor = ConcreteComponentDescriptor<SwitchShadowNode>;
25
24
  using UnimplementedNativeViewComponentDescriptor = ConcreteComponentDescriptor<UnimplementedNativeViewShadowNode>;
26
25
 
27
26
  void FBReactNativeSpec_registerComponentDescriptorsFromCodegen(
@@ -17,7 +17,6 @@ extern const char AndroidDrawerLayoutComponentName[] = "AndroidDrawerLayout";
17
17
  extern const char AndroidSwipeRefreshLayoutComponentName[] = "AndroidSwipeRefreshLayout";
18
18
  extern const char DebuggingOverlayComponentName[] = "DebuggingOverlay";
19
19
  extern const char PullToRefreshViewComponentName[] = "PullToRefreshView";
20
- extern const char SwitchComponentName[] = "Switch";
21
20
  extern const char UnimplementedNativeViewComponentName[] = "UnimplementedNativeView";
22
21
 
23
22
  } // namespace facebook::react
@@ -73,17 +73,6 @@ using PullToRefreshViewShadowNode = ConcreteViewShadowNode<
73
73
  PullToRefreshViewEventEmitter,
74
74
  PullToRefreshViewState>;
75
75
 
76
- JSI_EXPORT extern const char SwitchComponentName[];
77
-
78
- /*
79
- * `ShadowNode` for <Switch> component.
80
- */
81
- using SwitchShadowNode = ConcreteViewShadowNode<
82
- SwitchComponentName,
83
- SwitchProps,
84
- SwitchEventEmitter,
85
- SwitchState>;
86
-
87
76
  JSI_EXPORT extern const char UnimplementedNativeViewComponentName[];
88
77
 
89
78
  /*
@@ -25,8 +25,6 @@ using DebuggingOverlayState = StateData;
25
25
 
26
26
  using PullToRefreshViewState = StateData;
27
27
 
28
- using SwitchState = StateData;
29
-
30
28
  using UnimplementedNativeViewState = StateData;
31
29
 
32
30
  } // namespace facebook::react
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.82.0-rc.3
1
+ VERSION_NAME=0.82.0-rc.4
2
2
  react.internal.publishingGroup=com.facebook.react
3
3
  react.internal.hermesPublishingGroup=com.facebook.hermes
4
4
 
@@ -328,6 +328,15 @@ public class ReactInstanceManager {
328
328
  }
329
329
 
330
330
  registerCxxErrorHandlerFunc();
331
+
332
+ // Using `if (true)` just to prevent tests / lint errors.
333
+ if (true) {
334
+ // Legacy architecture of React Native is deprecated and can't be initialized anymore.
335
+ // More details on:
336
+ // https://github.com/react-native-community/discussions-and-proposals/blob/nc/legacy-arch-removal/proposals/0929-legacy-architecture-removal.md
337
+ throw new UnsupportedOperationException(
338
+ "ReactInstanceManager.createReactContext is unsupported.");
339
+ }
331
340
  }
332
341
 
333
342
  private ReactInstanceDevHelper createDevHelperInterface() {
@@ -1446,6 +1455,7 @@ public class ReactInstanceManager {
1446
1455
  */
1447
1456
  private ReactApplicationContext createReactContext(
1448
1457
  JavaScriptExecutor jsExecutor, JSBundleLoader jsBundleLoader) {
1458
+
1449
1459
  FLog.d(ReactConstants.TAG, "ReactInstanceManager.createReactContext()");
1450
1460
  ReactMarker.logMarker(CREATE_REACT_CONTEXT_START, jsExecutor.getName());
1451
1461
 
@@ -125,6 +125,16 @@ public object DefaultNewArchitectureEntryPoint {
125
125
  privateConcurrentReactEnabled = featureFlags.enableFabricRenderer()
126
126
  privateBridgelessEnabled = featureFlags.enableBridgelessArchitecture()
127
127
 
128
+ val (isValid, errorMessage) =
129
+ isConfigurationValid(
130
+ privateTurboModulesEnabled,
131
+ privateFabricEnabled,
132
+ privateBridgelessEnabled,
133
+ )
134
+ if (!isValid) {
135
+ error(errorMessage)
136
+ }
137
+
128
138
  DefaultSoLoader.maybeLoadSoLibrary()
129
139
  }
130
140
 
@@ -158,13 +168,13 @@ public object DefaultNewArchitectureEntryPoint {
158
168
  fabricEnabled: Boolean,
159
169
  bridgelessEnabled: Boolean,
160
170
  ): Pair<Boolean, String> =
161
- when {
162
- fabricEnabled && !turboModulesEnabled ->
163
- false to
164
- "fabricEnabled=true requires turboModulesEnabled=true (is now false) - Please update your DefaultNewArchitectureEntryPoint.load() parameters."
165
- bridgelessEnabled && (!turboModulesEnabled || !fabricEnabled) ->
166
- false to
167
- "bridgelessEnabled=true requires (turboModulesEnabled=true AND fabricEnabled=true) - Please update your DefaultNewArchitectureEntryPoint.load() parameters."
168
- else -> true to ""
171
+ if (!turboModulesEnabled || !fabricEnabled || !bridgelessEnabled) {
172
+ false to
173
+ "You cannot load React Native with the New Architecture disabled. " +
174
+ "Please use DefaultNewArchitectureEntryPoint.load() instead of " +
175
+ "DefaultNewArchitectureEntryPoint.load(turboModulesEnabled=$turboModulesEnabled, " +
176
+ "fabricEnabled=$fabricEnabled, bridgelessEnabled=$bridgelessEnabled)"
177
+ } else {
178
+ true to ""
169
179
  }
170
180
  }
@@ -15,6 +15,6 @@ public object ReactNativeVersion {
15
15
  "major" to 0,
16
16
  "minor" to 82,
17
17
  "patch" to 0,
18
- "prerelease" to "rc.3"
18
+ "prerelease" to "rc.4"
19
19
  )
20
20
  }
@@ -22,7 +22,7 @@ constexpr struct {
22
22
  int32_t Major = 0;
23
23
  int32_t Minor = 82;
24
24
  int32_t Patch = 0;
25
- std::string_view Prerelease = "rc.3";
25
+ std::string_view Prerelease = "rc.4";
26
26
  } ReactNativeVersion;
27
27
 
28
28
  } // namespace facebook::react
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native",
3
- "version": "0.82.0-rc.3",
3
+ "version": "0.82.0-rc.4",
4
4
  "description": "A framework for building native apps using React",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -162,13 +162,13 @@
162
162
  },
163
163
  "dependencies": {
164
164
  "@jest/create-cache-key-function": "^29.7.0",
165
- "@react-native/assets-registry": "0.82.0-rc.3",
166
- "@react-native/codegen": "0.82.0-rc.3",
167
- "@react-native/community-cli-plugin": "0.82.0-rc.3",
168
- "@react-native/gradle-plugin": "0.82.0-rc.3",
169
- "@react-native/js-polyfills": "0.82.0-rc.3",
170
- "@react-native/normalize-colors": "0.82.0-rc.3",
171
- "@react-native/virtualized-lists": "0.82.0-rc.3",
165
+ "@react-native/assets-registry": "0.82.0-rc.4",
166
+ "@react-native/codegen": "0.82.0-rc.4",
167
+ "@react-native/community-cli-plugin": "0.82.0-rc.4",
168
+ "@react-native/gradle-plugin": "0.82.0-rc.4",
169
+ "@react-native/js-polyfills": "0.82.0-rc.4",
170
+ "@react-native/normalize-colors": "0.82.0-rc.4",
171
+ "@react-native/virtualized-lists": "0.82.0-rc.4",
172
172
  "abort-controller": "^3.0.0",
173
173
  "anser": "^1.4.9",
174
174
  "ansi-regex": "^5.0.0",
@@ -80,7 +80,7 @@ Pod::Spec.new do |spec|
80
80
  )
81
81
 
82
82
  spec.user_target_xcconfig = {
83
- 'HERMES_CLI_PATH' => "#{hermes_compiler_path}/osx-bin/hermesc"
83
+ 'HERMES_CLI_PATH' => "#{hermes_compiler_path}/hermesc/osx-bin/hermesc"
84
84
  }
85
85
  end
86
86
 
@@ -228,8 +228,8 @@ def release_tarball_url(version, build_type)
228
228
  if hermes_v1_enabled()
229
229
  namespace = "com/facebook/hermes"
230
230
  # Sample url from Maven:
231
- # https://repo1.maven.org/maven2/com/facebook/hermes/hermes-ios/0.14.0/hermes-ios-0.14.0-debug.tar.gz
232
- return "#{maven_repo_url}/#{namespace}/hermes-ios/#{version}/hermes-ios-#{version}-#{build_type.to_s}.tar.gz"
231
+ # https://repo1.maven.org/maven2/com/facebook/hermes/hermes-ios/0.14.0/hermes-ios-0.14.0-hermes-ios-debug.tar.gz
232
+ return "#{maven_repo_url}/#{namespace}/hermes-ios/#{version}/hermes-ios-#{version}-hermes-ios-#{build_type.to_s}.tar.gz"
233
233
  else
234
234
  namespace = "com/facebook/react"
235
235
  # Sample url from Maven:
Binary file
Binary file
Binary file
@@ -38,3 +38,26 @@ project(":packages:react-native:ReactAndroid:hermes-engine").projectDir =
38
38
  project(":packages").projectDir = file("/tmp")
39
39
 
40
40
  project(":packages:react-native").projectDir = file("/tmp")
41
+
42
+ // Gradle properties defined in `gradle.properties` are not inherited by
43
+ // included builds, see https://github.com/gradle/gradle/issues/2534.
44
+ // This is a workaround to read the configuration from the consuming project,
45
+ // and apply relevant properties to the :react-native project.
46
+ buildscript {
47
+ val properties = java.util.Properties()
48
+ val propertiesToInherit = listOf("hermesV1Enabled", "react.hermesV1Enabled")
49
+
50
+ try {
51
+ file("../../android/gradle.properties").inputStream().use { properties.load(it) }
52
+
53
+ gradle.rootProject {
54
+ propertiesToInherit.forEach { property ->
55
+ if (properties.containsKey(property)) {
56
+ gradle.rootProject.extra.set(property, properties.getProperty(property))
57
+ }
58
+ }
59
+ }
60
+ } catch (e: Exception) {
61
+ // fail silently
62
+ }
63
+ }
@@ -58,4 +58,5 @@ export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
58
58
  export default (codegenNativeComponent<SwitchNativeProps>('Switch', {
59
59
  paperComponentName: 'RCTSwitch',
60
60
  excludedPlatforms: ['android'],
61
+ interfaceOnly: true,
61
62
  }): ComponentType);