@@ -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; |
+2
-2
| { | ||
| "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
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
26851
14.3%Updated