Update dependency async to v3 [SECURITY]#10
Open
renovate[bot] wants to merge 1 commit intomasterfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^1.5.0→^3.0.0^0.9.0→^3.0.0^1.5.2→^3.0.0Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Prototype Pollution in async
CVE-2021-43138 / GHSA-fwr7-v2mv-hh25
More information
Details
A vulnerability exists in Async through 3.2.1 for 3.x and through 2.6.3 for 2.x (fixed in 3.2.2 and 2.6.4), which could let a malicious user obtain privileges via the
mapValues()method.Severity
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
caolan/async (async)
v3.2.6Compare Source
v3.2.5Compare Source
Errorobjects such asAggregateErrorare propagated without modification (#1920)v3.2.4Compare Source
priorityQueuewhere it didn't wait for the result. (#1725)unshiftAsyncwas included inpriorityQueue. (#1790)v3.2.3Compare Source
autoInject. (#1767, #1780)v3.2.2Compare Source
v3.2.1Compare Source
queueMicrotaskif available to the environment (#1761)priorityQueue(#1727)v3.2.0Compare Source
func.namev3.1.1Compare Source
nameproperty on wrapped functions.v3.1.0Compare Source
q.pushAsyncandq.unshiftAsync, analagous toq.pushandq.unshift, except they always do not accept a callback, and reject if processing the task errors. (#1659)q.pushandq.unshiftwhen a callback is not passed now resolve even if an error ocurred. (#1659)autoInjectwith complicated function bodies (#1663)v3.0.1Compare Source
Bug fixes
queueandcargowould be completely flattened. (#1645)v3.0.0Compare Source
The
async/awaitrelease!There are a lot of new features and subtle breaking changes in this major version, but the biggest feature is that most Async methods return a Promise if you omit the callback, meaning you can
awaitthem from within anasyncfunction.Breaking Changes
await-able! (#1572)queue,priorityQueue,cargoandcargoQueue, the "event"-style methods, likeq.drainandq.saturatedare now methods that register a callback, rather than properties you assign a callback to. They are now of the formq.drain(callback). If you do not pass a callback a Promise will be returned for the next occurrence of the event, making themawait-able, e.g.await q.drain(). (#1586, #1641)callback(false)will cancel an async method, preventing further iteration and callback calls. This is useful for preventing memory leaks when you break out of an async flow by calling an outer callback. (#1064, #1542)duringanddoDuringhave been removed, and insteadwhilst,doWhilst,untilanddoUntilnow have asynchronoustestfunctions. (#850, #1557)limitsof less than 1 now cause an error to be thrown in queues and collection methods. (#1249, #1552)memoizeno longer memoizes errors (#1465, #1466)applyEach/applyEachSerieshave a simpler interface, to make them more easily type-able. It always returns a function that takes in a single callback argument. If that callback is omitted, a promise is returned, making it awaitable. (#1228, #1640)New Features
cargoQueue, a queue with bothconcurrencyandpayloadsize parameters. (#1567)queuenow have aSymbol.iteratormethod, meaning they can be iterated over to inspect the current list of items in the queue. (#1459, #1556)async.mjsis included in theasyncpackage. This is described in thepackage.json"module"field, meaning it should be automatically used by Webpack and other compatible bundlers.Bug fixes
asyncify(#1568, #1569)Other
v2.6.4Compare Source
v2.6.3Compare Source
v2.6.2Compare Source
v2.6.1Compare Source
npm auditwarnings. (#1532, #1533)async-esmore optimized for webpack users (#1517)v2.6.0Compare Source
require('async/find')or useasync.anyLimit. (#1483)queueperformance. (#1448, #1454)v2.5.0Compare Source
concatLimit, theLimitequivalent ofconcat(#1426, #1430)concatimprovements: it now preserves order, handles falsy values and theiterateecallback takes a variable number of arguments (#1437, #1436)queuewhere there was a size discrepancy betweenworkersList().lengthandrunning()(#1428, #1429)v2.4.1Compare Source
timeout()from being re-used. (#1418, #1419)v2.4.0Compare Source
tryEach, for running async functions in parallel, where you only expect one to succeed. (#1365, #687)parallelandwaterfall(#1395)queue.remove(), for removing items in aqueue(#1397, #1391)eval, preventing Async from running in pages with Content Security Policy (#1404, #1403)asyncifyed function's callback being caught by the underlying Promise (#1408)queue.empty()(#1367)v2.3.0Compare Source
asyncfunctions. Wherever you can pass a Node-style/CPS function that uses a callback, you can also pass anasyncfunction. Previously, you had to wrapasyncfunctions withasyncify. The caveat is that it will only work ifasyncfunctions are supported natively in your environment, transpiled implementations can't be detected. (#1386, #1390)v2.2.0Compare Source
groupBy, and theSeries/Limitequivalents, analogous to_.groupBy(#1364)transformbug whencallbackwas not passed (#1381)reflecttoparalleldocs (#1385)v2.1.5Compare Source
autobug when function names collided with Array.prototype (#1358)some,everyandfindwhere processing would continue after the result was determined.some,everyandfindv2.1.4Compare Source
v2.1.2Compare Source
detect,some,everyon large inputs (#1293).v2.1.1Compare Source
v2.1.0Compare Source
retryandretryablenow support an optionalerrorFilterfunction that determines if thetaskshould retry on the error (#1256, #1261)race,cargo,queue, andpriorityQueue(#1253)v2.0.1Compare Source
each,map,filter, etc (#1245, #1246, #1247).v2.0.0Compare Source
Lots of changes here!
First and foremost, we have a slick new site for docs. Special thanks to @hargasinski for his work converting our old docs to
jsdocformat and implementing the new website. Also huge ups to @ivanseidel for designing our new logo. It was a long process for both of these tasks, but I think these changes turned out extraordinary well.The biggest feature is modularization. You can now
require("async/series")to only require theseriesfunction. Every Async library function is available this way. You still canrequire("async")to require the entire library, like you could do before.We also provide Async as a collection of ES2015 modules. You can now
import {each} from 'async-es'orimport waterfall from 'async-es/waterfall'. If you are using only a few Async functions, and are using a ES bundler such as Rollup, this can significantly lower your build size.Major thanks to @Kikobeats, @aearly and @megawac for doing the majority of the modularization work, as well as @jdalton and @Rich-Harris for advisory work on the general modularization strategy.
Another one of the general themes of the 2.0 release is standardization of what an "async" function is. We are now more strictly following the node-style continuation passing style. That is, an async function is a function that:
There were several cases where Async accepted some functions that did not strictly have these properties, most notably
auto,every,some,filter,rejectanddetect.Another theme is performance. We have eliminated internal deferrals in all cases where they make sense. For example, in
waterfallandauto, there was asetImmediatebetween each task -- these deferrals have been removed. AsetImmediatecall can add up to 1ms of delay. This might not seem like a lot, but it can add up if you are using many Async functions in the course of processing a HTTP request, for example. Nearly all asynchronous functions that do I/O already have some sort of deferral built in, so the extra deferral is unnecessary. The trade-off of this change is removing our built-in stack-overflow defense. Many synchronous callback calls in series can quickly overflow the JS call stack. If you do have a function that is sometimes synchronous (calling its callback on the same tick), and are running into stack overflows, wrap it withasync.ensureAsync().Another big performance win has been re-implementing
queue,cargo, andpriorityQueuewith doubly linked lists instead of arrays. This has lead to queues being an order of magnitude faster on large sets of tasks.New Features
require()d from the main package. (require('async/auto')) (#984, #996)async-espackage. (import {forEachSeries} from 'async-es') (#984, #996)race, analogous toPromise.race(). It will run an array of async tasks in parallel and will call its callback with the result of the first task to respond. (#568, #1038)each,map,parallel, etc.. (#579, #839, #1074)mapValues, for mapping over the properties of an object and returning an object with the same keys. (#1157, #1177)timeout, a wrapper for an async function that will make the task time-out after the specified time. (#1007, #1027)reflectandreflectAll, analagous toPromise.reflect(), a wrapper for async tasks that always succeeds, by gathering results and errors into an object. (#942, #1012, #1095)constantsupports dynamic arguments -- it will now always use its last argument as the callback. (#1016, #1052)setImmediateandnextTicknow support arguments to partially apply to the deferred function, like the node-native versions do. (#940, #1053)autonow supports resolving cyclic dependencies using Kahn's algorithm (#1140).autoInject, a relative ofautothat automatically spreads a task's dependencies as arguments to the task function. (#608, #1055, #1099, #1100)autotasks. (#635, #637)retryable, a relative ofretrythat wraps an async function, making it retry when called. (#1058)retrynow supports specifying a function that determines the next time interval, useful for exponential backoff, logging and other retry strategies. (#1161)retrywill now pass all of the arguments the task function was resolved with to the callback (#1231).q.unsaturated-- callback called when aqueue's number of running workers falls below a threshold. (#868, #1030, #1033, #1034)q.error-- a callback called whenever aqueuetask calls its callback with an error. (#1170)applyEachandapplyEachSeriesnow pass results to the final callback. (#1088)Breaking changes
waterfall. If you were relying on this behavior, you should more accurately represent your control flow as an event emitter or stream. (#814, #815, #1048, #1050)autotask functions now always take the callback as the last argument. If a task has dependencies, theresultsobject will be passed as the first argument. To migrate old task functions, wrap them with_.flip(#1036, #1042)setImmediatecalls have been refactored away. This may make existing flows vulnerable to stack overflows if you use many synchronous functions in series. UseensureAsyncto work around this. (#696, #704, #1049, #1050)mapused to return an object when iterating over an object.mapnow always returns an array, like in other libraries. The previous object behavior has been split out intomapValues. (#1157, #1177)filter,reject,some,every,detectand their families like{METHOD}Seriesand{METHOD}Limitnow expect an error as the first callback argument, rather than just a simple boolean. Passnullas the first argument, or usefs.accessinstead offs.exists. (#118, #774, #1028, #1041){METHOD}and{METHOD}Seriesare now implemented in terms of{METHOD}Limit. This is a major internal simplification, and is not expected to cause many problems, but it does subtly affect how functions execute internally. (#778, #847)retry's callback is now optional. Previously, omitting the callback would partially apply the function, meaning it could be passed directly as a task toseriesorauto. The partially applied "control-flow" behavior has been separated out intoretryable. (#1054, #1058)whilst,until, andduringused to be passed non-error args from the iteratee function's callback, but this led to weirdness where the first call of the test function would be passed no args. We have made it so the test function is never passed extra arguments, and only thedoWhilst,doUntil, anddoDuringfunctions pass iteratee callback arguments to the test function (#1217, #1224)q.tasksarray has been renamedq._tasksand is now implemented as a doubly linked list (DLL). Any code that used to interact with this array will need to be updated to either use the provided helpers or support DLLs (#1205).q.saturated()callback in aqueuehas been modified to better reflect when tasks pushed to the queue will start queueing. (#724, #1078)iteratormethod in favour of ES2015 iterator protocol which natively supports arrays (#1237)Bug Fixes
auto&autoInject(#1147).asyncifywithPromisescould resolve twice (#1197).Other
someSeriesandeverySeriesfor symmetry, as well as a complete set ofany/anyLimit/anySeriesandall//allLmit/allSeriesaliases.findas an alias fordetect. (as well asfindLimitandfindSeries`).Thank you @aearly and @megawac for taking the lead on version 2 of async.
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.