From bd7f2b6db1daf61b144a97e534bbdfcc5b0ee075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Tue, 3 May 2016 15:55:37 +0200 Subject: [PATCH 1/3] travis: drop node@5, add node@6 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e918e73f..d431fa42 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,5 +4,5 @@ node_js: - "0.10" - "0.12" - "4" - - "5" + - "6" From da2fb0ae15c2b436a26467cde94173f2339eb439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Tue, 3 May 2016 16:03:48 +0200 Subject: [PATCH 2/3] app: send port:0 instead of port:undefined Node v6 no longer supports port:undefined, this commit is fixing app.listen() to correctly send port:0 when no port is specified. --- lib/application.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/application.js b/lib/application.js index c5485fdb..dad8f24f 100644 --- a/lib/application.js +++ b/lib/application.js @@ -566,7 +566,11 @@ app.listen = function(cb) { (arguments.length == 1 && typeof arguments[0] == 'function'); if (useAppConfig) { - server.listen(this.get('port'), this.get('host'), cb); + var port = this.get('port'); + // NOTE(bajtos) port:undefined no longer works on node@6, + // we must pass port:0 explicitly + if (port === undefined) port = 0; + server.listen(port, this.get('host'), cb); } else { server.listen.apply(server, arguments); } From e2b1f78f1e801ac8f5dc7ed0a8bb594f39979207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Tue, 3 May 2016 16:43:45 +0200 Subject: [PATCH 3/3] Upgrade phantomjs to 2.x --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 148d8007..2eb05c8b 100644 --- a/package.json +++ b/package.json @@ -78,12 +78,13 @@ "karma-html2js-preprocessor": "^0.1.0", "karma-junit-reporter": "^0.2.2", "karma-mocha": "^0.1.10", - "karma-phantomjs-launcher": "^0.1.4", + "karma-phantomjs-launcher": "^1.0.0", "karma-script-launcher": "^0.1.0", "loopback-boot": "^2.7.0", "loopback-datasource-juggler": "^2.19.1", "loopback-testing": "~1.1.0", "mocha": "^2.1.0", + "phantomjs-prebuilt": "^2.1.7", "sinon": "^1.13.0", "sinon-chai": "^2.8.0", "strong-task-emitter": "^0.0.6",