diff --git a/package-lock.json b/package-lock.json index 9dd95f30..f3dd4125 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2667,9 +2667,9 @@ } }, "clean-css": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.9.tgz", - "integrity": "sha1-Nc7ornaHpJuYA09w3gDE7dOCYwE=", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.11.tgz", + "integrity": "sha1-Ls3xRaujj1R0DybO/Q/z4D4SXWo=", "dev": true, "requires": { "source-map": "0.5.7" @@ -3624,18 +3624,6 @@ "css-what": "2.1.0", "domutils": "1.5.1", "nth-check": "1.0.1" - }, - "dependencies": { - "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "dev": true, - "requires": { - "dom-serializer": "0.1.0", - "domelementtype": "1.3.0" - } - } } }, "css-selector-tokenizer": { @@ -4393,6 +4381,25 @@ "webidl-conversions": "4.0.2" } }, + "domhandler": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.1.0.tgz", + "integrity": "sha1-0mRvXlf2w7qxHPbLBdPArPdBJZQ=", + "dev": true, + "requires": { + "domelementtype": "1.3.0" + } + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dev": true, + "requires": { + "dom-serializer": "0.1.0", + "domelementtype": "1.3.0" + } + }, "dot-prop": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", @@ -7421,25 +7428,24 @@ "dev": true }, "html-minifier": { - "version": "3.5.8", - "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.8.tgz", - "integrity": "sha512-WX7D6PB9PFq05fZ1/CyxPUuyqXed6vh2fGOM80+zJT5wAO93D/cUjLs0CcbBFjQmlwmCgRvl97RurtArIpOnkw==", + "version": "3.5.14", + "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.14.tgz", + "integrity": "sha512-sZjw6zhQgyUnIlIPU+W80XpRjWjdxHtNcxjfyOskOsCTDKytcfLY04wsQY/83Yqb4ndoiD2FtauiL7Yg6uUQFQ==", "dev": true, "requires": { "camel-case": "3.0.0", - "clean-css": "4.1.9", - "commander": "2.12.2", + "clean-css": "4.1.11", + "commander": "2.15.1", "he": "1.1.1", - "ncname": "1.0.0", "param-case": "2.1.1", "relateurl": "0.2.7", - "uglify-js": "3.3.8" + "uglify-js": "3.3.21" }, "dependencies": { "commander": { - "version": "2.12.2", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.12.2.tgz", - "integrity": "sha512-BFnaq5ZOGcDN7FlrtBT4xxkgIToalIIxwjxLWVJ8bGTpe1LroqMiqQXdA7ygc7CRvaYS+9zfPGFnJqFSayx+AA==", + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, "source-map": { @@ -7449,37 +7455,30 @@ "dev": true }, "uglify-js": { - "version": "3.3.8", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.8.tgz", - "integrity": "sha512-X0jAGtpSZRtd4RhbVNuGHyjZNa/h2MrVkKrR3Ew5iL2MJw6d7FmBke+fhVCALWySv1ygHnjjROG1KI1FAPvddw==", + "version": "3.3.21", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.21.tgz", + "integrity": "sha512-uy82472lH8tshK3jS3c5IFb5MmNKd/5qyBd0ih8sM42L3jWvxnE339U9gZU1zufnLVs98Stib9twq8dLm2XYCA==", "dev": true, "requires": { - "commander": "2.13.0", + "commander": "2.15.1", "source-map": "0.6.1" - }, - "dependencies": { - "commander": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", - "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", - "dev": true - } } } } }, "html-webpack-plugin": { - "version": "2.30.1", - "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-2.30.1.tgz", - "integrity": "sha1-f5xCG36pHsRg9WUn1430hO51N9U=", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz", + "integrity": "sha1-sBq71yOsqqeze2r0SS69oD2d03s=", "dev": true, "requires": { - "bluebird": "3.5.1", - "html-minifier": "3.5.8", + "html-minifier": "3.5.14", "loader-utils": "0.2.17", "lodash": "4.17.4", "pretty-error": "2.1.1", - "toposort": "1.0.6" + "tapable": "1.0.0", + "toposort": "1.0.6", + "util.promisify": "1.0.0" }, "dependencies": { "loader-utils": { @@ -7496,6 +7495,53 @@ } } }, + "htmlparser2": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz", + "integrity": "sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=", + "dev": true, + "requires": { + "domelementtype": "1.3.0", + "domhandler": "2.1.0", + "domutils": "1.1.6", + "readable-stream": "1.0.34" + }, + "dependencies": { + "domutils": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.1.6.tgz", + "integrity": "sha1-vdw94Jm5ou+sxRxiPyj0FuzFdIU=", + "dev": true, + "requires": { + "domelementtype": "1.3.0" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, "http-cache-semantics": { "version": "3.8.1", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", @@ -10786,15 +10832,6 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "ncname": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/ncname/-/ncname-1.0.0.tgz", - "integrity": "sha1-W1etGLHKCShk72Kwse2BlPODtxw=", - "dev": true, - "requires": { - "xml-char-classes": "1.0.0" - } - }, "negotiator": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", @@ -14151,6 +14188,16 @@ } } }, + "object.getownpropertydescriptors": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", + "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "dev": true, + "requires": { + "define-properties": "1.1.2", + "es-abstract": "1.11.0" + } + }, "object.omit": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", @@ -16187,60 +16234,6 @@ "utila": "0.3.3" }, "dependencies": { - "domhandler": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.1.0.tgz", - "integrity": "sha1-0mRvXlf2w7qxHPbLBdPArPdBJZQ=", - "dev": true, - "requires": { - "domelementtype": "1.3.0" - } - }, - "domutils": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.1.6.tgz", - "integrity": "sha1-vdw94Jm5ou+sxRxiPyj0FuzFdIU=", - "dev": true, - "requires": { - "domelementtype": "1.3.0" - } - }, - "htmlparser2": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz", - "integrity": "sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=", - "dev": true, - "requires": { - "domelementtype": "1.3.0", - "domhandler": "2.1.0", - "domutils": "1.1.6", - "readable-stream": "1.0.34" - } - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, "utila": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz", @@ -19222,6 +19215,16 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, + "util.promisify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", + "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "dev": true, + "requires": { + "define-properties": "1.1.2", + "object.getownpropertydescriptors": "2.0.3" + } + }, "utila": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", @@ -21079,12 +21082,6 @@ "safe-buffer": "5.1.1" } }, - "xml-char-classes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/xml-char-classes/-/xml-char-classes-1.0.0.tgz", - "integrity": "sha1-ZGV4SKIP/F31g6Qq2KJ3tFErvE0=", - "dev": true - }, "xml-name-validator": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", diff --git a/package.json b/package.json index 748d611c..da4ac50b 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "lint:fix": "eslint src --fix", "coverage": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text npm run test", "analyze": "webpack --profile --json > stats.json", - "manual-test": "webpack-dev-server './src/manual_test.js' --hot --inline --output-filename 'test.js'", + "manual-test": "webpack-dev-server --webpack-config webpack.test.config.js './src/manual_test.js' --hot --inline --output-filename 'test.js'", "semantic-release": "semantic-release", "test:e2e": "webpack src/manual_test.js --output-filename test.js --config webpack.config.js && mocha-webpack \"src/e2e-test.js\" --timeout 80000 --webpack-config webpack.test.config.js --require babel-polyfill" }, @@ -51,7 +51,7 @@ "fake-style-loader": "^1.0.1", "file-loader": "^1.1.8", "hard-source-webpack-plugin": "^0.6.0", - "html-webpack-plugin": "^2.30.1", + "html-webpack-plugin": "^3.2.0", "inject-loader": "^4.0.1", "js-yaml": "^3.10.0", "jsdoc": "^3.5.5", diff --git a/src/jq-web.js b/src/jq-web.js index 5e438016..1d3c243f 100644 --- a/src/jq-web.js +++ b/src/jq-web.js @@ -1,7 +1,8 @@ const jq = async (...args) => { - const jq_ = await import(/* webpackChunkName: "jq" */ 'jq-web') - return jq_(...args) + const jq_ = await import(/* webpackChunkName: "jq-web" */ 'jq-web') +console.log(jq_) // eslint-disable-line + return jq_.default(...args) } export default jq diff --git a/webpack.config.js b/webpack.config.js index d4b1443b..3bfff38a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -9,9 +9,9 @@ module.exports = { compress: true, port: 9000 }, - entry: './src/index.js', + entry: ["babel-polyfill", './src/index.js'], target: 'web', - mode: 'production', + mode: 'development', node: { fs: 'empty' }, diff --git a/webpack.screenshot.config.js b/webpack.screenshot.config.js index a9d3b896..8ab054c8 100644 --- a/webpack.screenshot.config.js +++ b/webpack.screenshot.config.js @@ -2,7 +2,7 @@ const path = require('path'); const nodeExternals = require('webpack-node-externals'); module.exports = { - entry: './src/index.js', + entry: ["babel-polyfill", './src/index.js'], target: 'web', devtool: 'source-map', mode: 'development', diff --git a/webpack.test.config.js b/webpack.test.config.js index ac9b0750..42c0442b 100644 --- a/webpack.test.config.js +++ b/webpack.test.config.js @@ -2,7 +2,7 @@ const path = require('path'); const nodeExternals = require('webpack-node-externals'); module.exports = { - entry: './src/index.js', + entry: ["babel-polyfill", './src/index.js'], target: 'node', mode: 'development', externals: [nodeExternals()],