Skip to content

Chore/bump nitro#78

Merged
patrickkabwe merged 3 commits intomainfrom
chore/bump-nitro
Aug 17, 2025
Merged

Chore/bump nitro#78
patrickkabwe merged 3 commits intomainfrom
chore/bump-nitro

Conversation

@patrickkabwe
Copy link
Copy Markdown
Owner

@patrickkabwe patrickkabwe commented Aug 17, 2025

Summary by CodeRabbit

  • New Features

    • Added optional edge-to-edge display support in the Android example app.
    • Improved layout handling with safe area support.
  • Chores

    • Upgraded React Native to 0.81.0 and aligned related tooling.
    • Updated Android build/target SDK and build tools to 36; Gradle to 8.14.3.
    • Bumped TypeScript to 5.8 and refreshed CLI/eslint/metro configs.
    • iOS CI updated to use Xcode 16.4.
  • Configuration

    • Added TypeScript include/exclude settings for clearer project scoping.

- Bump versions for `nitro-codegen`, `react-native`, `react-native-nitro-modules`, and `typescript` in `package.json` and `example/package.json`.
- Update Android build tools and SDK versions in `build.gradle`.
- Add `react-native-safe-area-context` as a dependency in `example/package.json`.
- Modify TypeScript configuration to include and exclude specific directories.
- Update iOS Podfile.lock to reflect new versions for `FBLazyVector`, `hermes-engine`, and `NitroModules`.
- Refactor C++ and Kotlin code to improve function signatures and maintain consistency across the project.
- Introduced Xcode setup step in both iOS build workflows to specify version 16.4 using the maxim-lobanov/setup-xcode action.
@patrickkabwe patrickkabwe self-assigned this Aug 17, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Aug 17, 2025

Warning

Rate limit exceeded

@patrickkabwe has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 9 minutes and 26 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between da22f99 and d7fcf88.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • .github/workflows/release.yml (1 hunks)

Walkthrough

Adds Xcode 16.4 setup steps to the iOS GitHub Actions workflow. Updates Android example project to SDK 36 and Gradle 8.14.3, and introduces an edge-to-edge flag. Bumps React Native and related dependencies in example and root package.json. Adds include/exclude to example tsconfig.

Changes

Cohort / File(s) Summary of changes
CI: iOS workflow Xcode setup
.github/workflows/ios-build.yml
Inserted setup steps to install Xcode 16.4 using maxim-lobanov/setup-xcode@v1 in both build jobs before bun install.
Android build/config updates
example/android/build.gradle, example/android/gradle.properties, example/android/gradle/wrapper/gradle-wrapper.properties
Bumped compile/target SDK to 36 and buildTools to 36.0.0; added edgeToEdgeEnabled=false with comments; updated Gradle wrapper to 8.14.3.
Example app JS/TS deps & config
example/package.json, example/tsconfig.json
Upgraded RN to 0.81.0 and related tooling; added react-native-safe-area-context; updated TypeScript to ^5.8.3; added tsconfig include/exclude.
Root devDependencies bump
package.json
Upgraded devDependencies: RN 0.81.0, nitro modules/codegen ^0.28.0, TypeScript ^5.8.3.

Sequence Diagram(s)

sequenceDiagram
  participant GH as GitHub Actions Runner
  participant X as setup-xcode@v1
  participant N as bun (npm deps)
  participant B as iOS Build

  GH->>X: Setup Xcode (16.4)
  X-->>GH: Xcode configured
  GH->>N: Install npm dependencies
  N-->>GH: Dependencies installed
  GH->>B: Build iOS (new/old jobs)
  B-->>GH: Build artifacts
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I nibbled through configs, hop by hop,
Xcode’s fresh, the builds won’t stop.
Android grew to SDK thirty-six,
Gradle rose with wrapper tricks.
RN hopped up, TS too—
My whiskers twitch: the CI flew! 🐇✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/bump-nitro

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (3)
example/tsconfig.json (1)

