react-native-macos 0.72.3 → 0.72.5

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.
@@ -12,6 +12,6 @@
12
12
  exports.version = {
13
13
  major: 0,
14
14
  minor: 72,
15
- patch: 3,
15
+ patch: 5,
16
16
  prerelease: null,
17
17
  };
@@ -23,7 +23,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
23
23
  __rnVersion = @{
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(72),
26
- RCTVersionPatch: @(3),
26
+ RCTVersionPatch: @(5),
27
27
  RCTVersionPrerelease: [NSNull null],
28
28
  };
29
29
  });
@@ -17,12 +17,23 @@ class JSCExecutorFactory : public JSExecutorFactory {
17
17
  explicit JSCExecutorFactory(JSIExecutor::RuntimeInstaller runtimeInstaller)
18
18
  : runtimeInstaller_(std::move(runtimeInstaller)) {}
19
19
 
20
+ // [macOS
21
+ void setEnableDebugger(bool enableDebugger);
22
+
23
+ void setDebuggerName(const std::string &debuggerName);
24
+ // macOS]
25
+
20
26
  std::unique_ptr<JSExecutor> createJSExecutor(
21
27
  std::shared_ptr<ExecutorDelegate> delegate,
22
28
  std::shared_ptr<MessageQueueThread> jsQueue) override;
23
29
 
24
30
  private:
25
31
  JSIExecutor::RuntimeInstaller runtimeInstaller_;
32
+
33
+ // [macOS
34
+ bool enableDebugger_ = true;
35
+ std::string debuggerName_ = "JSC React Native";
36
+ // macOS]
26
37
  };
27
38
 
28
39
  } // namespace react
@@ -14,12 +14,27 @@
14
14
  namespace facebook {
15
15
  namespace react {
16
16
 
17
+ // [macOS
18
+ void JSCExecutorFactory::setEnableDebugger(bool enableDebugger) {
19
+ enableDebugger_ = enableDebugger;
20
+ }
21
+
22
+ void JSCExecutorFactory::setDebuggerName(const std::string &debuggerName) {
23
+ debuggerName_ = debuggerName;
24
+ }
25
+ // macOS]
26
+
17
27
  std::unique_ptr<JSExecutor> JSCExecutorFactory::createJSExecutor(
18
28
  std::shared_ptr<ExecutorDelegate> delegate,
19
29
  std::shared_ptr<MessageQueueThread> __unused jsQueue)
20
30
  {
21
- return std::make_unique<JSIExecutor>(
22
- facebook::jsc::makeJSCRuntime(), delegate, JSIExecutor::defaultTimeoutInvoker, runtimeInstaller_);
31
+ // [macOS
32
+ facebook::jsc::RuntimeConfig rc = {
33
+ .enableDebugger = enableDebugger_,
34
+ .debuggerName = debuggerName_,
35
+ };
36
+ return std::make_unique<JSIExecutor>(facebook::jsc::makeJSCRuntime(std::move(rc)), delegate, JSIExecutor::defaultTimeoutInvoker, runtimeInstaller_);
37
+ // macOS]
23
38
  }
24
39
 
25
40
  } // namespace react
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.72.3
1
+ VERSION_NAME=0.72.5
2
2
  GROUP=com.facebook.react
3
3
 
4
4
  # JVM Versions
@@ -17,6 +17,6 @@ public class ReactNativeVersion {
17
17
  public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
18
18
  "major", 0,
19
19
  "minor", 72,
20
- "patch", 3,
20
+ "patch", 5,
21
21
  "prerelease", null);
22
22
  }
