diff --git a/.travis.yml b/.travis.yml index 40e93d8..d8c9fb9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,10 @@ matrix: env: V_REQUEST=latest - node_js: "6" env: V_REQUEST=latest + - node_js: "8" + env: V_REQUEST=latest + - node_js: "10" + env: V_REQUEST=latest before_install: - npm install tough-cookie diff --git a/README.md b/README.md index bae72ac..63f8d7d 100644 --- a/README.md +++ b/README.md @@ -277,6 +277,7 @@ Consider Request-Promise being: - Plus some methods on a request call object: - `rp(...).then(...)` or e.g. `rp.post(...).then(...)` which turn `rp(...)` and `rp.post(...)` into promises - `rp(...).catch(...)` or e.g. `rp.del(...).catch(...)` which is the same method as provided by Bluebird promises + - Errors that the `request` library would pass to the callback are wrapped by `request-promise` and then passed to the catch handler. See [code example](https://github.com/request/request-promise#thenonfulfilled-onrejected) below. - `rp(...).finally(...)` or e.g. `rp.put(...).finally(...)` which is the same method as provided by Bluebird promises - `rp(...).cancel()` or e.g. `rp.get(...).cancel()` which cancels the request - `rp(...).promise()` or e.g. `rp.head(...).promise()` which returns the underlying promise so you can access the full [Bluebird API](https://github.com/petkaantonov/bluebird/blob/master/API.md) diff --git a/lib/rp.js b/lib/rp.js index 1398e8e..9630d01 100644 --- a/lib/rp.js +++ b/lib/rp.js @@ -18,7 +18,7 @@ try { /* istanbul ignore next */ var EOL = require('os').EOL; /* istanbul ignore next */ - console.error(EOL + '###' + EOL + '### The "request" library is not installed automatically anymore.' + EOL + '### But required by "request-promise".' + EOL + '###' + EOL + '### npm install request --save' + EOL + '###' + EOL); + console.error(EOL + '###' + EOL + '### The "request" library is not installed automatically anymore.' + EOL + '### But is a dependency of "request-promise".' + EOL + '### Please install it with:' + EOL + '### npm install request --save' + EOL + '###' + EOL); /* istanbul ignore next */ throw err; } diff --git a/package.json b/package.json index ff1f5d5..0c4e7b4 100644 --- a/package.json +++ b/package.json @@ -35,8 +35,8 @@ "dependencies": { "request-promise-core": "1.1.1", "bluebird": "^3.5.0", - "stealthy-require": "^1.1.0", - "tough-cookie": "^2.5.0" + "stealthy-require": "^1.1.1", + "tough-cookie": "~2.3.3" }, "peerDependencies": { "request": "^2.34"