Skip to content

Commit e44beac

Browse files
committed
feat: upgrade to Nitro 0.35.0
Upgrade nitrogen to 0.35.0 and regenerate specs to support the latest version. Nitro 0.35.0 includes a critical memory leak fix in Kotlin HybridObjects. Changes: - Upgrade nitrogen from 0.34.1 to 0.35.0 - Regenerate specs using nitrogen 0.35.0 - Update peerDependencies to require react-native-nitro-modules >=35.0 - Add compatibility documentation - Update version requirements in installation guide
1 parent e6b99d8 commit e44beac

File tree

10 files changed

+277
-333
lines changed

10 files changed

+277
-333
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ bun add react-native-nitro-version-check
4545
- [**Nitro Version Check** docs 📚](https://alshehriali0.github.io/react-native-nitro-version-check/)
4646
- [**Getting Started** guide](https://alshehriali0.github.io/react-native-nitro-version-check/docs/getting-started)
4747
- [**Installation** guide](https://alshehriali0.github.io/react-native-nitro-version-check/docs/installation)
48+
- [**Compatibility** guide](https://alshehriali0.github.io/react-native-nitro-version-check/docs/compatibility)
4849
- [**API Reference**](https://alshehriali0.github.io/react-native-nitro-version-check/docs/api-reference)
4950
- [**Migration Guide** from react-native-version-check](https://alshehriali0.github.io/react-native-nitro-version-check/docs/migration-guide)
5051

bun.lock

Lines changed: 144 additions & 250 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/docs/compatibility.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
sidebar_position: 3
3+
title: Compatibility
4+
---
5+
6+
# Compatibility
7+
8+
This page documents the compatibility between different versions of react-native-nitro-version-check and the Nitro ecosystem.
9+
10+
## Version Matrix
11+
12+
| Library Version | Nitro Modules | Status |
13+
|---|---|---|
14+
| v1.0.x | 0.32.0 - 0.34.x | Stable |
15+
| v1.1.0+ | 0.35.0+ | Current |
16+
17+
## Nitro 0.35.0 Breaking Changes
18+
19+
Starting with **v1.1.0**, this library requires [Nitro 0.35.0](https://github.com/mrousavy/nitro/releases/tag/v0.35.0) or later.
20+
21+
### What Changed
22+
23+
Nitro 0.35.0 includes a critical memory leak fix in Kotlin HybridObjects. This required changes to:
24+
25+
- **Kotlin**: Regenerated specs with updated JNI initialization
26+
- **Swift & C++**: No breaking changes, specs regenerated for compatibility
27+
28+
### Migration Path
29+
30+
If you're using v1.0.x and want to upgrade to v1.1.0:
31+
32+
1. Ensure you have Nitro modules 0.35.0+:
33+
```sh
34+
bun add react-native-nitro-modules@latest
35+
```
36+
37+
2. Update the library:
38+
```sh
39+
bun add react-native-nitro-version-check@latest
40+
```
41+
42+
3. Rebuild your app:
43+
```sh
44+
# For Expo
45+
npx expo prebuild --clean
46+
47+
# For bare React Native
48+
cd ios && pod install && cd ..
49+
```
50+
51+
## Staying on v1.0.x
52+
53+
If you need to stay on v1.0.x, no action is required. v1.0.x remains compatible with Nitro 0.32.0 - 0.34.x.
54+
55+
However, we recommend upgrading to v1.1.0+ to benefit from the memory leak fixes and improvements in Nitro 0.35.0.

docs/docs/installation.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ cd ios && pod install
4444
## Requirements
4545

4646
- React Native 0.76+
47-
- [react-native-nitro-modules](https://github.com/mrousavy/nitro) >= 0.32.0
47+
- [react-native-nitro-modules](https://github.com/mrousavy/nitro) >= 0.35.0 (for v1.1.0+)
48+
- [react-native-nitro-modules](https://github.com/mrousavy/nitro) >= 0.32.0 (for v1.0.x)
4849

4950
## Verify installation
5051

docs/sidebars.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const sidebars: SidebarsConfig = {
55
{
66
type: "category",
77
label: "Getting Started",
8-
items: ["getting-started", "installation"],
8+
items: ["getting-started", "installation", "compatibility"],
99
},
1010
{
1111
type: "category",

package/nitrogen/generated/android/NitroVersionCheckOnLoad.cpp

Lines changed: 11 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package/nitrogen/generated/android/c++/JHybridVersionCheckSpec.cpp

Lines changed: 26 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package/nitrogen/generated/android/c++/JHybridVersionCheckSpec.hpp

Lines changed: 19 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroversioncheck/HybridVersionCheckSpec.kt

Lines changed: 15 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package/package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,7 @@
8888
"npm": {
8989
"publish": true,
9090
"skipChecks": true,
91-
"publishArgs": [
92-
"--provenance --access public"
93-
]
91+
"publishArgs": ["--provenance --access public"]
9492
},
9593
"github": {
9694
"release": true
@@ -154,7 +152,7 @@
154152
"@types/jest": "^29.5.12",
155153
"@types/react": "^19.1.03",
156154
"jest": "^29.7.0",
157-
"nitrogen": "*",
155+
"nitrogen": "^0.35.0",
158156
"react": "19.2.0",
159157
"react-native": "0.83.0",
160158
"react-native-nitro-modules": "*",
@@ -165,6 +163,6 @@
165163
"peerDependencies": {
166164
"react": "*",
167165
"react-native": "*",
168-
"react-native-nitro-modules": ">=32.0"
166+
"react-native-nitro-modules": ">=35.0"
169167
}
170168
}

0 commit comments

Comments
 (0)