Socket
Socket
Sign inDemoInstall

slonik

Package Overview
Dependencies
12
Maintainers
1
Versions
392
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 41.0.0 to 41.0.1

3

dist/factories/createDriverFactory.js

@@ -84,2 +84,5 @@ "use strict";

}
if (releasePromise) {
await releasePromise;
}
isDestroyed = true;

@@ -86,0 +89,0 @@ clientEventEmitter.emit('destroy');

@@ -227,2 +227,16 @@ "use strict";

});
test('simultaneous releasing and destroying waits for release promise to resolve before proceeding to terminate the backend', async (t) => {
await t.notThrowsAsync(async () => {
let repeat = 10;
while (repeat--) {
const pool = await (0, __1.createPool)(t.context.dsn, {
driverFactory,
});
void t.notThrowsAsync(pool.connect((connection) => {
return connection.query(__1.sql.unsafe `SELECT 1`);
}));
await pool.end();
}
});
});
test('does not allow to reuse released connection', async (t) => {

@@ -229,0 +243,0 @@ const pool = await (0, __1.createPool)(t.context.dsn, {

2

package.json

@@ -95,3 +95,3 @@ {

"types": "./dist/index.d.ts",
"version": "41.0.0"
"version": "41.0.1"
}

@@ -225,2 +225,6 @@ import { Logger } from '../Logger';

if (releasePromise) {
await releasePromise;
}
isDestroyed = true;

@@ -227,0 +231,0 @@

@@ -289,2 +289,22 @@ /* eslint-disable id-length */

test('simultaneous releasing and destroying waits for release promise to resolve before proceeding to terminate the backend', async (t) => {
await t.notThrowsAsync(async () => {
let repeat = 10;
while (repeat--) {
const pool = await createPool(t.context.dsn, {
driverFactory,
});
void t.notThrowsAsync(
pool.connect((connection) => {
return connection.query(sql.unsafe`SELECT 1`);
}),
);
await pool.end();
}
});
});
test('does not allow to reuse released connection', async (t) => {

@@ -291,0 +311,0 @@ const pool = await createPool(t.context.dsn, {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc