Launch Week Day 3: Introducing Organization Notifications in Socket.Learn More
Socket
Book a DemoSign in
Socket

tdoc-api

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tdoc-api - npm Package Compare versions

Comparing version
0.3.3
to
0.3.4
+49
-4
#last-comit-partial.patch

@@ -1,2 +0,2 @@

Version 0.3.3.
Upgrade from bluebird 2.x to 3.x.
# Enter your commit comment above and edit your patch below.

@@ -6,4 +6,40 @@ # (Lines starting with # will be stripped and leading and trailing whitespace removed).

==END_COMMENT==
diff --git a/lib/promise.js b/lib/promise.js
index 5551569..7f3941e 100644
--- a/lib/promise.js
+++ b/lib/promise.js
@@ -1,8 +1,13 @@
/*jshint node: true, strict: true, globalstrict: true, indent: 4, immed: true, undef: true, sub: true */
'use strict';
-// local instance, as we enable long stack traces
-var Promise = require('bluebird/js/main/promise')();
+// local instance, as we enable debug features
+var Promise = require('bluebird/js/release/promise')();
Promise.prototype.fail = Promise.prototype['catch'];
-Promise.longStackTraces();
+Promise.config({
+ warnings: true,
+ longStackTraces: true,
+ cancellation: false,
+ monitoring: false,
+});
module.exports = Promise;
diff --git a/lib/restler-q.js b/lib/restler-q.js
index 76c57c2..baac0ca 100644
--- a/lib/restler-q.js
+++ b/lib/restler-q.js
@@ -15,6 +15,10 @@ function improveErr(err, status) {
err = 'HTTP ' + status;
// use a real error
err = new Error(err);
+ } else if (!(err instanceof Error)) {
+ var e = new Error(err.message || 'Unknown error');
+ e.data = err;
+ err = e;
}
err.status = status;
return err;
diff --git a/package.json b/package.json
index e1be651..9eabd42 100644
index 48d819e..ff78bb1 100644
--- a/package.json

@@ -14,6 +50,15 @@ +++ b/package.json

"name": "tdoc-api",
- "version": "0.3.2",
+ "version": "0.3.3",
- "version": "0.3.3",
+ "version": "0.3.4",
"description": "Wrapper around tDoc REST-ful APIs",
"main": "index.js",
"homepage": "https://github.com/andxor/tdoc-api",
@@ -12,7 +12,7 @@
"node": ">=0.10.x"
},
"dependencies": {
- "bluebird": "^2.9.30",
+ "bluebird": "^3.3.3",
"restler": "^3.2.2"
},
"devDependencies": {},
+2
-2

@@ -260,6 +260,6 @@ /*!

function searchOne(me, p) {
p.limit = 2;
p.limit = 2; // we need 1 but limit to 2 to know if search was not unique
return search(me, p).then(function (data) {
if (data.length != 1)
throw new Error('More than one document was found');
throw new Error('Search result was not a single document');
var p2 = { id: data[0] };

@@ -266,0 +266,0 @@ if (p.user) p2.user = p.user;

{
"name": "tdoc-api",
"version": "0.3.3",
"version": "0.3.4",
"description": "Wrapper around tDoc REST-ful APIs",

@@ -15,3 +15,3 @@ "main": "index.js",

"dependencies": {
"bluebird": "^3.3.0",
"bluebird": "^3.3.3",
"restler": "^3.2.2"

@@ -18,0 +18,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet