@rnx-kit/react-native-host 0.5.13 → 0.5.14

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.
@@ -10,8 +10,10 @@ repo_dir = repository['directory']
10
10
 
11
11
  new_arch_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
12
12
  preprocessor_definitions = [
13
- '$(inherit)',
13
+ '$(inherited)',
14
14
  "USE_HERMES=#{ENV['USE_HERMES'] || '0'}",
15
+ "USE_THIRD_PARTY_JSC=#{ENV['USE_THIRD_PARTY_JSC'] || '0'}",
16
+ "USE_V8=#{ENV['USE_V8'] || '0'}",
15
17
  ]
16
18
  if new_arch_enabled
17
19
  preprocessor_definitions << 'RCT_NEW_ARCH_ENABLED=1'
@@ -49,6 +51,7 @@ Pod::Spec.new do |s|
49
51
  'CLANG_CXX_LANGUAGE_STANDARD' => 'c++20',
50
52
  'DEFINES_MODULE' => 'YES',
51
53
  'GCC_PREPROCESSOR_DEFINITIONS' => preprocessor_definitions,
54
+ 'CPP_PREPROCESSOR_DEFINITIONS' => preprocessor_definitions,
52
55
  'HEADER_SEARCH_PATHS' => [
53
56
  '$(PODS_ROOT)/Headers/Private/React-Core',
54
57
  '$(PODS_CONFIGURATION_BUILD_DIR)/React-RuntimeApple/React_RuntimeApple.framework/Headers',
@@ -8,9 +8,13 @@
8
8
 
9
9
  #if USE_HERMES
10
10
  #import <ReactCommon/RCTHermesInstance.h>
11
+ #elif USE_V8
12
+ #import <v8runtime/V8ExecutorFactory.h>
13
+ #elif __has_include(<React-jsc/RCTJscInstance.h>)
14
+ #import <React-jsc/RCTJscInstance.h>
11
15
  #else
12
- #import <ReactCommon/RCTJscInstance.h>
13
- #endif // USE_HERMES
16
+ #import <ReactCommon/RCTJscInstance.h> // RN pre 0.80
17
+ #endif // USE_HERMES
14
18
 
15
19
  #ifdef USE_REACT_NATIVE_CONFIG
16
20
  #import <react/config/ReactNativeConfig.h>
@@ -296,9 +296,11 @@ using ReactNativeConfig = facebook::react::EmptyReactNativeConfig const;
296
296
  #else
297
297
  return std::make_shared<facebook::react::RCTHermesInstance>(nullptr, false);
298
298
  #endif // USE_REACT_NATIVE_CONFIG
299
- #else // USE_HERMES
299
+ #elif USE_V8
300
+ return std::make_shared<facebook::react::V8ExecutorFactory>();
301
+ #else
300
302
  return std::make_shared<facebook::react::RCTJscInstance>();
301
- #endif // USE_HERMES
303
+ #endif
302
304
  };
303
305
 
304
306
  __weak __typeof(self) weakSelf = self;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rnx-kit/react-native-host",
3
- "version": "0.5.13",
3
+ "version": "0.5.14",
4
4
  "description": "Simplify React Native initialization",
5
5
  "homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/react-native-host#readme",
6
6
  "license": "MIT",