Skip to content

Commit db380e6

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

File tree

8 files changed

+15
-59
lines changed

8 files changed

+15
-59
lines changed

.github/workflows/build-templates.yml

Lines changed: 4 additions & 3 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

@@ -145,20 +146,20 @@ jobs:
145146
run: |
146147
# Build Android for only some matrices to skip redundant builds
147148
if [[ ${{ matrix.os }} =~ ubuntu ]]; then
148-
if [[ ${{ matrix.type.name }} == *-view && ${{ matrix.type.language }} == *-objc ]] || [[ ${{ matrix.type.name }} == *-module && ${{ matrix.type.language }} == *-objc ]]; then
149+
if [[ ${{ matrix.type.name }} == *-view && ${{ matrix.type.language }} == *-objc ]] || [[ ${{ matrix.type.name }} == *-module && ${{ matrix.type.language }} == *-objc ]] || [[ ${{ matrix.type.name }} == nitro-* ]]; then
149150
echo "android_build=1" >> $GITHUB_ENV
150151
fi
151152
fi
152153
153154
# Build iOS for only some matrices to skip redundant builds
154155
if [[ ${{ matrix.os }} =~ macos ]]; then
155-
if [[ ${{ matrix.type.name }} == *-view && ${{ matrix.type.language }} == kotlin-* ]] || [[ ${{ matrix.type.name }} == *-module && ${{ matrix.type.language }} == kotlin-* ]]; then
156+
if [[ ${{ matrix.type.name }} == *-view && ${{ matrix.type.language }} == kotlin-* ]] || [[ ${{ matrix.type.name }} == *-module && ${{ matrix.type.language }} == kotlin-* ]] || [[ ${{ matrix.type.name }} == nitro-* ]]; then
156157
echo "ios_build=1" >> $GITHUB_ENV
157158
fi
158159
fi
159160
160161
- name: Generate nitrogen code
161-
if: matrix.type == 'nitro-view' || matrix.type == 'nitro-module'
162+
if: matrix.type.name == 'nitro-view' || matrix.type.name == 'nitro-module'
162163
working-directory: ${{ env.work_dir }}
163164
run: yarn nitrogen
164165

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/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ async function create() {
101101
await alignDependencyVersionsWithExampleApp(rootPackageJson, folder);
102102
}
103103

104-
if (!answers.local && answers.tools.length > 0) {
104+
if (!answers.local) {
105105
spinner.text = 'Configuring tools';
106106

107107
await configureTools({

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

Lines changed: 3 additions & 2 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',
@@ -134,7 +135,7 @@ export const AVAILABLE_TOOLS = {
134135
} as const satisfies Record<string, Tool>;
135136

136137
const REQUIRED_TOOLS = {
137-
turbo: TURBOREPO,
138+
turborepo: TURBOREPO,
138139
} as const satisfies Record<string, Tool>;
139140

140141
const ALL_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: 0 additions & 44 deletions
This file was deleted.

packages/create-react-native-library/templates/nitro-view/android/src/main/java/com/margelo/nitro/{%- project.package_dir %}/{%- project.name %}Package.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
package com.margelo.nitro.<%- project.package %>
22

3-
import com.facebook.react.TurboReactPackage
3+
import com.facebook.react.BaseReactPackage
44
import com.facebook.react.bridge.NativeModule
55
import com.facebook.react.bridge.ReactApplicationContext
66
import com.facebook.react.module.model.ReactModuleInfoProvider
77
import com.facebook.react.uimanager.ViewManager
88

9-
import <%- project.package_cpp -%>.views.Hybrid<%- project.name -%>Manager
9+
import com.margelo.nitro.awesomelib.views.Hybrid<%- project.name -%>Manager
1010

11-
class <%- project.name -%>Package : TurboReactPackage() {
11+
class <%- project.name -%>Package : BaseReactPackage() {
1212
override fun getModule(name: String, reactContext: ReactApplicationContext): NativeModule? {
1313
return null
1414
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"build:ios": {
2323
"env": [
2424
"RCT_NEW_ARCH_ENABLED",
25+
"RCT_REMOVE_LEGACY_ARCH",
2526
"RCT_USE_RN_DEP",
2627
"RCT_USE_PREBUILT_RNCORE"
2728
],

0 commit comments

Comments
 (0)