From 4e3aa1a5c85812357a2aaa3f814d12b92b351e4b Mon Sep 17 00:00:00 2001 From: Satyajit Sahoo Date: Mon, 25 Aug 2025 19:52:13 +0200 Subject: [PATCH] feat: upgrade to latest react native --- packages/create-react-native-library/src/constants.ts | 6 +++--- .../templates/common/tsconfig.json | 1 + .../native-library-new/src/Native{%- project.name %}.ts | 3 +-- .../src/{%- project.name %}ViewNativeComponent.ts | 3 +-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/create-react-native-library/src/constants.ts b/packages/create-react-native-library/src/constants.ts index 583385744..713fd3f82 100644 --- a/packages/create-react-native-library/src/constants.ts +++ b/packages/create-react-native-library/src/constants.ts @@ -1,3 +1,3 @@ -export const FALLBACK_BOB_VERSION = '0.40.8'; -export const FALLBACK_NITRO_MODULES_VERSION = '0.26.2'; -export const SUPPORTED_REACT_NATIVE_VERSION = '0.79.2'; +export const FALLBACK_BOB_VERSION = '0.40.13'; +export const FALLBACK_NITRO_MODULES_VERSION = '0.28.1'; +export const SUPPORTED_REACT_NATIVE_VERSION = '0.81.0'; diff --git a/packages/create-react-native-library/templates/common/tsconfig.json b/packages/create-react-native-library/templates/common/tsconfig.json index 5f136018a..defe37fd3 100644 --- a/packages/create-react-native-library/templates/common/tsconfig.json +++ b/packages/create-react-native-library/templates/common/tsconfig.json @@ -6,6 +6,7 @@ }, "allowUnreachableCode": false, "allowUnusedLabels": false, + "customConditions": ["react-native-strict-api"], "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "jsx": "react-jsx", diff --git a/packages/create-react-native-library/templates/native-library-new/src/Native{%- project.name %}.ts b/packages/create-react-native-library/templates/native-library-new/src/Native{%- project.name %}.ts index b6f84feb8..dd44ab839 100644 --- a/packages/create-react-native-library/templates/native-library-new/src/Native{%- project.name %}.ts +++ b/packages/create-react-native-library/templates/native-library-new/src/Native{%- project.name %}.ts @@ -1,5 +1,4 @@ -import type { TurboModule } from 'react-native'; -import { TurboModuleRegistry } from 'react-native'; +import { TurboModuleRegistry, type TurboModule } from 'react-native'; export interface Spec extends TurboModule { multiply(a: number, b: number): number; diff --git a/packages/create-react-native-library/templates/native-view-new/src/{%- project.name %}ViewNativeComponent.ts b/packages/create-react-native-library/templates/native-view-new/src/{%- project.name %}ViewNativeComponent.ts index db1ff171e..4bd616d97 100644 --- a/packages/create-react-native-library/templates/native-view-new/src/{%- project.name %}ViewNativeComponent.ts +++ b/packages/create-react-native-library/templates/native-view-new/src/{%- project.name %}ViewNativeComponent.ts @@ -1,5 +1,4 @@ -import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; -import type { ViewProps } from 'react-native'; +import { codegenNativeComponent, type ViewProps } from 'react-native'; interface NativeProps extends ViewProps { color?: string;