@expo/metro-file-map 55.0.0-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/README.md +1 -0
- package/build/Watcher.d.ts +53 -0
- package/build/Watcher.js +249 -0
- package/build/cache/DiskCacheManager.d.ts +25 -0
- package/build/cache/DiskCacheManager.js +110 -0
- package/build/constants.d.ts +23 -0
- package/build/constants.js +27 -0
- package/build/crawlers/node/fallback.d.ts +20 -0
- package/build/crawlers/node/fallback.js +148 -0
- package/build/crawlers/node/index.d.ts +10 -0
- package/build/crawlers/node/index.js +152 -0
- package/build/crawlers/watchman/index.d.ts +8 -0
- package/build/crawlers/watchman/index.js +288 -0
- package/build/crawlers/watchman/planQuery.d.ts +31 -0
- package/build/crawlers/watchman/planQuery.js +99 -0
- package/build/index.d.ts +140 -0
- package/build/index.js +836 -0
- package/build/lib/FileProcessor.d.ts +42 -0
- package/build/lib/FileProcessor.js +180 -0
- package/build/lib/FileSystemChangeAggregator.d.ts +18 -0
- package/build/lib/FileSystemChangeAggregator.js +114 -0
- package/build/lib/RootPathUtils.d.ts +24 -0
- package/build/lib/RootPathUtils.js +311 -0
- package/build/lib/TreeFS.d.ts +161 -0
- package/build/lib/TreeFS.js +1006 -0
- package/build/lib/checkWatchmanCapabilities.d.ts +9 -0
- package/build/lib/checkWatchmanCapabilities.js +50 -0
- package/build/lib/normalizePathSeparatorsToPosix.d.ts +8 -0
- package/build/lib/normalizePathSeparatorsToPosix.js +20 -0
- package/build/lib/normalizePathSeparatorsToSystem.d.ts +8 -0
- package/build/lib/normalizePathSeparatorsToSystem.js +20 -0
- package/build/lib/removeOverlappingRoots.d.ts +10 -0
- package/build/lib/removeOverlappingRoots.js +37 -0
- package/build/lib/rootRelativeCacheKeys.d.ts +11 -0
- package/build/lib/rootRelativeCacheKeys.js +56 -0
- package/build/lib/sorting.d.ts +8 -0
- package/build/lib/sorting.js +31 -0
- package/build/plugins/DependencyPlugin.d.ts +23 -0
- package/build/plugins/DependencyPlugin.js +61 -0
- package/build/plugins/FileDataPlugin.d.ts +28 -0
- package/build/plugins/FileDataPlugin.js +46 -0
- package/build/plugins/HastePlugin.d.ts +32 -0
- package/build/plugins/HastePlugin.js +358 -0
- package/build/plugins/MockPlugin.d.ts +27 -0
- package/build/plugins/MockPlugin.js +157 -0
- package/build/plugins/dependencies/dependencyExtractor.d.ts +7 -0
- package/build/plugins/dependencies/dependencyExtractor.js +66 -0
- package/build/plugins/dependencies/worker.d.ts +18 -0
- package/build/plugins/dependencies/worker.js +30 -0
- package/build/plugins/haste/DuplicateHasteCandidatesError.d.ts +14 -0
- package/build/plugins/haste/DuplicateHasteCandidatesError.js +51 -0
- package/build/plugins/haste/HasteConflictsError.d.ts +12 -0
- package/build/plugins/haste/HasteConflictsError.js +49 -0
- package/build/plugins/haste/computeConflicts.d.ts +19 -0
- package/build/plugins/haste/computeConflicts.js +74 -0
- package/build/plugins/haste/getPlatformExtension.d.ts +7 -0
- package/build/plugins/haste/getPlatformExtension.js +19 -0
- package/build/plugins/haste/worker.d.ts +16 -0
- package/build/plugins/haste/worker.js +48 -0
- package/build/plugins/mocks/getMockName.d.ts +8 -0
- package/build/plugins/mocks/getMockName.js +17 -0
- package/build/ts-declarations/fb-watchman.d.ts +20 -0
- package/build/ts-declarations/fb-watchman.js +2 -0
- package/build/types.d.ts +404 -0
- package/build/types.js +8 -0
- package/build/watchers/AbstractWatcher.d.ts +30 -0
- package/build/watchers/AbstractWatcher.js +97 -0
- package/build/watchers/FallbackWatcher.d.ts +18 -0
- package/build/watchers/FallbackWatcher.js +411 -0
- package/build/watchers/NativeWatcher.d.ts +39 -0
- package/build/watchers/NativeWatcher.js +156 -0
- package/build/watchers/RecrawlWarning.d.ts +18 -0
- package/build/watchers/RecrawlWarning.js +59 -0
- package/build/watchers/WatchmanWatcher.d.ts +22 -0
- package/build/watchers/WatchmanWatcher.js +263 -0
- package/build/watchers/common.d.ts +39 -0
- package/build/watchers/common.js +60 -0
- package/build/worker.d.ts +24 -0
- package/build/worker.js +80 -0
- package/build/workerExclusionList.d.ts +8 -0
- package/build/workerExclusionList.js +57 -0
- package/package.json +54 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.DuplicateHasteCandidatesError = void 0;
|
|
13
|
+
const constants_1 = __importDefault(require("../../constants"));
|
|
14
|
+
class DuplicateHasteCandidatesError extends Error {
|
|
15
|
+
hasteName;
|
|
16
|
+
platform;
|
|
17
|
+
supportsNativePlatform;
|
|
18
|
+
duplicatesSet;
|
|
19
|
+
constructor(name, platform, supportsNativePlatform, duplicatesSet) {
|
|
20
|
+
const platformMessage = getPlatformMessage(platform);
|
|
21
|
+
super(`The name \`${name}\` was looked up in the Haste module map. It ` +
|
|
22
|
+
'cannot be resolved, because there exists several different ' +
|
|
23
|
+
'files, or packages, that provide a module for ' +
|
|
24
|
+
`that particular name and platform. ${platformMessage} You must ` +
|
|
25
|
+
'delete or exclude files until there remains only one of these:\n\n' +
|
|
26
|
+
Array.from(duplicatesSet)
|
|
27
|
+
.map(([dupFilePath, dupFileType]) => ` * \`${dupFilePath}\` (${getTypeMessage(dupFileType)})\n`)
|
|
28
|
+
.sort()
|
|
29
|
+
.join(''));
|
|
30
|
+
this.hasteName = name;
|
|
31
|
+
this.platform = platform;
|
|
32
|
+
this.supportsNativePlatform = supportsNativePlatform;
|
|
33
|
+
this.duplicatesSet = duplicatesSet;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.DuplicateHasteCandidatesError = DuplicateHasteCandidatesError;
|
|
37
|
+
function getPlatformMessage(platform) {
|
|
38
|
+
if (platform === constants_1.default.GENERIC_PLATFORM) {
|
|
39
|
+
return 'The platform is generic (no extension).';
|
|
40
|
+
}
|
|
41
|
+
return `The platform extension is \`${platform}\`.`;
|
|
42
|
+
}
|
|
43
|
+
function getTypeMessage(type) {
|
|
44
|
+
switch (type) {
|
|
45
|
+
case constants_1.default.MODULE:
|
|
46
|
+
return 'module';
|
|
47
|
+
case constants_1.default.PACKAGE:
|
|
48
|
+
return 'package';
|
|
49
|
+
}
|
|
50
|
+
return 'unknown';
|
|
51
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
import type { HasteConflict } from '../../types';
|
|
8
|
+
export declare class HasteConflictsError extends Error {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(conflicts: readonly HasteConflict[]);
|
|
11
|
+
getDetailedMessage(pathsRelativeToRoot: string | null): string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.HasteConflictsError = void 0;
|
|
13
|
+
const path_1 = __importDefault(require("path"));
|
|
14
|
+
class HasteConflictsError extends Error {
|
|
15
|
+
#conflicts;
|
|
16
|
+
constructor(conflicts) {
|
|
17
|
+
super(`Found ${conflicts.length} Haste conflict(s). Haste module IDs must be globally unique in the codebase.`);
|
|
18
|
+
this.#conflicts = conflicts;
|
|
19
|
+
}
|
|
20
|
+
getDetailedMessage(pathsRelativeToRoot) {
|
|
21
|
+
const messages = [];
|
|
22
|
+
const conflicts = this.#conflicts;
|
|
23
|
+
if (conflicts.some((conflict) => conflict.type === 'duplicate')) {
|
|
24
|
+
messages.push('Advice: Resolve conflicts of type "duplicate" by renaming one or both of the conflicting modules, or by excluding conflicting paths from Haste.');
|
|
25
|
+
}
|
|
26
|
+
if (conflicts.some((conflict) => conflict.type === 'shadowing')) {
|
|
27
|
+
messages.push('Advice: Resolve conflicts of type "shadowing" by moving the modules to the same folder, or by excluding conflicting paths from Haste.');
|
|
28
|
+
}
|
|
29
|
+
let index = 0;
|
|
30
|
+
for (const conflict of conflicts) {
|
|
31
|
+
const itemHeader = index + 1 + '. ';
|
|
32
|
+
const indent = ' '.repeat(itemHeader.length + 2);
|
|
33
|
+
messages.push('\n' +
|
|
34
|
+
itemHeader +
|
|
35
|
+
conflict.id +
|
|
36
|
+
(conflict.platform != null ? `.${conflict.platform}` : '') +
|
|
37
|
+
` (${conflict.type})`);
|
|
38
|
+
for (const modulePath of conflict.absolutePaths) {
|
|
39
|
+
messages.push(indent +
|
|
40
|
+
(pathsRelativeToRoot != null
|
|
41
|
+
? path_1.default.relative(pathsRelativeToRoot, modulePath)
|
|
42
|
+
: modulePath));
|
|
43
|
+
}
|
|
44
|
+
++index;
|
|
45
|
+
}
|
|
46
|
+
return messages.join('\n');
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.HasteConflictsError = HasteConflictsError;
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
import type { HasteMapItem } from '../../types';
|
|
8
|
+
interface Conflict {
|
|
9
|
+
id: string;
|
|
10
|
+
platform: string | null;
|
|
11
|
+
absolutePaths: string[];
|
|
12
|
+
type: 'duplicate' | 'shadowing';
|
|
13
|
+
}
|
|
14
|
+
export declare function computeHasteConflicts(options: {
|
|
15
|
+
readonly duplicates: ReadonlyMap<string, ReadonlyMap<string, ReadonlyMap<string, number>>>;
|
|
16
|
+
readonly map: ReadonlyMap<string, HasteMapItem>;
|
|
17
|
+
readonly rootDir: string;
|
|
18
|
+
}): Conflict[];
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.computeHasteConflicts = computeHasteConflicts;
|
|
13
|
+
const path_1 = __importDefault(require("path"));
|
|
14
|
+
const constants_1 = __importDefault(require("../../constants"));
|
|
15
|
+
const sorting_1 = require("../../lib/sorting");
|
|
16
|
+
function computeHasteConflicts(options) {
|
|
17
|
+
const { duplicates, map, rootDir } = options;
|
|
18
|
+
const conflicts = [];
|
|
19
|
+
// Add duplicates reported by metro-file-map
|
|
20
|
+
for (const [id, dupsByPlatform] of duplicates.entries()) {
|
|
21
|
+
for (const [platform, conflictingModules] of dupsByPlatform) {
|
|
22
|
+
conflicts.push({
|
|
23
|
+
id,
|
|
24
|
+
platform: platform === constants_1.default.GENERIC_PLATFORM ? null : platform,
|
|
25
|
+
absolutePaths: [...conflictingModules.keys()]
|
|
26
|
+
.map((modulePath) => path_1.default.resolve(rootDir, modulePath))
|
|
27
|
+
// Sort for ease of testing
|
|
28
|
+
.sort(),
|
|
29
|
+
type: 'duplicate',
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
// Add cases of "shadowing at a distance": a module with a platform suffix and
|
|
34
|
+
// a module with a lower priority platform suffix (or no suffix), in different
|
|
35
|
+
// directories.
|
|
36
|
+
for (const [id, data] of map) {
|
|
37
|
+
const conflictPaths = new Set();
|
|
38
|
+
const basePaths = [];
|
|
39
|
+
for (const basePlatform of [constants_1.default.NATIVE_PLATFORM, constants_1.default.GENERIC_PLATFORM]) {
|
|
40
|
+
if (data[basePlatform] == null) {
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
const basePath = data[basePlatform][0];
|
|
44
|
+
basePaths.push(basePath);
|
|
45
|
+
const basePathDir = path_1.default.dirname(basePath);
|
|
46
|
+
// Find all platforms that can shadow basePlatform
|
|
47
|
+
// Given that X.(specific platform).js > x.native.js > X.js
|
|
48
|
+
// and basePlatform is either 'native' or generic (no platform).
|
|
49
|
+
for (const platform of Object.keys(data)) {
|
|
50
|
+
if (platform === basePlatform || platform === constants_1.default.GENERIC_PLATFORM /* lowest priority */) {
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
const platformPath = data[platform][0];
|
|
54
|
+
if (path_1.default.dirname(platformPath) !== basePathDir) {
|
|
55
|
+
conflictPaths.add(platformPath);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (conflictPaths.size) {
|
|
60
|
+
conflicts.push({
|
|
61
|
+
id,
|
|
62
|
+
platform: null,
|
|
63
|
+
absolutePaths: [...new Set([...conflictPaths, ...basePaths])]
|
|
64
|
+
.map((modulePath) => path_1.default.resolve(rootDir, modulePath))
|
|
65
|
+
// Sort for ease of testing
|
|
66
|
+
.sort(),
|
|
67
|
+
type: 'shadowing',
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
// Sort for ease of testing
|
|
72
|
+
conflicts.sort((0, sorting_1.chainComparators)((a, b) => (0, sorting_1.compareStrings)(a.type, b.type), (a, b) => (0, sorting_1.compareStrings)(a.id, b.id), (a, b) => (0, sorting_1.compareStrings)(a.platform, b.platform)));
|
|
73
|
+
return conflicts;
|
|
74
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
export default function getPlatformExtension(file: string, platforms: ReadonlySet<string>): string | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.default = getPlatformExtension;
|
|
10
|
+
// Extract platform extension: index.ios.js -> ios
|
|
11
|
+
function getPlatformExtension(file, platforms) {
|
|
12
|
+
const last = file.lastIndexOf('.');
|
|
13
|
+
const secondToLast = file.lastIndexOf('.', last - 1);
|
|
14
|
+
if (secondToLast === -1) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
const platform = file.substring(secondToLast + 1, last);
|
|
18
|
+
return platforms.has(platform) ? platform : null;
|
|
19
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
import type { MetadataWorker, V8Serializable, WorkerMessage } from '../../types';
|
|
8
|
+
export default class Worker implements MetadataWorker {
|
|
9
|
+
#private;
|
|
10
|
+
constructor({ hasteImplModulePath }: Readonly<{
|
|
11
|
+
hasteImplModulePath: string | null;
|
|
12
|
+
}>);
|
|
13
|
+
processFile(data: WorkerMessage, utils: {
|
|
14
|
+
readonly getContent: () => Promise<Buffer>;
|
|
15
|
+
}): Promise<V8Serializable>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const path_1 = __importDefault(require("path"));
|
|
13
|
+
const workerExclusionList_1 = __importDefault(require("../../workerExclusionList"));
|
|
14
|
+
const PACKAGE_JSON = path_1.default.sep + 'package.json';
|
|
15
|
+
class Worker {
|
|
16
|
+
#hasteImpl = null;
|
|
17
|
+
constructor({ hasteImplModulePath }) {
|
|
18
|
+
if (hasteImplModulePath != null) {
|
|
19
|
+
const mod = require(hasteImplModulePath);
|
|
20
|
+
this.#hasteImpl = mod.__esModule === true && 'default' in mod ? mod.default : mod;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
async processFile(data, utils) {
|
|
24
|
+
let hasteName = null;
|
|
25
|
+
const { filePath } = data;
|
|
26
|
+
if (filePath.endsWith(PACKAGE_JSON)) {
|
|
27
|
+
// Process a package.json that is returned as a PACKAGE type with its name.
|
|
28
|
+
try {
|
|
29
|
+
const fileData = JSON.parse((await utils.getContent()).toString());
|
|
30
|
+
if (fileData.name) {
|
|
31
|
+
hasteName = fileData.name;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
catch (err) {
|
|
35
|
+
throw new Error(`Cannot parse ${filePath} as JSON: ${err.message}`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
else if (!workerExclusionList_1.default.has(filePath.substr(filePath.lastIndexOf('.')))) {
|
|
39
|
+
if (!this.#hasteImpl) {
|
|
40
|
+
throw new Error('computeHaste is true but hasteImplModulePath not set');
|
|
41
|
+
}
|
|
42
|
+
// Process a random file that is returned as a MODULE.
|
|
43
|
+
hasteName = this.#hasteImpl.getHasteName(filePath) || null;
|
|
44
|
+
}
|
|
45
|
+
return hasteName;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.default = Worker;
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
declare const _default: (filePath: string) => string;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const path_1 = __importDefault(require("path"));
|
|
13
|
+
const MOCKS_PATTERN = path_1.default.sep + '__mocks__' + path_1.default.sep;
|
|
14
|
+
exports.default = (filePath) => {
|
|
15
|
+
const mockPath = filePath.split(MOCKS_PATTERN)[1];
|
|
16
|
+
return mockPath.substring(0, mockPath.lastIndexOf(path_1.default.extname(mockPath))).replaceAll('\\', '/');
|
|
17
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare module 'fb-watchman' {
|
|
2
|
+
/** Information about a changed file */
|
|
3
|
+
interface FileChange {
|
|
4
|
+
dev?: number;
|
|
5
|
+
cclock?: string;
|
|
6
|
+
gid?: number;
|
|
7
|
+
ino?: number;
|
|
8
|
+
mode?: number;
|
|
9
|
+
mtime?: number;
|
|
10
|
+
mtime_us?: number;
|
|
11
|
+
mtime_ns?: number;
|
|
12
|
+
mtime_f?: number;
|
|
13
|
+
new?: boolean;
|
|
14
|
+
nlink?: number;
|
|
15
|
+
uid?: number;
|
|
16
|
+
'content.sha1hex'?: string;
|
|
17
|
+
symlink_target?: string;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export {};
|