react-native-macos 0.76.0 → 0.76.1
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.
- package/Libraries/AppDelegate/RCTAppDelegate.mm +1 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/ReactNative/AppRegistry.js +3 -3
- package/React/Base/RCTVersion.m +1 -1
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +2 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/HeadlessJsTaskService.java +4 -8
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactNativeHost.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/local-cli/generate-macos.js +0 -2
- package/local-cli/generator-macos/index.js +1 -13
- package/package.json +8 -8
- package/scripts/cocoapods/utils.rb +4 -2
- package/scripts/codegen/generate-artifacts-executor.js +19 -4
|
@@ -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
|
|
@@ -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
|
|
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;
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -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 (
|
|
129
|
-
|
|
130
|
-
|
|
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();
|
|
@@ -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.
|
|
3
|
+
"version": "0.76.1",
|
|
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.
|
|
115
|
-
"@react-native/assets-registry": "0.76.
|
|
116
|
-
"@react-native/codegen": "0.76.
|
|
117
|
-
"@react-native/community-cli-plugin": "0.76.
|
|
118
|
-
"@react-native/gradle-plugin": "0.76.
|
|
119
|
-
"@react-native/js-polyfills": "0.76.
|
|
120
|
-
"@react-native/normalize-colors": "0.76.
|
|
114
|
+
"@react-native-mac/virtualized-lists": "0.76.1",
|
|
115
|
+
"@react-native/assets-registry": "0.76.1",
|
|
116
|
+
"@react-native/codegen": "0.76.1",
|
|
117
|
+
"@react-native/community-cli-plugin": "0.76.1",
|
|
118
|
+
"@react-native/gradle-plugin": "0.76.1",
|
|
119
|
+
"@react-native/js-polyfills": "0.76.1",
|
|
120
|
+
"@react-native/normalize-colors": "0.76.1",
|
|
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(
|
|
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
|
-
|
|
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(
|