From 93ca0b34fa9eb93ac423248283bb15b5223d32de Mon Sep 17 00:00:00 2001 From: peter-murray Date: Thu, 17 Sep 2015 21:20:17 +0100 Subject: [PATCH] Remove dependency on parseUri library Resolves issues around there being two parseUri and parseuri npm modules in the registry. Newer versions of npm do not like this and there will be more issues from this in the future once npm v3 is released, so the dependency was removed. --- hue-api/bridge-discovery.js | 8 ++++---- package.json | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/hue-api/bridge-discovery.js b/hue-api/bridge-discovery.js index 98c1a5d..65bd8ac 100644 --- a/hue-api/bridge-discovery.js +++ b/hue-api/bridge-discovery.js @@ -1,7 +1,7 @@ "use strict"; -var Q = require("q") - , parseUri = require("parseUri") +var url = require("url") + , Q = require("q") , search = require("./search") , http = require("./httpPromise") , utils = require("./utils") @@ -157,10 +157,10 @@ function _getHueBridgeHost(description) { var uri; if (_isHueBridge(description)) { - uri = parseUri(description.url); + uri = url.parse(description.url); return { "id": description.model.serial, - "ipaddress": uri.host + "ipaddress": uri.hostname }; } return null; diff --git a/package.json b/package.json index 5269479..98d8a89 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ ], "main": "index.js", "scripts": { - "test": "make test" + "test": "mocha test" }, "repository": { "type": "git", @@ -40,7 +40,6 @@ "xml2js": "~0.2.2", "q": "~1.0.0", "request-util": "~0.1.0", - "parseUri": "~1.2.3-2", "traits": "~0.4.0" }, "devDependencies": {