@react-native/codegen 0.84.0-nightly-20251202-b0e754bc7 → 0.84.0-nightly-20251204-5bb3a6d68

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,8 +14,8 @@ const {FlowParser} = require('../../parsers/flow/parser');
14
14
  const {TypeScriptParser} = require('../../parsers/typescript/parser');
15
15
  const {filterJSFile} = require('./combine-utils');
16
16
  const fs = require('fs');
17
- const glob = require('glob');
18
17
  const path = require('path');
18
+ const {globSync} = require('tinyglobby');
19
19
  const flowParser = new FlowParser();
20
20
  const typescriptParser = new TypeScriptParser();
21
21
  function combineSchemas(files, libraryName) {
@@ -55,13 +55,11 @@ function expandDirectoriesIntoFiles(fileList, platform, exclude) {
55
55
  if (!fs.lstatSync(file).isDirectory()) {
56
56
  return [file];
57
57
  }
58
- const filePattern = path.sep === '\\' ? file.replace(/\\/g, '/') : file;
59
- return glob.sync(`${filePattern}/**/*{,.fb}.{js,ts,tsx}`, {
60
- nodir: true,
61
- // TODO: This will remove the need of slash substitution above for Windows,
62
- // but it requires glob@v9+; with the package currenlty relying on
63
- // glob@7.1.1; and flow-typed repo not having definitions for glob@9+.
64
- // windowsPathsNoEscape: true,
58
+ return globSync('**/*{,.fb}.{js,ts,tsx}', {
59
+ expandDirectories: false,
60
+ onlyFiles: true,
61
+ absolute: true,
62
+ cwd: file,
65
63
  });
66
64
  })
67
65
  .filter(element => filterJSFile(element, platform, exclude));
@@ -15,8 +15,8 @@ const {FlowParser} = require('../../parsers/flow/parser');
15
15
  const {TypeScriptParser} = require('../../parsers/typescript/parser');
16
16
  const {filterJSFile} = require('./combine-utils');
17
17
  const fs = require('fs');
18
- const glob = require('glob');
19
18
  const path = require('path');
19
+ const {globSync} = require('tinyglobby');
20
20
 
21
21
  const flowParser = new FlowParser();
22
22
  const typescriptParser = new TypeScriptParser();
@@ -66,13 +66,11 @@ function expandDirectoriesIntoFiles(
66
66
  if (!fs.lstatSync(file).isDirectory()) {
67
67
  return [file];
68
68
  }
69
- const filePattern = path.sep === '\\' ? file.replace(/\\/g, '/') : file;
70
- return glob.sync(`${filePattern}/**/*{,.fb}.{js,ts,tsx}`, {
71
- nodir: true,
72
- // TODO: This will remove the need of slash substitution above for Windows,
73
- // but it requires glob@v9+; with the package currenlty relying on
74
- // glob@7.1.1; and flow-typed repo not having definitions for glob@9+.
75
- // windowsPathsNoEscape: true,
69
+ return globSync('**/*{,.fb}.{js,ts,tsx}', {
70
+ expandDirectories: false,
71
+ onlyFiles: true,
72
+ absolute: true,
73
+ cwd: file,
76
74
  });
77
75
  })
78
76
  .filter(element => filterJSFile(element, platform, exclude));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native/codegen",
3
- "version": "0.84.0-nightly-20251202-b0e754bc7",
3
+ "version": "0.84.0-nightly-20251204-5bb3a6d68",
4
4
  "description": "Code generation tools for React Native",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -31,10 +31,10 @@
31
31
  "dependencies": {
32
32
  "@babel/core": "^7.25.2",
33
33
  "@babel/parser": "^7.25.3",
34
- "glob": "^7.1.1",
35
34
  "hermes-parser": "0.32.0",
36
35
  "invariant": "^2.2.4",
37
36
  "nullthrows": "^1.1.1",
37
+ "tinyglobby": "^0.2.15",
38
38
  "yargs": "^17.6.2"
39
39
  },
40
40
  "devDependencies": {