@@ -17,7 +17,7 @@ namespace facebook::react {
17
17
  constexpr struct {
18
18
  int32_t Major = 0;
19
19
  int32_t Minor = 72;
20
- int32_t Patch = 3;
20
+ int32_t Patch = 5;
21
21
  std::string_view Prerelease = "";
22
22
  } ReactNativeVersion;
23
23
 
@@ -36,6 +36,10 @@ class JSCRuntime : public jsi::Runtime {
36
36
  public:
37
37
  // Creates new context in new context group
38
38
  JSCRuntime();
39
+ // [macOS
40
+ // Creates new context in new context group with config
41
+ JSCRuntime(const facebook::jsc::RuntimeConfig& rc);
42
+ // macOS]
39
43
  // Retains ctx
40
44
  JSCRuntime(JSGlobalContextRef ctx);
41
45
  ~JSCRuntime();
@@ -293,7 +297,7 @@ class JSCRuntime : public jsi::Runtime {
293
297
  } \
294
298
  } while (0)
295
299
 
296
- #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
300
+ #if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) // [macOS]
297
301
  // This takes care of watch and tvos (due to backwards compatibility in
298
302
  // Availability.h
299
303
  #if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_9_0
@@ -316,6 +320,11 @@ class JSCRuntime : public jsi::Runtime {
316
320
  #if __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_12
317
321
  #define _JSC_NO_ARRAY_BUFFERS
318
322
  #endif
323
+ // [macOS
324
+ #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 130300
325
+ #define _JSC_HAS_INSPECTABLE
326
+ #endif
327
+ // macOS]
319
328
  #endif
320
329
 
321
330
  // JSStringRef utilities
@@ -392,6 +401,19 @@ JSCRuntime::JSCRuntime()
392
401
  JSGlobalContextRelease(ctx_);
393
402
  }
394
403
 
404
+ // [macOS
405
+ JSCRuntime::JSCRuntime(const facebook::jsc::RuntimeConfig& rc)
406
+ : JSCRuntime() {
407
+ #ifdef _JSC_HAS_INSPECTABLE
408
+ if (__builtin_available(macOS 13.3, iOS 16.4, tvOS 16.4, *)) {
409
+ JSGlobalContextSetInspectable(ctx_, rc.enableDebugger);
410
+ }
411
+ #endif
412
+ JSGlobalContextSetName(ctx_, JSStringCreateWithUTF8CString(rc.debuggerName.c_str()));
413
+
414
+ }
415
+ // macOS]
416
+
395
417
  JSCRuntime::JSCRuntime(JSGlobalContextRef ctx)
396
418
  : ctx_(JSGlobalContextRetain(ctx)),
397
419
  ctxInvalid_(false)
@@ -1567,5 +1589,11 @@ std::unique_ptr<jsi::Runtime> makeJSCRuntime() {
1567
1589
  return std::make_unique<JSCRuntime>();
1568
1590
  }
1569
1591
 
1592
+ // [macOS
1593
+ std::unique_ptr<jsi::Runtime> makeJSCRuntime(const facebook::jsc::RuntimeConfig& rc) {
1594
+ return std::make_unique<JSCRuntime>(rc);
1595
+ }
1596
+ // macOS]
1597
+
1570
1598
  } // namespace jsc
1571
1599
  } // namespace facebook
@@ -13,7 +13,16 @@
13
13
  namespace facebook {
14
14
  namespace jsc {
15
15
 
16
+ // [macOS
17
+ struct RuntimeConfig {
18
+ bool enableDebugger;
19
+ std::string debuggerName;
20
+ };
21
+ // macOS]
22
+
16
23
  std::unique_ptr<jsi::Runtime> makeJSCRuntime();
17
24
 
25
+ std::unique_ptr<jsi::Runtime> makeJSCRuntime(const facebook::jsc::RuntimeConfig& rc); // [macOS]
26
+
18
27
  } // namespace jsc
19
28
  } // namespace facebook
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-macos",
3
- "version": "0.72.3",
3
+ "version": "0.72.5",
4
4
  "bin": "./cli.js",
5
5
  "description": "React Native for macOS",
6
6
  "license": "MIT",
@@ -13,7 +13,7 @@
13
13
  "dependencies": {
14
14
  "react": "18.2.0",
15
15
  "react-native-macos": "1000.0.0",
16
- "react-native": "0.72.3"
16
+ "react-native": "0.72.5"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@babel/core": "^7.20.0",