diff --git a/.nx/version-plans/version-plan-1769115988858.md b/.nx/version-plans/version-plan-1769115988858.md new file mode 100644 index 00000000000000..6c450ac23e99a4 --- /dev/null +++ b/.nx/version-plans/version-plan-1769115988858.md @@ -0,0 +1,5 @@ +--- +__default__: patch +--- + +Release 0.81.1 diff --git a/package.json b/package.json index 0f05e8a14be9dc..95f5467c89a6e4 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/packages/nx-release-version/package.json b/packages/nx-release-version/package.json index 314c8388a7d598..45119c8897da99 100644 --- a/packages/nx-release-version/package.json +++ b/packages/nx-release-version/package.json @@ -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", diff --git a/packages/react-native/local-cli/runMacOS/runMacOS.js b/packages/react-native/local-cli/runMacOS/runMacOS.js index e171d776937f63..9fad4f6555c681 100644 --- a/packages/react-native/local-cli/runMacOS/runMacOS.js +++ b/packages/react-native/local-cli/runMacOS/runMacOS.js @@ -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); @@ -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}; @@ -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( @@ -179,7 +194,7 @@ function buildProject(sourceDir, xcodeProject, scheme, args) { scheme, ]; logger.info( - `Building ${chalk.dim( + `Building ${colors.dim( `(using "xcodebuild ${xcodebuildArgs.join(' ')}")`, )}`, ); diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 666825082cd283..3a9b3bdf568f3c 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -205,7 +205,7 @@ { "name": "FBReactNativeSpec", "type": "all", - "ios": { + "macos": { "modules": { "AccessibilityManager": { "unstableRequiresMainQueueSetup": true diff --git a/packages/react-native/react-native.config.js b/packages/react-native/react-native.config.js index 46579f1475b48b..4fc760e979c04d 100644 --- a/packages/react-native/react-native.config.js +++ b/packages/react-native/react-native.config.js @@ -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( @@ -156,7 +162,7 @@ if (android != null) { // [macOS config.commands.push(...macosCommands); -if (apple != null) { +if (apple) { config.platforms.macos = { linkConfig: () => { return { diff --git a/packages/react-native/scripts/codegen/__tests__/__snapshots__/generate-artifacts-executor-test.js.snap b/packages/react-native/scripts/codegen/__tests__/__snapshots__/generate-artifacts-executor-test.js.snap index 72417e5e0f655d..5d6fce2dac5fe8 100644 --- a/packages/react-native/scripts/codegen/__tests__/__snapshots__/generate-artifacts-executor-test.js.snap +++ b/packages/react-native/scripts/codegen/__tests__/__snapshots__/generate-artifacts-executor-test.js.snap @@ -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. @@ -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. @@ -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. @@ -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.