metro-file-map
Advanced tools
Comparing version 0.71.2 to 0.71.3
{ | ||
"name": "metro-file-map", | ||
"version": "0.71.2", | ||
"version": "0.71.3", | ||
"description": "[Experimental] - 🚇 File crawling, watching and mapping for Metro", | ||
@@ -16,2 +16,3 @@ "main": "src/index.js", | ||
"dependencies": { | ||
"abort-controller": "^3.0.0", | ||
"anymatch": "^3.0.3", | ||
@@ -18,0 +19,0 @@ "debug": "^2.2.0", |
@@ -105,2 +105,4 @@ "use strict"; | ||
module.exports = async function watchmanCrawl(options) { | ||
var _options$abortSignal; | ||
const fields = ["name", "exists", "mtime_ms", "size"]; | ||
@@ -113,2 +115,6 @@ const { data, extensions, ignore, rootDir, roots, perfLogger } = options; | ||
const client = new watchman.Client(); | ||
(_options$abortSignal = options.abortSignal) === null || | ||
_options$abortSignal === void 0 | ||
? void 0 | ||
: _options$abortSignal.addEventListener("abort", () => client.end()); | ||
perfLogger === null || perfLogger === void 0 | ||
@@ -115,0 +121,0 @@ ? void 0 |
@@ -75,2 +75,4 @@ "use strict"; | ||
var _abortController = _interopRequireDefault(require("abort-controller")); | ||
function _getRequireWildcardCache(nodeInterop) { | ||
@@ -135,2 +137,3 @@ if (typeof WeakMap !== "function") return null; | ||
// $FlowFixMe[untyped-import] - jest-worker | ||
// $FlowFixMe[untyped-import] - this is a polyfill | ||
const nodeCrawl = require("./crawlers/node"); | ||
@@ -346,2 +349,3 @@ | ||
: _this$_options$perfLo.point("constructor_end"); | ||
this._crawlerAbortController = new _abortController.default(); | ||
} | ||
@@ -895,2 +899,3 @@ | ||
const crawlerOptions = { | ||
abortSignal: this._crawlerAbortController.signal, | ||
computeSha1: options.computeSha1, | ||
@@ -1262,2 +1267,4 @@ data: hasteMap, | ||
this._watchers = []; | ||
this._crawlerAbortController.abort(); | ||
} | ||
@@ -1264,0 +1271,0 @@ /** |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
222538
4021
13
+ Addedabort-controller@^3.0.0
+ Addedabort-controller@3.0.0(transitive)
+ Addedevent-target-shim@5.0.1(transitive)