3-4: Nice addition of include/exclude; consider excluding build artifacts for faster TS.

To reduce type-check noise and speed up IDE/CI, also exclude Android/iOS build outputs.

Apply this diff:

   "include": ["**/*.ts", "**/*.tsx"],
-  "exclude": ["**/node_modules", "**/Pods"],
+  "exclude": ["**/node_modules", "**/Pods", "**/android/**/build", "**/ios/build"],
example/android/gradle.properties (1)

41-44: Minor doc tweak for custom Activity guidance

Consider clarifying what “should not be used with custom Activity” means (i.e., it won’t have any effect unless you implement edge-to-edge manually).

Suggested wording:

-# Note: Only works with ReactActivity and should not be used with custom Activity.
+# Note: Only applies automatically when using ReactActivity.
+# If you use a custom Activity, this flag has no effect; handle edge-to-edge/insets manually.
example/package.json (1)

23-29: ESLint version likely too old for the RN 0.81 ESLint config

You upgraded @react-native/eslint-config to 0.81.0, but eslint is pinned at ^8.19.0 (mid-2022). The RN ESLint config for newer RN versions typically expects a much newer ESLint (often >= 8.56 or 9.x). This can cause peer-dependency warnings or rule resolution issues.

Consider bumping ESLint and aligning related tooling:

-        "eslint": "^8.19.0",
+        "eslint": "^9.11.0",

If your CI reports peer requirements for specific 9.x, match that exact range.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 2036a81 and da22f99.

⛔ Files ignored due to path filters (24)
  • bun.lock is excluded by !**/*.lock
  • example/ios/Podfile.lock is excluded by !**/*.lock
  • nitrogen/generated/android/NitroFSOnLoad.cpp is excluded by !**/generated/**
  • nitrogen/generated/android/c++/JFunc_void_double_double.hpp is excluded by !**/generated/**
  • nitrogen/generated/android/c++/JHybridNitroFSSpec.hpp is excluded by !**/generated/**
  • nitrogen/generated/android/c++/JNitroFileEncoding.hpp is excluded by !**/generated/**
  • nitrogen/generated/android/c++/JNitroUploadMethod.hpp is excluded by !**/generated/**
  • nitrogen/generated/android/kotlin/com/margelo/nitro/nitrofs/Func_void_double_double.kt is excluded by !**/generated/**
  • nitrogen/generated/android/kotlin/com/margelo/nitro/nitrofs/NitroFile.kt is excluded by !**/generated/**
  • nitrogen/generated/android/kotlin/com/margelo/nitro/nitrofs/NitroFileEncoding.kt is excluded by !**/generated/**
  • nitrogen/generated/android/kotlin/com/margelo/nitro/nitrofs/NitroFileStat.kt is excluded by !**/generated/**
  • nitrogen/generated/android/kotlin/com/margelo/nitro/nitrofs/NitroUploadMethod.kt is excluded by !**/generated/**
  • nitrogen/generated/android/kotlin/com/margelo/nitro/nitrofs/NitroUploadOptions.kt is excluded by !**/generated/**
  • nitrogen/generated/ios/NitroFS-Swift-Cxx-Bridge.cpp is excluded by !**/generated/**
  • nitrogen/generated/ios/NitroFS-Swift-Cxx-Bridge.hpp is excluded by !**/generated/**
  • nitrogen/generated/ios/NitroFSAutolinking.mm is excluded by !**/generated/**
  • nitrogen/generated/ios/NitroFSAutolinking.swift is excluded by !**/generated/**
  • nitrogen/generated/ios/swift/Func_void_double_double.swift is excluded by !**/generated/**
  • nitrogen/generated/ios/swift/HybridNitroFSSpec_cxx.swift is excluded by !**/generated/**
  • nitrogen/generated/shared/c++/NitroFile.hpp is excluded by !**/generated/**
  • nitrogen/generated/shared/c++/NitroFileEncoding.hpp is excluded by !**/generated/**
  • nitrogen/generated/shared/c++/NitroFileStat.hpp is excluded by !**/generated/**
  • nitrogen/generated/shared/c++/NitroUploadMethod.hpp is excluded by !**/generated/**
  • nitrogen/generated/shared/c++/NitroUploadOptions.hpp is excluded by !**/generated/**
📒 Files selected for processing (7)
  • .github/workflows/ios-build.yml (2 hunks)
  • example/android/build.gradle (1 hunks)
  • example/android/gradle.properties (1 hunks)
  • example/android/gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • example/package.json (2 hunks)
  • example/tsconfig.json (1 hunks)
  • package.json (2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
example/package.json (1)
example/babel.config.js (1)
  • api (4-20)
🪛 YAMLlint (1.37.1)
.github/workflows/ios-build.yml

[warning] 104-104: wrong indentation: expected 10 but found 12

(indentation)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Build Android Example App (new architecture)
  • GitHub Check: Build Android Example App (old architecture)
  • GitHub Check: Build iOS Example App (old architecture)
🔇 Additional comments (9)
.github/workflows/ios-build.yml (1)

53-57: Good call adding explicit Xcode 16.4 setup early in the job.

This ensures the toolchain is consistent before installing dependencies and running Pods/xcodebuild.

example/android/gradle/wrapper/gradle-wrapper.properties (1)

3-3: Gradle wrapper updated to 8.14.3 — looks good.

This aligns with the SDK 36 bump and should be compatible with current AGP/Kotlin versions used in RN 0.81-based projects.

package.json (4)

61-61: nitro-codegen -> ^0.28.0 aligns with the Nitro bump.

Matches the example app and keeps codegen consistent across the repo.


63-63: React Native 0.81.0 with React 19.1.0 is consistent.

This pairing is expected for RN 0.81 and aligns with the example app changes.


65-65: react-native-nitro-modules -> ^0.28.0 matches the Nitro ecosystem bump.

Good for keeping native modules in sync.


67-67: TypeScript -> ^5.8.3 mirrors the example app.

Keeps type tooling consistent across the workspace.

example/android/build.gradle (1)

3-6: SDK and build tools bumped to 36 — LGTM.

The compile/target/buildTools updates are consistent with the Gradle wrapper update and RN 0.81 baseline.

example/package.json (2)

23-29: CLI and tooling alignment with Node 18+

@react-native-community/cli* 20.0.0 and @react-native/babel-preset/metro-config/typescript-config 0.81.0 look consistent with RN 0.81.0 and Node >=18 in engines. No blockers spotted.


38-38: TypeScript 5.8 upgrade: ensure tsconfig and Jest transformer alignment

TypeScript ^5.8.3 is fine, but make sure:

  • example/tsconfig.json options match TS 5.8 expectations (which you updated per PR summary).
  • Jest uses the appropriate transformer (babel-jest via RN preset) so TS 5.8 syntax is handled.

If you want, I can generate a quick sanity script to grep for babel-jest config and ts-jest usage across the repo.

Comment on lines +101 to +105
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 16.4

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Fix the YAML indentation under the second “Setup Xcode” step.

YAMLlint points out the extra indentation on Line 104. It should match the first job’s indentation so the “with” map parses correctly.

Apply this diff to align indentation:

       - name: Setup Xcode
         uses: maxim-lobanov/setup-xcode@v1
         with:
-            xcode-version: 16.4
+          xcode-version: 16.4
🧰 Tools
🪛 YAMLlint (1.37.1)

[warning] 104-104: wrong indentation: expected 10 but found 12

(indentation)

🤖 Prompt for AI Agents
.github/workflows/ios-build.yml around lines 101 to 105: the second "Setup
Xcode" step has incorrect extra indentation for the "with" mapping (line 104)
which prevents YAML from parsing the map correctly; align the "with" key to the
same indentation level as the first "Setup Xcode" step (remove the extra two
spaces) so that "with:" is directly under the step's "uses:" line, and ensure
its nested "xcode-version: 16.4" stays indented one level under "with".

Comment on lines +41 to +44
# Use this property to enable edge-to-edge display support.
# This allows your app to draw behind system bars for an immersive UI.
# Note: Only works with ReactActivity and should not be used with custom Activity.
edgeToEdgeEnabled=false
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Edge-to-edge flag: confirm wiring and Activity type

The docs are clear. Two quick checks:

  • This flag is auto-handled only when the app Activity extends ReactActivity. If you use a custom Activity, you must handle WindowInsets yourself.
  • Ensure your build actually reads this property (RN templates/plugins do, but verify for your setup).

Run the following to confirm:

If (1) doesn’t show ReactActivity, keep edgeToEdgeEnabled=false or add manual insets handling. If (2) only hits gradle.properties, that’s fine if RN 0.81’s Gradle plugin is in use; otherwise it’s a no-op.


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "1) Check if MainActivity extends ReactActivity (auto edge-to-edge support):"
fd -t f -a -e java -e kt MainActivity example/android/app 2>/dev/null | while read -r f; do
  echo "--- $f"
  rg -n -C2 'class\s+\w+\s+(:\s*ReactActivity|extends\s+ReactActivity)' "$f" || true
done

echo
echo "2) Check where edgeToEdgeEnabled is referenced (besides gradle.properties):"
rg -n -C2 '\bedgeToEdgeEnabled\b' || true

Length of output: 1233


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "1) Check for react-native-gradle-plugin in buildscript classpath (android/build.gradle):"
rg -n 'react-native-gradle-plugin' -g 'android/**/*' || true

