metro 0.66.2 → 0.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +22 -24
- package/src/Assets.js +9 -9
- package/src/Assets.js.flow +5 -7
- package/src/Bundler/util.js +16 -15
- package/src/Bundler/util.js.flow +11 -10
- package/src/Bundler.js +21 -8
- package/src/Bundler.js.flow +19 -7
- package/src/DeltaBundler/DeltaCalculator.js +15 -15
- package/src/DeltaBundler/DeltaCalculator.js.flow +7 -7
- package/src/DeltaBundler/Serializers/baseBytecodeBundle.js +13 -13
- package/src/DeltaBundler/Serializers/baseBytecodeBundle.js.flow +6 -7
- package/src/DeltaBundler/Serializers/baseJSBundle.js +4 -4
- package/src/DeltaBundler/Serializers/baseJSBundle.js.flow +4 -4
- package/src/DeltaBundler/Serializers/getAllFiles.js +1 -1
- package/src/DeltaBundler/Serializers/getAllFiles.js.flow +3 -3
- package/src/DeltaBundler/Serializers/getAssets.js +3 -3
- package/src/DeltaBundler/Serializers/getAssets.js.flow +4 -5
- package/src/DeltaBundler/Serializers/getExplodedSourceMap.js +4 -4
- package/src/DeltaBundler/Serializers/getExplodedSourceMap.js.flow +4 -4
- package/src/DeltaBundler/Serializers/getRamBundleInfo.js +20 -20
- package/src/DeltaBundler/Serializers/getRamBundleInfo.js.flow +9 -10
- package/src/DeltaBundler/Serializers/helpers/bytecode.js +11 -11
- package/src/DeltaBundler/Serializers/helpers/bytecode.js.flow +5 -6
- package/src/DeltaBundler/Serializers/helpers/getInlineSourceMappingURL.js +1 -1
- package/src/DeltaBundler/Serializers/helpers/getInlineSourceMappingURL.js.flow +1 -1
- package/src/DeltaBundler/Serializers/helpers/getSourceMapInfo.js +2 -2
- package/src/DeltaBundler/Serializers/helpers/getSourceMapInfo.js.flow +4 -4
- package/src/DeltaBundler/Serializers/helpers/getTransitiveDependencies.js +1 -1
- package/src/DeltaBundler/Serializers/helpers/getTransitiveDependencies.js.flow +1 -1
- package/src/DeltaBundler/Serializers/helpers/js.js +6 -6
- package/src/DeltaBundler/Serializers/helpers/js.js.flow +11 -12
- package/src/DeltaBundler/Serializers/helpers/processBytecodeModules.js +4 -4
- package/src/DeltaBundler/Serializers/helpers/processBytecodeModules.js.flow +3 -3
- package/src/DeltaBundler/Serializers/helpers/processModules.js +4 -4
- package/src/DeltaBundler/Serializers/helpers/processModules.js.flow +3 -3
- package/src/DeltaBundler/Serializers/hmrJSBundle.js +9 -9
- package/src/DeltaBundler/Serializers/hmrJSBundle.js.flow +9 -8
- package/src/DeltaBundler/Serializers/sourceMapGenerator.js +6 -6
- package/src/DeltaBundler/Serializers/sourceMapGenerator.js.flow +3 -4
- package/src/DeltaBundler/Serializers/sourceMapObject.js +5 -5
- package/src/DeltaBundler/Serializers/sourceMapObject.js.flow +4 -4
- package/src/DeltaBundler/Serializers/sourceMapString.js +2 -2
- package/src/DeltaBundler/Serializers/sourceMapString.js.flow +3 -3
- package/src/DeltaBundler/Transformer.js +9 -9
- package/src/DeltaBundler/Transformer.js.flow +7 -9
- package/src/DeltaBundler/Worker.js +8 -11
- package/src/DeltaBundler/Worker.js.flow +8 -11
- package/src/DeltaBundler/WorkerFarm.js +14 -17
- package/src/DeltaBundler/WorkerFarm.js.flow +7 -10
- package/src/DeltaBundler/__fixtures__/hasteImpl.js +2 -2
- package/src/DeltaBundler/computeDelta.js +2 -2
- package/src/DeltaBundler/computeDelta.js.flow +2 -2
- package/src/DeltaBundler/getTransformCacheKey.js +4 -4
- package/src/DeltaBundler/getTransformCacheKey.js.flow +5 -6
- package/src/DeltaBundler/mergeDeltas.js +2 -2
- package/src/DeltaBundler/mergeDeltas.js.flow +1 -1
- package/src/DeltaBundler/traverseDependencies.js +22 -22
- package/src/DeltaBundler/traverseDependencies.js.flow +3 -3
- package/src/DeltaBundler/types.flow.js +1 -1
- package/src/DeltaBundler/types.flow.js.flow +1 -1
- package/src/DeltaBundler.js +5 -5
- package/src/DeltaBundler.js.flow +4 -4
- package/src/HmrServer.js +71 -55
- package/src/HmrServer.js.flow +40 -37
- package/src/IncrementalBundler/GraphNotFoundError.js +1 -1
- package/src/IncrementalBundler/GraphNotFoundError.js.flow +1 -1
- package/src/IncrementalBundler/ResourceNotFoundError.js +1 -1
- package/src/IncrementalBundler/ResourceNotFoundError.js.flow +1 -1
- package/src/IncrementalBundler/RevisionNotFoundError.js +1 -1
- package/src/IncrementalBundler/RevisionNotFoundError.js.flow +1 -1
- package/src/IncrementalBundler.js +44 -32
- package/src/IncrementalBundler.js.flow +30 -24
- package/src/ModuleGraph/module.js +3 -3
- package/src/ModuleGraph/module.js.flow +1 -1
- package/src/ModuleGraph/node-haste/HasteFS.js +2 -2
- package/src/ModuleGraph/node-haste/HasteFS.js.flow +1 -1
- package/src/ModuleGraph/node-haste/Module.js +1 -1
- package/src/ModuleGraph/node-haste/Module.js.flow +1 -1
- package/src/ModuleGraph/node-haste/ModuleCache.js +1 -1
- package/src/ModuleGraph/node-haste/ModuleCache.js.flow +3 -3
- package/src/ModuleGraph/node-haste/Package.js +3 -3
- package/src/ModuleGraph/node-haste/Package.js.flow +3 -3
- package/src/ModuleGraph/node-haste/node-haste.flow.js +1 -1
- package/src/ModuleGraph/node-haste/node-haste.flow.js.flow +1 -1
- package/src/ModuleGraph/node-haste/node-haste.js +42 -32
- package/src/ModuleGraph/node-haste/node-haste.js.flow +28 -23
- package/src/ModuleGraph/output/indexed-ram-bundle.js +17 -17
- package/src/ModuleGraph/output/indexed-ram-bundle.js.flow +41 -9
- package/src/ModuleGraph/output/multiple-files-ram-bundle.js +18 -18
- package/src/ModuleGraph/output/multiple-files-ram-bundle.js.flow +21 -9
- package/src/ModuleGraph/output/plain-bundle.js +6 -6
- package/src/ModuleGraph/output/plain-bundle.js.flow +7 -7
- package/src/ModuleGraph/output/reverse-dependency-map-references.js +3 -3
- package/src/ModuleGraph/output/reverse-dependency-map-references.js.flow +4 -8
- package/src/ModuleGraph/output/util.js +31 -30
- package/src/ModuleGraph/output/util.js.flow +15 -16
- package/src/ModuleGraph/silent-console.js +2 -2
- package/src/ModuleGraph/silent-console.js.flow +1 -1
- package/src/ModuleGraph/test-helpers.js +7 -7
- package/src/ModuleGraph/types.flow.js +1 -1
- package/src/ModuleGraph/types.flow.js.flow +7 -7
- package/src/ModuleGraph/worker/JsFileWrapping.js +7 -7
- package/src/ModuleGraph/worker/JsFileWrapping.js.flow +3 -2
- package/src/ModuleGraph/worker/Platforms.js +2 -2
- package/src/ModuleGraph/worker/Platforms.js.flow +1 -1
- package/src/ModuleGraph/worker/collectDependencies.js +24 -25
- package/src/ModuleGraph/worker/collectDependencies.js.flow +15 -17
- package/src/ModuleGraph/worker/generate.js +2 -2
- package/src/ModuleGraph/worker/generate.js.flow +3 -3
- package/src/ModuleGraph/worker/generateImportNames.js +5 -5
- package/src/ModuleGraph/worker/generateImportNames.js.flow +3 -5
- package/src/ModuleGraph/worker/mergeSourceMaps.js +8 -7
- package/src/ModuleGraph/worker/mergeSourceMaps.js.flow +3 -3
- package/src/Server/MultipartResponse.js +4 -8
- package/src/Server/symbolicate.js +8 -8
- package/src/Server/symbolicate.js.flow +17 -5
- package/src/Server.js +202 -150
- package/src/Server.js.flow +129 -87
- package/src/cli-utils.js +4 -4
- package/src/cli-utils.js.flow +15 -13
- package/src/cli.js +4 -4
- package/src/cli.js.flow +2 -4
- package/src/commands/build.js +23 -24
- package/src/commands/build.js.flow +6 -9
- package/src/commands/dependencies.js +25 -19
- package/src/commands/serve.js +17 -18
- package/src/commands/serve.js.flow +6 -9
- package/src/index.js +116 -51
- package/src/index.js.flow +107 -41
- package/src/integration_tests/basic_bundle/AssetRegistry.js +2 -2
- package/src/integration_tests/basic_bundle/AssetRegistry.js.flow +1 -1
- package/src/integration_tests/basic_bundle/Bar.js +2 -2
- package/src/integration_tests/basic_bundle/Bar.js.flow +1 -1
- package/src/integration_tests/basic_bundle/ErrorBundle.js +2 -2
- package/src/integration_tests/basic_bundle/ErrorBundle.js.flow +1 -1
- package/src/integration_tests/basic_bundle/Foo.js +2 -2
- package/src/integration_tests/basic_bundle/Foo.js.flow +1 -1
- package/src/integration_tests/basic_bundle/TestBundle.js +3 -2
- package/src/integration_tests/basic_bundle/TestBundle.js.flow +3 -1
- package/src/integration_tests/basic_bundle/TestPolyfill.js +1 -1
- package/src/integration_tests/basic_bundle/TestPolyfill.js.flow +1 -1
- package/src/integration_tests/basic_bundle/TypeScript.ts +1 -1
- package/src/integration_tests/basic_bundle/import-export/export-1.js +2 -2
- package/src/integration_tests/basic_bundle/import-export/export-1.js.flow +1 -1
- package/src/integration_tests/basic_bundle/import-export/export-2.js +2 -2
- package/src/integration_tests/basic_bundle/import-export/export-2.js.flow +1 -1
- package/src/integration_tests/basic_bundle/import-export/export-3.js +2 -2
- package/src/integration_tests/basic_bundle/import-export/export-3.js.flow +1 -1
- package/src/integration_tests/basic_bundle/import-export/export-4.js +2 -2
- package/src/integration_tests/basic_bundle/import-export/export-4.js.flow +1 -1
- package/src/integration_tests/basic_bundle/import-export/export-5.js +2 -2
- package/src/integration_tests/basic_bundle/import-export/export-5.js.flow +1 -1
- package/src/integration_tests/basic_bundle/import-export/export-6.js +2 -2
- package/src/integration_tests/basic_bundle/import-export/export-6.js.flow +1 -1
- package/src/integration_tests/basic_bundle/import-export/export-null.js +2 -2
- package/src/integration_tests/basic_bundle/import-export/export-null.js.flow +1 -1
- package/src/integration_tests/basic_bundle/import-export/export-primitive-default.js +2 -2
- package/src/integration_tests/basic_bundle/import-export/export-primitive-default.js.flow +1 -1
- package/src/integration_tests/basic_bundle/import-export/index.js +8 -8
- package/src/integration_tests/basic_bundle/import-export/index.js.flow +1 -1
- package/src/integration_tests/basic_bundle/polyfill.js +1 -1
- package/src/integration_tests/execBundle.js +2 -2
- package/src/integration_tests/execBundle.js.flow +1 -1
- package/src/integration_tests/metro.config.js +8 -8
- package/src/lib/BatchProcessor.js +3 -3
- package/src/lib/BatchProcessor.js.flow +1 -1
- package/src/lib/JsonReporter.js +2 -2
- package/src/lib/JsonReporter.js.flow +1 -1
- package/src/lib/RamBundleParser.js +1 -1
- package/src/lib/RamBundleParser.js.flow +1 -1
- package/src/lib/TerminalReporter.js +14 -14
- package/src/lib/TerminalReporter.js.flow +9 -10
- package/src/lib/bundleToBytecode.js +6 -7
- package/src/lib/bundleToBytecode.js.flow +8 -7
- package/src/lib/bundleToString.js +3 -3
- package/src/lib/bundleToString.js.flow +5 -4
- package/src/lib/countLines.js +3 -7
- package/src/lib/countLines.js.flow +4 -7
- package/src/lib/createModuleIdFactory.js +2 -2
- package/src/lib/createModuleIdFactory.js.flow +1 -1
- package/src/lib/{attachWebsocketServer.js → createWebsocketServer.js} +18 -17
- package/src/lib/{attachWebsocketServer.js.flow → createWebsocketServer.js.flow} +12 -21
- package/src/lib/debounceAsyncQueue.js +2 -2
- package/src/lib/debounceAsyncQueue.js.flow +1 -1
- package/src/lib/formatBundlingError.js +21 -21
- package/src/lib/formatBundlingError.js.flow +6 -8
- package/src/lib/getAppendScripts.js +26 -27
- package/src/lib/getAppendScripts.js.flow +7 -8
- package/src/lib/getGraphId.js +3 -3
- package/src/lib/getGraphId.js.flow +3 -3
- package/src/lib/getMaxWorkers.js +2 -2
- package/src/lib/getMaxWorkers.js.flow +1 -1
- package/src/lib/getPreludeCode.js +2 -2
- package/src/lib/getPreludeCode.js.flow +1 -1
- package/src/lib/getPrependedScripts.js +15 -15
- package/src/lib/getPrependedScripts.js.flow +7 -8
- package/src/lib/logToConsole.js +1 -1
- package/src/lib/logToConsole.js.flow +3 -3
- package/src/lib/parseCustomTransformOptions.js +2 -2
- package/src/lib/parseCustomTransformOptions.js.flow +3 -3
- package/src/lib/parseOptionsFromUrl.js +7 -7
- package/src/lib/parseOptionsFromUrl.js.flow +29 -9
- package/src/lib/relativizeSourceMap.js +1 -1
- package/src/lib/relativizeSourceMap.js.flow +3 -3
- package/src/lib/reporting.js +5 -5
- package/src/lib/reporting.js.flow +16 -3
- package/src/lib/splitBundleOptions.js +5 -5
- package/src/lib/splitBundleOptions.js.flow +1 -1
- package/src/lib/transformHelpers.js +10 -10
- package/src/lib/transformHelpers.js.flow +5 -5
- package/src/node-haste/DependencyGraph/ModuleResolution.js +51 -30
- package/src/node-haste/DependencyGraph/ModuleResolution.js.flow +46 -42
- package/src/node-haste/DependencyGraph/createHasteMap.js +99 -0
- package/src/node-haste/DependencyGraph/createHasteMap.js.flow +88 -0
- package/src/node-haste/DependencyGraph/{assets/empty-module.js → types.js} +2 -2
- package/src/node-haste/DependencyGraph/types.js.flow +88 -0
- package/src/node-haste/DependencyGraph.js +49 -117
- package/src/node-haste/DependencyGraph.js.flow +36 -111
- package/src/node-haste/Module.js +1 -1
- package/src/node-haste/Module.js.flow +3 -3
- package/src/node-haste/ModuleCache.js +54 -13
- package/src/node-haste/ModuleCache.js.flow +53 -12
- package/src/node-haste/Package.js +7 -9
- package/src/node-haste/Package.js.flow +1 -8
- package/src/node-haste/lib/AssetPaths.js +5 -5
- package/src/node-haste/lib/AssetPaths.js.flow +2 -4
- package/src/node-haste/lib/parsePlatformFilePath.js +4 -4
- package/src/node-haste/lib/parsePlatformFilePath.js.flow +1 -1
- package/src/shared/output/RamBundle/as-assets.js +16 -17
- package/src/shared/output/RamBundle/as-assets.js.flow +11 -15
- package/src/shared/output/RamBundle/as-indexed-file.js +14 -15
- package/src/shared/output/RamBundle/as-indexed-file.js.flow +8 -12
- package/src/shared/output/RamBundle/buildSourcemapWithMetadata.js +7 -7
- package/src/shared/output/RamBundle/buildSourcemapWithMetadata.js.flow +4 -4
- package/src/shared/output/RamBundle/magic-number.js +1 -1
- package/src/shared/output/RamBundle/magic-number.js.flow +1 -1
- package/src/shared/output/RamBundle/util.js +21 -19
- package/src/shared/output/RamBundle/util.js.flow +5 -8
- package/src/shared/output/RamBundle/write-sourcemap.js +1 -1
- package/src/shared/output/RamBundle/write-sourcemap.js.flow +1 -1
- package/src/shared/output/RamBundle.js +2 -2
- package/src/shared/output/RamBundle.js.flow +4 -5
- package/src/shared/output/bundle.js +6 -6
- package/src/shared/output/bundle.js.flow +4 -5
- package/src/shared/output/meta.js +4 -5
- package/src/shared/output/meta.js.flow +2 -4
- package/src/shared/output/unbundle.js +1 -1
- package/src/shared/output/unbundle.js.flow +1 -1
- package/src/shared/output/writeFile.js +1 -1
- package/src/shared/output/writeFile.js.flow +1 -1
- package/src/shared/types.flow.js +1 -1
- package/src/shared/types.flow.js.flow +2 -2
- package/src/node-haste/DependencyGraph/assets/empty-module.js.flow +0 -9
- package/src/node-haste/types.js +0 -10
- package/src/node-haste/types.js.flow +0 -23
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _jestHasteMap = _interopRequireDefault(require("jest-haste-map"));
|
|
4
|
+
|
|
5
|
+
function _interopRequireDefault(obj) {
|
|
6
|
+
return obj && obj.__esModule ? obj : { default: obj };
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the MIT license found in the
|
|
13
|
+
* LICENSE file in the root directory of this source tree.
|
|
14
|
+
*
|
|
15
|
+
*
|
|
16
|
+
* @format
|
|
17
|
+
*/
|
|
18
|
+
// $FlowFixMe: Types for `jest-haste-map`
|
|
19
|
+
const ci = require("ci-info");
|
|
20
|
+
|
|
21
|
+
const path = require("path");
|
|
22
|
+
|
|
23
|
+
const JEST_HASTE_MAP_CACHE_BREAKER = 5;
|
|
24
|
+
|
|
25
|
+
function getIgnorePattern(config) {
|
|
26
|
+
// For now we support both options
|
|
27
|
+
const { blockList, blacklistRE } = config.resolver;
|
|
28
|
+
const ignorePattern = blacklistRE || blockList; // If neither option has been set, use default pattern
|
|
29
|
+
|
|
30
|
+
if (!ignorePattern) {
|
|
31
|
+
return / ^/;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const combine = (regexes) =>
|
|
35
|
+
new RegExp(
|
|
36
|
+
regexes
|
|
37
|
+
.map((regex) => "(" + regex.source.replace(/\//g, path.sep) + ")")
|
|
38
|
+
.join("|")
|
|
39
|
+
); // If ignorePattern is an array, merge it into one
|
|
40
|
+
|
|
41
|
+
if (Array.isArray(ignorePattern)) {
|
|
42
|
+
return combine(ignorePattern);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return ignorePattern;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function createHasteMap(config, options) {
|
|
49
|
+
var _options$name, _options$throwOnModul;
|
|
50
|
+
|
|
51
|
+
const dependencyExtractor =
|
|
52
|
+
(options === null || options === void 0
|
|
53
|
+
? void 0
|
|
54
|
+
: options.extractDependencies) === false
|
|
55
|
+
? null
|
|
56
|
+
: config.resolver.dependencyExtractor;
|
|
57
|
+
const computeDependencies = dependencyExtractor != null;
|
|
58
|
+
const hasteConfig = {
|
|
59
|
+
cacheDirectory: config.hasteMapCacheDirectory,
|
|
60
|
+
computeDependencies,
|
|
61
|
+
computeSha1: true,
|
|
62
|
+
dependencyExtractor: config.resolver.dependencyExtractor,
|
|
63
|
+
extensions: config.resolver.sourceExts.concat(config.resolver.assetExts),
|
|
64
|
+
forceNodeFilesystemAPI: !config.resolver.useWatchman,
|
|
65
|
+
hasteImplModulePath: config.resolver.hasteImplModulePath,
|
|
66
|
+
hasteMapModulePath: config.resolver.unstable_hasteMapModulePath,
|
|
67
|
+
ignorePattern: getIgnorePattern(config),
|
|
68
|
+
maxWorkers: config.maxWorkers,
|
|
69
|
+
mocksPattern: "",
|
|
70
|
+
name: `${
|
|
71
|
+
(_options$name =
|
|
72
|
+
options === null || options === void 0 ? void 0 : options.name) !==
|
|
73
|
+
null && _options$name !== void 0
|
|
74
|
+
? _options$name
|
|
75
|
+
: "metro"
|
|
76
|
+
}-${JEST_HASTE_MAP_CACHE_BREAKER}`,
|
|
77
|
+
platforms: config.resolver.platforms,
|
|
78
|
+
retainAllFiles: true,
|
|
79
|
+
resetCache: config.resetCache,
|
|
80
|
+
rootDir: config.projectRoot,
|
|
81
|
+
roots: config.watchFolders,
|
|
82
|
+
throwOnModuleCollision:
|
|
83
|
+
(_options$throwOnModul =
|
|
84
|
+
options === null || options === void 0
|
|
85
|
+
? void 0
|
|
86
|
+
: options.throwOnModuleCollision) !== null &&
|
|
87
|
+
_options$throwOnModul !== void 0
|
|
88
|
+
? _options$throwOnModul
|
|
89
|
+
: true,
|
|
90
|
+
useWatchman: config.resolver.useWatchman,
|
|
91
|
+
watch:
|
|
92
|
+
(options === null || options === void 0 ? void 0 : options.watch) == null
|
|
93
|
+
? !ci.isCI
|
|
94
|
+
: options.watch,
|
|
95
|
+
};
|
|
96
|
+
return _jestHasteMap.default.create(hasteConfig);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
module.exports = createHasteMap;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @flow strict-local
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type {HasteConfig, HasteMap} from './types';
|
|
12
|
+
import type {ConfigT} from 'metro-config/src/configTypes.flow';
|
|
13
|
+
|
|
14
|
+
// $FlowFixMe: Types for `jest-haste-map`
|
|
15
|
+
import JestHasteMap from 'jest-haste-map';
|
|
16
|
+
|
|
17
|
+
const ci = require('ci-info');
|
|
18
|
+
const path = require('path');
|
|
19
|
+
|
|
20
|
+
const JEST_HASTE_MAP_CACHE_BREAKER = 5;
|
|
21
|
+
|
|
22
|
+
function getIgnorePattern(config: ConfigT): RegExp {
|
|
23
|
+
// For now we support both options
|
|
24
|
+
const {blockList, blacklistRE} = config.resolver;
|
|
25
|
+
const ignorePattern = blacklistRE || blockList;
|
|
26
|
+
|
|
27
|
+
// If neither option has been set, use default pattern
|
|
28
|
+
if (!ignorePattern) {
|
|
29
|
+
return / ^/;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const combine = regexes =>
|
|
33
|
+
new RegExp(
|
|
34
|
+
regexes
|
|
35
|
+
.map(regex => '(' + regex.source.replace(/\//g, path.sep) + ')')
|
|
36
|
+
.join('|'),
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
// If ignorePattern is an array, merge it into one
|
|
40
|
+
if (Array.isArray(ignorePattern)) {
|
|
41
|
+
return combine(ignorePattern);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return ignorePattern;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function createHasteMap(
|
|
48
|
+
config: ConfigT,
|
|
49
|
+
options?: $ReadOnly<{
|
|
50
|
+
extractDependencies?: boolean,
|
|
51
|
+
watch?: boolean,
|
|
52
|
+
throwOnModuleCollision?: boolean,
|
|
53
|
+
name?: string,
|
|
54
|
+
}>,
|
|
55
|
+
): HasteMap {
|
|
56
|
+
const dependencyExtractor =
|
|
57
|
+
options?.extractDependencies === false
|
|
58
|
+
? null
|
|
59
|
+
: config.resolver.dependencyExtractor;
|
|
60
|
+
const computeDependencies = dependencyExtractor != null;
|
|
61
|
+
|
|
62
|
+
const hasteConfig: HasteConfig = {
|
|
63
|
+
cacheDirectory: config.hasteMapCacheDirectory,
|
|
64
|
+
computeDependencies,
|
|
65
|
+
computeSha1: true,
|
|
66
|
+
dependencyExtractor: config.resolver.dependencyExtractor,
|
|
67
|
+
extensions: config.resolver.sourceExts.concat(config.resolver.assetExts),
|
|
68
|
+
forceNodeFilesystemAPI: !config.resolver.useWatchman,
|
|
69
|
+
hasteImplModulePath: config.resolver.hasteImplModulePath,
|
|
70
|
+
hasteMapModulePath: config.resolver.unstable_hasteMapModulePath,
|
|
71
|
+
ignorePattern: getIgnorePattern(config),
|
|
72
|
+
maxWorkers: config.maxWorkers,
|
|
73
|
+
mocksPattern: '',
|
|
74
|
+
name: `${options?.name ?? 'metro'}-${JEST_HASTE_MAP_CACHE_BREAKER}`,
|
|
75
|
+
platforms: config.resolver.platforms,
|
|
76
|
+
retainAllFiles: true,
|
|
77
|
+
resetCache: config.resetCache,
|
|
78
|
+
rootDir: config.projectRoot,
|
|
79
|
+
roots: config.watchFolders,
|
|
80
|
+
throwOnModuleCollision: options?.throwOnModuleCollision ?? true,
|
|
81
|
+
useWatchman: config.resolver.useWatchman,
|
|
82
|
+
watch: options?.watch == null ? !ci.isCI : options.watch,
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
return JestHasteMap.create(hasteConfig);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
module.exports = createHasteMap;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @format
|
|
8
7
|
*
|
|
8
|
+
* @format
|
|
9
9
|
*/
|
|
10
10
|
"use strict";
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @flow strict
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
import type EventEmitter from 'events';
|
|
14
|
+
|
|
15
|
+
// TODO(cpojer): Create a jest-types repo.
|
|
16
|
+
export type HasteFS = {
|
|
17
|
+
exists(filePath: string): boolean,
|
|
18
|
+
getAllFiles(): Array<string>,
|
|
19
|
+
getDependencies(filePath: string): Array<string>,
|
|
20
|
+
getFileIterator(): Iterator<string>,
|
|
21
|
+
getModuleName(filePath: string): ?string,
|
|
22
|
+
getSha1(string): ?string,
|
|
23
|
+
matchFiles(pattern: RegExp | string): Array<string>,
|
|
24
|
+
...
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type HasteConfig = $ReadOnly<{
|
|
28
|
+
cacheDirectory?: ?string,
|
|
29
|
+
computeDependencies?: ?boolean,
|
|
30
|
+
computeSha1?: ?boolean,
|
|
31
|
+
dependencyExtractor?: ?string | null,
|
|
32
|
+
enableSymlinks?: ?boolean,
|
|
33
|
+
extensions: $ReadOnlyArray<string>,
|
|
34
|
+
forceNodeFilesystemAPI?: ?boolean,
|
|
35
|
+
hasteImplModulePath?: ?string,
|
|
36
|
+
hasteMapModulePath?: ?string,
|
|
37
|
+
ignorePattern?: ?RegExp | ((str: string) => boolean),
|
|
38
|
+
maxWorkers: number,
|
|
39
|
+
mocksPattern?: ?string,
|
|
40
|
+
name: string,
|
|
41
|
+
platforms: $ReadOnlyArray<string>,
|
|
42
|
+
resetCache?: ?boolean,
|
|
43
|
+
retainAllFiles: boolean,
|
|
44
|
+
rootDir: string,
|
|
45
|
+
roots: $ReadOnlyArray<string>,
|
|
46
|
+
skipPackageJson?: ?boolean,
|
|
47
|
+
throwOnModuleCollision?: ?boolean,
|
|
48
|
+
useWatchman?: ?boolean,
|
|
49
|
+
watch?: ?boolean,
|
|
50
|
+
...
|
|
51
|
+
}>;
|
|
52
|
+
|
|
53
|
+
type ModuleMapItem = {[platform: string]: ModuleMetaData};
|
|
54
|
+
type ModuleMetaData = [string, number];
|
|
55
|
+
type MockData = Map<string, string>;
|
|
56
|
+
type ModuleMapData = Map<string, ModuleMapItem>;
|
|
57
|
+
type DuplicatesSet = Map<string, number>;
|
|
58
|
+
type DuplicatesIndex = Map<string, Map<string, DuplicatesSet>>;
|
|
59
|
+
|
|
60
|
+
type RawModuleMap = {
|
|
61
|
+
rootDir: string,
|
|
62
|
+
duplicates: DuplicatesIndex,
|
|
63
|
+
map: ModuleMapData,
|
|
64
|
+
mocks: MockData,
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
// `jest-haste-map`'s interface for ModuleMap.
|
|
68
|
+
export type ModuleMap = {
|
|
69
|
+
getModule(
|
|
70
|
+
name: string,
|
|
71
|
+
platform: string | null,
|
|
72
|
+
supportsNativePlatform: ?boolean,
|
|
73
|
+
): ?string,
|
|
74
|
+
getPackage(
|
|
75
|
+
name: string,
|
|
76
|
+
platform: string | null,
|
|
77
|
+
supportsNativePlatform: ?boolean,
|
|
78
|
+
): ?string,
|
|
79
|
+
getRawModuleMap(): RawModuleMap,
|
|
80
|
+
...
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// Interface as used by node-haste / internal tools, satisfied by JestHasteMap
|
|
84
|
+
export interface HasteMap extends EventEmitter {
|
|
85
|
+
build: () => Promise<{hasteFS: HasteFS, moduleMap: ModuleMap}>;
|
|
86
|
+
end: () => void;
|
|
87
|
+
getCacheFilePath: () => string;
|
|
88
|
+
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _jestHasteMap = require("jest-haste-map");
|
|
4
|
+
|
|
1
5
|
/**
|
|
2
|
-
* Copyright (c)
|
|
6
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
7
|
*
|
|
4
8
|
* This source code is licensed under the MIT license found in the
|
|
5
9
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -7,37 +11,31 @@
|
|
|
7
11
|
*
|
|
8
12
|
* @format
|
|
9
13
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const { AmbiguousModuleResolutionError } = require("metro-core");
|
|
13
|
-
|
|
14
|
-
const { DuplicateHasteCandidatesError } = require("jest-haste-map").ModuleMap;
|
|
14
|
+
const createHasteMap = require("./DependencyGraph/createHasteMap");
|
|
15
15
|
|
|
16
|
-
const {
|
|
17
|
-
|
|
18
|
-
const { PackageResolutionError } = require("metro-core");
|
|
19
|
-
|
|
20
|
-
const JestHasteMap = require("jest-haste-map");
|
|
16
|
+
const { ModuleResolver } = require("./DependencyGraph/ModuleResolution");
|
|
21
17
|
|
|
22
18
|
const Module = require("./Module");
|
|
23
19
|
|
|
24
20
|
const ModuleCache = require("./ModuleCache");
|
|
25
21
|
|
|
26
|
-
const
|
|
22
|
+
const { EventEmitter } = require("events");
|
|
27
23
|
|
|
28
24
|
const fs = require("fs");
|
|
29
25
|
|
|
30
|
-
const
|
|
26
|
+
const {
|
|
27
|
+
AmbiguousModuleResolutionError,
|
|
28
|
+
Logger: { createActionStartEntry, createActionEndEntry, log },
|
|
29
|
+
PackageResolutionError,
|
|
30
|
+
} = require("metro-core");
|
|
31
31
|
|
|
32
|
-
const {
|
|
32
|
+
const { InvalidPackageError } = require("metro-resolver");
|
|
33
33
|
|
|
34
|
-
const
|
|
34
|
+
const nullthrows = require("nullthrows");
|
|
35
35
|
|
|
36
|
-
const
|
|
37
|
-
Logger: { createActionStartEntry, createActionEndEntry, log }
|
|
38
|
-
} = require("metro-core");
|
|
36
|
+
const path = require("path");
|
|
39
37
|
|
|
40
|
-
const
|
|
38
|
+
const { DuplicateHasteCandidatesError } = _jestHasteMap.ModuleMap;
|
|
41
39
|
|
|
42
40
|
function getOrCreate(map, field) {
|
|
43
41
|
let subMap = map.get(field);
|
|
@@ -51,7 +49,6 @@ function getOrCreate(map, field) {
|
|
|
51
49
|
}
|
|
52
50
|
|
|
53
51
|
class DependencyGraph extends EventEmitter {
|
|
54
|
-
// $FlowFixMe[value-as-type]
|
|
55
52
|
constructor({ config, haste, initialHasteFS, initialModuleMap }) {
|
|
56
53
|
super();
|
|
57
54
|
this._config = config;
|
|
@@ -59,7 +56,7 @@ class DependencyGraph extends EventEmitter {
|
|
|
59
56
|
this._hasteFS = initialHasteFS;
|
|
60
57
|
this._moduleMap = initialModuleMap;
|
|
61
58
|
this._assetExtensions = new Set(
|
|
62
|
-
config.resolver.assetExts.map(asset => "." + asset)
|
|
59
|
+
config.resolver.assetExts.map((asset) => "." + asset)
|
|
63
60
|
); // $FlowFixMe[method-unbinding] added when improving typing for this parameters
|
|
64
61
|
|
|
65
62
|
this._haste.on("change", this._onHasteChange.bind(this));
|
|
@@ -70,86 +67,32 @@ class DependencyGraph extends EventEmitter {
|
|
|
70
67
|
this._createModuleResolver();
|
|
71
68
|
}
|
|
72
69
|
|
|
73
|
-
static _getIgnorePattern(config) {
|
|
74
|
-
/*
|
|
75
|
-
For now we support both blockList and blacklistRE options
|
|
76
|
-
*/
|
|
77
|
-
const { blockList, blacklistRE } = config.resolver;
|
|
78
|
-
|
|
79
|
-
const combine = regexes =>
|
|
80
|
-
new RegExp(
|
|
81
|
-
regexes
|
|
82
|
-
.map(regex => "(" + regex.source.replace(/\//g, path.sep) + ")")
|
|
83
|
-
.join("|")
|
|
84
|
-
); // If `blacklistRE` is set - use it,
|
|
85
|
-
// if `blockList` is set - use it
|
|
86
|
-
|
|
87
|
-
const ignorePattern = blacklistRE || blockList; // If neither option has been set, use default pattern
|
|
88
|
-
|
|
89
|
-
if (!ignorePattern) {
|
|
90
|
-
return / ^/;
|
|
91
|
-
} // If ignorePattern is an array, merge it into one
|
|
92
|
-
|
|
93
|
-
if (Array.isArray(ignorePattern)) {
|
|
94
|
-
return combine(ignorePattern);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return ignorePattern;
|
|
98
|
-
} // $FlowFixMe[value-as-type]
|
|
99
|
-
|
|
100
|
-
static _createHaste(config, watch) {
|
|
101
|
-
const haste = new JestHasteMap({
|
|
102
|
-
cacheDirectory: config.hasteMapCacheDirectory,
|
|
103
|
-
dependencyExtractor: config.resolver.dependencyExtractor,
|
|
104
|
-
computeSha1: true,
|
|
105
|
-
extensions: config.resolver.sourceExts.concat(config.resolver.assetExts),
|
|
106
|
-
forceNodeFilesystemAPI: !config.resolver.useWatchman,
|
|
107
|
-
hasteImplModulePath: config.resolver.hasteImplModulePath,
|
|
108
|
-
ignorePattern: this._getIgnorePattern(config),
|
|
109
|
-
maxWorkers: config.maxWorkers,
|
|
110
|
-
mocksPattern: "",
|
|
111
|
-
name: "metro-" + JEST_HASTE_MAP_CACHE_BREAKER,
|
|
112
|
-
platforms: config.resolver.platforms,
|
|
113
|
-
retainAllFiles: true,
|
|
114
|
-
resetCache: config.resetCache,
|
|
115
|
-
rootDir: config.projectRoot,
|
|
116
|
-
roots: config.watchFolders,
|
|
117
|
-
throwOnModuleCollision: true,
|
|
118
|
-
useWatchman: config.resolver.useWatchman,
|
|
119
|
-
watch: watch == null ? !ci.isCI : watch
|
|
120
|
-
}); // We can have a lot of graphs listening to Haste for changes.
|
|
121
|
-
// Bump this up to silence the max listeners EventEmitter warning.
|
|
122
|
-
|
|
123
|
-
haste.setMaxListeners(1000);
|
|
124
|
-
return haste;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
70
|
static async load(config, options) {
|
|
71
|
+
const { hasReducedPerformance, watch } =
|
|
72
|
+
options !== null && options !== void 0 ? options : {};
|
|
128
73
|
const initializingMetroLogEntry = log(
|
|
129
74
|
createActionStartEntry("Initializing Metro")
|
|
130
75
|
);
|
|
131
76
|
config.reporter.update({
|
|
132
77
|
type: "dep_graph_loading",
|
|
133
|
-
hasReducedPerformance:
|
|
134
|
-
? Boolean(options.hasReducedPerformance)
|
|
135
|
-
: false
|
|
78
|
+
hasReducedPerformance: !!hasReducedPerformance,
|
|
136
79
|
});
|
|
80
|
+
const haste = createHasteMap(config, {
|
|
81
|
+
watch,
|
|
82
|
+
}); // We can have a lot of graphs listening to Haste for changes.
|
|
83
|
+
// Bump this up to silence the max listeners EventEmitter warning.
|
|
137
84
|
|
|
138
|
-
|
|
139
|
-
config,
|
|
140
|
-
options && options.watch
|
|
141
|
-
);
|
|
142
|
-
|
|
85
|
+
haste.setMaxListeners(1000);
|
|
143
86
|
const { hasteFS, moduleMap } = await haste.build();
|
|
144
87
|
log(createActionEndEntry(initializingMetroLogEntry));
|
|
145
88
|
config.reporter.update({
|
|
146
|
-
type: "dep_graph_loaded"
|
|
89
|
+
type: "dep_graph_loaded",
|
|
147
90
|
});
|
|
148
91
|
return new DependencyGraph({
|
|
149
92
|
haste,
|
|
150
93
|
initialHasteFS: hasteFS,
|
|
151
94
|
initialModuleMap: moduleMap,
|
|
152
|
-
config
|
|
95
|
+
config,
|
|
153
96
|
});
|
|
154
97
|
}
|
|
155
98
|
|
|
@@ -186,16 +129,19 @@ class DependencyGraph extends EventEmitter {
|
|
|
186
129
|
|
|
187
130
|
_createModuleResolver() {
|
|
188
131
|
this._moduleResolver = new ModuleResolver({
|
|
189
|
-
dirExists: filePath => {
|
|
132
|
+
dirExists: (filePath) => {
|
|
190
133
|
try {
|
|
191
134
|
return fs.lstatSync(filePath).isDirectory();
|
|
192
135
|
} catch (e) {}
|
|
193
136
|
|
|
194
137
|
return false;
|
|
195
138
|
},
|
|
139
|
+
disableHierarchicalLookup:
|
|
140
|
+
this._config.resolver.disableHierarchicalLookup,
|
|
196
141
|
doesFileExist: this._doesFileExist,
|
|
142
|
+
emptyModulePath: this._config.resolver.emptyModulePath,
|
|
197
143
|
extraNodeModules: this._config.resolver.extraNodeModules,
|
|
198
|
-
isAssetFile: file => this._assetExtensions.has(path.extname(file)),
|
|
144
|
+
isAssetFile: (file) => this._assetExtensions.has(path.extname(file)),
|
|
199
145
|
mainFields: this._config.resolver.resolverMainFields,
|
|
200
146
|
moduleCache: this._moduleCache,
|
|
201
147
|
moduleMap: this._moduleMap,
|
|
@@ -207,20 +153,20 @@ class DependencyGraph extends EventEmitter {
|
|
|
207
153
|
const assets = [
|
|
208
154
|
basePath + extension,
|
|
209
155
|
...this._config.resolver.assetResolutions.map(
|
|
210
|
-
resolution => basePath + "@" + resolution + "x" + extension
|
|
211
|
-
)
|
|
212
|
-
].filter(candidate => this._hasteFS.exists(candidate));
|
|
156
|
+
(resolution) => basePath + "@" + resolution + "x" + extension
|
|
157
|
+
),
|
|
158
|
+
].filter((candidate) => this._hasteFS.exists(candidate));
|
|
213
159
|
return assets.length ? assets : null;
|
|
214
160
|
},
|
|
215
161
|
resolveRequest: this._config.resolver.resolveRequest,
|
|
216
|
-
sourceExts: this._config.resolver.sourceExts
|
|
162
|
+
sourceExts: this._config.resolver.sourceExts,
|
|
217
163
|
});
|
|
218
164
|
}
|
|
219
165
|
|
|
220
166
|
_createModuleCache() {
|
|
221
167
|
return new ModuleCache({
|
|
222
168
|
// $FlowFixMe[method-unbinding] added when improving typing for this parameters
|
|
223
|
-
getClosestPackage: this._getClosestPackage.bind(this)
|
|
169
|
+
getClosestPackage: this._getClosestPackage.bind(this),
|
|
224
170
|
});
|
|
225
171
|
}
|
|
226
172
|
|
|
@@ -249,7 +195,7 @@ class DependencyGraph extends EventEmitter {
|
|
|
249
195
|
}
|
|
250
196
|
|
|
251
197
|
return sha1;
|
|
252
|
-
}
|
|
198
|
+
}
|
|
253
199
|
|
|
254
200
|
getWatcher() {
|
|
255
201
|
return this._haste;
|
|
@@ -264,25 +210,22 @@ class DependencyGraph extends EventEmitter {
|
|
|
264
210
|
to,
|
|
265
211
|
platform,
|
|
266
212
|
{ assumeFlatNodeModules } = {
|
|
267
|
-
assumeFlatNodeModules: false
|
|
213
|
+
assumeFlatNodeModules: false,
|
|
268
214
|
}
|
|
269
215
|
) {
|
|
270
|
-
const
|
|
216
|
+
const isSensitiveToOriginFolder = // Resolution is always relative to the origin folder unless we assume a flat node_modules
|
|
217
|
+
!assumeFlatNodeModules || // Path requests are resolved relative to the origin folder
|
|
271
218
|
to.includes("/") ||
|
|
272
219
|
to === "." ||
|
|
273
|
-
to === ".." ||
|
|
220
|
+
to === ".." || // Preserve standard assumptions under node_modules
|
|
274
221
|
from.includes(path.sep + "node_modules" + path.sep);
|
|
275
222
|
const mapByDirectory = getOrCreate(
|
|
276
223
|
this._resolutionCache,
|
|
277
|
-
|
|
224
|
+
isSensitiveToOriginFolder ? path.dirname(from) : ""
|
|
278
225
|
);
|
|
279
|
-
|
|
226
|
+
const mapByPlatform = getOrCreate(mapByDirectory, to);
|
|
280
227
|
let modulePath = mapByPlatform.get(platform);
|
|
281
228
|
|
|
282
|
-
if (!modulePath) {
|
|
283
|
-
modulePath = this._moduleMap.getModule(to, platform, true);
|
|
284
|
-
}
|
|
285
|
-
|
|
286
229
|
if (!modulePath) {
|
|
287
230
|
try {
|
|
288
231
|
modulePath = this._moduleResolver.resolveDependency(
|
|
@@ -290,18 +233,7 @@ class DependencyGraph extends EventEmitter {
|
|
|
290
233
|
to,
|
|
291
234
|
true,
|
|
292
235
|
platform
|
|
293
|
-
).path;
|
|
294
|
-
// we need to cache packages by directory instead of globally.
|
|
295
|
-
|
|
296
|
-
if (
|
|
297
|
-
!assumeFlatNodeModules &&
|
|
298
|
-
modulePath.includes(path.sep + "node_modules" + path.sep)
|
|
299
|
-
) {
|
|
300
|
-
mapByPlatform = getOrCreate(
|
|
301
|
-
getOrCreate(this._resolutionCache, path.dirname(from)),
|
|
302
|
-
to
|
|
303
|
-
);
|
|
304
|
-
}
|
|
236
|
+
).path;
|
|
305
237
|
} catch (error) {
|
|
306
238
|
if (error instanceof DuplicateHasteCandidatesError) {
|
|
307
239
|
throw new AmbiguousModuleResolutionError(from, error);
|
|
@@ -311,7 +243,7 @@ class DependencyGraph extends EventEmitter {
|
|
|
311
243
|
throw new PackageResolutionError({
|
|
312
244
|
packageError: error,
|
|
313
245
|
originModulePath: from,
|
|
314
|
-
targetModuleName: to
|
|
246
|
+
targetModuleName: to,
|
|
315
247
|
});
|
|
316
248
|
}
|
|
317
249
|
|
|
@@ -323,7 +255,7 @@ class DependencyGraph extends EventEmitter {
|
|
|
323
255
|
return modulePath;
|
|
324
256
|
}
|
|
325
257
|
|
|
326
|
-
_doesFileExist = filePath => {
|
|
258
|
+
_doesFileExist = (filePath) => {
|
|
327
259
|
return this._hasteFS.exists(filePath);
|
|
328
260
|
};
|
|
329
261
|
|
|
@@ -338,7 +270,7 @@ class DependencyGraph extends EventEmitter {
|
|
|
338
270
|
}
|
|
339
271
|
|
|
340
272
|
getDependencies(filePath) {
|
|
341
|
-
return this._hasteFS.getDependencies(filePath);
|
|
273
|
+
return nullthrows(this._hasteFS.getDependencies(filePath));
|
|
342
274
|
}
|
|
343
275
|
}
|
|
344
276
|
|