From 45fb69e5f41ace6962e9d25cf415a1e1d435c4e5 Mon Sep 17 00:00:00 2001 From: Sebastian Gerske Date: Wed, 7 Nov 2018 09:53:43 +0100 Subject: [PATCH] switch to url polyfill --- package-lock.json | 28 ++++++++++++++++++++++++++++ package.json | 3 ++- src/aquarius/Aquarius.ts | 2 +- 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8d168a1..2c9317c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3767,6 +3767,11 @@ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" }, + "lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=" + }, "lowercase-keys": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", @@ -6816,6 +6821,14 @@ } } }, + "tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", + "requires": { + "punycode": "^2.1.0" + } + }, "trim": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", @@ -7669,6 +7682,11 @@ } } }, + "webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==" + }, "webpack": { "version": "4.23.1", "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.23.1.tgz", @@ -7759,6 +7777,16 @@ } } }, + "whatwg-url": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.0.0.tgz", + "integrity": "sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ==", + "requires": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", diff --git a/package.json b/package.json index b960eb7..690216b 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,8 @@ "node-fetch": "^2.2.1", "uuid": "^3.3.2", "web3": "1.0.0-beta.36", - "web3-utils": "1.0.0-beta.36" + "web3-utils": "1.0.0-beta.36", + "whatwg-url": "^7.0.0" }, "devDependencies": { "@types/chai": "^4.1.7", diff --git a/src/aquarius/Aquarius.ts b/src/aquarius/Aquarius.ts index 0f1d3ad..49f05ca 100644 --- a/src/aquarius/Aquarius.ts +++ b/src/aquarius/Aquarius.ts @@ -1,4 +1,4 @@ -import {URL} from "url" +import {URL} from "whatwg-url" import DDO from "../ddo/DDO" import Config from "../models/Config" import Logger from "../utils/Logger"