Skip to content

Commit 775cda6

Browse files
authored
chore: use fast-glob for link-assets and scripts (#2513)
1 parent 0c8439f commit 775cda6

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"eslint-plugin-import": "^2.25.3",
4444
"execa": "^5.0.0",
4545
"fast-glob": "^3.3.2",
46-
"glob": "^7.1.3",
4746
"husky": "^8.0.2",
4847
"jest": "^26.6.2",
4948
"jest-circus": "^26.6.2",

packages/cli-link-assets/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"@react-native-community/cli-platform-ios": "15.0.0-alpha.2",
1515
"@react-native-community/cli-tools": "15.0.0-alpha.2",
1616
"chalk": "^4.1.2",
17+
"fast-glob": "^3.3.2",
1718
"fast-xml-parser": "^4.4.1",
1819
"opentype.js": "^1.3.4",
1920
"plist": "^3.1.0",

packages/cli-link-assets/src/tools/helpers/font/androidFontAssetHelpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {isProjectUsingKotlin} from '@react-native-community/cli-platform-android
22
import {CLIError, logger} from '@react-native-community/cli-tools';
33
import {XMLBuilder, XMLParser} from 'fast-xml-parser';
44
import fs from 'fs-extra';
5-
import {sync as globSync} from 'glob';
5+
import glob from 'fast-glob';
66
import OpenType from 'opentype.js';
77
import path from 'path';
88

@@ -77,7 +77,7 @@ function convertToAndroidResourceName(str: string) {
7777
function getProjectFilePath(rootPath: string, name: string) {
7878
const isUsingKotlin = isProjectUsingKotlin(rootPath);
7979
const ext = isUsingKotlin ? 'kt' : 'java';
80-
const filePath = globSync(
80+
const filePath = glob.sync(
8181
path.join(rootPath, `app/src/main/java/**/${name}.${ext}`),
8282
)[0];
8383
return filePath;

scripts/build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
const fs = require('fs');
2222
const path = require('path');
23-
const glob = require('glob');
23+
const glob = require('fast-glob');
2424
const babel = require('@babel/core');
2525
const chalk = require('chalk');
2626
const micromatch = require('micromatch');

scripts/linkPackages.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const execa = require('execa');
22
const chalk = require('chalk');
33
const path = require('path');
4-
const glob = require('glob');
4+
const glob = require('fast-glob');
55

66
const projects = glob.sync('packages/*/package.json');
77

0 commit comments

Comments
 (0)