File tree Expand file tree Collapse file tree 7 files changed +1033
-17
lines changed Expand file tree Collapse file tree 7 files changed +1033
-17
lines changed Original file line number Diff line number Diff line change 1+ module . exports = require ( "chokidar" ) ;
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " chokidar2" ,
3+ "version" : " 2.0.0" ,
4+ "private" : true ,
5+ "engines" : {
6+ "node" : " <8.10.0"
7+ },
8+ "dependencies" : {
9+ "chokidar" : " ^2.1.8"
10+ }
11+ }
Original file line number Diff line number Diff line change 66
77var EventEmitter = require ( "events" ) . EventEmitter ;
88var async = require ( "neo-async" ) ;
9- var chokidar = require ( "chokidar" ) ;
9+ var chokidar = require ( "./ chokidar" ) ;
1010var fs = require ( "graceful-fs" ) ;
1111var path = require ( "path" ) ;
1212
@@ -357,7 +357,8 @@ DirectoryWatcher.prototype.getTimes = function() {
357357
358358DirectoryWatcher . prototype . close = function ( ) {
359359 this . initialScan = false ;
360- this . watcher . close ( ) . catch ( this . onWatcherError . bind ( this ) ) ;
360+ var p = this . watcher . close ( ) ;
361+ if ( p && p . catch ) p . catch ( this . onWatcherError . bind ( this ) ) ;
361362 if ( this . nestedWatching ) {
362363 Object . keys ( this . directories ) . forEach ( function ( dir ) {
363364 this . directories [ dir ] . close ( ) ;
Original file line number Diff line number Diff line change 1+ var v3Err ;
2+ try {
3+ module . exports = require ( "chokidar" ) ;
4+ return ;
5+ } catch ( e ) {
6+ v3Err = e ;
7+ }
8+
9+ var v2Err ;
10+ try {
11+ module . exports = require ( "chokidar2" ) ;
12+ return ;
13+ } catch ( e ) {
14+ v2Err = e ;
15+ }
16+
17+ throw new Error (
18+ "No version of chokidar is available. Tried chokidar@2 and chokidar@3.\n" +
19+ "You could try to manually install any chokidar version.\n" +
20+ "chokidar@3: " + v3Err + "\n" +
21+ "chokidar@2: " + v2Err + "\n"
22+ )
Original file line number Diff line number Diff line change 3636 "rimraf" : " ^2.6.2" ,
3737 "should" : " ^8.3.1"
3838 },
39- "dependencies " : {
39+ "optionalDependencies " : {
4040 "chokidar" : " ^3.3.0" ,
41+ "chokidar2" : " file:./chokidar2"
42+ },
43+ "dependencies" : {
4144 "graceful-fs" : " ^4.1.2" ,
4245 "neo-async" : " ^2.5.0"
4346 },
Original file line number Diff line number Diff line change 44require ( "should" ) ;
55var path = require ( "path" ) ;
66var fs = require ( "fs" ) ;
7- var chokidar = require ( "chokidar" ) ;
7+ var chokidar = require ( "../lib/ chokidar" ) ;
88var TestHelper = require ( "./helpers/TestHelper" ) ;
99var Watchpack = require ( "../lib/watchpack" ) ;
1010
You can’t perform that action at this time.
0 commit comments