react-native 0.72.0-rc.2 → 0.72.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.
Files changed (67) hide show
  1. package/Libraries/AppDelegate/RCTAppDelegate.h +5 -0
  2. package/Libraries/AppDelegate/RCTAppDelegate.mm +30 -9
  3. package/Libraries/AppDelegate/RCTAppSetupUtils.h +8 -2
  4. package/Libraries/AppDelegate/RCTAppSetupUtils.mm +25 -1
  5. package/Libraries/AppDelegate/React-RCTAppDelegate.podspec +16 -0
  6. package/Libraries/Components/TextInput/TextInput.d.ts +121 -86
  7. package/Libraries/Components/TextInput/TextInput.flow.js +121 -135
  8. package/Libraries/Components/TextInput/TextInput.js +121 -135
  9. package/Libraries/Core/ReactNativeVersion.js +1 -1
  10. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +0 -2
  11. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -13
  12. package/React/Base/RCTJavaScriptLoader.mm +11 -1
  13. package/React/Base/RCTRuntimeExecutorFromBridge.h +19 -0
  14. package/React/Base/RCTRuntimeExecutorFromBridge.mm +56 -0
  15. package/React/Base/RCTVersion.m +1 -1
  16. package/React/CxxBridge/RCTCxxBridge.mm +9 -4
  17. package/React/Fabric/Mounting/ComponentViews/Image/RCTImageComponentView.mm +12 -1
  18. package/React/Fabric/RCTSurfacePresenter.mm +4 -0
  19. package/React/Fabric/RCTSurfacePresenterBridgeAdapter.h +0 -3
  20. package/React/Fabric/RCTSurfacePresenterBridgeAdapter.mm +1 -37
  21. package/React/React-RCTFabric.podspec +14 -1
  22. package/React-Core.podspec +6 -4
  23. package/ReactAndroid/build.gradle +4 -1
  24. package/ReactAndroid/cmake-utils/ReactNative-application.cmake +14 -1
  25. package/ReactAndroid/gradle.properties +1 -1
  26. package/ReactAndroid/hermes-engine/build.gradle +5 -0
  27. package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +9 -0
  28. package/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +7 -0
  29. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
  30. package/ReactAndroid/src/main/jni/CMakeLists.txt +0 -1
  31. package/ReactCommon/React-Fabric.podspec +13 -23
  32. package/ReactCommon/ReactCommon.podspec +0 -4
  33. package/ReactCommon/cxxreact/React-cxxreact.podspec +1 -1
  34. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  35. package/ReactCommon/react/debug/React-debug.podspec +36 -0
  36. package/ReactCommon/react/renderer/core/CoreFeatures.cpp +1 -0
  37. package/ReactCommon/react/renderer/core/CoreFeatures.h +4 -0
  38. package/ReactCommon/react/renderer/imagemanager/ImageRequest.h +7 -3
  39. package/ReactCommon/react/renderer/imagemanager/platform/cxx/react/renderer/imagemanager/ImageRequest.cpp +0 -11
  40. package/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec +5 -0
  41. package/ReactCommon/react/renderer/imagemanager/platform/ios/react/renderer/imagemanager/ImageRequest.cpp +4 -14
  42. package/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec +66 -0
  43. package/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerBinding.cpp +2 -1
  44. package/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerBinding.h +2 -1
  45. package/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerCallInvoker.cpp +1 -0
  46. package/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerCallInvoker.h +2 -1
  47. package/ReactCommon/react/renderer/runtimescheduler/primitives.h +3 -15
  48. package/ReactCommon/react/renderer/scheduler/SchedulerToolbox.h +1 -1
  49. package/ReactCommon/react/utils/React-utils.podspec +57 -0
  50. package/package.json +10 -10
  51. package/scripts/cocoapods/__tests__/codegen_utils-test.rb +7 -2
  52. package/scripts/cocoapods/__tests__/flipper-test.rb +9 -1
  53. package/scripts/cocoapods/__tests__/new_architecture-test.rb +9 -3
  54. package/scripts/cocoapods/__tests__/utils-test.rb +0 -68
  55. package/scripts/cocoapods/codegen_utils.rb +6 -0
  56. package/scripts/cocoapods/flipper.rb +2 -2
  57. package/scripts/cocoapods/new_architecture.rb +13 -0
  58. package/scripts/cocoapods/utils.rb +0 -7
  59. package/scripts/react-native-xcode.sh +1 -1
  60. package/scripts/react_native_pods.rb +6 -6
  61. package/sdks/hermesc/linux64-bin/hermesc +0 -0
  62. package/sdks/hermesc/osx-bin/hermesc +0 -0
  63. package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
  64. package/template/android/app/build.gradle +0 -7
  65. package/template/ios/Podfile +1 -1
  66. package/template/package.json +6 -6
  67. package/types/experimental.d.ts +101 -0
