metro-file-map 0.73.6 → 0.73.7
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
CHANGED
package/src/crawlers/node.js
CHANGED
|
@@ -4,6 +4,7 @@ var _constants = _interopRequireDefault(require("../constants"));
|
|
|
4
4
|
var fastPath = _interopRequireWildcard(require("../lib/fast_path"));
|
|
5
5
|
var _child_process = require("child_process");
|
|
6
6
|
var fs = _interopRequireWildcard(require("graceful-fs"));
|
|
7
|
+
var _os = require("os");
|
|
7
8
|
var path = _interopRequireWildcard(require("path"));
|
|
8
9
|
function _getRequireWildcardCache(nodeInterop) {
|
|
9
10
|
if (typeof WeakMap !== "function") return null;
|
|
@@ -60,7 +61,7 @@ function _interopRequireDefault(obj) {
|
|
|
60
61
|
*/
|
|
61
62
|
|
|
62
63
|
async function hasNativeFindSupport(forceNodeFilesystemAPI) {
|
|
63
|
-
if (forceNodeFilesystemAPI) {
|
|
64
|
+
if (forceNodeFilesystemAPI || (0, _os.platform)() === "win32") {
|
|
64
65
|
return false;
|
|
65
66
|
}
|
|
66
67
|
try {
|
|
@@ -16,6 +16,7 @@ import H from '../constants';
|
|
|
16
16
|
import * as fastPath from '../lib/fast_path';
|
|
17
17
|
import {spawn} from 'child_process';
|
|
18
18
|
import * as fs from 'graceful-fs';
|
|
19
|
+
import {platform} from 'os';
|
|
19
20
|
import * as path from 'path';
|
|
20
21
|
|
|
21
22
|
type Result = Array<[/* id */ string, /* mtime */ number, /* size */ number]>;
|
|
@@ -25,7 +26,7 @@ type Callback = (result: Result) => void;
|
|
|
25
26
|
async function hasNativeFindSupport(
|
|
26
27
|
forceNodeFilesystemAPI: boolean,
|
|
27
28
|
): Promise<boolean> {
|
|
28
|
-
if (forceNodeFilesystemAPI) {
|
|
29
|
+
if (forceNodeFilesystemAPI || platform() === 'win32') {
|
|
29
30
|
return false;
|
|
30
31
|
}
|
|
31
32
|
|