Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

promise-pool-ext

Package Overview
Dependencies
Maintainers
0
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

promise-pool-ext - npm Package Compare versions

Comparing version 3.2.0 to 3.3.0

17

lib/modules/pool-manager.js

@@ -6,7 +6,10 @@ import assert from 'assert';

export default (logic, opts) => {
Joi.assert(logic, Joi.object().min(1).pattern(
export default (logic_, opts) => {
Joi.assert(logic_, Joi.object().min(1).pattern(
Joi.string(),
Joi.object().keys({
requires: Joi.array().items(Joi.string().valid(...Object.keys(logic))).optional(),
requires: Joi.alternatives(
Joi.array().items(Joi.string().valid(...Object.keys(logic_))),
Joi.string().valid('*')
).optional(),
if: Joi.function().optional(),

@@ -16,2 +19,10 @@ fn: Joi.function()

));
const logic = Object.fromEntries(
Object
.entries(logic_)
.map(([k, v], idx, arr) => [k, v.requires === '*' ? {
...v,
requires: arr.slice(0, idx).map((e) => e[0])
} : v])
);
checkCyclic(Object.entries(logic)

@@ -18,0 +29,0 @@ .reduce((p, [k, v]) => Object.assign(p, { [k]: v.requires || [] }), {}));

2

package.json
{
"name": "promise-pool-ext",
"type": "module",
"version": "3.2.0",
"version": "3.3.0",
"main": "lib/index.js",

@@ -6,0 +6,0 @@ "repository": {

@@ -71,2 +71,4 @@ # promise-pool-ext

The `requires` option can be set to `"*"` to make all previous tasks required.
See tests for more examples

@@ -73,0 +75,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc