react-native-nitro-modules 0.31.0 → 0.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -88,7 +88,8 @@ jsi::Value HybridObject::toObject(jsi::Runtime& runtime) {
|
|
|
88
88
|
std::string typeName = "HybridObject<" + std::string(_name) + ">";
|
|
89
89
|
ObjectUtils::defineProperty(runtime, object, "__type",
|
|
90
90
|
PlainPropertyDescriptor{
|
|
91
|
-
.configurable
|
|
91
|
+
// .configurable has to be true because this property is non-frozen
|
|
92
|
+
.configurable = true,
|
|
92
93
|
.enumerable = true,
|
|
93
94
|
.value = jsi::String::createFromUtf8(runtime, typeName),
|
|
94
95
|
.writable = false,
|
|
@@ -53,13 +53,16 @@ jsi::Value HybridObjectPrototype::createPrototype(jsi::Runtime& runtime, const s
|
|
|
53
53
|
const std::string& name = getter.first;
|
|
54
54
|
if (isReadonly) {
|
|
55
55
|
// get
|
|
56
|
-
ObjectUtils::defineProperty(
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
ObjectUtils::defineProperty(runtime, object, name.c_str(),
|
|
57
|
+
ComputedReadonlyPropertyDescriptor{// readonly
|
|
58
|
+
.configurable = false,
|
|
59
|
+
.enumerable = true,
|
|
60
|
+
.get = getter.second.toJSFunction(runtime)});
|
|
59
61
|
} else {
|
|
60
62
|
// get + set
|
|
61
63
|
ObjectUtils::defineProperty(runtime, object, name.c_str(),
|
|
62
|
-
ComputedPropertyDescriptor{
|
|
64
|
+
ComputedPropertyDescriptor{// readonly with setter
|
|
65
|
+
.configurable = false,
|
|
63
66
|
.enumerable = false,
|
|
64
67
|
.get = getter.second.toJSFunction(runtime),
|
|
65
68
|
.set = setter->second.toJSFunction(runtime)});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-nitro-modules",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.1",
|
|
4
4
|
"description": "Insanely fast native C++, Swift or Kotlin modules with a statically compiled binding layer to JSI.",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|