New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

loopback-connector

Package Overview
Dependencies
Maintainers
7
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loopback-connector - npm Package Compare versions

Comparing version 4.7.0 to 4.8.0

6

CHANGES.md

@@ -0,1 +1,7 @@

2019-06-28, Version 4.8.0
=========================
* chore: add promise support (Biniam Admikew)
2019-05-03, Version 4.7.0

@@ -2,0 +8,0 @@ =========================

19

lib/transaction.js

@@ -12,2 +12,3 @@ // Copyright IBM Corp. 2015,2019. All Rights Reserved.

var uuid = require('uuid');
const {createPromiseCallback} = require('./utils');

@@ -50,3 +51,9 @@ module.exports = Transaction;

Transaction.prototype.commit = function(cb) {
return this.connector.commit(this.connection, cb);
cb = cb || createPromiseCallback();
if (cb.promise) {
this.connector.commit(this.connection, cb);
return cb.promise;
} else {
return this.connector.commit(this.connection, cb);
}
};

@@ -60,3 +67,9 @@

Transaction.prototype.rollback = function(cb) {
return this.connector.rollback(this.connection, cb);
cb = cb || createPromiseCallback();
if (cb.promise) {
this.connector.rollback(this.connection, cb);
return cb.promise;
} else {
return this.connector.rollback(this.connection, cb);
}
};

@@ -75,2 +88,3 @@

}
cb = cb || createPromiseCallback();
if (typeof options === 'string') {

@@ -125,2 +139,3 @@ options = {isolationLevel: options};

});
if (cb.promise) return cb.promise;
};

5

package.json
{
"name": "loopback-connector",
"version": "4.7.0",
"version": "4.8.0",
"description": "Building blocks for LoopBack connectors",

@@ -34,3 +34,4 @@ "engines": {

"devDependencies": {
"chai": "^4.1.2",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"eslint": "^4.19.1",

@@ -37,0 +38,0 @@ "eslint-config-loopback": "^10.0.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