Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use fast-glob for link-assets and scripts #2513

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"eslint-plugin-import": "^2.25.3",
"execa": "^5.0.0",
"fast-glob": "^3.3.2",
"glob": "^7.1.3",
"husky": "^8.0.2",
"jest": "^26.6.2",
"jest-circus": "^26.6.2",
Expand Down
1 change: 1 addition & 0 deletions packages/cli-link-assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@react-native-community/cli-platform-ios": "15.0.0-alpha.2",
"@react-native-community/cli-tools": "15.0.0-alpha.2",
"chalk": "^4.1.2",
"fast-glob": "^3.3.2",
"fast-xml-parser": "^4.4.1",
"opentype.js": "^1.3.4",
"plist": "^3.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {isProjectUsingKotlin} from '@react-native-community/cli-platform-android
import {CLIError, logger} from '@react-native-community/cli-tools';
import {XMLBuilder, XMLParser} from 'fast-xml-parser';
import fs from 'fs-extra';
import {sync as globSync} from 'glob';
import glob from 'fast-glob';
import OpenType from 'opentype.js';
import path from 'path';

Expand Down Expand Up @@ -77,7 +77,7 @@ function convertToAndroidResourceName(str: string) {
function getProjectFilePath(rootPath: string, name: string) {
const isUsingKotlin = isProjectUsingKotlin(rootPath);
const ext = isUsingKotlin ? 'kt' : 'java';
const filePath = globSync(
const filePath = glob.sync(
path.join(rootPath, `app/src/main/java/**/${name}.${ext}`),
)[0];
return filePath;
Expand Down
2 changes: 1 addition & 1 deletion scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

const fs = require('fs');
const path = require('path');
const glob = require('glob');
const glob = require('fast-glob');
const babel = require('@babel/core');
const chalk = require('chalk');
const micromatch = require('micromatch');
Expand Down
2 changes: 1 addition & 1 deletion scripts/linkPackages.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const execa = require('execa');
const chalk = require('chalk');
const path = require('path');
const glob = require('glob');
const glob = require('fast-glob');

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

Expand Down
Loading