mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00: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:
1 parent
b447d267a8
commit
41eace0093
17 files changed
+159
-160
No files matched your search
+6
-3
@@ -25,10 +25,10 @@
|
||||
|
||||
const babel = require('@babel/core');
|
||||
const fs = require('fs');
|
||||
const glob = require('glob');
|
||||
const micromatch = require('micromatch');
|
||||
const path = require('path');
|
||||
const prettier = require('prettier');
|
||||
const {globSync} = require('tinyglobby');
|
||||
const {styleText} = require('util');
|
||||
|
||||
const prettierConfig = JSON.parse(
|
||||
@@ -106,8 +106,11 @@ async function buildFile(file, silent) {
|
||||
}
|
||||
|
||||
const srcDir = path.resolve(__dirname, '..', SRC_DIR);
|
||||
const pattern = path.resolve(srcDir, '**/*');
|
||||
const files = glob.sync(pattern, {nodir: true});
|
||||
const files = globSync('**/*', {
|
||||
cwd: srcDir,
|
||||
absolute: true,
|
||||
onlyFiles: true,
|
||||
});
|
||||
|
||||
process.stdout.write(fixedWidth(`${path.basename(PACKAGE_DIR)}\n`));
|
||||
|
||||
|
||||
Reference in new issue
Block a user