@@ -550,6 +550,7 @@ class CodegenUtilsTests < Test::Unit::TestCase
550
550
  ].join(' ')
551
551
  },
552
552
  'dependencies': {
553
+ "DoubleConversion": [],
553
554
  "FBReactNativeSpec": [],
554
555
  "RCT-Folly": [],
555
556
  "RCTRequired": [],
@@ -561,6 +562,7 @@ class CodegenUtilsTests < Test::Unit::TestCase
561
562
  "ReactCommon/turbomodule/bridging": [],
562
563
  "ReactCommon/turbomodule/core": [],
563
564
  "hermes-engine": [],
565
+ "glog": [],
564
566
  'React-NativeModulesApple': [],
565
567
  }
566
568
  }
@@ -573,7 +575,8 @@ class CodegenUtilsTests < Test::Unit::TestCase
573
575
  'React-graphics': [],
574
576
  'React-rncore': [],
575
577
  'React-Fabric': [],
576
-
578
+ 'React-utils': [],
579
+ 'React-debug': [],
577
580
  })
578
581
 
579
582
  specs[:'script_phases'] = script_phases
@@ -585,11 +588,13 @@ class CodegenUtilsTests < Test::Unit::TestCase
585
588
  specs = get_podspec_no_fabric_no_script()
586
589
 
587
590
  specs["pod_target_xcconfig"]["FRAMEWORK_SEARCH_PATHS"].concat([])
588
- specs["pod_target_xcconfig"]["HEADER_SEARCH_PATHS"].concat(" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_TARGET_SRCROOT)\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-Fabric/React_Fabric.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-graphics/React_graphics.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\" \"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-RCTFabric/RCTFabric.framework/Headers\"")
591
+ specs["pod_target_xcconfig"]["HEADER_SEARCH_PATHS"].concat(" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_TARGET_SRCROOT)\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-Fabric/React_Fabric.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-graphics/React_graphics.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\" \"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-RCTFabric/RCTFabric.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-debug/React_debug.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-utils/React_utils.framework/Headers\"")
589
592
 
590
593
  specs[:dependencies].merge!({
591
594
  'React-graphics': [],
592
595
  'React-Fabric': [],
596
+ 'React-utils': [],
597
+ 'React-debug': [],
593
598
  })
594
599
 
595
600
  return specs
@@ -82,7 +82,7 @@ class FlipperTests < Test::Unit::TestCase
82
82
  assert_equal(config.build_settings['SWIFT_VERSION'], '4.1')
83
83
  end
84
84
 
85
- reactCore_target = installer.target_with_name("React-Core")
85
+ reactCore_target = installer.target_with_name("React-RCTAppDelegate")
86
86
  reactCore_target.build_configurations.each do |config|
87
87
  if config.name == 'Debug' || config.name == 'CustomConfig' then
88
88
  assert_equal(config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'], ['$(inherited)', 'FB_SONARKIT_ENABLED=1'])
@@ -144,6 +144,14 @@ class FlipperTests < Test::Unit::TestCase
144
144
  BuildConfigurationMock.new("Release", is_debug: false),
145
145
  BuildConfigurationMock.new("CustomConfig", is_debug: true),
146
146
  ]
147
+ ),
148
+ TargetMock.new(
149
+ "React-RCTAppDelegate",
150
+ [
151
+ BuildConfigurationMock.new("Debug", is_debug: true),
152
+ BuildConfigurationMock.new("Release", is_debug: false),
153
+ BuildConfigurationMock.new("CustomConfig", is_debug: true),
154
+ ]
147
155
  )
148
156
  ]
149
157
  )
@@ -129,7 +129,7 @@ class NewArchitectureTests < Test::Unit::TestCase
129
129
 
130
130
  # Assert
131
131
  assert_equal(spec.compiler_flags, NewArchitectureHelper.folly_compiler_flags)
132
- assert_equal(spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"], "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\"")
132
+ assert_equal(spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"], "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-utils/React_utils.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\"")
133
133
  assert_equal(spec.pod_target_xcconfig["CLANG_CXX_LANGUAGE_STANDARD"], "c++17")
