Skip to content

Commit 71a9877

Browse files
committed
feat: bump react native to 0.83
1 parent 8a4de96 commit 71a9877

File tree

6 files changed

+9
-77
lines changed

6 files changed

+9
-77
lines changed

.github/workflows/build-templates.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
XCODE_VERSION: 16.3
2222
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
2323
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
24+
RCT_REMOVE_LEGACY_ARCH: 1
2425
RCT_USE_RN_DEP: 1
2526
RCT_USE_PREBUILT_RNCORE: 1
2627

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export const FALLBACK_BOB_VERSION = '0.40.13';
22
export const FALLBACK_NITRO_MODULES_VERSION = '0.29.8';
3-
export const SUPPORTED_REACT_NATIVE_VERSION = '0.81.1';
3+
export const SUPPORTED_REACT_NATIVE_VERSION = '0.83.0';

packages/create-react-native-library/src/utils/configureTools.ts

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import fs from 'fs-extra';
22
import path from 'node:path';
33
import { applyTemplate, type TemplateConfiguration } from '../template';
44
import sortObjectKeys from './sortObjectKeys';
5+
import { SUPPORTED_REACT_NATIVE_VERSION } from '../constants';
56

67
type Tool = {
78
name: string;
@@ -35,7 +36,7 @@ const ESLINT = {
3536
'@eslint/compat': '^1.3.2',
3637
'@eslint/eslintrc': '^3.3.1',
3738
'@eslint/js': '^9.35.0',
38-
'@react-native/eslint-config': '^0.81.1',
39+
'@react-native/eslint-config': SUPPORTED_REACT_NATIVE_VERSION,
3940
'eslint-config-prettier': '^10.1.8',
4041
'eslint-plugin-prettier': '^5.5.4',
4142
'eslint': '^9.35.0',
@@ -115,45 +116,21 @@ const JEST = {
115116
},
116117
};
117118

118-
const TURBOREPO = {
119-
name: 'Turborepo',
120-
description: 'Cache build outputs on CI',
121-
package: {
122-
devDependencies: {
123-
turbo: '^2.5.6',
124-
},
125-
},
126-
condition: (config: TemplateConfiguration) => config.example !== 'expo',
127-
};
128-
129119
export const AVAILABLE_TOOLS = {
130120
'eslint': ESLINT,
131121
'jest': JEST,
132122
'lefthook': LEFTHOOK,
133123
'release-it': RELEASE_IT,
134124
} as const satisfies Record<string, Tool>;
135125

136-
const REQUIRED_TOOLS = {
137-
turbo: TURBOREPO,
138-
} as const satisfies Record<string, Tool>;
139-
140-
const ALL_TOOLS = {
141-
...AVAILABLE_TOOLS,
142-
...REQUIRED_TOOLS,
143-
} as const;
144-
145126
export async function configureTools({
146127
tools,
147128
config,
148129
root,
149130
packageJson,
150131
}: Options) {
151-
for (const key of [
152-
...tools,
153-
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
154-
...(Object.keys(REQUIRED_TOOLS) as (keyof typeof REQUIRED_TOOLS)[]),
155-
]) {
156-
if (!(key in ALL_TOOLS)) {
132+
for (const key of tools) {
133+
if (!(key in AVAILABLE_TOOLS)) {
157134
throw new Error(
158135
`Invalid tool '${key}'. Available tools are: ${Object.keys(
159136
AVAILABLE_TOOLS

packages/create-react-native-library/templates/common/$package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,14 @@
6969
"registry": "https://registry.npmjs.org/"
7070
},
7171
"devDependencies": {
72-
<% if (example === 'vanilla' && (project.moduleConfig === 'turbo-modules' || project.viewConfig === 'fabric-view')) { -%>
73-
"@react-native-community/cli": "20.0.1",
74-
<% } -%>
75-
"@react-native/babel-preset": "0.81.1",
72+
"@react-native/babel-preset": "0.83.0",
7673
"@types/react": "^19.1.12",
7774
"del-cli": "^6.0.0",
7875
<% if (project.moduleConfig === 'nitro-modules' || project.viewConfig === 'nitro-view') { -%>
7976
"nitrogen": "^<%- versions.nitro %>",
8077
<% } -%>
8178
"react": "19.1.0",
82-
"react-native": "0.81.1",
79+
"react-native": "0.83.0",
8380
"react-native-builder-bob": "^<%- versions.bob %>",
8481
<% if (project.moduleConfig === 'nitro-modules' || project.viewConfig === 'nitro-view') { -%>
8582
"react-native-nitro-modules": "^<%- versions.nitro %>",

packages/create-react-native-library/templates/native-common-example/turbo.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"globalDependencies": [".nvmrc", ".yarnrc.yml"],
44
"globalEnv": ["NODE_ENV"],
55
"tasks": {
6-
<% if (example !== 'expo') { -%>
76
"build:android": {
87
"env": ["ANDROID_HOME", "ORG_GRADLE_PROJECT_newArchEnabled"],
98
"inputs": [
@@ -23,6 +22,7 @@
2322
"build:ios": {
2423
"env": [
2524
"RCT_NEW_ARCH_ENABLED",
25+
"RCT_REMOVE_LEGACY_ARCH",
2626
"RCT_USE_RN_DEP",
2727
"RCT_USE_PREBUILT_RNCORE"
2828
],
@@ -39,6 +39,5 @@
3939
],
4040
"outputs": []
4141
}
42-
<% } -%>
4342
}
4443
}

packages/create-react-native-library/templates/tools/turborepo/turbo.json

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)