react-native-macos 0.66.48 → 0.66.51

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: 66,
15
- patch: 48,
15
+ patch: 51,
16
16
  prerelease: null,
17
17
  };
@@ -23,7 +23,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
23
23
  __rnVersion = @{
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(66),
26
- RCTVersionPatch: @(48),
26
+ RCTVersionPatch: @(51),
27
27
  RCTVersionPrerelease: [NSNull null],
28
28
  };
29
29
  });
@@ -1501,6 +1501,7 @@ RCT_EXPORT_METHOD(clearJSResponder)
1501
1501
  static NSMutableDictionary<NSString *, id> *moduleConstantsForComponent(
1502
1502
  NSMutableDictionary<NSString *, NSDictionary *> *directEvents,
1503
1503
  NSMutableDictionary<NSString *, NSDictionary *> *bubblingEvents,
1504
+ NSMutableDictionary<NSString *, NSString *> *registrationCache, // TODO(macOS GH#774)
1504
1505
  RCTComponentData *componentData)
1505
1506
  {
1506
1507
  NSMutableDictionary<NSString *, id> *moduleConstants = [NSMutableDictionary new];
@@ -1520,6 +1521,8 @@ static NSMutableDictionary<NSString *, id> *moduleConstantsForComponent(
1520
1521
  moduleConstants[@"bubblingEventTypes"] = bubblingEventTypes;
1521
1522
  moduleConstants[@"directEventTypes"] = directEventTypes;
1522
1523
 
1524
+ NSString *componentName = [componentData name]; // TODO(macOS GH#774)
1525
+
1523
1526
  // Add direct events
1524
1527
  for (NSString *eventName in viewConfig[@"directEvents"]) {
1525
1528
  if (!directEvents[eventName]) {
@@ -1530,11 +1533,13 @@ static NSMutableDictionary<NSString *, id> *moduleConstantsForComponent(
1530
1533
  directEventTypes[eventName] = directEvents[eventName];
1531
1534
  if (RCT_DEBUG && bubblingEvents[eventName]) {
1532
1535
  RCTLogError(
1533
- @"Component '%@' re-registered bubbling event '%@' as a "
1536
+ @"Component '%@' re-registered bubbling event '%@' (originally registered by '%@') as a "
1534
1537
  "direct event",
1535
- componentData.name,
1536
- eventName);
1538
+ componentName,
1539
+ eventName,
1540
+ registrationCache[eventName] ?: @"<unknown>"); // TODO(macOS GH#774)
1537
1541
  }
1542
+ registrationCache[eventName] = componentName; // TODO(macOS GH#774)
1538
1543
  }
1539
1544
 
1540
1545
  // Add bubbling events
@@ -1551,11 +1556,13 @@ static NSMutableDictionary<NSString *, id> *moduleConstantsForComponent(
1551
1556
  bubblingEventTypes[eventName] = bubblingEvents[eventName];
1552
1557
  if (RCT_DEBUG && directEvents[eventName]) {
1553
1558
  RCTLogError(
1554
- @"Component '%@' re-registered direct event '%@' as a "
1559
+ @"Component '%@' re-registered direct event '%@' (originally registered by '%@') as a "
1555
1560
  "bubbling event",
1556
- componentData.name,
1557
- eventName);
1561
+ componentName,
1562
+ eventName,
1563
+ registrationCache[eventName] ?: @"<unknown>"); // TODO(macOS GH#774)
1558
1564
  }
1565
+ registrationCache[eventName] = componentName; // TODO(macOS GH#774)
1559
1566
  }
1560
1567
 
1561
1568
  return moduleConstants;
@@ -1571,12 +1578,13 @@ static NSMutableDictionary<NSString *, id> *moduleConstantsForComponent(
1571
1578
  NSMutableDictionary<NSString *, NSDictionary *> *constants = [NSMutableDictionary new];
1572
1579
  NSMutableDictionary<NSString *, NSDictionary *> *directEvents = [NSMutableDictionary new];
1573
1580
  NSMutableDictionary<NSString *, NSDictionary *> *bubblingEvents = [NSMutableDictionary new];
1581
+ NSMutableDictionary<NSString *, NSString *> *registrationCache = [NSMutableDictionary new]; // TODO(macOS GH#774)
1574
1582
 
1575
1583
  [_componentDataByName
1576
1584
  enumerateKeysAndObjectsUsingBlock:^(NSString *name, RCTComponentData *componentData, __unused BOOL *stop) {
1577
1585
  RCTAssert(!constants[name], @"UIManager already has constants for %@", componentData.name);
1578
1586
  NSMutableDictionary<NSString *, id> *moduleConstants =
1579
- moduleConstantsForComponent(directEvents, bubblingEvents, componentData);
1587
+ moduleConstantsForComponent(directEvents, bubblingEvents, registrationCache, componentData); // TODO(macOS GH#774)
1580
1588
  constants[name] = moduleConstants;
1581
1589
  }];
1582
1590
 
@@ -1621,10 +1629,11 @@ RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(lazilyLoadView : (NSString *)name)
1621
1629
  bridge:self.bridge
1622
1630
  eventDispatcher:self.bridge.eventDispatcher];
1623
1631
  _componentDataByName[componentData.name] = componentData;
1624
- NSMutableDictionary *directEvents = [NSMutableDictionary new];
1625
- NSMutableDictionary *bubblingEvents = [NSMutableDictionary new];
1632
+ NSMutableDictionary<NSString *, NSDictionary *> *directEvents = [NSMutableDictionary new];
1633
+ NSMutableDictionary<NSString *, NSDictionary *> *bubblingEvents = [NSMutableDictionary new];
1634
+ NSMutableDictionary<NSString *, NSString *> *registrationCache = [NSMutableDictionary new]; // TODO(macOS GH#774)
1626
1635
  NSMutableDictionary<NSString *, id> *moduleConstants =
1627
- moduleConstantsForComponent(directEvents, bubblingEvents, componentData);
1636
+ moduleConstantsForComponent(directEvents, bubblingEvents, registrationCache, componentData); // TODO(macOS GH#774)
1628
1637
  return @{
1629
1638
  @"viewConfig" : moduleConstants,
1630
1639
  };
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.66.48
1
+ VERSION_NAME=0.66.51
2
2
  GROUP=com.facebook.react
3
3
 
4
4
  POM_NAME=ReactNative
@@ -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", 66,
20
- "patch", 48,
20
+ "patch", 51,
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 = 66;
20
- int32_t Patch = 48;
20
+ int32_t Patch = 51;
21
21
  std::string_view Prerelease = "";
22
22
  } ReactNativeVersion;
23
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-macos",
3
- "version": "0.66.48",
3
+ "version": "0.66.51",
4
4
  "bin": "./cli.js",
5
5
  "description": "React Native for macOS",
6
6
  "license": "MIT",
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "react": "17.0.2",
14
- "react-native": "0.66.48"
14
+ "react-native": "0.66.51"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@babel/core": "^7.12.9",