@react-native/codegen 0.72.5 → 0.72.7

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.
@@ -14,6 +14,7 @@
14
14
  const combine = require('./combine-js-to-schema');
15
15
  const fs = require('fs');
16
16
  const glob = require('glob');
17
+ const path = require('path');
17
18
  const _require = require('./combine-utils'),
18
19
  parseArgs = _require.parseArgs,
19
20
  filterJSFile = _require.filterJSFile;
@@ -24,9 +25,14 @@ const _parseArgs = parseArgs(process.argv),
24
25
  const allFiles = [];
25
26
  fileList.forEach(file => {
26
27
  if (fs.lstatSync(file).isDirectory()) {
28
+ const filePattern = path.sep === '\\' ? file.replace(/\\/g, '/') : file;
27
29
  const dirFiles = glob
28
- .sync(`${file}/**/*.{js,ts,tsx}`, {
30
+ .sync(`${filePattern}/**/*.{js,ts,tsx}`, {
29
31
  nodir: true,
32
+ // TODO: This will remove the need of slash substitution above for Windows,
33
+ // but it requires glob@v9+; with the package currenlty relying on
34
+ // glob@7.1.1; and flow-typed repo not having definitions for glob@9+.
35
+ // windowsPathsNoEscape: true,
30
36
  })
31
37
  .filter(element => filterJSFile(element, platform));
32
38
  allFiles.push(...dirFiles);
@@ -14,6 +14,7 @@
14
14
  const combine = require('./combine-js-to-schema');
15
15
  const fs = require('fs');
16
16
  const glob = require('glob');
17
+ const path = require('path');
17
18
  const {parseArgs, filterJSFile} = require('./combine-utils');
18
19
 
19
20
  const {platform, outfile, fileList} = parseArgs(process.argv);
@@ -21,9 +22,14 @@ const {platform, outfile, fileList} = parseArgs(process.argv);
21
22
  const allFiles = [];
22
23
  fileList.forEach(file => {
23
24
  if (fs.lstatSync(file).isDirectory()) {
25
+ const filePattern = path.sep === '\\' ? file.replace(/\\/g, '/') : file;
24
26
  const dirFiles = glob
25
- .sync(`${file}/**/*.{js,ts,tsx}`, {
27
+ .sync(`${filePattern}/**/*.{js,ts,tsx}`, {
26
28
  nodir: true,
29
+ // TODO: This will remove the need of slash substitution above for Windows,
30
+ // but it requires glob@v9+; with the package currenlty relying on
31
+ // glob@7.1.1; and flow-typed repo not having definitions for glob@9+.
32
+ // windowsPathsNoEscape: true,
27
33
  })
28
34
  .filter(element => filterJSFile(element, platform));
29
35
  allFiles.push(...dirFiles);
@@ -366,7 +366,7 @@ struct Bridging<${enumName}> {
366
366
  ${fromCases}
367
367
  }
368
368
 
369
- static ${toValue} toJs(jsi::Runtime &rt, ${enumName} value, const std::shared_ptr<CallInvoker> &jsInvoker) {
369
+ static ${toValue} toJs(jsi::Runtime &rt, ${enumName} value) {
370
370
  ${toCases}
371
371
  }
372
372
  };`;
@@ -343,7 +343,7 @@ struct Bridging<${enumName}> {
343
343
  ${fromCases}
344
344
  }
345
345
 
346
- static ${toValue} toJs(jsi::Runtime &rt, ${enumName} value, const std::shared_ptr<CallInvoker> &jsInvoker) {
346
+ static ${toValue} toJs(jsi::Runtime &rt, ${enumName} value) {
347
347
  ${toCases}
348
348
  }
349
349
  };`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native/codegen",
3
- "version": "0.72.5",
3
+ "version": "0.72.7",
4
4
  "description": "⚛️ Code generation tools for React Native",
5
5
  "homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/react-native-codegen",
6
6
  "repository": {