Skip to content

Commit 03dd7c9

Browse files
authored
feat: Upgrade Nitro to 0.30.0 (#923)
1 parent cf77676 commit 03dd7c9

File tree

8 files changed

+52
-21
lines changed

8 files changed

+52
-21
lines changed

bun.lock

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"react": "19.1.0",
2424
"react-native": "0.81.0",
2525
"react-native-mmkv": "*",
26-
"react-native-nitro-modules": "^0.29.4",
26+
"react-native-nitro-modules": "^0.30.0",
2727
"react-native-safe-area-context": "^5.5.2",
2828
},
2929
"devDependencies": {
@@ -60,11 +60,11 @@
6060
"eslint": "^8.57.0",
6161
"eslint-config-prettier": "^9.1.0",
6262
"eslint-plugin-prettier": "^5.2.1",
63-
"nitrogen": "^0.29.4",
63+
"nitrogen": "^0.30.0",
6464
"prettier": "^3.3.3",
6565
"react": "19.1.0",
6666
"react-native": "0.81.0",
67-
"react-native-nitro-modules": "^0.29.4",
67+
"react-native-nitro-modules": "^0.30.0",
6868
"typescript": "^5.8.3",
6969
},
7070
"peerDependencies": {
@@ -601,7 +601,7 @@
601601

602602
"@tootallnate/quickjs-emscripten": ["@tootallnate/[email protected]", "", {}, "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA=="],
603603

604-
"@ts-morph/common": ["@ts-morph/common@0.26.1", "", { "dependencies": { "fast-glob": "^3.3.2", "minimatch": "^9.0.4", "path-browserify": "^1.0.1" } }, "sha512-Sn28TGl/4cFpcM+jwsH1wLncYq3FtN/BIpem+HOygfBWPT5pAeS5dB4VFVzV8FbnOKHpDLZmvAl4AjPEev5idA=="],
604+
"@ts-morph/common": ["@ts-morph/common@0.28.1", "", { "dependencies": { "minimatch": "^10.0.1", "path-browserify": "^1.0.1", "tinyglobby": "^0.2.14" } }, "sha512-W74iWf7ILp1ZKNYXY5qbddNaml7e9Sedv5lvU1V8lftlitkc9Pq1A+jlH23ltDgWYeZFFEqGCD1Ies9hqu3O+g=="],
605605

606606
"@types/babel__core": ["@types/[email protected]", "", { "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA=="],
607607

@@ -1593,7 +1593,7 @@
15931593

15941594
"new-github-release-url": ["[email protected]", "", { "dependencies": { "type-fest": "^2.5.1" } }, "sha512-NHDDGYudnvRutt/VhKFlX26IotXe1w0cmkDm6JGquh5bz/bDTw0LufSmH/GxTjEdpHEO+bVKFTwdrcGa/9XlKQ=="],
15951595

1596-
"nitrogen": ["nitrogen@0.29.4", "", { "dependencies": { "chalk": "^5.3.0", "react-native-nitro-modules": "^0.29.4", "ts-morph": "^25.0.0", "yargs": "^17.7.2", "zod": "^4.0.5" }, "bin": { "nitrogen": "lib/index.js" } }, "sha512-XtQyaWw12S8LpKD3muf+BXNXP2UAPONd4wC7oWK2+JoYVMSlYnMTnRxd6RRT7qH2j5KwFQeuRpwRPWSsxtCAXQ=="],
1596+
"nitrogen": ["nitrogen@0.30.0", "", { "dependencies": { "chalk": "^5.3.0", "react-native-nitro-modules": "^0.30.0", "ts-morph": "^27.0.0", "yargs": "^18.0.0", "zod": "^4.0.5" }, "bin": { "nitrogen": "lib/index.js" } }, "sha512-dM7GBwAOkf8FEILyzvio67Xjuwvbxa9FMMQdsj1PuIQon21et8Nw2ZY0F3xqQK7/osz7b/IWQ5EICPfUzhN3Ng=="],
15971597

15981598
"nocache": ["[email protected]", "", {}, "sha512-WDD0bdg9mbq6F4mRxEYcPWwfA1vxd0mrvKOyxI7Xj/atfRHVeutzuWByG//jfm4uPzp0y4Kj051EORCBSQMycw=="],
15991599

@@ -1771,7 +1771,7 @@
17711771

17721772
"react-native-mmkv": ["react-native-mmkv@workspace:packages/react-native-mmkv"],
17731773

1774-
"react-native-nitro-modules": ["react-native-nitro-modules@0.29.4", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-AfUMcwFtj9FuEDwDLN5eIVo0lBYTQqDaV7meiFzuoZyRmc8ywykFTKfyZwRN2t8Z/WtTlfCj9Y9yaET33IImsg=="],
1774+
"react-native-nitro-modules": ["react-native-nitro-modules@0.30.0", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-DHFSEbM7cwVHmpbGvmd+b5iqy67My0In9oBc8eSMvjTkLWrDkkiE5jLdt6ZJyDF7Fn3C5Tr6Lq2bUa596VSW2g=="],
17751775

17761776
"react-native-safe-area-context": ["[email protected]", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-/wJE58HLEAkATzhhX1xSr+fostLsK8Q97EfpfMDKo8jlOc1QKESSX/FQrhk7HhQH/2uSaox4Y86sNaI02kteiA=="],
17771777

@@ -1995,7 +1995,7 @@
19951995

19961996
"ts-api-utils": ["[email protected]", "", { "peerDependencies": { "typescript": ">=4.2.0" } }, "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw=="],
19971997

1998-
"ts-morph": ["ts-morph@25.0.1", "", { "dependencies": { "@ts-morph/common": "~0.26.0", "code-block-writer": "^13.0.3" } }, "sha512-QJEiTdnz1YjrB3JFhd626gX4rKHDLSjSVMvGGG4v7ONc3RBwa0Eei98G9AT9uNFDMtV54JyuXsFeC+OH0n6bXQ=="],
1998+
"ts-morph": ["ts-morph@27.0.2", "", { "dependencies": { "@ts-morph/common": "~0.28.1", "code-block-writer": "^13.0.3" } }, "sha512-fhUhgeljcrdZ+9DZND1De1029PrE+cMkIP7ooqkLRTrRLTqcki2AstsyJm0vRNbTbVCNJ0idGlbBrfqc7/nA8w=="],
19991999

20002000
"tslib": ["[email protected]", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
20012001

@@ -2233,7 +2233,7 @@
22332233

22342234
"@testing-library/react-native/pretty-format": ["[email protected]", "", { "dependencies": { "@jest/schemas": "30.0.5", "ansi-styles": "^5.2.0", "react-is": "^18.3.1" } }, "sha512-D1tKtYvByrBkFLe2wHJl2bwMJIiT8rW+XA+TiataH79/FszLQMrpGEvzUVkzPau7OCO0Qnrhpe87PqtOAIB8Yw=="],
22352235

2236-
"@ts-morph/common/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="],
2236+
"@ts-morph/common/minimatch": ["minimatch@10.0.3", "", { "dependencies": { "@isaacs/brace-expansion": "^5.0.0" } }, "sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw=="],
22372237

22382238
"@typescript-eslint/typescript-estree/minimatch": ["[email protected]", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="],
22392239

@@ -2357,6 +2357,8 @@
23572357

23582358
"nitrogen/chalk": ["[email protected]", "", {}, "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA=="],
23592359

2360+
"nitrogen/yargs": ["[email protected]", "", { "dependencies": { "cliui": "^9.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "string-width": "^7.2.0", "y18n": "^5.0.5", "yargs-parser": "^22.0.0" } }, "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg=="],
2361+
23602362
"normalize-package-data/semver": ["[email protected]", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="],
23612363

23622364
"npm-run-path/path-key": ["[email protected]", "", {}, "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ=="],
@@ -2603,8 +2605,6 @@
26032605

26042606
"@testing-library/react-native/pretty-format/react-is": ["[email protected]", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="],
26052607

2606-
"@ts-morph/common/minimatch/brace-expansion": ["[email protected]", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ=="],
2607-
26082608
"@typescript-eslint/typescript-estree/minimatch/brace-expansion": ["[email protected]", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ=="],
26092609

26102610
"accepts/mime-types/mime-db": ["[email protected]", "", {}, "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="],
@@ -2685,6 +2685,10 @@
26852685

26862686
"metro/mime-types/mime-db": ["[email protected]", "", {}, "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="],
26872687

2688+
"nitrogen/yargs/cliui": ["[email protected]", "", { "dependencies": { "string-width": "^7.2.0", "strip-ansi": "^7.1.0", "wrap-ansi": "^9.0.0" } }, "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w=="],
2689+
2690+
"nitrogen/yargs/yargs-parser": ["[email protected]", "", {}, "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw=="],
2691+
26882692
"ora/strip-ansi/ansi-regex": ["[email protected]", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="],
26892693

26902694
"pkg-dir/find-up/locate-path": ["[email protected]", "", { "dependencies": { "p-locate": "^4.1.0" } }, "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g=="],
@@ -2757,6 +2761,10 @@
27572761

27582762
"metro-config/cosmiconfig/js-yaml/argparse": ["[email protected]", "", { "dependencies": { "sprintf-js": "~1.0.2" } }, "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg=="],
27592763

2764+
"nitrogen/yargs/cliui/strip-ansi": ["[email protected]", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA=="],
2765+
2766+
"nitrogen/yargs/cliui/wrap-ansi": ["[email protected]", "", { "dependencies": { "ansi-styles": "^6.2.1", "string-width": "^7.0.0", "strip-ansi": "^7.1.0" } }, "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww=="],
2767+
27602768
"pkg-dir/find-up/locate-path/p-locate": ["[email protected]", "", { "dependencies": { "p-limit": "^2.2.0" } }, "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A=="],
27612769

27622770
"slice-ansi/ansi-styles/color-convert/color-name": ["[email protected]", "", {}, "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="],
@@ -2775,6 +2783,10 @@
27752783

27762784
"logkitty/yargs/find-up/locate-path/p-locate": ["[email protected]", "", { "dependencies": { "p-limit": "^2.2.0" } }, "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A=="],
27772785

2786+
"nitrogen/yargs/cliui/strip-ansi/ansi-regex": ["[email protected]", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="],
2787+
2788+
"nitrogen/yargs/cliui/wrap-ansi/ansi-styles": ["[email protected]", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="],
2789+
27782790
"pkg-dir/find-up/locate-path/p-locate/p-limit": ["[email protected]", "", { "dependencies": { "p-try": "^2.0.0" } }, "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w=="],
27792791

27802792
"@react-native-community/cli-doctor/ora/cli-cursor/restore-cursor/onetime/mimic-fn": ["[email protected]", "", {}, "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="],

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"react": "19.1.0",
1919
"react-native": "0.81.0",
2020
"react-native-mmkv": "*",
21-
"react-native-nitro-modules": "^0.29.4",
21+
"react-native-nitro-modules": "^0.30.0",
2222
"react-native-safe-area-context": "^5.5.2"
2323
},
2424
"devDependencies": {

packages/react-native-mmkv/nitrogen/generated/android/NitroMmkv+autolinking.cmake

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
# include(${CMAKE_SOURCE_DIR}/../nitrogen/generated/android/NitroMmkv+autolinking.cmake)
1414
# ```
1515

16+
# Define a flag to check if we are building properly
17+
add_definitions(-DBUILDING_NITROMMKV_WITH_GENERATED_CMAKE_PROJECT)
18+
19+
# Enable Raw Props parsing in react-native (for Nitro Views)
20+
add_definitions(-DRN_SERIALIZABLE_STATE)
21+
1622
# Add all headers that were generated by Nitrogen
1723
include_directories(
1824
"../nitrogen/generated/shared/c++"
@@ -34,12 +40,9 @@ target_sources(
3440
../nitrogen/generated/android/c++/JHybridMMKVPlatformContextSpec.cpp
3541
)
3642

37-
# Define a flag to check if we are building properly
38-
add_definitions(-DBUILDING_NITROMMKV_WITH_GENERATED_CMAKE_PROJECT)
39-
4043
# From node_modules/react-native/ReactAndroid/cmake-utils/folly-flags.cmake
4144
# Used in node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake
42-
target_compile_definitions(
45+
target_compile_definitions(
4346
NitroMmkv PRIVATE
4447
-DFOLLY_NO_CONFIG=1
4548
-DFOLLY_HAVE_CLOCK_GETTIME=1

packages/react-native-mmkv/nitrogen/generated/ios/NitroMmkv-Swift-Cxx-Bridge.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
namespace margelo::nitro::mmkv::bridge::swift {
1515

1616
// pragma MARK: std::shared_ptr<HybridMMKVPlatformContextSpec>
17-
std::shared_ptr<HybridMMKVPlatformContextSpec> create_std__shared_ptr_HybridMMKVPlatformContextSpec_(void* _Nonnull swiftUnsafePointer) noexcept {
17+
std::shared_ptr<HybridMMKVPlatformContextSpec> create_std__shared_ptr_HybridMMKVPlatformContextSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
1818
NitroMmkv::HybridMMKVPlatformContextSpec_cxx swiftPart = NitroMmkv::HybridMMKVPlatformContextSpec_cxx::fromUnsafe(swiftUnsafePointer);
1919
return std::make_shared<margelo::nitro::mmkv::HybridMMKVPlatformContextSpecSwift>(swiftPart);
2020
}
21-
void* _Nonnull get_std__shared_ptr_HybridMMKVPlatformContextSpec_(std__shared_ptr_HybridMMKVPlatformContextSpec_ cppType) noexcept {
21+
void* NON_NULL get_std__shared_ptr_HybridMMKVPlatformContextSpec_(std__shared_ptr_HybridMMKVPlatformContextSpec_ cppType) {
2222
std::shared_ptr<margelo::nitro::mmkv::HybridMMKVPlatformContextSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::mmkv::HybridMMKVPlatformContextSpecSwift>(cppType);
2323
#ifdef NITRO_DEBUG
2424
if (swiftWrapper == nullptr) [[unlikely]] {

packages/react-native-mmkv/nitrogen/generated/ios/NitroMmkv-Swift-Cxx-Bridge.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ namespace margelo::nitro::mmkv::bridge::swift {
4949
* Specialized version of `std::shared_ptr<HybridMMKVPlatformContextSpec>`.
5050
*/
5151
using std__shared_ptr_HybridMMKVPlatformContextSpec_ = std::shared_ptr<HybridMMKVPlatformContextSpec>;
52-
std::shared_ptr<HybridMMKVPlatformContextSpec> create_std__shared_ptr_HybridMMKVPlatformContextSpec_(void* _Nonnull swiftUnsafePointer) noexcept;
53-
void* _Nonnull get_std__shared_ptr_HybridMMKVPlatformContextSpec_(std__shared_ptr_HybridMMKVPlatformContextSpec_ cppType) noexcept;
52+
std::shared_ptr<HybridMMKVPlatformContextSpec> create_std__shared_ptr_HybridMMKVPlatformContextSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
53+
void* NON_NULL get_std__shared_ptr_HybridMMKVPlatformContextSpec_(std__shared_ptr_HybridMMKVPlatformContextSpec_ cppType);
5454

5555
// pragma MARK: std::weak_ptr<HybridMMKVPlatformContextSpec>
5656
using std__weak_ptr_HybridMMKVPlatformContextSpec_ = std::weak_ptr<HybridMMKVPlatformContextSpec>;

packages/react-native-mmkv/nitrogen/generated/shared/c++/Configuration.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
#else
1818
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
1919
#endif
20+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
21+
#include <NitroModules/JSIHelpers.hpp>
22+
#else
23+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24+
#endif
2025

2126
// Forward declaration of `Mode` to properly resolve imports.
2227
namespace margelo::nitro::mmkv { enum class Mode; }
@@ -74,6 +79,9 @@ namespace margelo::nitro {
7479
return false;
7580
}
7681
jsi::Object obj = value.getObject(runtime);
82+
if (!nitro::isPlainObject(runtime, obj)) {
83+
return false;
84+
}
7785
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "id"))) return false;
7886
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "path"))) return false;
7987
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "encryptionKey"))) return false;

packages/react-native-mmkv/nitrogen/generated/shared/c++/Listener.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
#else
1818
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
1919
#endif
20+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
21+
#include <NitroModules/JSIHelpers.hpp>
22+
#else
23+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24+
#endif
2025

2126

2227

@@ -59,6 +64,9 @@ namespace margelo::nitro {
5964
return false;
6065
}
6166
jsi::Object obj = value.getObject(runtime);
67+
if (!nitro::isPlainObject(runtime, obj)) {
68+
return false;
69+
}
6270
if (!JSIConverter<std::function<void()>>::canConvert(runtime, obj.getProperty(runtime, "remove"))) return false;
6371
return true;
6472
}

packages/react-native-mmkv/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@
6868
"eslint": "^8.57.0",
6969
"eslint-config-prettier": "^9.1.0",
7070
"eslint-plugin-prettier": "^5.2.1",
71-
"nitrogen": "^0.29.4",
71+
"nitrogen": "^0.30.0",
7272
"prettier": "^3.3.3",
7373
"react": "19.1.0",
7474
"react-native": "0.81.0",
75-
"react-native-nitro-modules": "^0.29.4",
75+
"react-native-nitro-modules": "^0.30.0",
7676
"typescript": "^5.8.3"
7777
},
7878
"peerDependencies": {

0 commit comments

Comments
 (0)