cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject cordova-app-harness git commit: Make harnessclient compatible with node 0.12 as well as 0.10
Date Wed, 13 May 2015 01:58:13 GMT
Repository: cordova-app-harness
Updated Branches:
  refs/heads/master 6fb0c3a1f -> 101b9ffdf


Make harnessclient compatible with node 0.12 as well as 0.10


Project: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/commit/101b9ffd
Tree: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/tree/101b9ffd
Diff: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/diff/101b9ffd

Branch: refs/heads/master
Commit: 101b9ffdf3122a703077225f9cf288397a7d43fa
Parents: 6fb0c3a
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Thu Mar 5 15:17:54 2015 -0500
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Tue May 12 21:58:01 2015 -0400

----------------------------------------------------------------------
 .../node_modules/cordova-harness-client/harnessclient.js        | 5 ++++-
 harness-push/node_modules/cordova-harness-client/package.json   | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/101b9ffd/harness-push/node_modules/cordova-harness-client/harnessclient.js
----------------------------------------------------------------------
diff --git a/harness-push/node_modules/cordova-harness-client/harnessclient.js b/harness-push/node_modules/cordova-harness-client/harnessclient.js
index ab76548..2cd34b4 100644
--- a/harness-push/node_modules/cordova-harness-client/harnessclient.js
+++ b/harness-push/node_modules/cordova-harness-client/harnessclient.js
@@ -17,12 +17,15 @@
   under the License.
  */
 
+var nodeVersion = process.version.replace(/^v|-.*$/g, '').split('.').map(Number);
+var useOldKeepAlive = nodeVersion[0] < 1 && nodeVersion[1] <= 10;
+
 var http = require('http');
 var url = require('url');
 var fs = require('fs');
 var adbkit = require('adbkit');
 var Q = require('q');
-var AgentKeepAlive = require('agentkeepalive');
+var AgentKeepAlive = useOldKeepAlive ? require('old-agentkeepalive') : require('agentkeepalive');
 var PushSession = require('./pushsession');
 
 var httpAgent = new AgentKeepAlive({

http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/101b9ffd/harness-push/node_modules/cordova-harness-client/package.json
----------------------------------------------------------------------
diff --git a/harness-push/node_modules/cordova-harness-client/package.json b/harness-push/node_modules/cordova-harness-client/package.json
index 50e921f..9538900 100644
--- a/harness-push/node_modules/cordova-harness-client/package.json
+++ b/harness-push/node_modules/cordova-harness-client/package.json
@@ -19,8 +19,9 @@
   ],
   "dependencies": {
     "adbkit": "^2.1.2",
-    "agentkeepalive": "~0.2",
+    "agentkeepalive": "^1.2.0",
     "jszip": "~2.1",
+    "old-agentkeepalive": "^0.2.2",
     "q": "~0.9",
     "shelljs": "0.1.x"
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message