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

native-promise-pool

Package Overview
Dependencies
Maintainers
2
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

native-promise-pool - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0-next.1573294962.f9366d7fd5cee248bec6df38dfcefb2d3196597a

.dependabot/config.yml

4

HISTORY.md
# History
## v1.1.0 2019 November 9
- Updated [base files](https://github.com/bevry/base) and [editions](https://editions.bevry.me) using [boundation](https://github.com/bevry/boundation)
## v1.0.0 2018 November 14
- Initial stable release

2

LICENSE.md

@@ -18,3 +18,3 @@ <!-- LICENSEFILE/ -->

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.

@@ -21,0 +21,0 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

{
"name": "native-promise-pool",
"version": "1.0.0",
"version": "1.1.0-next.1573294962.f9366d7fd5cee248bec6df38dfcefb2d3196597a",
"description": "Create a pool of a specified concurrency that accepts functions that return promises",

@@ -27,4 +27,2 @@ "homepage": "https://github.com/bevry/native-promise-pool",

"liberapay",
"thanksapp",
"boostlab",
"buymeacoffee",

@@ -44,5 +42,10 @@ "opencollective",

"paypalURL": "https://bevry.me/paypal",
"wishlistURL": "https://bevry.me/wishlist"
"wishlistURL": "https://bevry.me/wishlist",
"travisTLD": "com"
}
},
"funding": {
"type": "cooperative",
"url": "https://bevry.me/fund"
},
"author": "2018+ Benjamin Lupton <b@lupton.cc>",

@@ -70,6 +73,2 @@ "maintainers": [

"entry": "index.js",
"engines": {
"node": "6 || 8 || 10 || 11",
"browsers": false
},
"tags": [

@@ -79,3 +78,7 @@ "javascript",

"require"
]
],
"engines": {
"node": "6 || 8 || 10 || 12 || 13",
"browsers": false
}
},

@@ -86,10 +89,10 @@ {

"entry": "index.js",
"tags": [
"javascript",
"require"
],
"engines": {
"node": false,
"browsers": "defaults"
},
"tags": [
"javascript",
"require"
]
}
}

@@ -99,23 +102,25 @@ ],

