diff --git a/lib/appenders/dateFile.js b/lib/appenders/dateFile.js index e1c5cea..8b6d594 100644 --- a/lib/appenders/dateFile.js +++ b/lib/appenders/dateFile.js @@ -56,7 +56,7 @@ function configure(config, options) { } function shutdown(cb) { - async.forEach(openFiles, function(file, done) { + async.each(openFiles, function(file, done) { if (!file.write(eol, "utf-8")) { file.once('drain', function() { file.end(done); diff --git a/lib/appenders/file.js b/lib/appenders/file.js index 8a7d113..6788d30 100644 --- a/lib/appenders/file.js +++ b/lib/appenders/file.js @@ -80,7 +80,7 @@ function configure(config, options) { } function shutdown(cb) { - async.forEach(openFiles, function(file, done) { + async.each(openFiles, function(file, done) { if (!file.write(eol, "utf-8")) { file.once('drain', function() { file.end(done); diff --git a/lib/log4js.js b/lib/log4js.js index 2e1f25c..de4f974 100644 --- a/lib/log4js.js +++ b/lib/log4js.js @@ -388,7 +388,7 @@ function shutdown(cb) { }, []); // Call each of the shutdown functions. - async.forEach( + async.each( shutdownFunctions, function(shutdownFn, done) { shutdownFn(done); diff --git a/lib/streams/RollingFileStream.js b/lib/streams/RollingFileStream.js index 64a0725..c9d35dd 100644 --- a/lib/streams/RollingFileStream.js +++ b/lib/streams/RollingFileStream.js @@ -71,7 +71,7 @@ RollingFileStream.prototype.roll = function(filename, callback) { //roll the backups (rename file.n to file.n+1, where n <= numBackups) debug("Renaming the old files"); fs.readdir(path.dirname(filename), function (err, files) { - async.forEachSeries( + async.eachSeries( files.filter(justTheseFiles).sort(byIndex).reverse(), increaseFileIndex, cb diff --git a/package.json b/package.json index 40b5e86..83809d7 100644 --- a/package.json +++ b/package.json @@ -28,9 +28,9 @@ "lib": "lib" }, "dependencies": { - "async": "0.1.15", - "semver": "~1.1.4", - "readable-stream": "~1.0.2" + "async": "~0.2.0", + "readable-stream": "~1.0.2", + "semver": "~1.1.4" }, "devDependencies": { "vows": "0.7.0", diff --git a/test/streams/rollingFileStream-test.js b/test/streams/rollingFileStream-test.js index f39c2dc..fa97c67 100644 --- a/test/streams/rollingFileStream-test.js +++ b/test/streams/rollingFileStream-test.js @@ -122,7 +122,7 @@ vows.describe('RollingFileStream').addBatch({ __dirname + "/test-rolling-file-stream-write-more", 45 ); - async.forEach( + async.each( [0, 1, 2, 3, 4, 5, 6], function(i, cb) { stream.write(i +".cheese\n", "utf8", cb); @@ -183,7 +183,7 @@ vows.describe('RollingFileStream').addBatch({ 45, 5 ); - async.forEach( + async.each( [0, 1, 2, 3, 4, 5, 6], function(i, cb) { stream.write(i +".cheese\n", "utf8", cb);