react-native-macos 0.76.0 → 0.76.2

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.
@@ -90,6 +90,7 @@
90
90
  #endif // [visionOS]
91
91
  UIViewController *rootViewController = [self createRootViewController];
92
92
  [self setRootView:rootView toRootViewController:rootViewController];
93
+ _window.windowScene.delegate = self;
93
94
  _window.rootViewController = rootViewController;
94
95
  [_window makeKeyAndVisible];
95
96
  #else // [macOS
@@ -16,7 +16,7 @@ const version: $ReadOnly<{
16
16
  }> = {
17
17
  major: 0,
18
18
  minor: 76,
19
- patch: 0,
19
+ patch: 2,
20
20
  prerelease: null,
21
21
  };
22
22
 
@@ -13,7 +13,7 @@ import type {RootTag} from '../Types/RootTagTypes';
13
13
  import type {IPerformanceLogger} from '../Utilities/createPerformanceLogger';
14
14
  import type {DisplayModeType} from './DisplayMode';
15
15
 
16
- import BatchedBridge from '../BatchedBridge/BatchedBridge';
16
+ import registerCallableModule from '../Core/registerCallableModule';
17
17
  import BugReporting from '../BugReporting/BugReporting';
18
18
  import createPerformanceLogger from '../Utilities/createPerformanceLogger';
19
19
  import infoLog from '../Utilities/infoLog';
@@ -363,8 +363,8 @@ global.RN$SurfaceRegistry = {
363
363
 
364
364
  if (global.RN$Bridgeless === true) {
365
365
  console.log('Bridgeless mode is enabled');
366
- } else {
367
- BatchedBridge.registerCallableModule('AppRegistry', AppRegistry);
368
366
  }
369
367
 
368
+ registerCallableModule('AppRegistry', AppRegistry);
369
+
370
370
  module.exports = AppRegistry;
@@ -23,7 +23,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
23
23
  __rnVersion = @{
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(76),
26
- RCTVersionPatch: @(0),
26
+ RCTVersionPatch: @(2),
27
27
  RCTVersionPrerelease: [NSNull null],
28
28
  };
29
29
  });
@@ -983,6 +983,8 @@ static RCTCursor RCTCursorFromCursor(Cursor cursor)
983
983
  _backgroundColorLayer.mask = maskLayer;
984
984
  _backgroundColorLayer.cornerRadius = 0;
985
985
  }
986
+
987
+ [_backgroundColorLayer removeAllAnimations];
986
988
  }
987
989
 
988
990
  // borders
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.76.0
1
+ VERSION_NAME=0.76.2
2
2
  react.internal.publishingGroup=com.facebook.react
3
3
 
4
4
  android.useAndroidX=true
@@ -124,15 +124,11 @@ public abstract class HeadlessJsTaskService extends Service implements HeadlessJ
124
124
  @Override