"browser": "edition-browsers/index.js",
"dependencies": {},
"devDependencies": {
"@babel/cli": "^7.1.5",
"@babel/core": "^7.1.6",
"@babel/preset-env": "^7.1.6",
"assert-helpers": "^4.5.1",
"bluebird": "^3.5.3",
"chalk": "^2.4.1",
"eslint": "^5.9.0",
"joe": "^2.0.2",
"joe-reporter-console": "^2.0.2",
"jsdoc": "^3.5.5",
"logger-clearable": "^1.0.0",
"@babel/cli": "^7.7.0",
"@babel/core": "^7.7.2",
"@babel/plugin-proposal-object-rest-spread": "^7.6.2",
"@babel/preset-env": "^7.7.1",
"assert-helpers": "^4.9.7",
"bluebird": "^3.7.1",
"chalk": "^3.0.0",
"eslint": "^6.6.0",
"eslint-config-bevry": "^1.2.1",
"eslint-config-prettier": "^6.5.0",
"eslint-plugin-prettier": "^3.1.1",
"jsdoc": "^3.6.3",
"kava": "^3.1.0",
"logger-clearable": "^1.0.1",
"minami": "^1.2.3",
"projectz": "^1.5.3",
"surge": "^0.20.1",
"prettier": "^1.19.0",
"projectz": "^1.7.5",
"surge": "^0.21.3",
"valid-directory": "^1.0.0"
},
"optionalDependencies": {},
"scripts": {
"our:clean": "rm -Rf ./docs ./edition* ./es2015 ./es5 ./out",
"our:clean": "rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next",
"our:compile": "npm run our:compile:edition-browsers",

@@ -125,3 +130,4 @@ "our:compile:edition-browsers": "env BABEL_ENV=edition-browsers babel --out-dir ./edition-browsers ./source",

"our:meta": "npm run our:meta:docs && npm run our:meta:projectz",
"our:meta:docs": "rm -Rf ./docs && jsdoc --recurse --pedantic --access all --destination ./docs --package ./package.json --readme ./README.md --template ./node_modules/minami ./source && mv ./docs/$npm_package_name/$npm_package_version/* ./docs/ && rm -Rf ./docs/$npm_package_name/$npm_package_version",
"our:meta:docs": "npm run our:meta:docs:jsdoc",
"our:meta:docs:jsdoc": "rm -Rf ./docs && jsdoc --recurse --pedantic --access all --destination ./docs --package ./package.json --readme ./README.md --template ./node_modules/minami ./source && mv ./docs/$npm_package_name/$npm_package_version/* ./docs/ && rm -Rf ./docs/$npm_package_name/$npm_package_version",
"our:meta:projectz": "projectz compile",

@@ -134,13 +140,24 @@ "our:release": "npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push",

"our:release:tag": "export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"",
"our:setup": "npm run our:setup:npm",
"our:setup:npm": "npm install",
"our:setup": "npm run our:setup:install",
"our:setup:install": "npm install",
"our:test": "npm run our:verify && npm test",
"our:verify": "npm run our:verify:directory && npm run our:verify:eslint",
"our:verify": "npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier",
"our:verify:directory": "npx valid-directory",
"our:verify:eslint": "eslint --fix ./source/**",
"test": "node --harmony ./source/test.js --joe-reporter=console"
"our:verify:eslint": "eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source",
"our:verify:prettier": "prettier --write ./source/**",
"test": "node ./source/test.js"
},
"eslintConfig": {
"extends": [
"bevry"
]
},
"prettier": {
"semi": false,
"singleQuote": true
},
"babel": {
"env": {
"edition-browsers": {
"sourceType": "script",
"presets": [

@@ -150,7 +167,9 @@ [

{
"targets": {
"browsers": "defaults"
}
"targets": "defaults",
"modules": "commonjs"
}
]
],
"plugins": [
"@babel/proposal-object-rest-spread"
]

@@ -157,0 +176,0 @@ }

@@ -10,3 +10,3 @@ <!-- TITLE/ -->

<span class="badge-travisci"><a href="http://travis-ci.org/bevry/native-promise-pool" title="Check this project's build status on TravisCI"><img src="https://img.shields.io/travis/bevry/native-promise-pool/master.svg" alt="Travis CI Build Status" /></a></span>
<span class="badge-travisci"><a href="http://travis-ci.com/bevry/native-promise-pool" title="Check this project's build status on TravisCI"><img src="https://img.shields.io/travis/com/bevry/native-promise-pool/master.svg" alt="Travis CI Build Status" /></a></span>
<span class="badge-npmversion"><a href="https://npmjs.org/package/native-promise-pool" title="View this project on NPM"><img src="https://img.shields.io/npm/v/native-promise-pool.svg" alt="NPM version" /></a></span>

@@ -20,4 +20,2 @@ <span class="badge-npmdownloads"><a href="https://npmjs.org/package/native-promise-pool" title="View this project on NPM"><img src="https://img.shields.io/npm/dm/native-promise-pool.svg" alt="NPM downloads" /></a></span>

<span class="badge-liberapay"><a href="https://liberapay.com/bevry" title="Donate to this project using Liberapay"><img src="https://img.shields.io/badge/liberapay-donate-yellow.svg" alt="Liberapay donate button" /></a></span>
<span class="badge-thanksapp"><a href="https://givethanks.app/donate/npm/native-promise-pool" title="Donate to this project using Thanks App"><img src="https://img.shields.io/badge/thanksapp-donate-yellow.svg" alt="Thanks App donate button" /></a></span>
<span class="badge-boostlab"><a href="https://boost-lab.app/bevry/native-promise-pool" title="Donate to this project using Boost Lab"><img src="https://img.shields.io/badge/boostlab-donate-yellow.svg" alt="Boost Lab donate button" /></a></span>
<span class="badge-buymeacoffee"><a href="https://buymeacoffee.com/balupton" title="Donate to this project using Buy Me A Coffee"><img src="https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg" alt="Buy Me A Coffee donate button" /></a></span>

@@ -43,16 +41,17 @@ <span class="badge-opencollective"><a href="https://opencollective.com/bevry" title="Donate to this project using Open Collective"><img src="https://img.shields.io/badge/open%20collective-donate-yellow.svg" alt="Open Collective donate button" /></a></span>

<a href="https://npmjs.com" title="npm is a package manager for javascript"><h3>NPM</h3></a><ul>
<a href="https://npmjs.com" title="npm is a package manager for javascript"><h3>npm</h3></a>
<ul>
<li>Install: <code>npm install --save native-promise-pool</code></li>
<li>Module: <code>require('native-promise-pool')</code></li></ul>
<li>Require: <code>require('native-promise-pool')</code></li>
</ul>
<a href="http://browserify.org" title="Browserify lets you require('modules') in the browser by bundling up all of your dependencies"><h3>Browserify</h3></a><ul>
<li>Install: <code>npm install --save native-promise-pool</code></li>
<li>Module: <code>require('native-promise-pool')</code></li>
<li>CDN URL: <code>//wzrd.in/bundle/native-promise-pool@1.0.0</code></li></ul>
<a href="https://jspm.io" title="Native ES Modules CDN"><h3>jspm</h3></a>
<a href="http://enderjs.com" title="Ender is a full featured package manager for your browser"><h3>Ender</h3></a><ul>
<li>Install: <code>ender add native-promise-pool</code></li>
<li>Module: <code>require('native-promise-pool')</code></li></ul>
``` html
<script type="module">
import * as pkg from '//dev.jspm.io/native-promise-pool'
</script>
```
<h3><a href="https://github.com/bevry/editions" title="Editions are the best way to produce and consume packages you care about.">Editions</a></h3>
<h3><a href="https://editions.bevry.me" title="Editions are the best way to produce and consume packages you care about.">Editions</a></h3>

@@ -65,2 +64,14 @@ <p>This package is published with the following editions:</p>

<h3><a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a></h3>
This project provides its type information via inline <a href="http://usejsdoc.org" title="JSDoc is an API documentation generator for JavaScript, similar to Javadoc or phpDocumentor">JSDoc Comments</a>. To make use of this in <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a>, set your <code>maxNodeModuleJsDepth</code> compiler option to `5` or thereabouts. You can accomlish this via your `tsconfig.json` file like so:
``` json
{
"compilerOptions": {
"maxNodeModuleJsDepth": 5
}
}
```
<!-- /INSTALL -->

@@ -149,4 +160,2 @@

<span class="badge-liberapay"><a href="https://liberapay.com/bevry" title="Donate to this project using Liberapay"><img src="https://img.shields.io/badge/liberapay-donate-yellow.svg" alt="Liberapay donate button" /></a></span>
<span class="badge-thanksapp"><a href="https://givethanks.app/donate/npm/native-promise-pool" title="Donate to this project using Thanks App"><img src="https://img.shields.io/badge/thanksapp-donate-yellow.svg" alt="Thanks App donate button" /></a></span>
<span class="badge-boostlab"><a href="https://boost-lab.app/bevry/native-promise-pool" title="Donate to this project using Boost Lab"><img src="https://img.shields.io/badge/boostlab-donate-yellow.svg" alt="Boost Lab donate button" /></a></span>
<span class="badge-buymeacoffee"><a href="https://buymeacoffee.com/balupton" title="Donate to this project using Buy Me A Coffee"><img src="https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg" alt="Buy Me A Coffee donate button" /></a></span>

@@ -153,0 +162,0 @@ <span class="badge-opencollective"><a href="https://opencollective.com/bevry" title="Donate to this project using Open Collective"><img src="https://img.shields.io/badge/open%20collective-donate-yellow.svg" alt="Open Collective donate button" /></a></span>

@@ -19,3 +19,3 @@ 'use strict'

*/
static create (...args) {
static create(...args) {
return new this(...args)

@@ -30,3 +30,3 @@ }

*/
constructor ({ concurrency, PromiseClass = Promise }) {
constructor({ concurrency, PromiseClass = Promise }) {
/**

@@ -74,3 +74,3 @@ * How many tasks to run at once.

*/
open (task) {
open(task) {
// Grab the class to use to create our promise,

@@ -82,3 +82,3 @@ // so that the consumer can ensure `.finally` exists.

// This has the effect that we can queue its execution for later, instead of right now.
const p = new Promise((resolve) => this.queue.push(resolve))
const p = new Promise(resolve => this.queue.push(resolve))
// Once the resolver has fired, update the counts accordingly.

@@ -101,3 +101,3 @@ .finally(() => {

// If our pool is under capacity, then start the first item in the queue.
if ((this.running + this.started) < this.concurrency && this.queue.length) {
if (this.running + this.started < this.concurrency && this.queue.length) {
this.started++

@@ -104,0 +104,0 @@ this.queue.shift()()

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