You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ra...@apache.org on 2018/09/30 00:30:12 UTC
[cordova-fetch] branch master updated: Drop Q,
use native promises :tada: (#49)
This is an automated email from the ASF dual-hosted git repository.
raphinesse pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-fetch.git
The following commit(s) were added to refs/heads/master by this push:
new b3ebb55 Drop Q, use native promises :tada: (#49)
b3ebb55 is described below
commit b3ebb55ebb7b9ec996dd27ba0cec2a30d1c22fdd
Author: Raphael von der GrĂ¼n <ra...@gmail.com>
AuthorDate: Sun Sep 30 02:30:08 2018 +0200
Drop Q, use native promises :tada: (#49)
---
index.js | 8 ++++----
package.json | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/index.js b/index.js
index 6899a7e..4853e2a 100644
--- a/index.js
+++ b/index.js
@@ -15,14 +15,14 @@
under the License.
*/
-var Q = require('q');
-var which = Q.denodeify(require('which'));
+const pify = require('pify');
+const which = pify(require('which'));
var superspawn = require('cordova-common').superspawn;
var events = require('cordova-common').events;
var path = require('path');
var fs = require('fs-extra');
var CordovaError = require('cordova-common').CordovaError;
-const resolve = Q.denodeify(require('resolve'));
+const resolve = pify(require('resolve'), { multiArgs: true });
const npa = require('npm-package-arg');
const semver = require('semver');
@@ -37,7 +37,7 @@ const semver = require('semver');
* @return {Promise<string>} Absolute path to the installed package
*/
module.exports = function (target, dest, opts = {}) {
- return Q()
+ return Promise.resolve()
.then(function () {
if (!dest || !target) {
throw new CordovaError('Need to supply a target and destination');
diff --git a/package.json b/package.json
index ba465e1..02955b3 100644
--- a/package.json
+++ b/package.json
@@ -24,7 +24,7 @@
"cordova-common": "^2.2.0",
"fs-extra": "^6.0.1",
"npm-package-arg": "^6.1.0",
- "q": "^1.4.1",
+ "pify": "^4.0.0",
"resolve": "^1.8.1",
"semver": "^5.5.0",
"which": "^1.3.1"
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org