diff --git a/dist/index.js b/dist/index.js index 34a7828..b81842a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -87,7 +87,7 @@ exports.default = function (_ref) { onBoundary: onBoundary }; - _async2.default.forEach(options.objects, _async2.default.ensureAsync(processObject.bind(null, context)), onFinish); + _async2.default.forEachSeries(options.objects, _async2.default.ensureAsync(processObject.bind(null, context)), onFinish); }); }; @@ -96,7 +96,7 @@ function processObject(context, object, cb) { fetchObjectFiles(context, object, function (err, filePaths) { if (err) return cb(err); debug(_chalk2.default.bold('Processing ' + filePaths.length + ' boundary ' + (0, _plural2.default)('file', filePaths.length) + ' for ' + object)); - _async2.default.forEach(filePaths, _async2.default.ensureAsync(processFilePath.bind(null, context)), cb); + _async2.default.forEachSeries(filePaths, _async2.default.ensureAsync(processFilePath.bind(null, context)), cb); }); } diff --git a/package.json b/package.json index 7bc5180..f7c0c23 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "census-boundaries", - "version": "2.0.3", + "version": "2.0.4", "description": "Downloads and converts US Census TIGER data representing all boundaries in the United States", "main": "dist/index.js", "keywords": [ diff --git a/src/index.js b/src/index.js index 8450a75..c35c52a 100644 --- a/src/index.js +++ b/src/index.js @@ -33,7 +33,7 @@ export default ({ objects, onBoundary, onFinish }) => { onBoundary } - async.forEach(options.objects, async.ensureAsync(processObject.bind(null, context)), onFinish) + async.forEachSeries(options.objects, async.ensureAsync(processObject.bind(null, context)), onFinish) }) } @@ -42,7 +42,7 @@ function processObject(context, object, cb) { fetchObjectFiles(context, object, (err, filePaths) => { if (err) return cb(err) debug(chalk.bold(`Processing ${filePaths.length} boundary ${plural('file', filePaths.length)} for ${object}`)) - async.forEach(filePaths, async.ensureAsync(processFilePath.bind(null, context)), cb) + async.forEachSeries(filePaths, async.ensureAsync(processFilePath.bind(null, context)), cb) }) }