From 325006dfd8c1a12f7b0550f768356205e0071820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Tue, 16 Jan 2024 18:39:35 +0100 Subject: [PATCH] add ios warning as well --- packages/cli-platform-android/src/config/index.ts | 2 +- packages/cli-platform-ios/src/config/index.ts | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/cli-platform-android/src/config/index.ts b/packages/cli-platform-android/src/config/index.ts index 7f278a64b..683e3856b 100644 --- a/packages/cli-platform-android/src/config/index.ts +++ b/packages/cli-platform-android/src/config/index.ts @@ -75,7 +75,7 @@ export function projectConfig( // @todo remove for RN 0.75 if (userConfig.unstable_reactLegacyComponentNames) { logger.warn( - 'The "unstable_reactLegacyComponentNames" config option is not necessary anymore for React Native 0.74 and does nothing. Please remove it from the "react-native.config.js" file.', + 'The "project.android.unstable_reactLegacyComponentNames" config option is not necessary anymore for React Native 0.74 and does nothing. Please remove it from the "react-native.config.js" file.', ); } diff --git a/packages/cli-platform-ios/src/config/index.ts b/packages/cli-platform-ios/src/config/index.ts index 38f2367d7..5a2556f74 100644 --- a/packages/cli-platform-ios/src/config/index.ts +++ b/packages/cli-platform-ios/src/config/index.ts @@ -18,7 +18,7 @@ import { IOSProjectConfig, IOSDependencyConfig, } from '@react-native-community/cli-types'; -import {CLIError} from '@react-native-community/cli-tools'; +import {CLIError, logger} from '@react-native-community/cli-tools'; /** * Returns project config by analyzing given folder and applying some user defaults @@ -47,6 +47,13 @@ export function projectConfig( const xcodeProject = findXcodeProject(fs.readdirSync(sourceDir)); + // @ts-ignore @todo remove for RN 0.75 + if (userConfig.unstable_reactLegacyComponentNames) { + logger.warn( + 'The "project.ios.unstable_reactLegacyComponentNames" config option is not necessary anymore for React Native 0.74 and does nothing. Please remove it from the "react-native.config.js" file.', + ); + } + return { sourceDir, watchModeCommandParams: userConfig.watchModeCommandParams,