@react-native/codegen 0.88.0-nightly-20260720-e64027865 → 0.88.0-nightly-20260722-eb4d3892a
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.
- package/lib/cli/combine/combine-js-to-schema.js +2 -2
- package/lib/cli/combine/combine-js-to-schema.js.flow +2 -2
- package/lib/cli/combine/combine-schemas-cli.js +2 -2
- package/lib/cli/combine/combine-schemas-cli.js.flow +2 -2
- package/lib/cli/combine/combine-utils.js +1 -1
- package/lib/cli/combine/combine-utils.js.flow +1 -1
- package/lib/cli/generators/generate-all.js +1 -1
- package/lib/cli/generators/generate-all.js.flow +1 -1
- package/lib/cli/parser/parser.js +1 -1
- package/lib/cli/parser/parser.js.flow +1 -1
- package/lib/generators/RNCodegen.js +2 -2
- package/lib/generators/RNCodegen.js.flow +2 -2
- package/lib/generators/modules/GenerateModuleObjCpp/serializeMethod.js +1 -1
- package/lib/generators/modules/GenerateModuleObjCpp/serializeMethod.js.flow +1 -1
- package/lib/parsers/flow/parser.js +1 -1
- package/lib/parsers/flow/parser.js.flow +1 -1
- package/lib/parsers/typescript/parser.js +1 -1
- package/lib/parsers/typescript/parser.js.flow +1 -1
- package/lib/parsers/utils.js +1 -1
- package/lib/parsers/utils.js.flow +1 -1
- package/package.json +1 -1
|
@@ -14,8 +14,8 @@ import type {SchemaType} from '../../CodegenSchema.js';
|
|
|
14
14
|
const {FlowParser} = require('../../parsers/flow/parser');
|
|
15
15
|
const {TypeScriptParser} = require('../../parsers/typescript/parser');
|
|
16
16
|
const {filterJSFile} = require('./combine-utils');
|
|
17
|
-
const fs = require('fs');
|
|
18
|
-
const path = require('path');
|
|
17
|
+
const fs = require('node:fs');
|
|
18
|
+
const path = require('node:path');
|
|
19
19
|
const {globSync} = require('tinyglobby');
|
|
20
20
|
|
|
21
21
|
const flowParser = new FlowParser();
|
|
@@ -16,8 +16,8 @@ import type {
|
|
|
16
16
|
SchemaType,
|
|
17
17
|
} from '../../CodegenSchema.js';
|
|
18
18
|
|
|
19
|
-
const assert = require('assert');
|
|
20
|
-
const fs = require('fs');
|
|
19
|
+
const assert = require('node:assert');
|
|
20
|
+
const fs = require('node:fs');
|
|
21
21
|
const yargs = require('yargs');
|
|
22
22
|
|
|
23
23
|
const argv = yargs
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const path = require('path');
|
|
3
|
+
const path = require('node:path');
|
|
4
4
|
function filterJSFile(originalFilePath, currentPlatform, excludeRegExp) {
|
|
5
5
|
const filePath = originalFilePath.replace(/\.fb(\.|$)/, '$1');
|
|
6
6
|
const basename = path.basename(filePath);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const RNCodegen = require('../../generators/RNCodegen.js');
|
|
4
|
-
const fs = require('fs');
|
|
4
|
+
const fs = require('node:fs');
|
|
5
5
|
const args = process.argv.slice(2);
|
|
6
6
|
if (args.length < 3) {
|
|
7
7
|
throw new Error(`Expected to receive path to schema, library name, output directory and module spec name. Received ${args.join(', ')}`);
|
package/lib/cli/parser/parser.js
CHANGED
|
@@ -6,7 +6,7 @@ const {
|
|
|
6
6
|
const {
|
|
7
7
|
TypeScriptParser
|
|
8
8
|
} = require('../../parsers/typescript/parser');
|
|
9
|
-
const path = require('path');
|
|
9
|
+
const path = require('node:path');
|
|
10
10
|
const flowParser = new FlowParser();
|
|
11
11
|
const typescriptParser = new TypeScriptParser();
|
|
12
12
|
function parseFiles(files) {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
const {FlowParser} = require('../../parsers/flow/parser');
|
|
14
14
|
const {TypeScriptParser} = require('../../parsers/typescript/parser');
|
|
15
|
-
const path = require('path');
|
|
15
|
+
const path = require('node:path');
|
|
16
16
|
|
|
17
17
|
const flowParser = new FlowParser();
|
|
18
18
|
const typescriptParser = new TypeScriptParser();
|
|
@@ -23,8 +23,8 @@ const generateModuleJavaSpec = require('./modules/GenerateModuleJavaSpec.js');
|
|
|
23
23
|
const generateModuleJniCpp = require('./modules/GenerateModuleJniCpp.js');
|
|
24
24
|
const generateModuleJniH = require('./modules/GenerateModuleJniH.js');
|
|
25
25
|
const generateModuleObjCpp = require('./modules/GenerateModuleObjCpp');
|
|
26
|
-
const fs = require('fs');
|
|
27
|
-
const path = require('path');
|
|
26
|
+
const fs = require('node:fs');
|
|
27
|
+
const path = require('node:path');
|
|
28
28
|
const ALL_GENERATORS = {
|
|
29
29
|
generateComponentDescriptorH: generateComponentDescriptorH.generate,
|
|
30
30
|
generateComponentDescriptorCpp: generateComponentDescriptorCpp.generate,
|
|
@@ -35,8 +35,8 @@ const generateModuleJavaSpec = require('./modules/GenerateModuleJavaSpec.js');
|
|
|
35
35
|
const generateModuleJniCpp = require('./modules/GenerateModuleJniCpp.js');
|
|
36
36
|
const generateModuleJniH = require('./modules/GenerateModuleJniH.js');
|
|
37
37
|
const generateModuleObjCpp = require('./modules/GenerateModuleObjCpp');
|
|
38
|
-
const fs = require('fs');
|
|
39
|
-
const path = require('path');
|
|
38
|
+
const fs = require('node:fs');
|
|
39
|
+
const path = require('node:path');
|
|
40
40
|
|
|
41
41
|
const ALL_GENERATORS = {
|
|
42
42
|
generateComponentDescriptorH: generateComponentDescriptorH.generate,
|
|
@@ -124,7 +124,7 @@ function getParamObjCType(hasteModuleName, methodName, param, structName, struct
|
|
|
124
124
|
}
|
|
125
125
|
case 'ArrayBufferTypeAnnotation':
|
|
126
126
|
{
|
|
127
|
-
return notStruct(wrapOptional('
|
|
127
|
+
return notStruct(wrapOptional('NSData *', !nullable));
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
const [structTypeAnnotation] = unwrapNullable(structCollector.process(structName, 'REGULAR', resolveAlias, wrapNullable(nullable, typeAnnotation)));
|
|
@@ -221,7 +221,7 @@ function getParamObjCType(
|
|
|
221
221
|
return notStruct(wrapOptional('NSArray *', !nullable));
|
|
222
222
|
}
|
|
223
223
|
case 'ArrayBufferTypeAnnotation': {
|
|
224
|
-
return notStruct(wrapOptional('
|
|
224
|
+
return notStruct(wrapOptional('NSData *', !nullable));
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
|
|
@@ -32,8 +32,8 @@ const {
|
|
|
32
32
|
const {
|
|
33
33
|
parseFlowAndThrowErrors
|
|
34
34
|
} = require('./parseFlowAndThrowErrors');
|
|
35
|
-
const fs = require('fs');
|
|
36
35
|
const invariant = require('invariant');
|
|
36
|
+
const fs = require('node:fs');
|
|
37
37
|
class FlowParser {
|
|
38
38
|
constructor() {
|
|
39
39
|
_defineProperty(this, "typeParameterInstantiation", 'TypeParameterInstantiation');
|
|
@@ -56,8 +56,8 @@ const {
|
|
|
56
56
|
} = require('./components/componentsUtils');
|
|
57
57
|
const {flowTranslateTypeAnnotation} = require('./modules');
|
|
58
58
|
const {parseFlowAndThrowErrors} = require('./parseFlowAndThrowErrors');
|
|
59
|
-
const fs = require('fs');
|
|
60
59
|
const invariant = require('invariant');
|
|
60
|
+
const fs = require('node:fs');
|
|
61
61
|
|
|
62
62
|
type ExtendsForProp = null | {
|
|
63
63
|
type: 'ReactNativeBuiltInType',
|
|
@@ -34,8 +34,8 @@ const {
|
|
|
34
34
|
parseTopLevelType
|
|
35
35
|
} = require('./parseTopLevelType');
|
|
36
36
|
const babelParser = require('@babel/parser');
|
|
37
|
-
const fs = require('fs');
|
|
38
37
|
const invariant = require('invariant');
|
|
38
|
+
const fs = require('node:fs');
|
|
39
39
|
class TypeScriptParser {
|
|
40
40
|
constructor() {
|
|
41
41
|
_defineProperty(this, "typeParameterInstantiation", 'TSTypeParameterInstantiation');
|
|
@@ -59,8 +59,8 @@ const {typeScriptTranslateTypeAnnotation} = require('./modules');
|
|
|
59
59
|
const {parseTopLevelType} = require('./parseTopLevelType');
|
|
60
60
|
// $FlowFixMe[untyped-import] Use flow-types for @babel/parser
|
|
61
61
|
const babelParser = require('@babel/parser');
|
|
62
|
-
const fs = require('fs');
|
|
63
62
|
const invariant = require('invariant');
|
|
63
|
+
const fs = require('node:fs');
|
|
64
64
|
|
|
65
65
|
class TypeScriptParser implements Parser {
|
|
66
66
|
typeParameterInstantiation: string = 'TSTypeParameterInstantiation';
|
package/lib/parsers/utils.js
CHANGED