Closes #238 Updated async library in order to use lib in —use-strict mode

cdb
Dmitry M. Lazutkin 10 years ago
parent fb072dd70d
commit 7558a3c367

@ -56,7 +56,7 @@ function configure(config, options) {
} }
function shutdown(cb) { function shutdown(cb) {
async.forEach(openFiles, function(file, done) { async.each(openFiles, function(file, done) {
if (!file.write(eol, "utf-8")) { if (!file.write(eol, "utf-8")) {
file.once('drain', function() { file.once('drain', function() {
file.end(done); file.end(done);

@ -80,7 +80,7 @@ function configure(config, options) {
} }
function shutdown(cb) { function shutdown(cb) {
async.forEach(openFiles, function(file, done) { async.each(openFiles, function(file, done) {
if (!file.write(eol, "utf-8")) { if (!file.write(eol, "utf-8")) {
file.once('drain', function() { file.once('drain', function() {
file.end(done); file.end(done);

@ -388,7 +388,7 @@ function shutdown(cb) {
}, []); }, []);
// Call each of the shutdown functions. // Call each of the shutdown functions.
async.forEach( async.each(
shutdownFunctions, shutdownFunctions,
function(shutdownFn, done) { function(shutdownFn, done) {
shutdownFn(done); shutdownFn(done);

@ -71,7 +71,7 @@ RollingFileStream.prototype.roll = function(filename, callback) {
//roll the backups (rename file.n to file.n+1, where n <= numBackups) //roll the backups (rename file.n to file.n+1, where n <= numBackups)
debug("Renaming the old files"); debug("Renaming the old files");
fs.readdir(path.dirname(filename), function (err, files) { fs.readdir(path.dirname(filename), function (err, files) {
async.forEachSeries( async.eachSeries(
files.filter(justTheseFiles).sort(byIndex).reverse(), files.filter(justTheseFiles).sort(byIndex).reverse(),
increaseFileIndex, increaseFileIndex,
cb cb

@ -28,9 +28,9 @@
"lib": "lib" "lib": "lib"
}, },
"dependencies": { "dependencies": {
"async": "0.1.15", "async": "~0.2.0",
"semver": "~1.1.4", "readable-stream": "~1.0.2",
"readable-stream": "~1.0.2" "semver": "~1.1.4"
}, },
"devDependencies": { "devDependencies": {
"vows": "0.7.0", "vows": "0.7.0",

@ -122,7 +122,7 @@ vows.describe('RollingFileStream').addBatch({
__dirname + "/test-rolling-file-stream-write-more", __dirname + "/test-rolling-file-stream-write-more",
45 45
); );
async.forEach( async.each(
[0, 1, 2, 3, 4, 5, 6], [0, 1, 2, 3, 4, 5, 6],
function(i, cb) { function(i, cb) {
stream.write(i +".cheese\n", "utf8", cb); stream.write(i +".cheese\n", "utf8", cb);
@ -183,7 +183,7 @@ vows.describe('RollingFileStream').addBatch({
45, 45,
5 5
); );
async.forEach( async.each(
[0, 1, 2, 3, 4, 5, 6], [0, 1, 2, 3, 4, 5, 6],
function(i, cb) { function(i, cb) {
stream.write(i +".cheese\n", "utf8", cb); stream.write(i +".cheese\n", "utf8", cb);

Loading…
Cancel
Save