echo
echo "2) Check for application of com.facebook.react plugin in android/app/build.gradle:"
rg -nE 'id\(["'"'"']com\.facebook\.react["'"'"']\)|apply plugin:\s*["'"'"']com\.facebook\.react["'"'"']' -g 'android/app/build.gradle' || true

Length of output: 984


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "1) Look for plugin DSL 'com.facebook.react' in android/app/build.gradle(.kts):"
rg -nE "id\\s*['\"]com\\.facebook\\.react['\"]" -g "android/app/build.gradle*" || true

echo
echo "2) Look for legacy apply plugin syntax in android/app/build.gradle(.kts):"
rg -nE "apply plugin:\\s*['\"]com\\.facebook\\.react['\"]" -g "android/app/build.gradle*" || true

echo
echo "3) Check plugin resolution strategy for react-native-gradle-plugin in settings.gradle(.kts):"
rg -n "com.facebook.react:react-native-gradle-plugin" -g "android/settings.gradle*" || true

Length of output: 1783


Edge-to-edge flag not wired up – Gradle plugin missing

Your edgeToEdgeEnabled=false will be a no-op unless the React Native Gradle plugin is on your classpath and applied in your app project. Based on our checks:

  • android/build.gradle doesn’t include
    com.facebook.react:react-native-gradle-plugin in its buildscript.dependencies.
  • android/app/build.gradle(.kts) doesn’t apply the com.facebook.react plugin.

Please add:

In android/build.gradle

buildscript {
  dependencies {
    // add this line
    classpath("com.facebook.react:react-native-gradle-plugin")
  }
}

In android/app/build.gradle (Groovy)

// at top of file
apply plugin: 'com.facebook.react'

Or in android/app/build.gradle.kts (Kotlin DSL)

plugins {
  // add this line
  id("com.facebook.react")
}

Once you’ve wired up the plugin, the edgeToEdgeEnabled property in gradle.properties will be picked up automatically by ReactActivity. Otherwise you’ll need to handle WindowInsets manually in your custom Activity.

🤖 Prompt for AI Agents
In example/android/gradle.properties around lines 41-44 the
edgeToEdgeEnabled=false flag is a no-op because the React Native Gradle plugin
is not on the classpath or applied; add the
com.facebook.react:react-native-gradle-plugin to android/build.gradle
buildscript dependencies and apply the React Native plugin in the app module
(use apply plugin: 'com.facebook.react' in android/app/build.gradle or
id("com.facebook.react") in android/app/build.gradle.kts) so the
edgeToEdgeEnabled property is picked up automatically by ReactActivity.

