Socket
Socket
Sign inDemoInstall

tarn

Package Overview
Dependencies
Maintainers
4
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tarn - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

18

dist/Pool.js

@@ -186,4 +186,9 @@ "use strict";

.then(() => {
// poll every 100ms and wait that all validations are ready
// eslint-disable-next-line
return new Promise((resolve, reject) => {
// poll every 100ms and wait that all validations are ready
if (this.numPendingValidations() === 0) {
resolve();
return;
}
const interval = setInterval(() => {

@@ -280,2 +285,3 @@ if (this.numPendingValidations() === 0) {

const abortAbleValidation = new PendingOperation_1.PendingOperation(this.acquireTimeoutMillis);
// eslint-disable-next-line
pendingAcquire.promise.catch(err => {

@@ -379,3 +385,6 @@ abortAbleValidation.abort();

pendingCreate.promise = pendingCreate.promise.catch(err => {
remove(this.pendingCreates, pendingCreate);
if (remove(this.pendingCreates, pendingCreate)) {
// TODO: figure out more consistent way for different error handlers in next rewrite
this._executeEventHandlers('createFail', eventId, err);
}
throw err;

@@ -401,6 +410,7 @@ });

}
remove(this.pendingCreates, pendingCreate);
if (remove(this.pendingCreates, pendingCreate)) {
this._executeEventHandlers('createFail', eventId, err);
}
// Not returned on purpose.
pendingCreate.reject(err);
this._executeEventHandlers('createFail', eventId, err);
return null;

@@ -407,0 +417,0 @@ });

{
"name": "tarn",
"version": "3.0.0",
"version": "3.0.1",
"description": "Simple and robust resource pool for node.js",

@@ -5,0 +5,0 @@ "main": "dist/tarn.js",

@@ -162,2 +162,6 @@ [![Build Status](https://travis-ci.org/Vincit/tarn.js.svg?branch=master)](https://travis-ci.org/Vincit/tarn.js)

### 3.0.1 2020-10-25
- Added triggering missing createFail event on timeout error - fixes #57
### 3.0.0 2020-04-18

@@ -164,0 +168,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