134
134
  assert_equal(spec.pod_target_xcconfig["OTHER_CPLUSPLUSFLAGS"], "$(inherited) -DRCT_NEW_ARCH_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1")
135
135
  assert_equal(
@@ -143,7 +143,13 @@ class NewArchitectureTests < Test::Unit::TestCase
143
143
  { :dependency_name => "RCTTypeSafety" },
144
144
  { :dependency_name => "ReactCommon/turbomodule/bridging" },
145
145
  { :dependency_name => "ReactCommon/turbomodule/core" },
146
- { :dependency_name => "React-NativeModulesApple" }
146
+ { :dependency_name => "React-NativeModulesApple" },
147
+ { :dependency_name => "Yoga" },
148
+ { :dependency_name => "React-Fabric" },
149
+ { :dependency_name => "React-graphics" },
150
+ { :dependency_name => "React-utils" },
151
+ { :dependency_name => "React-debug" },
152
+ { :dependency_name => "hermes-engine" }
147
153
  ])
148
154
  end
149
155
 
@@ -161,7 +167,7 @@ class NewArchitectureTests < Test::Unit::TestCase
161
167
 
162
168
  # Assert
163
169
  assert_equal(spec.compiler_flags, "-Wno-nullability-completeness #{NewArchitectureHelper.folly_compiler_flags}")
164
- assert_equal(spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"], "#{other_flags} \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\"")
170
+ assert_equal(spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"], "#{other_flags} \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-utils/React_utils.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\"")
165
171
  assert_equal(spec.pod_target_xcconfig["CLANG_CXX_LANGUAGE_STANDARD"], "c++17")
166
172
  assert_equal(
167
173
  spec.dependencies,
@@ -677,74 +677,6 @@ class UtilsTests < Test::Unit::TestCase
677
677
  assert_equal(config.build_settings["OTHER_CFLAGS"], "$(inherited)")
678
678
  end
679
679
  end
680
-
681
- # ============================= #
682
- # Test - Enable Hermes Profiler #
683
- # ============================= #
684
-
685
- def test_enableHermesProfiler_whenEnableHermesProfileIsTrue_setsFlagsInRelease
686
- # Arrange
687
- first_target = prepare_target("FirstTarget")
688
- second_target = prepare_target("SecondTarget")
689
- third_target = prepare_target("ThirdTarget", "com.apple.product-type.bundle")
690
- user_project_mock = UserProjectMock.new("a/path", [
691
- prepare_config("Debug"),
692
- prepare_config("Release"),
693
- ],
694
- :native_targets => [
695
- first_target,
696
- second_target
697
- ]
698
- )
699
- pods_projects_mock = PodsProjectMock.new([third_target], {"hermes-engine" => {}})
700
- installer = InstallerMock.new(pods_projects_mock, [
701
- AggregatedProjectMock.new(user_project_mock)
702
- ])
703
-
704
- # Act
705
- ReactNativePodsUtils.enable_hermes_profiler(installer, enable_hermes_profiler: true)
706
-
707
- # Assert
708
- installer.target_installation_results.pod_target_installation_results.each do |pod_name, target_installation_result|
709
- target_installation_result.native_target.build_configurations.each do |config|
710
- if config.name != "Release"
711
- assert_nil(config.build_settings["OTHER_CFLAGS"])
712
- else
713
- assert_equal(config.build_settings["OTHER_CFLAGS"], "$(inherited) -DRCT_REMOTE_PROFILE=1")
714
- end
715
- end
716
- end
717
- end
718
-
719
- def test_enableHermesProfiler_whenEnableHermesProfileIsFalse_doesNothing
720
- # Arrange
721
- first_target = prepare_target("FirstTarget")
722
- second_target = prepare_target("SecondTarget")
723
- third_target = prepare_target("ThirdTarget", "com.apple.product-type.bundle")
724
- user_project_mock = UserProjectMock.new("a/path", [
725
- prepare_config("Debug"),
726
- prepare_config("Release"),
727
- ],
728
- :native_targets => [
729
- first_target,
730
- second_target
731
- ]
732
- )
733
- pods_projects_mock = PodsProjectMock.new([third_target], {"hermes-engine" => {}})
734
- installer = InstallerMock.new(pods_projects_mock, [
735
- AggregatedProjectMock.new(user_project_mock)
736
- ])
737
-
738
- # Act
739
- ReactNativePodsUtils.enable_hermes_profiler(installer)
740
-
741
- # Assert
742
- installer.target_installation_results.pod_target_installation_results.each do |pod_name, target_installation_result|
743
- target_installation_result.native_target.build_configurations.each do |config|
744
- assert_nil(config.build_settings["OTHER_CFLAGS"])
745
- end
746
- end
747
- end
748
680
  end
749
681
 
750
682
  # ===== #
@@ -97,6 +97,8 @@ class CodegenUtils
97
97
  "\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"",
98
98
  "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"",
99
99
  "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-RCTFabric/RCTFabric.framework/Headers\"",
100
+ "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-debug/React_debug.framework/Headers\"",
101
+ "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-utils/React_utils.framework/Headers\"",
100
102
  ])
101
103
  end
102
104
 
@@ -128,6 +130,8 @@ class CodegenUtils
128
130
  "ReactCommon/turbomodule/bridging": [],
129
131
  "ReactCommon/turbomodule/core": [],
130
132
  "React-NativeModulesApple": [],
133
+ "glog": [],
134
+ "DoubleConversion": [],
131
135
  }
132
136
  }
133
137
 
@@ -135,6 +139,8 @@ class CodegenUtils
135
139
  spec[:'dependencies'].merge!({
136
140
  'React-graphics': [],
137
141
  'React-Fabric': [],
142
+ 'React-debug': [],
143
+ 'React-utils': [],
138
144
  });
139
145
  end
140
146
 
@@ -77,8 +77,8 @@ def flipper_post_install(installer)
77
77
  end
78
78
  end
79
79
 
80
- # Enable flipper for React-Core Debug configuration
81
- if target.name == 'React-Core'
80
+ # Enable flipper for React-RCTAppDelegate Debug configuration
81
+ if target.name == 'React-RCTAppDelegate'
82
82
  target.build_configurations.each do |config|
83
83
  if config.debug?
84
84
  config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = ['$(inherited)', 'FB_SONARKIT_ENABLED=1']
@@ -96,6 +96,8 @@ class NewArchitectureHelper
96
96
  header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\""
97
97
  header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\""
98
98
  header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\""
99
+ header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-utils/React_utils.framework/Headers\""
100
+ header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\""
99
101
  end
100
102
  header_search_paths_string = header_search_paths.join(" ")
101
103
  spec.compiler_flags = compiler_flags.empty? ? @@folly_compiler_flags : "#{compiler_flags} #{@@folly_compiler_flags}"
@@ -118,6 +120,17 @@ class NewArchitectureHelper
118
120
  spec.dependency "ReactCommon/turbomodule/bridging"
119
121
  spec.dependency "ReactCommon/turbomodule/core"
120
122
  spec.dependency "React-NativeModulesApple"
123
+ spec.dependency "Yoga"
124
+ spec.dependency "React-Fabric"
125
+ spec.dependency "React-graphics"
126
+ spec.dependency "React-utils"
127
+ spec.dependency "React-debug"
128
+
129
+ if ENV["USE_HERMES"] == nil || ENV["USE_HERMES"] == "1"
130
+ spec.dependency "hermes-engine"
131
+ else
132
+ spec.dependency "React-jsi"
133
+ end
121
134
  end
122
135
 
123
136
  spec.pod_target_xcconfig = current_config
@@ -220,13 +220,6 @@ class ReactNativePodsUtils
220
220
  end
221
221
  end
222
222
 
223
- def self.enable_hermes_profiler(installer, enable_hermes_profiler: false)
224
- return if !enable_hermes_profiler
225
-
226
- Pod::UI.puts "[Hermes Profiler] Enable Hermes Sample profiler"
227
- self.add_compiler_flag_to_pods(installer, "-DRCT_REMOTE_PROFILE=1", configuration: "Release")
228
- end
229
-
230
223
  # ========= #
231
224
  # Utilities #
232
225
  # ========= #
@@ -176,7 +176,7 @@ else
176
176
  if [[ $EMIT_SOURCEMAP == true ]]; then
177
177
  EXTRA_COMPILER_ARGS="$EXTRA_COMPILER_ARGS -output-source-map"
178
178
  fi
179
- "$HERMES_CLI_PATH" -emit-binary $EXTRA_COMPILER_ARGS -out "$DEST/main.jsbundle" "$BUNDLE_FILE"
179
+ "$HERMES_CLI_PATH" -emit-binary -max-diagnostic-width=80 "$EXTRA_COMPILER_ARGS" -out "$DEST/main.jsbundle" "$BUNDLE_FILE"
180
180
  if [[ $EMIT_SOURCEMAP == true ]]; then
181
181
  HBC_SOURCEMAP_FILE="$DEST/main.jsbundle.map"
182
182
  "$NODE_BINARY" "$COMPOSE_SOURCEMAP_PATH" "$PACKAGER_SOURCEMAP_FILE" "$HBC_SOURCEMAP_FILE" -o "$SOURCEMAP_FILE"
@@ -117,6 +117,8 @@ def use_react_native! (
117
117
  pod 'React-Core/RCTWebSocket', :path => "#{prefix}/"
118
118
  pod 'React-rncore', :path => "#{prefix}/ReactCommon"
119
119
  pod 'React-cxxreact', :path => "#{prefix}/ReactCommon/cxxreact"
120
+ pod 'React-debug', :path => "#{prefix}/ReactCommon/react/debug"
121
+ pod 'React-utils', :path => "#{prefix}/ReactCommon/react/utils"
120
122
 
121
123
  if hermes_enabled
122
124
  setup_hermes!(:react_native_path => prefix, :fabric_enabled => fabric_enabled)
@@ -129,6 +131,7 @@ def use_react_native! (
129
131
 
130
132
  pod 'React-callinvoker', :path => "#{prefix}/ReactCommon/callinvoker"
131
133
  pod 'React-runtimeexecutor', :path => "#{prefix}/ReactCommon/runtimeexecutor"
134
+ pod 'React-runtimescheduler', :path => "#{prefix}/ReactCommon/react/renderer/runtimescheduler"
132
135
  pod 'React-perflogger', :path => "#{prefix}/ReactCommon/reactperflogger"
133
136
  pod 'React-logger', :path => "#{prefix}/ReactCommon/logger"
134
137
  pod 'ReactCommon/turbomodule/core', :path => "#{prefix}/ReactCommon", :modular_headers => true
@@ -222,11 +225,10 @@ end
222
225
  # - mac_catalyst_enabled: whether we are running the Pod on a Mac Catalyst project or not.
223
226
  # - enable_hermes_profiler: whether the hermes profiler should be turned on in Release mode
224
227
  def react_native_post_install(
225
- installer, react_native_path = "../node_modules/react-native",
226
- mac_catalyst_enabled: false,
227
- enable_hermes_profiler: false
228
+ installer,
229
+ react_native_path = "../node_modules/react-native",
230
+ mac_catalyst_enabled: false
228
231
  )
229
- enable_hermes_profiler = enable_hermes_profiler || ENV["ENABLE_HERMES_PROFILER"] == "1"
230
232
  ReactNativePodsUtils.turn_off_resource_bundle_react_core(installer)
231
233
 
232
234
  ReactNativePodsUtils.apply_mac_catalyst_patches(installer) if mac_catalyst_enabled
@@ -242,13 +244,11 @@ def react_native_post_install(
242
244
  ReactNativePodsUtils.update_search_paths(installer)
243
245
  ReactNativePodsUtils.set_node_modules_user_settings(installer, react_native_path)
244
246
  ReactNativePodsUtils.apply_flags_for_fabric(installer, fabric_enabled: fabric_enabled)
245
- ReactNativePodsUtils.enable_hermes_profiler(installer, enable_hermes_profiler: enable_hermes_profiler)
246
247
 
247
248
  NewArchitectureHelper.set_clang_cxx_language_standard_if_needed(installer)
248
249
  is_new_arch_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == "1"
249
250
  NewArchitectureHelper.modify_flags_for_new_architecture(installer, is_new_arch_enabled)
250
251
 
251
-
252
252
  Pod::UI.puts "Pod install took #{Time.now.to_i - $START_TIME} [s] to run".green
253
253
  end
254
254
 
Binary file
Binary file
Binary file
@@ -1,10 +1,3 @@
1
- /*
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
1
  apply plugin: "com.android.application"
9
2
  apply plugin: "com.facebook.react"
10
3
 
@@ -51,7 +51,7 @@ target 'HelloWorld' do
51
51
  end
52
52
 
53
53
  post_install do |installer|
54
- # https://github.com/facebook/react-native/blob/main/scripts/react_native_pods.rb#L197-L202
54
+ # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
55
55
  react_native_post_install(
56
56
  installer,
57
57
  config[:reactNativePath],
@@ -11,22 +11,22 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "react": "18.2.0",
14
- "react-native": "0.72.0-rc.2"
14
+ "react-native": "0.72.0-rc.4"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@babel/core": "^7.20.0",
18
18
  "@babel/preset-env": "^7.20.0",
19
- "@babel/runtime": "^7.12.5",
20
- "@react-native/eslint-config": "^0.72.1",
21
- "@react-native/metro-config": "^0.72.1",
19
+ "@babel/runtime": "^7.20.0",
20
+ "@react-native/eslint-config": "^0.72.2",
21
+ "@react-native/metro-config": "^0.72.6",
22
22
  "@tsconfig/react-native": "^3.0.0",
23
- "@types/metro-config": "^0.76.2",
23
+ "@types/metro-config": "^0.76.3",
24
24
  "@types/react": "^18.0.24",
25
25
  "@types/react-test-renderer": "^18.0.0",
26
26
  "babel-jest": "^29.2.1",
27
27
  "eslint": "^8.19.0",
28
28
  "jest": "^29.2.1",
29
- "metro-react-native-babel-preset": "0.76.2",
29
+ "metro-react-native-babel-preset": "0.76.5",
30
30
  "prettier": "^2.4.1",
31
31
  "react-test-renderer": "18.2.0",
32
32
  "typescript": "4.8.4"
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @format
8
+ */
9
+
10
+ /**
11
+ * These are types for things that are present for New Architecture enabled apps
12
+ * which is currently considered experimental.
13
+ *
14
+ * To load the types declared here in an actual project, there are three ways.
15
+ *
16
+ * 1. If your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
17
+ * is to add `"react-native/types/experimental"` to the `"types"` array.
18
+ *
19
+ * 2. Alternatively, a specific import syntax can to be used from a typescript file.
20
+ * This module does not exist in reality, which is why the {} is important:
21
+ *
22
+ * ```ts
23
+ * import {} from 'react-native/types/experimental'
24
+ * ```
25
+ *
26
+ * 3. It is also possible to include it through a triple-slash reference:
27
+ *
28
+ * ```ts
29
+ * /// <reference types="react-native/types/experimental" />
30
+ * ```
31
+ *
32
+ * Either the import or the reference only needs to appear once, anywhere in the project.
33
+ */
34
+
35
+ import {DimensionValue} from 'react-native/Libraries/StyleSheet/StyleSheetTypes';
36
+
37
+ export {};
38
+
39
+ declare module '.' {
40
+ export interface FlexStyle {
41
+ /**
42
+ * Equivalent to `marginVertical`
43
+ */
44
+ marginBlock?: DimensionValue | undefined;
45
+
46
+ /**
47
+ * Equivalent to `marginBottom`
48
+ */
49
+ marginBlockEnd?: DimensionValue | undefined;
50
+
51
+ /**
52
+ * Equivalent to `marginTop`
53
+ */
54
+ marginBlockStart?: DimensionValue | undefined;
55
+
56
+ /**
57
+ * Equivalent to `marginHorizontal`
58
+ */
59
+ marginInline?: DimensionValue | undefined;
60
+
61
+ /**
62
+ * Equivalent to `marginEnd`
63
+ */
64
+ marginInlineEnd?: DimensionValue | undefined;
65
+
66
+ /**
67
+ * Equivalent to `marginStart`
68
+ */
69
+ marginInlineStart?: DimensionValue | undefined;
70
+
71
+ /**
72
+ * Equivalent to `paddingVertical`
73
+ */
74
+ paddingBlock?: DimensionValue | undefined;
75
+
76
+ /**
77
+ * Equivalent to `paddingBottom`
78
+ */
79
+ paddingBlockEnd?: DimensionValue | undefined;
80
+
81
+ /**
82
+ * Equivalent to `paddingTop`
83
+ */
84
+ paddingBlockStart?: DimensionValue | undefined;
85
+
86
+ /**
87
+ * Equivalent to `paddingHorizontal`
88
+ */
89
+ paddingInline?: DimensionValue | undefined;
90
+
91
+ /**
92
+ * Equivalent to `paddingEnd`
93
+ */
94
+ paddingInlineEnd?: DimensionValue | undefined;
95
+
96
+ /**
97
+ * Equivalent to `paddingStart`
98
+ */
99
+ paddingInlineStart?: DimensionValue | undefined;
100
+ }
101
+ }