diff --git a/declarations.d.ts b/declarations.d.ts index 6a62225c9..9a3715663 100644 --- a/declarations.d.ts +++ b/declarations.d.ts @@ -77,6 +77,13 @@ declare module "neo-async" { callback?: ErrorCallback ): void; + export function eachLimit( + arr: IterableCollection, + limit: number, + iterator: AsyncIterator, + callback?: ErrorCallback + ): void; + export function map( arr: T[] | IterableIterator, iterator: AsyncResultIterator, @@ -98,6 +105,7 @@ declare module "neo-async" { ): void; export const forEach: typeof each; + export const forEachLimit: typeof eachLimit; } // There are no typings for @webassemblyjs/ast diff --git a/lib/Compiler.js b/lib/Compiler.js index 8ad6e7352..11f960f76 100644 --- a/lib/Compiler.js +++ b/lib/Compiler.js @@ -319,8 +319,9 @@ class Compiler { const emitFiles = err => { if (err) return callback(err); - asyncLib.forEach( + asyncLib.forEachLimit( compilation.assets, + 15, (source, file, callback) => { let targetFile = file; const queryStringIdx = targetFile.indexOf("?"); diff --git a/package.json b/package.json index 7c21e0098..73b69d351 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "@webassemblyjs/helper-module-context": "1.7.11", "@webassemblyjs/wasm-edit": "1.7.11", "@webassemblyjs/wasm-parser": "1.7.11", - "acorn": "^6.0.0", + "acorn": "^6.0.5", "acorn-dynamic-import": "^4.0.0", "ajv": "^6.1.0", "ajv-keywords": "^3.1.0", diff --git a/yarn.lock b/yarn.lock index 062e0aaad..d4d805049 100644 --- a/yarn.lock +++ b/yarn.lock @@ -303,10 +303,10 @@ acorn@^5.0.3, acorn@^5.6.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.2.tgz#91fa871883485d06708800318404e72bfb26dcc5" integrity sha512-cJrKCNcr2kv8dlDnbw+JPUGjHZzo4myaxOLmpOX8a+rgX94YeTcTMv/LFJUSByRpc+i4GgVnnhLxvMu/2Y+rqw== -acorn@^6.0.0: - version "6.0.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.0.2.tgz#6a459041c320ab17592c6317abbfdf4bbaa98ca4" - integrity sha512-GXmKIvbrN3TV7aVqAzVFaMW8F8wzVX7voEBRO3bDA64+EX37YSayggRJP5Xig6HYHBkWKpFg9W5gg6orklubhg== +acorn@^6.0.5: + version "6.0.5" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.0.5.tgz#81730c0815f3f3b34d8efa95cb7430965f4d887a" + integrity sha512-i33Zgp3XWtmZBMNvCr4azvOFeWVw1Rk6p3hfi3LUDvIFraOMywb1kAtrbi+med14m4Xfpqm3zRZMT+c0FNE7kg== ajv-errors@^1.0.0: version "1.0.1"