Skip to content

Commit 85ce381

Browse files
authored
Merge pull request #2 from AlshehriAli0/nitro-0.35-upgrade
2 parents e6b99d8 + a68e783 commit 85ce381

File tree

14 files changed

+242
-362
lines changed

14 files changed

+242
-362
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,16 @@ if (await VersionCheck.needsUpdate()) {
3838
bun add react-native-nitro-version-check
3939
```
4040

41+
> **Version 2.x and newer requires Nitro 0.35+** — for earlier versions, use version 1.x
42+
>
4143
> Check the [full installation guide](https://alshehriali0.github.io/react-native-nitro-version-check/docs/installation) for platform setup and additional dependencies.
4244
4345
## Documentation
4446

4547
- [**Nitro Version Check** docs 📚](https://alshehriali0.github.io/react-native-nitro-version-check/)
4648
- [**Getting Started** guide](https://alshehriali0.github.io/react-native-nitro-version-check/docs/getting-started)
4749
- [**Installation** guide](https://alshehriali0.github.io/react-native-nitro-version-check/docs/installation)
50+
- [**Compatibility** guide](https://alshehriali0.github.io/react-native-nitro-version-check/docs/compatibility)
4851
- [**API Reference**](https://alshehriali0.github.io/react-native-nitro-version-check/docs/api-reference)
4952
- [**Migration Guide** from react-native-version-check](https://alshehriali0.github.io/react-native-nitro-version-check/docs/migration-guide)
5053

bun.lock

Lines changed: 97 additions & 271 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: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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+
| `react-native-nitro-version-check` Version | `react-native-nitro-modules` | Status |
13+
|---|---|---|
14+
| v1.x | 0.32.0 - 0.34.x | Stable |
15+
| v2.0.0+ | 0.35.0+ | Current |
16+
17+
## Nitro 0.35.0 and Later
18+
19+
**Version 2.x and newer is fully built around Nitro 0.35+ support.** All v1.x versions work with Nitro 0.32.0 - 0.34.x.
20+
21+
### Nitro 0.35.0 Improvements
22+
23+
Nitro 0.35.0 includes critical improvements and a memory leak fix in Kotlin HybridObjects. This required changes to:
24+
25+
- **Kotlin**: Regenerated specs with updated JNI initialization
26+
- **Swift & C++**: Specs regenerated for compatibility
27+
28+
Version 2.x and newer leverage these improvements for better performance and stability.
29+
30+
### Upgrading from v1.x to v2.0.0+
31+
32+
When you're ready to upgrade to v2.0.0, ensure you have `react-native-nitro-modules` 0.35.0+:
33+
34+
```sh
35+
bun add react-native-nitro-modules@0.35.0
36+
bun add react-native-nitro-version-check@2.0.0
37+
```
38+
39+
Then rebuild your app:
40+
41+
```sh
42+
# For Expo
43+
bunx expo prebuild --clean
44+
45+
# For bare React Native
46+
cd ios && pod install
47+
```
48+
49+
### Staying on v1.x
50+
51+
All v1.x versions work with Nitro 0.32.0 - 0.34.x. When you upgrade to Nitro 0.35.0+, you'll need to upgrade to v2.0.0+.

docs/docs/contributing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ bun install
4242

4343
```sh
4444
cd example
45-
npx expo prebuild
45+
bunx expo prebuild
4646
bun run ios
4747
```
4848

4949
### Android
5050

5151
```sh
5252
cd example
53-
npx expo prebuild
53+
bunx expo prebuild
5454
bun run android
5555
```
5656

docs/docs/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: Getting Started
55

66
# Getting Started
77

8-
**react-native-nitro-version-check** is a lightweight, fast version-checking library for React Native, powered by [Nitro Modules](https://github.com/mrousavy/nitro).
8+
`react-native-nitro-version-check` is a lightweight, fast version-checking library for React Native, powered by [Nitro Modules](https://github.com/mrousavy/nitro).
99

1010
It's a drop-in replacement for the unmaintained [`react-native-version-check`](https://github.com/kimxogus/react-native-version-check) — rewritten from scratch for performance.
1111

docs/docs/installation.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ bun add react-native-nitro-version-check
1414
```
1515

1616
> Or use your preferred package manager (`npm`, `yarn`, etc.)
17+
>
18+
> **Version 2.x and newer requires Nitro 0.35.0+** — for earlier versions, see [Compatibility](/docs/compatibility)
1719
1820
### Nitro Modules
1921

20-
This library requires [react-native-nitro-modules](https://github.com/mrousavy/nitro). If you don't already have it installed, add it:
22+
This library requires [`react-native-nitro-modules`](https://github.com/mrousavy/nitro). If you don't already have it installed, add it:
2123

2224
```sh
2325
bun add react-native-nitro-modules
@@ -30,7 +32,7 @@ bun add react-native-nitro-modules
3032
For Expo projects, run prebuild after installing:
3133

3234
```sh
33-
npx expo prebuild
35+
bunx expo prebuild
3436
```
3537

3638
### Bare React Native
@@ -44,7 +46,10 @@ cd ios && pod install
4446
## Requirements
4547

4648
- React Native 0.76+
47-
- [react-native-nitro-modules](https://github.com/mrousavy/nitro) >= 0.32.0
49+
- **v2.x+**: [`react-native-nitro-modules`](https://github.com/mrousavy/nitro) >= 0.35.0
50+
- **v1.x**: [`react-native-nitro-modules`](https://github.com/mrousavy/nitro) >= 0.32.0
51+
52+
> See the [Compatibility](/docs/compatibility) guide to understand version requirements and migration paths.
4853
4954
## Verify installation
5055

docs/docs/migration-guide.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ Remove the old package and install the new one:
1616
npm uninstall react-native-version-check
1717

1818
# Install new
19-
bun add react-native-nitro-version-check react-native-nitro-modules
19+
bun add react-native-nitro-version-check react-native-nitro-modules@latest
2020
```
2121

22+
> **Nitro Version Requirement**: Version 2.x requires `react-native-nitro-modules` >= 0.35.0. See the [Compatibility guide](/docs/compatibility) for version-specific requirements.
23+
2224
## 2. Update imports
2325

2426
```ts
@@ -93,7 +95,7 @@ These are new and have no equivalent in the old library:
9395
For Expo:
9496

9597
```sh
96-
npx expo prebuild --clean
98+
bunx expo prebuild --clean
9799
```
98100

99101
For bare React Native:

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",

example/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ bun install
1717

1818
# 2. Generate native projects
1919
cd example
20-
npx expo prebuild
20+
bunx expo prebuild
2121

2222
# 3. Run the app
2323
bun run ios # iOS

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.

0 commit comments

Comments
 (0)