From 3ba5fcfb63a5107d72f6f5e04adffa24fc9b2164 Mon Sep 17 00:00:00 2001 From: Nana Sakisaka Date: Sat, 11 Nov 2017 03:26:51 +0900 Subject: [PATCH] Polyfill 'whatwg-url' instead of native URL class --- js/crsearch/crsearch.js | 2 ++ js/crsearch/database.js | 2 ++ package-lock.json | 35 +++++++++++++++++++++++++++++++++++ package.json | 3 ++- 4 files changed, 41 insertions(+), 1 deletion(-) diff --git a/js/crsearch/crsearch.js b/js/crsearch/crsearch.js index 9991c82..dc3f039 100644 --- a/js/crsearch/crsearch.js +++ b/js/crsearch/crsearch.js @@ -6,6 +6,8 @@ import {IndexType as IType} from './index-type' import {Database} from './database' import {Index} from './index' +import {URL} from 'whatwg-url' + class CRSearch { static APPNAME = 'crsearch' diff --git a/js/crsearch/database.js b/js/crsearch/database.js index e727c6b..54b9a05 100644 --- a/js/crsearch/database.js +++ b/js/crsearch/database.js @@ -5,6 +5,8 @@ import {Namespace} from './namespace' import {Dictionary} from './dictionary' import {Priority, SiteCategory} from './kunai-config' +import {URL} from 'whatwg-url' + import * as Query from './query' diff --git a/package-lock.json b/package-lock.json index 3170de3..48e4e03 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4782,6 +4782,11 @@ "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=", "dev": true }, + "lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=" + }, "lodash.tail": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.tail/-/lodash.tail-4.1.1.tgz", @@ -10111,6 +10116,21 @@ "punycode": "1.4.1" } }, + "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" + }, + "dependencies": { + "punycode": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", + "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=" + } + } + }, "trim-newlines": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", @@ -10362,6 +10382,11 @@ "minimalistic-assert": "1.0.0" } }, + "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": "3.8.1", "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.8.1.tgz", @@ -10685,6 +10710,16 @@ "integrity": "sha1-Dhh4HeYpoYMIzhSBZQ9n/6JpOl0=", "dev": true }, + "whatwg-url": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.3.0.tgz", + "integrity": "sha512-rM+hE5iYKGPAOu05mIdJR47pYSR2vDzfrTEFRc/S8D3L60yW8BuXmUJ7Kog7x/DrokFN7JNaHKadpzjouKRRAw==", + "requires": { + "lodash.sortby": "4.7.0", + "tr46": "1.0.1", + "webidl-conversions": "4.0.2" + } + }, "whet.extend": { "version": "0.9.9", "resolved": "https://registry.npmjs.org/whet.extend/-/whet.extend-0.9.9.tgz", diff --git a/package.json b/package.json index 8d0a2fd..b234964 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,7 @@ "font-awesome": "^4.7.0", "jquery": "^3.2.1", "marked": "^0.3.6", - "nagato": "^1.8.2" + "nagato": "^1.8.2", + "whatwg-url": "^6.3.0" } }