Changeset 79a0317 for imaps-frontend/node_modules/chokidar/esm/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/esm/index.js
r0c6b92a r79a0317 1 /*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */ 1 2 import { stat as statcb } from 'fs'; 2 3 import { stat, readdir } from 'fs/promises'; … … 428 429 } 429 430 emitWithAll(event, args) { 430 this.emit( ...args);431 this.emit(event, ...args); 431 432 if (event !== EV.ERROR) 432 this.emit(EV.ALL, ...args);433 this.emit(EV.ALL, event, ...args); 433 434 } 434 435 // Common helpers … … 450 451 if (opts.cwd) 451 452 path = sysPath.relative(opts.cwd, path); 452 const args = [ event,path];453 const args = [path]; 453 454 if (stats != null) 454 455 args.push(stats); … … 461 462 if (opts.atomic) { 462 463 if (event === EV.UNLINK) { 463 this._pendingUnlinks.set(path, args);464 this._pendingUnlinks.set(path, [event, ...args]); 464 465 setTimeout(() => { 465 466 this._pendingUnlinks.forEach((entry, path) => { … … 472 473 } 473 474 if (event === EV.ADD && this._pendingUnlinks.has(path)) { 474 event = args[0] =EV.CHANGE;475 event = EV.CHANGE; 475 476 this._pendingUnlinks.delete(path); 476 477 } … … 479 480 const awfEmit = (err, stats) => { 480 481 if (err) { 481 event = args[0] =EV.ERROR;482 args[ 1] = err;482 event = EV.ERROR; 483 args[0] = err; 483 484 this.emitWithAll(event, args); 484 485 } 485 486 else if (stats) { 486 487 // if stats doesn't exist the file must have been deleted 487 if (args.length > 2) {488 args[ 2] = stats;488 if (args.length > 1) { 489 args[1] = stats; 489 490 } 490 491 else { … … 796 797 } 797 798 export default { watch, FSWatcher }; 798 //# sourceMappingURL=index.js.map
Note:
See TracChangeset
for help on using the changeset viewer.