Updating NPM dependencies
This commit is contained in:
106
node_modules/jest-haste-map/build/lib/WatchmanWatcher.js
generated
vendored
106
node_modules/jest-haste-map/build/lib/WatchmanWatcher.js
generated
vendored
@@ -5,30 +5,10 @@ Object.defineProperty(exports, '__esModule', {
|
||||
});
|
||||
exports.default = WatchmanWatcher;
|
||||
|
||||
function _fs() {
|
||||
const data = _interopRequireDefault(require('fs'));
|
||||
|
||||
_fs = function _fs() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _path() {
|
||||
const data = _interopRequireDefault(require('path'));
|
||||
|
||||
_path = function _path() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _assert() {
|
||||
const data = _interopRequireDefault(require('assert'));
|
||||
|
||||
_assert = function _assert() {
|
||||
_assert = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
@@ -38,7 +18,17 @@ function _assert() {
|
||||
function _events() {
|
||||
const data = require('events');
|
||||
|
||||
_events = function _events() {
|
||||
_events = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _path() {
|
||||
const data = _interopRequireDefault(require('path'));
|
||||
|
||||
_path = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
@@ -48,7 +38,17 @@ function _events() {
|
||||
function _fbWatchman() {
|
||||
const data = _interopRequireDefault(require('fb-watchman'));
|
||||
|
||||
_fbWatchman = function _fbWatchman() {
|
||||
_fbWatchman = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function fs() {
|
||||
const data = _interopRequireWildcard(require('graceful-fs'));
|
||||
|
||||
fs = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
@@ -58,7 +58,7 @@ function _fbWatchman() {
|
||||
function _common() {
|
||||
const data = _interopRequireDefault(require('sane/src/common'));
|
||||
|
||||
_common = function _common() {
|
||||
_common = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
@@ -70,13 +70,55 @@ function _recrawlWarningDedupe() {
|
||||
require('sane/src/utils/recrawl-warning-dedupe')
|
||||
);
|
||||
|
||||
_recrawlWarningDedupe = function _recrawlWarningDedupe() {
|
||||
_recrawlWarningDedupe = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _getRequireWildcardCache() {
|
||||
if (typeof WeakMap !== 'function') return null;
|
||||
var cache = new WeakMap();
|
||||
_getRequireWildcardCache = function () {
|
||||
return cache;
|
||||
};
|
||||
return cache;
|
||||
}
|
||||
|
||||
function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
}
|
||||
if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
||||
return {default: obj};
|
||||
}
|
||||
var cache = _getRequireWildcardCache();
|
||||
if (cache && cache.has(obj)) {
|
||||
return cache.get(obj);
|
||||
}
|
||||
var newObj = {};
|
||||
var hasPropertyDescriptor =
|
||||
Object.defineProperty && Object.getOwnPropertyDescriptor;
|
||||
for (var key in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = hasPropertyDescriptor
|
||||
? Object.getOwnPropertyDescriptor(obj, key)
|
||||
: null;
|
||||
if (desc && (desc.get || desc.set)) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
newObj[key] = obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
newObj.default = obj;
|
||||
if (cache) {
|
||||
cache.set(obj, newObj);
|
||||
}
|
||||
return newObj;
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
@@ -119,13 +161,13 @@ WatchmanWatcher.prototype.__proto__ = _events().EventEmitter.prototype;
|
||||
* @private
|
||||
*/
|
||||
|
||||
WatchmanWatcher.prototype.init = function() {
|
||||
WatchmanWatcher.prototype.init = function () {
|
||||
if (this.client) {
|
||||
this.client.removeAllListeners();
|
||||
}
|
||||
|
||||
const self = this;
|
||||
this.client = new (_fbWatchman()).default.Client();
|
||||
this.client = new (_fbWatchman().default.Client)();
|
||||
this.client.on('error', error => {
|
||||
self.emit('error', error);
|
||||
});
|
||||
@@ -255,7 +297,7 @@ WatchmanWatcher.prototype.init = function() {
|
||||
* @private
|
||||
*/
|
||||
|
||||
WatchmanWatcher.prototype.handleChangeEvent = function(resp) {
|
||||
WatchmanWatcher.prototype.handleChangeEvent = function (resp) {
|
||||
_assert().default.equal(
|
||||
resp.subscription,
|
||||
SUB_NAME,
|
||||
@@ -281,7 +323,7 @@ WatchmanWatcher.prototype.handleChangeEvent = function(resp) {
|
||||
* @private
|
||||
*/
|
||||
|
||||
WatchmanWatcher.prototype.handleFileChange = function(changeDescriptor) {
|
||||
WatchmanWatcher.prototype.handleFileChange = function (changeDescriptor) {
|
||||
const self = this;
|
||||
let absPath;
|
||||
let relativePath;
|
||||
@@ -313,7 +355,7 @@ WatchmanWatcher.prototype.handleFileChange = function(changeDescriptor) {
|
||||
if (!changeDescriptor.exists) {
|
||||
self.emitEvent(DELETE_EVENT, relativePath, self.root);
|
||||
} else {
|
||||
_fs().default.lstat(absPath, (error, stat) => {
|
||||
fs().lstat(absPath, (error, stat) => {
|
||||
// Files can be deleted between the event and the lstat call
|
||||
// the most reliable thing to do here is to ignore the event.
|
||||
if (error && error.code === 'ENOENT') {
|
||||
@@ -342,7 +384,7 @@ WatchmanWatcher.prototype.handleFileChange = function(changeDescriptor) {
|
||||
* @private
|
||||
*/
|
||||
|
||||
WatchmanWatcher.prototype.emitEvent = function(
|
||||
WatchmanWatcher.prototype.emitEvent = function (
|
||||
eventType,
|
||||
filepath,
|
||||
root,
|
||||
@@ -358,7 +400,7 @@ WatchmanWatcher.prototype.emitEvent = function(
|
||||
* @private
|
||||
*/
|
||||
|
||||
WatchmanWatcher.prototype.close = function(callback) {
|
||||
WatchmanWatcher.prototype.close = function (callback) {
|
||||
this.client.removeAllListeners();
|
||||
this.client.end();
|
||||
callback && callback(null, true);
|
||||
|
||||
Reference in New Issue
Block a user