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

Fix npm 7 compatability #28824

Merged
merged 1 commit into from
Feb 8, 2021
Merged
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
7 changes: 5 additions & 2 deletions patches/patch-xcode.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ const path = require( 'path' );
const nodeModulesDir = path.join( __dirname, '../', 'node_modules' ); const nodeModulesDir = path.join( __dirname, '../', 'node_modules' );


const fetchRNPackageDirs = ( dir ) => { const fetchRNPackageDirs = ( dir ) => {
const dirList = fs.readdirSync( dir ); const dirList = fs.readdirSync( dir, { withFileTypes: true } );
const packageDirs = []; const packageDirs = [];
dirList.forEach( ( packageName ) => { dirList
.filter( ( file ) => file.isDirectory() )
.map( ( file ) => file.name )
.forEach( ( packageName ) => {
const packageDir = path.join( dir, packageName ); const packageDir = path.join( dir, packageName );
if ( packageName.startsWith( '@' ) ) { if ( packageName.startsWith( '@' ) ) {
packageDirs.push( ...fetchRNPackageDirs( packageDir ) ); packageDirs.push( ...fetchRNPackageDirs( packageDir ) );
Expand Down