Changeset 79a0317 for imaps-frontend/node_modules/chokidar/index.js
- Timestamp:
- 01/21/25 03:08:24 (3 days ago)
- Branches:
- main
- Parents:
- 0c6b92a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/chokidar/index.js
r0c6b92a r79a0317 3 3 exports.FSWatcher = exports.WatchHelper = void 0; 4 4 exports.watch = watch; 5 /*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */ 5 6 const fs_1 = require("fs"); 6 7 const promises_1 = require("fs/promises"); … … 433 434 } 434 435 emitWithAll(event, args) { 435 this.emit( ...args);436 this.emit(event, ...args); 436 437 if (event !== handler_js_1.EVENTS.ERROR) 437 this.emit(handler_js_1.EVENTS.ALL, ...args);438 this.emit(handler_js_1.EVENTS.ALL, event, ...args); 438 439 } 439 440 // Common helpers … … 455 456 if (opts.cwd) 456 457 path = sysPath.relative(opts.cwd, path); 457 const args = [ event,path];458 const args = [path]; 458 459 if (stats != null) 459 460 args.push(stats); … … 466 467 if (opts.atomic) { 467 468 if (event === handler_js_1.EVENTS.UNLINK) { 468 this._pendingUnlinks.set(path, args);469 this._pendingUnlinks.set(path, [event, ...args]); 469 470 setTimeout(() => { 470 471 this._pendingUnlinks.forEach((entry, path) => { … … 477 478 } 478 479 if (event === handler_js_1.EVENTS.ADD && this._pendingUnlinks.has(path)) { 479 event = args[0] =handler_js_1.EVENTS.CHANGE;480 event = handler_js_1.EVENTS.CHANGE; 480 481 this._pendingUnlinks.delete(path); 481 482 } … … 484 485 const awfEmit = (err, stats) => { 485 486 if (err) { 486 event = args[0] =handler_js_1.EVENTS.ERROR;487 args[ 1] = err;487 event = handler_js_1.EVENTS.ERROR; 488 args[0] = err; 488 489 this.emitWithAll(event, args); 489 490 } 490 491 else if (stats) { 491 492 // if stats doesn't exist the file must have been deleted 492 if (args.length > 2) {493 args[ 2] = stats;493 if (args.length > 1) { 494 args[1] = stats; 494 495 } 495 496 else { … … 802 803 } 803 804 exports.default = { watch, FSWatcher }; 804 //# sourceMappingURL=index.js.map
Note:
See TracChangeset
for help on using the changeset viewer.