Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .nx/version-plans/version-plan-1769115988858.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
__default__: patch
---

Release 0.81.1
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-macos/monorepo",
"version": "0.81.0-rc0",
"version": "0.81.0",
"license": "MIT",
"packageManager": "yarn@4.12.0",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/nx-release-version/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-macos/nx-release-version",
"version": "0.81.0-rc0",
"version": "0.81.0",
"description": "Nx Release Version Actions for React Native macOS",
"homepage": "https://github.com/microsoft/react-native-macos/tree/HEAD/packages/nx-release-version#readme",
"license": "MIT",
Expand Down
31 changes: 23 additions & 8 deletions packages/react-native/local-cli/runMacOS/runMacOS.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,27 @@
* }} ProjectConfig
*/

const chalk = require('chalk');
const child_process = require('child_process');
const path = require('path');
const child_process = require('node:child_process');
const path = require('node:path');

const {logger, CLIError, getDefaultUserTerminal} = (() => {
const cli = require.resolve('@react-native-community/cli/package.json');
const colors = (() => {
const {WriteStream} = require('node:tty');
if (WriteStream.prototype.hasColors() &&
!process.env.NODE_TEST_CONTEXT &&
process.env.NODE_ENV !== 'test'
) {
return {
bold: (s) => '\u001B[1m' + s + '\u001B[22m',
dim: (s) => '\u001B[2m' + s + '\u001B[22m',
}
}

const passthrough = (s) => s;
return { bold: passthrough, dim: passthrough };
})();

const {logger, CLIError, getDefaultUserTerminal} = ((projectRoot = process.cwd()) => {
const cli = require.resolve('@react-native-community/cli/package.json', {paths: [projectRoot]});
const options = {paths: [path.dirname(cli)]};
const tools = require.resolve('@react-native-community/cli-tools', options);
return require(tools);
Expand Down Expand Up @@ -92,7 +107,7 @@ function parseArgs(ctx, args) {
logger.info(
`Found Xcode ${
xcodeProject.isWorkspace ? 'workspace' : 'project'
} "${chalk.bold(xcodeProject.name)}"`,
} "${colors.bold(xcodeProject.name)}"`,
);

return {sourceDir, xcodeProject, scheme};
Expand Down Expand Up @@ -146,7 +161,7 @@ async function run(sourceDir, xcodeProject, scheme, args) {
.trim();

logger.info(
`Launching app "${chalk.bold(bundleID)}" from "${chalk.bold(appPath)}"`,
`Launching app "${colors.bold(bundleID)}" from "${colors.bold(appPath)}"`,
);

child_process.exec(
Expand Down Expand Up @@ -179,7 +194,7 @@ function buildProject(sourceDir, xcodeProject, scheme, args) {
scheme,
];
logger.info(
`Building ${chalk.dim(
`Building ${colors.dim(
`(using "xcodebuild ${xcodebuildArgs.join(' ')}")`,
)}`,
);
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
{
"name": "FBReactNativeSpec",
"type": "all",
"ios": {
"macos": {
"modules": {
"AccessibilityManager": {
"unstableRequiresMainQueueSetup": true
Expand Down
10 changes: 8 additions & 2 deletions packages/react-native/react-native.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,14 @@ try {
// [macOS
let apple;
try {
const iosPath = require.resolve('@react-native-community/cli-platform-ios', {
paths: [process.cwd()],
});
// $FlowFixMe[untyped-import]
apple = require('@react-native-community/cli-platform-apple');
apple = findCommunityPlatformPackage(
'@react-native-community/cli-platform-apple',
iosPath,
);
} catch {
if (verbose) {
console.warn(
Expand Down Expand Up @@ -156,7 +162,7 @@ if (android != null) {

// [macOS
config.commands.push(...macosCommands);
if (apple != null) {
if (apple) {
config.platforms.macos = {
linkConfig: () => {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ exports[`execute test-app "ReactAppDependencyProvider.podspec" should match snap
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

version = \\"0.81.0-rc0\\"
version = \\"0.81.0\\"
source = { :git => 'https://github.com/facebook/react-native.git' }
if version == '1000.0.0'
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
Expand Down Expand Up @@ -399,7 +399,7 @@ exports[`execute test-app "ReactCodegen.podspec" should match snapshot 1`] = `
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

version = \\"0.81.0-rc0\\"
version = \\"0.81.0\\"
source = { :git => 'https://github.com/facebook/react-native.git' }
if version == '1000.0.0'
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
Expand Down Expand Up @@ -840,7 +840,7 @@ exports[`execute test-app-legacy "ReactAppDependencyProvider.podspec" should mat
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

version = \\"0.81.0-rc0\\"
version = \\"0.81.0\\"
source = { :git => 'https://github.com/facebook/react-native.git' }
if version == '1000.0.0'
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
Expand Down Expand Up @@ -878,7 +878,7 @@ exports[`execute test-app-legacy "ReactCodegen.podspec" should match snapshot 1`
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

version = \\"0.81.0-rc0\\"
version = \\"0.81.0\\"
source = { :git => 'https://github.com/facebook/react-native.git' }
if version == '1000.0.0'
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
Expand Down
Loading