125
125
  public void onDestroy() {
126
126
  super.onDestroy();
127
+ ReactContext reactContext = getReactContext();
127
128
 
128
- if (getReactNativeHost().hasInstance()) {
129
- ReactInstanceManager reactInstanceManager = getReactNativeHost().getReactInstanceManager();
130
- ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
131
- if (reactContext != null) {
132
- HeadlessJsTaskContext headlessJsTaskContext =
133
- HeadlessJsTaskContext.getInstance(reactContext);
134
- headlessJsTaskContext.removeTaskEventListener(this);
135
- }
129
+ if (reactContext != null) {
130
+ HeadlessJsTaskContext headlessJsTaskContext = HeadlessJsTaskContext.getInstance(reactContext);
131
+ headlessJsTaskContext.removeTaskEventListener(this);
136
132
  }
137
133
  if (sWakeLock != null) {
138
134
  sWakeLock.release();
@@ -111,7 +111,7 @@ protected constructor(
111
111
  packages,
112
112
  jsMainModuleName,
113
113
  bundleAssetName ?: "index",
114
- null,
114
+ jsBundleFile,
115
115
  isHermesEnabled ?: true,
116
116
  useDeveloperSupport,
117
117
  )
@@ -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", 76,
20
- "patch", 0,
20
+ "patch", 2,
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 = 76;
20
- int32_t Patch = 0;
20
+ int32_t Patch = 2;
21
21
  std::string_view Prerelease = "";
22
22
  } ReactNativeVersion;
23
23
 
@@ -30,8 +30,6 @@ function generateMacOS (projectDir, name, options) {
30
30
  { overwrite: options.overwrite }
31
31
  );
32
32
 
33
- installPods(options);
34
-
35
33
  printFinishMessage(name);
36
34
  }
37
35
 
@@ -122,32 +122,20 @@ function installDependencies(options) {
122
122
  childProcess.execSync(isYarn ? 'yarn' : 'npm i', execOptions);
123
123
  }
124
124
 
125
- /**
126
- * @param {{ verbose?: boolean }=} options
127
- */
128
- function installPods(options) {
129
- const cwd = path.join(process.cwd(), macOSDir);
130
- const quietFlag = options && options.verbose ? '' : '--quiet';
131
- childProcess.execSync(`npx ${quietFlag} pod-install --non-interactive ${quietFlag}`, { stdio: 'inherit', cwd });
132
- }
133
-
134
125
  /**
135
126
  * @param {string} newProjectName
136
127
  */
137
128
  function printFinishMessage(newProjectName) {
138
129
  console.log(`
139
130
  ${chalk.blue(`Run instructions for ${chalk.bold('macOS')}`)}:
131
+ • pod install --project-directory=macos
140
132
  • npx react-native run-macos
141
- ${chalk.dim('- or -')}
142
- • Open ${xcworkspacePath(newProjectName)} in Xcode or run "xed -b ${macOSDir}"
143
133
  • yarn start:macos
144
- • Hit the Run button
145
134
  `);
146
135
  }
147
136
 
148
137
  module.exports = {
149
138
  copyProjectTemplateAndReplace,
150
139
  installDependencies,
151
- installPods,
152
140
  printFinishMessage,
153
141
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-macos",
3
- "version": "0.76.0",
3
+ "version": "0.76.2",
4
4
  "description": "React Native for macOS",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -111,13 +111,13 @@
111
111
  },
112
112
  "dependencies": {
113
113
  "@jest/create-cache-key-function": "^29.6.3",
114
- "@react-native-mac/virtualized-lists": "0.76.0",
115
- "@react-native/assets-registry": "0.76.0",
116
- "@react-native/codegen": "0.76.0",
117
- "@react-native/community-cli-plugin": "0.76.0",
118
- "@react-native/gradle-plugin": "0.76.0",
119
- "@react-native/js-polyfills": "0.76.0",
120
- "@react-native/normalize-colors": "0.76.0",
114
+ "@react-native-mac/virtualized-lists": "0.76.2",
115
+ "@react-native/assets-registry": "0.76.2",
116
+ "@react-native/codegen": "0.76.2",
117
+ "@react-native/community-cli-plugin": "0.76.2",
118
+ "@react-native/gradle-plugin": "0.76.2",
119
+ "@react-native/js-polyfills": "0.76.2",
120
+ "@react-native/normalize-colors": "0.76.2",
121
121
  "abort-controller": "^3.0.0",
122
122
  "anser": "^1.4.9",
123
123
  "ansi-regex": "^5.0.0",
@@ -3,6 +3,8 @@
3
3
  # This source code is licensed under the MIT license found in the
4
4
  # LICENSE file in the root directory of this source tree.
5
5
 
6
+ require 'shellwords'
7
+
6
8
  require_relative "./helpers.rb"
7
9
 
8
10
  # Utilities class for React Native Cocoapods
@@ -237,8 +239,8 @@ class ReactNativePodsUtils
237
239
  # When installing pods with a yarn alias, yarn creates a fake yarn and node executables
238
240
  # in a temporary folder.
239
241
  # Using `node --print "process.argv[0]";` we are able to retrieve the actual path from which node is running.
240
- # see https://github.com/facebook/react-native/issues/43285 for more info
241
- node_binary = `node --print "process.argv[0]";`
242
+ # see https://github.com/facebook/react-native/issues/43285 for more info. We've tweaked this slightly.
243
+ node_binary = Shellwords.escape(`node --print "process.argv[0]"`.strip)
242
244
  system("echo 'export NODE_BINARY=#{node_binary}' > #{file_path}.local")
243
245
  end
244
246
  end
@@ -491,11 +491,22 @@ function rootCodegenTargetNeedsThirdPartyComponentProvider(pkgJson, platform) {
491
491
  return !pkgJsonIncludesGeneratedCode(pkgJson) && platform === 'ios';
492
492
  }
493
493
 
494
- function dependencyNeedsThirdPartyComponentProvider(schemaInfo, platform) {
494
+ function dependencyNeedsThirdPartyComponentProvider(
495
+ schemaInfo,
496
+ platform,
497
+ appCondegenConfigSpec,
498
+ ) {
495
499
  // Filter the react native core library out.
496
500
  // In the future, core library and third party library should
497
501
  // use the same way to generate/register the fabric components.
498
- return !isReactNativeCoreLibrary(schemaInfo.library.config.name, platform);
502
+ // We also have to filter out the the components defined in the app
503
+ // because the RCTThirdPartyComponentProvider is generated inside Fabric,
504
+ // which lives in a different target from the app and it has no visibility over
505
+ // the symbols defined in the app.
506
+ return (
507
+ !isReactNativeCoreLibrary(schemaInfo.library.config.name, platform) &&
508
+ schemaInfo.library.config.name !== appCondegenConfigSpec
509
+ );
499
510
  }
500
511
 
501
512
  function mustGenerateNativeCode(includeLibraryPath, schemaInfo) {
@@ -706,8 +717,12 @@ function execute(projectRoot, targetPlatform, baseOutputPath) {
706
717
  if (
707
718
  rootCodegenTargetNeedsThirdPartyComponentProvider(pkgJson, platform)
708
719
  ) {
709
- const filteredSchemas = schemaInfos.filter(
710
- dependencyNeedsThirdPartyComponentProvider,
720
+ const filteredSchemas = schemaInfos.filter(schemaInfo =>
721
+ dependencyNeedsThirdPartyComponentProvider(
722
+ schemaInfo,
723
+ platform,
724
+ pkgJson.codegenConfig?.appCondegenConfigSpec,
725
+ ),
711
726
  );
712
727
  const schemas = filteredSchemas.map(schemaInfo => schemaInfo.schema);
713
728
  const supportedApplePlatforms = filteredSchemas.map(