@react-native/codegen 0.75.0-nightly-20240228-252ef19c8 → 0.75.0-nightly-20240302-7d4778104
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.
|
@@ -161,6 +161,12 @@ function serializeArg(moduleName, arg, index, resolveAlias, enumMap) {
|
|
|
161
161
|
const val = `args[${index}]`;
|
|
162
162
|
const expression = callback(val);
|
|
163
163
|
|
|
164
|
+
// param?: T
|
|
165
|
+
if (optional && !nullable) {
|
|
166
|
+
// throw new Error('are we hitting this case? ' + moduleName);
|
|
167
|
+
return `count <= ${index} || ${val}.isUndefined() ? std::nullopt : std::make_optional(${expression})`;
|
|
168
|
+
}
|
|
169
|
+
|
|
164
170
|
// param: ?T
|
|
165
171
|
// param?: ?T
|
|
166
172
|
if (nullable || optional) {
|
|
@@ -132,6 +132,12 @@ function serializeArg(
|
|
|
132
132
|
const val = `args[${index}]`;
|
|
133
133
|
const expression = callback(val);
|
|
134
134
|
|
|
135
|
+
// param?: T
|
|
136
|
+
if (optional && !nullable) {
|
|
137
|
+
// throw new Error('are we hitting this case? ' + moduleName);
|
|
138
|
+
return `count <= ${index} || ${val}.isUndefined() ? std::nullopt : std::make_optional(${expression})`;
|
|
139
|
+
}
|
|
140
|
+
|
|
135
141
|
// param: ?T
|
|
136
142
|
// param?: ?T
|
|
137
143
|
if (nullable || optional) {
|
|
@@ -483,7 +483,7 @@ module.exports = {
|
|
|
483
483
|
'com.facebook.react.bridge.ReactApplicationContext',
|
|
484
484
|
'com.facebook.react.bridge.ReactContextBaseJavaModule',
|
|
485
485
|
'com.facebook.react.bridge.ReactMethod',
|
|
486
|
-
'com.facebook.react.
|
|
486
|
+
'com.facebook.react.turbomodule.core.interfaces.TurboModule',
|
|
487
487
|
'com.facebook.proguard.annotations.DoNotStrip',
|
|
488
488
|
'javax.annotation.Nonnull',
|
|
489
489
|
]);
|
|
@@ -462,7 +462,7 @@ module.exports = {
|
|
|
462
462
|
'com.facebook.react.bridge.ReactApplicationContext',
|
|
463
463
|
'com.facebook.react.bridge.ReactContextBaseJavaModule',
|
|
464
464
|
'com.facebook.react.bridge.ReactMethod',
|
|
465
|
-
'com.facebook.react.
|
|
465
|
+
'com.facebook.react.turbomodule.core.interfaces.TurboModule',
|
|
466
466
|
'com.facebook.proguard.annotations.DoNotStrip',
|
|
467
467
|
'javax.annotation.Nonnull',
|
|
468
468
|
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native/codegen",
|
|
3
|
-
"version": "0.75.0-nightly-
|
|
3
|
+
"version": "0.75.0-nightly-20240302-7d4778104",
|
|
4
4
|
"description": "Code generation tools for React Native",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@babel/parser": "^7.20.0",
|
|
33
33
|
"glob": "^7.1.1",
|
|
34
|
-
"hermes-parser": "0.
|
|
34
|
+
"hermes-parser": "0.20.0",
|
|
35
35
|
"invariant": "^2.2.4",
|
|
36
36
|
"jscodeshift": "^0.14.0",
|
|
37
37
|
"mkdirp": "^0.5.1",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@babel/plugin-transform-flow-strip-types": "^7.20.0",
|
|
50
50
|
"@babel/preset-env": "^7.20.0",
|
|
51
51
|
"chalk": "^4.0.0",
|
|
52
|
-
"hermes-estree": "0.
|
|
52
|
+
"hermes-estree": "0.20.0",
|
|
53
53
|
"micromatch": "^4.0.4",
|
|
54
54
|
"prettier": "2.8.8",
|
|
55
55
|
"rimraf": "^3.0.2",
|