Comment thread example/package.json
Comment on lines +15 to +17
"react-native": "0.81.0",
"react-native-nitro-modules": "^0.28.0",
"react-native-safe-area-context": "^5.5.2"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

React/React Native compatibility: verify supported React range for RN 0.81

You’re on react-native 0.81.0 with react 19.1.0. Ensure RN 0.81 officially supports React 19.x to avoid peer-dep warnings or subtle runtime issues.

Additionally, since you added react-native-safe-area-context, confirm the app wraps the root with SafeAreaProvider when you flip edge-to-edge on.


🏁 Script executed:

#!/bin/bash
set -euo pipefail
rg -n --type=ts --type=tsx -C2 'SafeAreaProvider' example || echo "No SafeAreaProvider usage found in example/"

Length of output: 202


🌐 Web query:

What React versions are supported by React Native 0.81.0?

💡 Result:

Short answer: React 19 (i.e. React 19.x — React 19.1 is the recommended/minimum for recent 0.8x releases). (reactnative.dev)

If you want the exact semver range that 0.81 declares (the precise peerDependency string from package.json), I can fetch that and paste it here. Would you like me to do that?

Citations:


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail
# Search for SafeAreaProvider usage across all files in example/
rg -n -C2 'SafeAreaProvider' example || echo "No SafeAreaProvider usage found in example/"

Length of output: 153


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail
# Fetch React peerDependency range from RN 0.81.0 package.json
curl -s https://raw.githubusercontent.com/facebook/react-native/v0.81.0/package.json \
  | sed -n 's/.*"react"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p'

Length of output: 179


React 19.1.0 compatibility confirmed
React Native 0.81.0’s package.json declares "react": "19.1.0" as its peer dependency, so your React 19.1.0 setup matches exactly—no changes needed here.

Wrap your app in SafeAreaProvider
I didn’t find any usage of SafeAreaProvider in the example/ folder. To ensure react-native-safe-area-context works correctly (especially when edge-to-edge rendering is enabled), wrap your top-level component in <SafeAreaProvider>. For instance, in example/App.tsx:

 import React from 'react';
-import { View } from 'react-native';
+import { SafeAreaProvider } from 'react-native-safe-area-context';
+import { View } from 'react-native';

 const App = () => (
-  <View style={{ flex: 1 }}> … </View>
+  <SafeAreaProvider>
+    <View style={{ flex: 1 }}> … </View>
+  </SafeAreaProvider>
 );

 export default App;
  • File to update: example/App.tsx (or your equivalent root file)
  • Ensure you import and wrap with SafeAreaProvider at the highest level.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"react-native": "0.81.0",
"react-native-nitro-modules": "^0.28.0",
"react-native-safe-area-context": "^5.5.2"
// example/App.tsx
import React from 'react';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { View } from 'react-native';
const App = () => (
<SafeAreaProvider>
<View style={{ flex: 1 }}> … </View>
</SafeAreaProvider>
);
export default App;
🤖 Prompt for AI Agents
In example/package.json around lines 15 to 17 the dependency shows
react-native-safe-area-context is present but the example app does not wrap its
root with SafeAreaProvider; open your root file (example/App.tsx or equivalent)
and import { SafeAreaProvider } from 'react-native-safe-area-context', then wrap
the highest-level component (usually the exported App component or the
navigation container) with <SafeAreaProvider> so all descendants can use the
safe area hooks and components correctly; ensure you export the wrapped
component and adjust any existing top-level JSX accordingly.

- Bump various Babel packages to version 7.28.3 in bun.lock.
- Update the cache key in the GitHub Actions release workflow to reference bun.lock instead of bun.lockb for improved caching.
@patrickkabwe patrickkabwe merged commit 263ce75 into main Aug 17, 2025
5 checks passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 0.6.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant