mirror of
https://github.com/react/react-native.git
synced 2026-09-28 13:23:09 +08:00
Replace glob@^7.0.0 with tinyglobby@^0.2.15 (#54737)
Summary: This replaces `glob@^7.0.0` with `tinyglobby@^0.2.15`. `glob@7` has been deprecated for a while and some versions after had security notices released for them. The plan is to backport this PR to `0.81.x` and onwards. > [!NOTE] > This is a stopgap solution until `fs.glob` becomes generally available with the EOL of Node v20 Succeeds: - https://github.com/facebook/react-native/issues/54669 - https://github.com/facebook/react-native/issues/48875 ## Changelog: [GENERAL] [SECURITY] - Replace `glob@^7.0.0` with `tinyglobby@^0.2.15` Pull Request resolved: https://github.com/facebook/react-native/pull/54737 Test Plan: - Ran all modified commands manually and `pod install in `rn-tester` - NOTE: `ios-prebuild`-related scripts haven't been run manually yet Reviewed By: robhogan Differential Revision: D88069145 Pulled By: huntie fbshipit-source-id: 0c455342a4c6d1d6605fd09fe47b418e5d751491
This commit is contained in:
committed by
meta-codesync[bot]
parent
b447d267a8
commit
41eace0093
@@ -10,8 +10,8 @@
|
||||
|
||||
const {REACT_NATIVE_PACKAGE_DIR, REPO_ROOT} = require('./consts');
|
||||
const {promises: fs} = require('fs');
|
||||
const glob = require('glob');
|
||||
const path = require('path');
|
||||
const {globSync} = require('tinyglobby');
|
||||
|
||||
const WORKSPACES_CONFIG = '{packages,private}/*';
|
||||
|
||||
@@ -71,15 +71,12 @@ async function getPackages(
|
||||
} = filter;
|
||||
|
||||
const packagesEntries = await Promise.all(
|
||||
glob
|
||||
.sync(`${WORKSPACES_CONFIG}/package.json`, {
|
||||
cwd: REPO_ROOT,
|
||||
absolute: true,
|
||||
ignore: includeReactNative
|
||||
? []
|
||||
: ['packages/react-native/package.json'],
|
||||
})
|
||||
.map(parsePackageInfo),
|
||||
globSync(`${WORKSPACES_CONFIG}/package.json`, {
|
||||
cwd: REPO_ROOT,
|
||||
absolute: true,
|
||||
ignore: includeReactNative ? [] : ['packages/react-native/package.json'],
|
||||
expandDirectories: false,
|
||||
}).map(parsePackageInfo),
|
||||
);
|
||||
|
||||
return Object.fromEntries(
|
||||
|
||||
Reference in New Issue
Block a user