diff --git a/packages/metro-file-map/src/Watcher.js b/packages/metro-file-map/src/Watcher.js index 99e10618a1..9f200dc774 100644 --- a/packages/metro-file-map/src/Watcher.js +++ b/packages/metro-file-map/src/Watcher.js @@ -49,7 +49,6 @@ type WatcherOptions = { console: Console, enableSymlinks: boolean, extensions: ReadonlyArray, - forceNodeFilesystemAPI: boolean, healthCheckFilePrefix: string, ignoreForCrawl: (filePath: string) => boolean, ignorePatternForWatch: RegExp, @@ -131,7 +130,6 @@ export class Watcher extends EventEmitter { console: options.console, includeSymlinks: options.enableSymlinks, extensions: options.extensions, - forceNodeFilesystemAPI: options.forceNodeFilesystemAPI, ignore: ignoreForCrawl, onStatus: status => { this.emit('status', status); diff --git a/packages/metro-file-map/src/cache/__tests__/DiskCacheManager-test.js b/packages/metro-file-map/src/cache/__tests__/DiskCacheManager-test.js index a37b092593..2d7689556f 100644 --- a/packages/metro-file-map/src/cache/__tests__/DiskCacheManager-test.js +++ b/packages/metro-file-map/src/cache/__tests__/DiskCacheManager-test.js @@ -42,7 +42,6 @@ const buildParameters: BuildParameters = { cacheBreaker: '', computeSha1: true, enableSymlinks: false, - forceNodeFilesystemAPI: true, ignorePattern: /ignored/, retainAllFiles: false, extensions: ['js', 'json'], diff --git a/packages/metro-file-map/src/crawlers/__tests__/integration-test.js b/packages/metro-file-map/src/crawlers/__tests__/integration-test.js index 3f01c0beca..f77260c8ba 100644 --- a/packages/metro-file-map/src/crawlers/__tests__/integration-test.js +++ b/packages/metro-file-map/src/crawlers/__tests__/integration-test.js @@ -34,18 +34,10 @@ const isWatchmanOnPath = () => { } }; -const mockUseNativeFind = jest.fn(); -jest.mock('../node/hasNativeFindSupport', () => () => mockUseNativeFind()); - type Crawler = typeof nodeCrawl | typeof watchmanCrawl; const CRAWLERS: {[key: string]: ?Crawler} = { - 'node-find': opts => { - mockUseNativeFind.mockResolvedValue(true); - return nodeCrawl(opts); - }, 'node-recursive': opts => { - mockUseNativeFind.mockResolvedValue(false); return nodeCrawl(opts); }, watchman: isWatchmanOnPath() ? watchmanCrawl : null, @@ -140,7 +132,6 @@ describe.each(Object.keys(CRAWLERS))( rootDir: FIXTURES_DIR, abortSignal: null, computeSha1: false, - forceNodeFilesystemAPI: false, onStatus: () => {}, }); diff --git a/packages/metro-file-map/src/crawlers/__tests__/node-test.js b/packages/metro-file-map/src/crawlers/__tests__/node-test.js index 479617b29b..0677ad5f9a 100644 --- a/packages/metro-file-map/src/crawlers/__tests__/node-test.js +++ b/packages/metro-file-map/src/crawlers/__tests__/node-test.js @@ -12,32 +12,6 @@ import TreeFS from '../../lib/TreeFS'; jest.useRealTimers(); -jest.mock('child_process', () => ({ - spawn: jest.fn((cmd, args) => { - let closeCallback; - return { - on: jest.fn().mockImplementation((event, callback) => { - if (event === 'exit') { - callback(mockSpawnExit, null); - } - }), - stdout: { - on: jest.fn().mockImplementation((event, callback) => { - if (event === 'data') { - setTimeout(() => { - callback(mockResponse); - setTimeout(closeCallback, 0); - }, 0); - } else if (event === 'close') { - closeCallback = callback; - } - }), - setEncoding: jest.fn(), - }, - }; - }), -})); - jest.mock('graceful-fs', () => { const slash = require('slash'); let mtime = 32; @@ -126,85 +100,26 @@ const createMap = obj => const rootDir = '/project'; const emptyFS = new TreeFS({rootDir, files: new Map()}); const getFS = (files: FileData) => new TreeFS({rootDir, files}); -let mockResponse; -let mockSpawnExit; let nodeCrawl; -let childProcess; describe('node crawler', () => { beforeEach(() => { jest.resetModules(); - - mockResponse = [ - '/project/fruits/pear.js', - '/project/fruits/strawberry.js', - '/project/fruits/tomato.js', - ].join('\n'); - - mockSpawnExit = 0; - }); - - test('crawls for files based on patterns', async () => { - childProcess = require('child_process'); - nodeCrawl = require('../node').default; - - mockResponse = [ - '/project/fruits/pear.js', - '/project/fruits/strawberry.js', - '/project/fruits/tomato.js', - '/project/vegetables/melon.json', - ].join('\n'); - - const {changedFiles, removedFiles} = await nodeCrawl({ - previousState: {fileSystem: emptyFS}, - extensions: ['js', 'json'], - ignore: pearMatcher, - rootDir, - roots: ['/project/fruits', '/project/vegtables'], - }); - - expect(childProcess.spawn).lastCalledWith('find', [ - '/project/fruits', - '/project/vegtables', - '(', - '(', - '-type', - 'f', - '(', - '-iname', - '*.js', - '-o', - '-iname', - '*.json', - ')', - ')', - ')', - ]); - - expect(changedFiles).not.toBe(null); - - expect(changedFiles).toEqual( - createMap({ - 'fruits/strawberry.js': [32, 42, 0, null, 0, null], - 'fruits/tomato.js': [33, 42, 0, null, 0, null], - 'vegetables/melon.json': [34, 42, 0, null, 0, null], - }), - ); - - expect(removedFiles).toEqual(new Set()); }); test('updates only changed files', async () => { nodeCrawl = require('../node').default; - // In this test sample, strawberry is changed and tomato is unchanged - const tomato = [33, 42, 1, null, 0, null]; + // The readdir mock returns tomato.js (mtime=32) and + // directory/strawberry.js (mtime=33). In this test, tomato is unchanged + // and strawberry is changed. const files = createMap({ - 'fruits/strawberry.js': [30, 40, 1, null, 0, null], - 'fruits/tomato.js': tomato, + 'fruits/directory/strawberry.js': [30, 40, 1, null, 0, null], + 'fruits/tomato.js': [32, 42, 1, null, 0, null], }); const {changedFiles, removedFiles} = await nodeCrawl({ + console: global.console, previousState: {fileSystem: getFS(files)}, extensions: ['js'], ignore: pearMatcher, @@ -212,10 +127,10 @@ describe('node crawler', () => { roots: ['/project/fruits'], }); - // Tomato is not included because it is unchanged + // Tomato is not included because its mtime is unchanged expect(changedFiles).toEqual( createMap({ - 'fruits/strawberry.js': [32, 42, 0, null, 0, null], + 'fruits/directory/strawberry.js': [33, 42, 0, null, 0, null], }), ); @@ -225,15 +140,16 @@ describe('node crawler', () => { test('returns removed files', async () => { nodeCrawl = require('../node').default; - // In this test sample, previouslyExisted was present before and will not be - // when crawling this directory. + // In this test sample, previouslyExisted was present before and will not + // be found when crawling this directory. const files = createMap({ 'fruits/previouslyExisted.js': [30, 40, 1, null, 0, null], - 'fruits/strawberry.js': [33, 42, 0, null, 0, null], + 'fruits/directory/strawberry.js': [33, 42, 0, null, 0, null], 'fruits/tomato.js': [32, 42, 0, null, 0, null], }); const {changedFiles, removedFiles} = await nodeCrawl({ + console: global.console, previousState: {fileSystem: getFS(files)}, extensions: ['js'], ignore: pearMatcher, @@ -241,93 +157,10 @@ describe('node crawler', () => { roots: ['/project/fruits'], }); - expect(changedFiles).toEqual( - createMap({ - 'fruits/strawberry.js': [32, 42, 0, null, 0, null], - 'fruits/tomato.js': [33, 42, 0, null, 0, null], - }), - ); + expect(changedFiles).toEqual(new Map()); expect(removedFiles).toEqual(new Set(['fruits/previouslyExisted.js'])); }); - test('uses node fs APIs with incompatible find binary', async () => { - mockResponse = ''; - mockSpawnExit = 1; - childProcess = require('child_process'); - - nodeCrawl = require('../node').default; - - const {changedFiles, removedFiles} = await nodeCrawl({ - previousState: {fileSystem: emptyFS}, - extensions: ['js'], - ignore: pearMatcher, - rootDir, - roots: ['/project/fruits'], - }); - - expect(childProcess.spawn).lastCalledWith( - 'find', - ['.', '-type', 'f', '(', '-iname', '*.ts', '-o', '-iname', '*.js', ')'], - {cwd: expect.any(String)}, - ); - expect(changedFiles).toEqual( - createMap({ - 'fruits/directory/strawberry.js': [33, 42, 0, null, 0, null], - 'fruits/tomato.js': [32, 42, 0, null, 0, null], - }), - ); - expect(removedFiles).toEqual(new Set()); - }); - - test('uses node fs APIs without find binary', async () => { - childProcess = require('child_process'); - childProcess.spawn.mockImplementationOnce(() => { - throw new Error(); - }); - nodeCrawl = require('../node').default; - - const {changedFiles, removedFiles} = await nodeCrawl({ - console: global.console, - previousState: {fileSystem: emptyFS}, - extensions: ['js'], - ignore: pearMatcher, - rootDir, - roots: ['/project/fruits'], - }); - - expect(changedFiles).toEqual( - createMap({ - 'fruits/directory/strawberry.js': [33, 42, 0, null, 0, null], - 'fruits/tomato.js': [32, 42, 0, null, 0, null], - }), - ); - expect(removedFiles).toEqual(new Set()); - }); - - test('uses node fs APIs if "forceNodeFilesystemAPI" is set to true, regardless of platform', async () => { - childProcess = require('child_process'); - nodeCrawl = require('../node').default; - - const {changedFiles, removedFiles} = await nodeCrawl({ - console: global.console, - previousState: {fileSystem: emptyFS}, - extensions: ['js'], - forceNodeFilesystemAPI: true, - ignore: pearMatcher, - rootDir, - roots: ['/project/fruits'], - }); - - expect(childProcess.spawn).toHaveBeenCalledTimes(0); - expect(changedFiles).toEqual( - createMap({ - 'fruits/directory/strawberry.js': [33, 42, 0, null, 0, null], - 'fruits/tomato.js': [32, 42, 0, null, 0, null], - }), - ); - expect(removedFiles).toEqual(new Set()); - }); - test('completes with empty roots', async () => { nodeCrawl = require('../node').default; @@ -335,7 +168,6 @@ describe('node crawler', () => { console: global.console, previousState: {fileSystem: emptyFS}, extensions: ['js'], - forceNodeFilesystemAPI: true, ignore: pearMatcher, rootDir, roots: [], @@ -357,7 +189,6 @@ describe('node crawler', () => { console: mockConsole, previousState: {fileSystem: emptyFS}, extensions: ['js'], - forceNodeFilesystemAPI: true, ignore: pearMatcher, rootDir, roots: ['/error'], @@ -378,7 +209,6 @@ describe('node crawler', () => { console: global.console, previousState: {fileSystem: emptyFS}, extensions: ['js'], - forceNodeFilesystemAPI: true, ignore: pearMatcher, rootDir, roots: ['/project/fruits'], @@ -440,7 +270,7 @@ describe('node crawler', () => { extensions: ['js', 'json'], ignore: pearMatcher, rootDir, - roots: ['/project/fruits', '/project/vegtables'], + roots: ['/project/fruits'], }), ).rejects.toThrow(err); }); diff --git a/packages/metro-file-map/src/crawlers/node/hasNativeFindSupport.js b/packages/metro-file-map/src/crawlers/node/hasNativeFindSupport.js deleted file mode 100644 index 69e394c39e..0000000000 --- a/packages/metro-file-map/src/crawlers/node/hasNativeFindSupport.js +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - * @oncall react_native - */ - -import {spawn} from 'child_process'; - -export default async function hasNativeFindSupport(): Promise { - try { - return await new Promise(resolve => { - // Check the find binary supports the non-POSIX -iname parameter wrapped in parens. - const args = [ - '.', - '-type', - 'f', - '(', - '-iname', - '*.ts', - '-o', - '-iname', - '*.js', - ')', - ]; - const child = spawn('find', args, {cwd: __dirname}); - child.on('error', () => { - resolve(false); - }); - child.on('exit', code => { - resolve(code === 0); - }); - }); - } catch { - return false; - } -} diff --git a/packages/metro-file-map/src/crawlers/node/index.js b/packages/metro-file-map/src/crawlers/node/index.js index e7aaabe7a7..5c1b803a67 100644 --- a/packages/metro-file-map/src/crawlers/node/index.js +++ b/packages/metro-file-map/src/crawlers/node/index.js @@ -18,15 +18,9 @@ import type { } from '../../flow-types'; import {RootPathUtils} from '../../lib/RootPathUtils'; -import hasNativeFindSupport from './hasNativeFindSupport'; -import {spawn} from 'child_process'; import * as fs from 'graceful-fs'; -import {platform} from 'os'; import * as path from 'path'; -// eslint-disable-next-line import/no-commonjs -const debug = require('debug')('Metro:NodeCrawler'); - type Callback = (result: FileData) => void; function find( @@ -106,70 +100,6 @@ function find( } } -function findNative( - roots: ReadonlyArray, - extensions: ReadonlyArray, - ignore: IgnoreMatcher, - includeSymlinks: boolean, - rootDir: string, - console: Console, - callback: Callback, -): void { - // Examples: - // ( ( -type f ( -iname *.js ) ) ) - // ( ( -type f ( -iname *.js -o -iname *.ts ) ) ) - // ( ( -type f ( -iname *.js ) ) -o -type l ) - // ( ( -type f ) -o -type l ) - const extensionClause = extensions.length - ? `( ${extensions.map(ext => `-iname *.${ext}`).join(' -o ')} )` - : ''; // Empty inner expressions eg "( )" are not allowed - const expression = `( ( -type f ${extensionClause} ) ${ - includeSymlinks ? '-o -type l ' : '' - })`; - - const pathUtils = new RootPathUtils(rootDir); - - const child = spawn('find', roots.concat(expression.split(' '))); - let stdout = ''; - if (child.stdout == null) { - throw new Error( - 'stdout is null - this should never happen. Please open up an issue at https://github.com/facebook/metro', - ); - } - child.stdout.setEncoding('utf-8'); - child.stdout.on('data', data => (stdout += data)); - - child.stdout.on('close', () => { - const lines = stdout - .trim() - .split('\n') - .filter(x => !ignore(x)); - const result: FileData = new Map(); - let count = lines.length; - if (!count) { - callback(new Map()); - } else { - lines.forEach(path => { - fs.lstat(path, (err, stat) => { - if (!err && stat) { - result.set(pathUtils.absoluteToNormal(path), [ - stat.mtime.getTime(), - stat.size, - 0, - null, - stat.isSymbolicLink() ? 1 : 0, - null, - ]); - } - if (--count === 0) { - callback(result); - } - }); - }); - } - }); -} - export default async function nodeCrawl( options: CrawlerOptions, ): Promise { @@ -177,7 +107,6 @@ export default async function nodeCrawl( console, previousState, extensions, - forceNodeFilesystemAPI, ignore, rootDir, includeSymlinks, @@ -190,12 +119,6 @@ export default async function nodeCrawl( abortSignal?.throwIfAborted(); perfLogger?.point('nodeCrawl_start'); - const useNativeFind = - !forceNodeFilesystemAPI && - platform() !== 'win32' && - (await hasNativeFindSupport()); - - debug('Using system find: %s', useNativeFind); return new Promise((resolve, reject) => { const callback: Callback = fileData => { @@ -214,26 +137,14 @@ export default async function nodeCrawl( resolve(difference); }; - if (useNativeFind) { - findNative( - roots, - extensions, - ignore, - includeSymlinks, - rootDir, - console, - callback, - ); - } else { - find( - roots, - extensions, - ignore, - includeSymlinks, - rootDir, - console, - callback, - ); - } + find( + roots, + extensions, + ignore, + includeSymlinks, + rootDir, + console, + callback, + ); }); } diff --git a/packages/metro-file-map/src/crawlers/watchman/__tests__/index-test.js b/packages/metro-file-map/src/crawlers/watchman/__tests__/index-test.js index e394675007..09f4d023c0 100644 --- a/packages/metro-file-map/src/crawlers/watchman/__tests__/index-test.js +++ b/packages/metro-file-map/src/crawlers/watchman/__tests__/index-test.js @@ -58,7 +58,6 @@ const DEFAULT_OPTIONS: CrawlerOptions = { systemPath('/roots/root1/project1'), systemPath('/roots/root2/project2'), ], - forceNodeFilesystemAPI: false, }; const WATCH_PROJECTS = new Map([ diff --git a/packages/metro-file-map/src/flow-types.js b/packages/metro-file-map/src/flow-types.js index 44d05dea4d..567370e555 100644 --- a/packages/metro-file-map/src/flow-types.js +++ b/packages/metro-file-map/src/flow-types.js @@ -19,7 +19,6 @@ export type BuildParameters = Readonly<{ computeSha1: boolean, enableSymlinks: boolean, extensions: ReadonlyArray, - forceNodeFilesystemAPI: boolean, ignorePattern: RegExp, plugins: ReadonlyArray, retainAllFiles: boolean, @@ -114,7 +113,6 @@ export type CrawlerOptions = { computeSha1: boolean, console: Console, extensions: ReadonlyArray, - forceNodeFilesystemAPI: boolean, ignore: IgnoreMatcher, includeSymlinks: boolean, perfLogger?: ?PerfLogger, diff --git a/packages/metro-file-map/src/index.js b/packages/metro-file-map/src/index.js index 113f85be1d..39e5ebc1b6 100644 --- a/packages/metro-file-map/src/index.js +++ b/packages/metro-file-map/src/index.js @@ -78,7 +78,6 @@ export type InputOptions = Readonly<{ computeSha1?: ?boolean, enableSymlinks?: ?boolean, extensions: ReadonlyArray, - forceNodeFilesystemAPI?: ?boolean, ignorePattern?: ?RegExp, plugins?: ReadonlyArray, retainAllFiles: boolean, @@ -318,7 +317,6 @@ export default class FileMap extends EventEmitter { computeSha1: options.computeSha1 || false, enableSymlinks: options.enableSymlinks || false, extensions: options.extensions, - forceNodeFilesystemAPI: !!options.forceNodeFilesystemAPI, ignorePattern, plugins, retainAllFiles: options.retainAllFiles, @@ -515,7 +513,6 @@ export default class FileMap extends EventEmitter { computeSha1, enableSymlinks, extensions, - forceNodeFilesystemAPI, ignorePattern, retainAllFiles, roots, @@ -530,7 +527,6 @@ export default class FileMap extends EventEmitter { console: this.#console, enableSymlinks, extensions, - forceNodeFilesystemAPI, healthCheckFilePrefix: this.#options.healthCheck.filePrefix, // TODO: Refactor out the two different ignore strategies here. ignoreForCrawl: filePath => { diff --git a/packages/metro-file-map/src/lib/__tests__/rootRelativeCacheKeys-test.js b/packages/metro-file-map/src/lib/__tests__/rootRelativeCacheKeys-test.js index 9d9ed06d75..7ce5231cfc 100644 --- a/packages/metro-file-map/src/lib/__tests__/rootRelativeCacheKeys-test.js +++ b/packages/metro-file-map/src/lib/__tests__/rootRelativeCacheKeys-test.js @@ -22,7 +22,6 @@ const buildParameters: BuildParameters = { computeSha1: false, enableSymlinks: false, extensions: ['a'], - forceNodeFilesystemAPI: false, ignorePattern: /a/, plugins: [getMockPlugin('1')], retainAllFiles: false, @@ -77,7 +76,6 @@ test('returns a distinct cache key for any change', () => { // Boolean case 'computeSha1': case 'enableSymlinks': - case 'forceNodeFilesystemAPI': case 'retainAllFiles': return varyDefault(key, !buildParameters[key]); // Strings diff --git a/packages/metro-file-map/src/lib/rootRelativeCacheKeys.js b/packages/metro-file-map/src/lib/rootRelativeCacheKeys.js index 2f705184c0..c0abddcbfc 100644 --- a/packages/metro-file-map/src/lib/rootRelativeCacheKeys.js +++ b/packages/metro-file-map/src/lib/rootRelativeCacheKeys.js @@ -39,7 +39,6 @@ export default function rootRelativeCacheKeys( case 'extensions': case 'computeSha1': case 'enableSymlinks': - case 'forceNodeFilesystemAPI': case 'retainAllFiles': return buildParameters[key] ?? null; case 'ignorePattern': diff --git a/packages/metro-file-map/types/Watcher.d.ts b/packages/metro-file-map/types/Watcher.d.ts index 9dff3ba096..de978d8006 100644 --- a/packages/metro-file-map/types/Watcher.d.ts +++ b/packages/metro-file-map/types/Watcher.d.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. * * @noformat - * @generated SignedSource<<25fee66c7d26ad53cdd5bbab454fe50b>> + * @generated SignedSource<<7e33ffd7eec05b9c9c072189d2ed3ec2>> * * This file was translated from Flow by scripts/generateTypeScriptDefinitions.js * Original file: packages/metro-file-map/src/Watcher.js @@ -30,7 +30,6 @@ type WatcherOptions = { console: Console; enableSymlinks: boolean; extensions: ReadonlyArray; - forceNodeFilesystemAPI: boolean; healthCheckFilePrefix: string; ignoreForCrawl: (filePath: string) => boolean; ignorePatternForWatch: RegExp; diff --git a/packages/metro-file-map/types/crawlers/node/hasNativeFindSupport.d.ts b/packages/metro-file-map/types/crawlers/node/hasNativeFindSupport.d.ts deleted file mode 100644 index e91d9a6978..0000000000 --- a/packages/metro-file-map/types/crawlers/node/hasNativeFindSupport.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @noformat - * @oncall react_native - * @generated SignedSource<<8b6ff8a24f9156cd7991006c72edd296>> - * - * This file was translated from Flow by scripts/generateTypeScriptDefinitions.js - * Original file: packages/metro-file-map/src/crawlers/node/hasNativeFindSupport.js - * To regenerate, run: - * js1 build metro-ts-defs (internal) OR - * yarn run build-ts-defs (OSS) - */ - -declare function hasNativeFindSupport(): Promise; -export default hasNativeFindSupport; diff --git a/packages/metro-file-map/types/flow-types.d.ts b/packages/metro-file-map/types/flow-types.d.ts index 16ca47efd9..7f4813a73b 100644 --- a/packages/metro-file-map/types/flow-types.d.ts +++ b/packages/metro-file-map/types/flow-types.d.ts @@ -6,7 +6,7 @@ * * @noformat * @oncall react_native - * @generated SignedSource<> + * @generated SignedSource<<6ff16bb65883df0a1cb70e6ca94461eb>> * * This file was translated from Flow by scripts/generateTypeScriptDefinitions.js * Original file: packages/metro-file-map/src/flow-types.js @@ -22,7 +22,6 @@ export type BuildParameters = Readonly<{ computeSha1: boolean; enableSymlinks: boolean; extensions: ReadonlyArray; - forceNodeFilesystemAPI: boolean; ignorePattern: RegExp; plugins: ReadonlyArray; retainAllFiles: boolean; @@ -95,7 +94,6 @@ export type CrawlerOptions = { computeSha1: boolean; console: Console; extensions: ReadonlyArray; - forceNodeFilesystemAPI: boolean; ignore: IgnoreMatcher; includeSymlinks: boolean; perfLogger?: null | undefined | PerfLogger; @@ -192,12 +190,12 @@ export interface FileMapPlugin< } export type InputFileMapPlugin = FileMapPlugin< /** - * > 235 | export type InputFileMapPlugin = FileMapPlugin; + * > 233 | export type InputFileMapPlugin = FileMapPlugin; * | ^^^^^ Unsupported feature: Translating "empty type" is currently not supported. **/ any, /** - * > 235 | export type InputFileMapPlugin = FileMapPlugin; + * > 233 | export type InputFileMapPlugin = FileMapPlugin; * | ^^^^^ Unsupported feature: Translating "empty type" is currently not supported. **/ any diff --git a/packages/metro-file-map/types/index.d.ts b/packages/metro-file-map/types/index.d.ts index 4f3fa28c50..d61b494a0f 100644 --- a/packages/metro-file-map/types/index.d.ts +++ b/packages/metro-file-map/types/index.d.ts @@ -6,7 +6,7 @@ * * @noformat * @oncall react_native - * @generated SignedSource<<806d228988308075b7a911c3dfb513d3>> + * @generated SignedSource<<220686ad19cc94bec3b8d89f49fa6304>> * * This file was translated from Flow by scripts/generateTypeScriptDefinitions.js * Original file: packages/metro-file-map/src/index.js @@ -49,7 +49,6 @@ export type InputOptions = Readonly<{ computeSha1?: null | undefined | boolean; enableSymlinks?: null | undefined | boolean; extensions: ReadonlyArray; - forceNodeFilesystemAPI?: null | undefined | boolean; ignorePattern?: null | undefined | RegExp; plugins?: ReadonlyArray; retainAllFiles: boolean; diff --git a/packages/metro/src/node-haste/DependencyGraph/createFileMap.js b/packages/metro/src/node-haste/DependencyGraph/createFileMap.js index 7b0db46499..6fde2022d5 100644 --- a/packages/metro/src/node-haste/DependencyGraph/createFileMap.js +++ b/packages/metro/src/node-haste/DependencyGraph/createFileMap.js @@ -126,7 +126,6 @@ export default function createFileMap( ...config.watcher.additionalExts, ]), ), - forceNodeFilesystemAPI: !config.resolver.useWatchman, healthCheck: config.watcher.healthCheck, ignorePattern: getIgnorePattern(config), maxWorkers: config.maxWorkers,