From 2d88e73c137daa68ea7b5625de3ea7c6b7ad5341 Mon Sep 17 00:00:00 2001 From: "Shahar Or (mightyiam)" Date: Tue, 16 Feb 2021 16:09:14 +0700 Subject: [PATCH] chore(deps): update eslint packages --- .eslintrc.cjs | 1 + README.md | 40 +- package-lock.json | 1308 ++++++++++----------- package.json | 11 +- src/package/h.ts | 8 +- src/package/modules/attributes.ts | 8 +- src/package/modules/class.ts | 10 +- src/package/modules/eventlisteners.ts | 20 +- src/package/modules/hero.ts | 32 +- src/package/modules/props.ts | 12 +- src/package/modules/style.ts | 45 +- src/package/ts-transform-js-extension.cjs | 8 +- src/test/unit/attachto.ts | 22 +- src/test/unit/attributes.ts | 28 +- src/test/unit/core.ts | 456 +++---- src/test/unit/dataset.ts | 16 +- src/test/unit/eventlisteners.ts | 36 +- src/test/unit/htmldomapi.ts | 26 +- src/test/unit/style.ts | 62 +- src/test/unit/thunk.ts | 72 +- 20 files changed, 1073 insertions(+), 1148 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 3e60e31..609d01a 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -26,6 +26,7 @@ module.exports = { rules: { 'import/newline-after-import': 'error', 'max-statements-per-line': 'error', + 'no-var': 'error', '@typescript-eslint/no-non-null-assertion': 'off', '@typescript-eslint/consistent-type-definitions': 'off', '@typescript-eslint/explicit-function-return-type': 'off', diff --git a/README.md b/README.md index 34d7408..6b955e6 100644 --- a/README.md +++ b/README.md @@ -69,16 +69,16 @@ import { styleModule } from 'snabbdom/modules/style' import { eventListenersModule } from 'snabbdom/modules/eventlisteners' import { h } from 'snabbdom/h' // helper function for creating vnodes -var patch = init([ // Init patch function with chosen modules +const patch = init([ // Init patch function with chosen modules classModule, // makes it easy to toggle classes propsModule, // for setting properties on DOM elements styleModule, // handles styling on elements with support for animations eventListenersModule, // attaches event listeners ]) -var container = document.getElementById('container') +const container = document.getElementById('container') -var vnode = h('div#container.two.classes', { on: { click: someFn } }, [ +const vnode = h('div#container.two.classes', { on: { click: someFn } }, [ h('span', { style: { fontWeight: 'bold' } }, 'This is bold'), ' and this is just normal text', h('a', { props: { href: '/foo' } }, 'I\'ll take you places!') @@ -86,7 +86,7 @@ var vnode = h('div#container.two.classes', { on: { click: someFn } }, [ // Patch into empty DOM element – this modifies the DOM as a side effect patch(container, vnode) -var newVnode = h('div#container.two.classes', { on: { click: anotherEventHandler } }, [ +const newVnode = h('div#container.two.classes', { on: { click: anotherEventHandler } }, [ h('span', { style: { fontWeight: 'normal', fontStyle: 'italic' } }, 'This is now italic type'), ' and this is still just normal text', h('a', { props: { href: '/bar' } }, 'I\'ll take you places!') @@ -160,7 +160,7 @@ specified set of modules. import { classModule } from 'snabbdom/modules/class' import { styleModule } from 'snabbdom/modules/style' -var patch = init([classModule, styleModule]) +const patch = init([classModule, styleModule]) ``` ### `patch` @@ -203,7 +203,7 @@ array of children. ```mjs import { h } from 'snabbdom/h' -var vnode = h('div', { style: { color: '#000' } }, [ +const vnode = h('div', { style: { color: '#000' } }, [ h('h1', 'Headline'), h('p', 'A paragraph'), ]) @@ -223,14 +223,14 @@ import { eventListenersModule } from 'snabbdom/modules/eventlisteners' import { h } from 'snabbdom/h' // helper function for creating vnodes import { toVNode } from 'snabbdom/tovnode' -var patch = init([ // Init patch function with chosen modules +const patch = init([ // Init patch function with chosen modules classModule, // makes it easy to toggle classes propsModule, // for setting properties on DOM elements styleModule, // handles styling on elements with support for animations eventListenersModule, // attaches event listeners ]) -var newVNode = h('div', { style: { color: '#000' } }, [ +const newVNode = h('div', { style: { color: '#000' } }, [ h('h1', 'Headline'), h('p', 'A paragraph'), ]) @@ -319,8 +319,8 @@ To see the difference between this hook and the `remove` hook, consider an example. ```mjs -var vnode1 = h('div', [h('div', [h('span', 'Hello')])]) -var vnode2 = h('div', []) +const vnode1 = h('div', [h('div', [h('span', 'Hello')])]) +const vnode2 = h('div', []) patch(container, vnode1) patch(vnode1, vnode2) ``` @@ -339,7 +339,7 @@ animate the disappearance of the removed element's children. Modules works by registering global listeners for [hooks](#hooks). A module is simply a dictionary mapping hook names to functions. ```mjs -var myModule = { +const myModule = { create: function (oldVnode, vnode) { // invoked whenever a new virtual node is created }, @@ -564,7 +564,7 @@ In particular, you should **not** do something like this: ```mjs // Does not work -var sharedHandler = { +const sharedHandler = { change: function (e) { console.log('you chose: ' + e.target.value) } } h('div', [ @@ -588,7 +588,7 @@ Alternatively, simply make sure each node is passed unique `on` values: ```mjs // Works -var sharedHandler = function (e) { +const sharedHandler = function (e) { console.log('you chose: ' + e.target.value) } h('div', [ @@ -614,7 +614,7 @@ nodes. SVG elements are automatically created with the appropriate namespaces. ```mjs -var vnode = h('div', [ +const vnode = h('div', [ h('svg', { attrs: { width: 100, height: 100 } }, [ h('circle', { attrs: { cx: 50, cy: 50, r: 40, stroke: 'green', 'stroke-width': 4, fill: 'yellow' } }) ]) @@ -819,13 +819,13 @@ Uncaught NotFoundError: Failed to execute 'insertBefore' on 'Node': The reason for this error is reusing of vnodes between patches (see code example), snabbdom stores actual dom nodes inside the virtual dom nodes passed to it as performance improvement, so reusing nodes between patches is not supported. ```mjs -var sharedNode = h('div', {}, 'Selected') -var vnode1 = h('div', [ +const sharedNode = h('div', {}, 'Selected') +const vnode1 = h('div', [ h('div', {}, ['One']), h('div', {}, ['Two']), h('div', {}, [sharedNode]), ]) -var vnode2 = h('div', [ +const vnode2 = h('div', [ h('div', {}, ['One']), h('div', {}, [sharedNode]), h('div', {}, ['Three']), @@ -837,7 +837,7 @@ patch(vnode1, vnode2) You can fix this issue by creating a shallow copy of the object (here with object spread syntax): ```mjs -var vnode2 = h('div', [ +const vnode2 = h('div', [ h('div', {}, ['One']), h('div', {}, [{ ...sharedNode }]), h('div', {}, ['Three']), @@ -847,8 +847,8 @@ var vnode2 = h('div', [ Another solution would be to wrap shared vnodes in a factory function: ```mjs -var sharedNode = () => h('div', {}, 'Selected') -var vnode1 = h('div', [ +const sharedNode = () => h('div', {}, 'Selected') +const vnode1 = h('div', [ h('div', {}, ['One']), h('div', {}, ['Two']), h('div', {}, [sharedNode()]), diff --git a/package-lock.json b/package-lock.json index 05a37ba..004fd76 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "@types/lodash.shuffle": "4.2.6", "@types/mathjs": "6.0.5", "@types/mocha": "8.0.3", - "@typescript-eslint/eslint-plugin": "4.2.0", + "@typescript-eslint/eslint-plugin": "4.15.1", "babel-loader": "8.1.0", "benchmark": "2.1.4", "chai": "4.2.0", @@ -27,13 +27,12 @@ "core-js": "3.6.5", "cross-env": "7.0.3", "editorconfig-checker": "3.2.0", - "eslint": "7.9.0", - "eslint-config-standard-with-typescript": "19.0.1", - "eslint-plugin-import": "2.22.0", - "eslint-plugin-markdown": "2.0.0-rc.0", + "eslint": "7.20.0", + "eslint-config-standard-with-typescript": "20.0.0", + "eslint-plugin-import": "2.22.1", + "eslint-plugin-markdown": "2.0.0", "eslint-plugin-node": "11.1.0", "eslint-plugin-promise": "4.3.1", - "eslint-plugin-standard": "4.0.1", "faker": "5.4.0", "globby": "11.0.2", "husky": "5.0.9", @@ -65,12 +64,12 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", - "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", "dev": true, "dependencies": { - "@babel/highlight": "^7.0.0" + "@babel/highlight": "^7.10.4" } }, "node_modules/@babel/compat-data": { @@ -225,17 +224,6 @@ "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", "dev": true }, - "node_modules/@babel/core/node_modules/@babel/highlight": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", - "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "node_modules/@babel/core/node_modules/@babel/parser": { "version": "7.12.16", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.16.tgz", @@ -287,20 +275,6 @@ "to-fast-properties": "^2.0.0" } }, - "node_modules/@babel/core/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/core/node_modules/debug": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", @@ -639,17 +613,6 @@ "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", "dev": true }, - "node_modules/@babel/helpers/node_modules/@babel/highlight": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", - "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "node_modules/@babel/helpers/node_modules/@babel/parser": { "version": "7.12.16", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.16.tgz", @@ -701,20 +664,6 @@ "to-fast-properties": "^2.0.0" } }, - "node_modules/@babel/helpers/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/helpers/node_modules/debug": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", @@ -743,28 +692,16 @@ "dev": true }, "node_modules/@babel/highlight": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", - "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", + "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", "dev": true, "dependencies": { + "@babel/helper-validator-identifier": "^7.12.11", "chalk": "^2.0.0", - "esutils": "^2.0.2", "js-tokens": "^4.0.0" } }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/highlight/node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -779,27 +716,6 @@ "node": ">=4" } }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/parser": { "version": "7.12.16", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.16.tgz", @@ -1502,31 +1418,6 @@ "@babel/highlight": "^7.12.13" } }, - "node_modules/@babel/template/node_modules/@babel/highlight": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", - "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "node_modules/@babel/template/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/traverse": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.13.tgz", @@ -1553,31 +1444,6 @@ "@babel/highlight": "^7.12.13" } }, - "node_modules/@babel/traverse/node_modules/@babel/highlight": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", - "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "node_modules/@babel/traverse/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/traverse/node_modules/debug": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", @@ -2258,9 +2124,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.1.3.tgz", - "integrity": "sha512-4YVwPkANLeNtRjMekzux1ci8hIaH5eGKktGqR0d3LWsKNn5B2X/1Z6Trxy7jQXl9EBGE6Yj02O+t09FMeRllaA==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.3.0.tgz", + "integrity": "sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -2270,7 +2136,7 @@ "ignore": "^4.0.6", "import-fresh": "^3.2.1", "js-yaml": "^3.13.1", - "lodash": "^4.17.19", + "lodash": "^4.17.20", "minimatch": "^3.0.4", "strip-json-comments": "^3.1.1" }, @@ -2279,24 +2145,36 @@ } }, "node_modules/@eslint/eslintrc/node_modules/ajv": { - "version": "6.12.4", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz", - "integrity": "sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==", + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, "node_modules/@eslint/eslintrc/node_modules/debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "dependencies": { - "ms": "^2.1.1" + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, "node_modules/@eslint/eslintrc/node_modules/fast-deep-equal": { @@ -2458,56 +2336,82 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.2.0.tgz", - "integrity": "sha512-zBNRkzvLSwo6y5TG0DVcmshZIYBHKtmzD4N+LYnfTFpzc4bc79o8jNRSb728WV7A4Cegbs+MV5IRAj8BKBgOVQ==", + "version": "4.15.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.15.1.tgz", + "integrity": "sha512-yW2epMYZSpNJXZy22Biu+fLdTG8Mn6b22kR3TqblVk50HGNV8Zya15WAXuQCr8tKw4Qf1BL4QtI6kv6PCkLoJw==", "dev": true, "dependencies": { - "@typescript-eslint/experimental-utils": "4.2.0", - "@typescript-eslint/scope-manager": "4.2.0", + "@typescript-eslint/experimental-utils": "4.15.1", + "@typescript-eslint/scope-manager": "4.15.1", "debug": "^4.1.1", "functional-red-black-tree": "^1.0.1", + "lodash": "^4.17.15", "regexpp": "^3.0.0", "semver": "^7.3.2", "tsutils": "^3.17.1" }, "engines": { "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^4.0.0", + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.2.0.tgz", - "integrity": "sha512-Tb402cxxObSxWIVT+PnBp5ruT2V/36yj6gG4C9AjkgRlZpxrLAzWDk3neen6ToMBGeGdxtnfFLoJRUecGz9mYQ==", + "version": "4.15.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.15.1.tgz", + "integrity": "sha512-ibQrTFcAm7yG4C1iwpIYK7vDnFg+fKaZVfvyOm3sNsGAerKfwPVFtYft5EbjzByDJ4dj1WD8/34REJfw/9wdVA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "4.2.0", - "@typescript-eslint/visitor-keys": "4.2.0" + "@typescript-eslint/types": "4.15.1", + "@typescript-eslint/visitor-keys": "4.15.1" }, "engines": { "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.2.0.tgz", - "integrity": "sha512-xkv5nIsxfI/Di9eVwN+G9reWl7Me9R5jpzmZUch58uQ7g0/hHVuGUbbn4NcxcM5y/R4wuJIIEPKPDb5l4Fdmwg==", + "version": "4.15.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.15.1.tgz", + "integrity": "sha512-iGsaUyWFyLz0mHfXhX4zO6P7O3sExQpBJ2dgXB0G5g/8PRVfBBsmQIc3r83ranEQTALLR3Vko/fnCIVqmH+mPw==", "dev": true, "engines": { "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.2.0.tgz", - "integrity": "sha512-WIf4BNOlFOH2W+YqGWa6YKLcK/EB3gEj2apCrqLw6mme1RzBy0jtJ9ewJgnrZDB640zfnv8L+/gwGH5sYp/rGw==", + "version": "4.15.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.15.1.tgz", + "integrity": "sha512-tYzaTP9plooRJY8eNlpAewTOqtWW/4ff/5wBjNVaJ0S0wC4Gpq/zDVRTJa5bq2v1pCNQ08xxMCndcvR+h7lMww==", "dev": true, "dependencies": { - "@typescript-eslint/types": "4.2.0", + "@typescript-eslint/types": "4.15.1", "eslint-visitor-keys": "^2.0.0" }, "engines": { "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/debug": { @@ -2550,86 +2454,118 @@ } }, "node_modules/@typescript-eslint/experimental-utils": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.2.0.tgz", - "integrity": "sha512-5BBj6BjgHEndBaQQpUVzRIPERz03LBc0MCQkHwUaH044FJFL08SwWv/sQftk7gf0ShZ2xZysz0LTwCwNt4Xu3w==", + "version": "4.15.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.15.1.tgz", + "integrity": "sha512-9LQRmOzBRI1iOdJorr4jEnQhadxK4c9R2aEAsm7WE/7dq8wkKD1suaV0S/JucTL8QlYUPU1y2yjqg+aGC0IQBQ==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.2.0", - "@typescript-eslint/types": "4.2.0", - "@typescript-eslint/typescript-estree": "4.2.0", + "@typescript-eslint/scope-manager": "4.15.1", + "@typescript-eslint/types": "4.15.1", + "@typescript-eslint/typescript-estree": "4.15.1", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" }, "engines": { "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" } }, "node_modules/@typescript-eslint/experimental-utils/node_modules/@typescript-eslint/scope-manager": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.2.0.tgz", - "integrity": "sha512-Tb402cxxObSxWIVT+PnBp5ruT2V/36yj6gG4C9AjkgRlZpxrLAzWDk3neen6ToMBGeGdxtnfFLoJRUecGz9mYQ==", + "version": "4.15.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.15.1.tgz", + "integrity": "sha512-ibQrTFcAm7yG4C1iwpIYK7vDnFg+fKaZVfvyOm3sNsGAerKfwPVFtYft5EbjzByDJ4dj1WD8/34REJfw/9wdVA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "4.2.0", - "@typescript-eslint/visitor-keys": "4.2.0" + "@typescript-eslint/types": "4.15.1", + "@typescript-eslint/visitor-keys": "4.15.1" }, "engines": { "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, "node_modules/@typescript-eslint/experimental-utils/node_modules/@typescript-eslint/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.2.0.tgz", - "integrity": "sha512-xkv5nIsxfI/Di9eVwN+G9reWl7Me9R5jpzmZUch58uQ7g0/hHVuGUbbn4NcxcM5y/R4wuJIIEPKPDb5l4Fdmwg==", + "version": "4.15.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.15.1.tgz", + "integrity": "sha512-iGsaUyWFyLz0mHfXhX4zO6P7O3sExQpBJ2dgXB0G5g/8PRVfBBsmQIc3r83ranEQTALLR3Vko/fnCIVqmH+mPw==", "dev": true, "engines": { "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, "node_modules/@typescript-eslint/experimental-utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.2.0.tgz", - "integrity": "sha512-iWDLCB7z4MGkLipduF6EOotdHNtgxuNKnYD54nMS/oitFnsk4S3S/TE/UYXQTra550lHtlv9eGmp+dvN9pUDtA==", + "version": "4.15.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.15.1.tgz", + "integrity": "sha512-z8MN3CicTEumrWAEB2e2CcoZa3KP9+SMYLIA2aM49XW3cWIaiVSOAGq30ffR5XHxRirqE90fgLw3e6WmNx5uNw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "4.2.0", - "@typescript-eslint/visitor-keys": "4.2.0", + "@typescript-eslint/types": "4.15.1", + "@typescript-eslint/visitor-keys": "4.15.1", "debug": "^4.1.1", "globby": "^11.0.1", "is-glob": "^4.0.1", - "lodash": "^4.17.15", "semver": "^7.3.2", "tsutils": "^3.17.1" }, "engines": { "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/@typescript-eslint/experimental-utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.2.0.tgz", - "integrity": "sha512-WIf4BNOlFOH2W+YqGWa6YKLcK/EB3gEj2apCrqLw6mme1RzBy0jtJ9ewJgnrZDB640zfnv8L+/gwGH5sYp/rGw==", + "version": "4.15.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.15.1.tgz", + "integrity": "sha512-tYzaTP9plooRJY8eNlpAewTOqtWW/4ff/5wBjNVaJ0S0wC4Gpq/zDVRTJa5bq2v1pCNQ08xxMCndcvR+h7lMww==", "dev": true, "dependencies": { - "@typescript-eslint/types": "4.2.0", + "@typescript-eslint/types": "4.15.1", "eslint-visitor-keys": "^2.0.0" }, "engines": { "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, "node_modules/@typescript-eslint/experimental-utils/node_modules/debug": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", - "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "dependencies": { "ms": "2.1.2" }, "engines": { "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, "node_modules/@typescript-eslint/experimental-utils/node_modules/eslint-visitor-keys": { @@ -2641,6 +2577,18 @@ "node": ">=10" } }, + "node_modules/@typescript-eslint/experimental-utils/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@typescript-eslint/experimental-utils/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -2648,10 +2596,13 @@ "dev": true }, "node_modules/@typescript-eslint/experimental-utils/node_modules/semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, "bin": { "semver": "bin/semver.js" }, @@ -2980,9 +2931,9 @@ } }, "node_modules/acorn": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.0.tgz", - "integrity": "sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w==", + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -2995,7 +2946,10 @@ "version": "5.3.1", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", - "dev": true + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } }, "node_modules/add-stream": { "version": "1.0.0", @@ -3532,12 +3486,12 @@ } }, "node_modules/astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/async-each": { @@ -7811,26 +7765,26 @@ } }, "node_modules/eslint": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.9.0.tgz", - "integrity": "sha512-V6QyhX21+uXp4T+3nrNfI3hQNBDa/P8ga7LoQOenwrlEFXrEnUEE+ok1dMtaS3b6rmLXhT1TkTIsG75HMLbknA==", + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.20.0.tgz", + "integrity": "sha512-qGi0CTcOGP2OtCQBgWZlQjcTuP0XkIpYFj25XtRTQSHC+umNnp7UMshr2G8SLsRFYDdAPFeHOsiteadmMH02Yw==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.0.0", - "@eslint/eslintrc": "^0.1.3", + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.3.0", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", "enquirer": "^2.3.5", - "eslint-scope": "^5.1.0", + "eslint-scope": "^5.1.1", "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^1.3.0", - "espree": "^7.3.0", - "esquery": "^1.2.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", + "file-entry-cache": "^6.0.0", "functional-red-black-tree": "^1.0.1", "glob-parent": "^5.0.0", "globals": "^12.1.0", @@ -7841,7 +7795,7 @@ "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash": "^4.17.19", + "lodash": "^4.17.20", "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", @@ -7850,7 +7804,7 @@ "semver": "^7.2.1", "strip-ansi": "^6.0.0", "strip-json-comments": "^3.1.0", - "table": "^5.2.3", + "table": "^6.0.4", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, @@ -7859,22 +7813,53 @@ }, "engines": { "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-config-standard": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz", - "integrity": "sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg==", - "dev": true + "version": "16.0.2", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-16.0.2.tgz", + "integrity": "sha512-fx3f1rJDsl9bY7qzyX8SAtP8GBSk6MfXFaTfaGgk12aAYW4gJSyRm7dM790L6cbXv63fvjY4XeSzXnb4WM+SKw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "peerDependencies": { + "eslint": "^7.12.1", + "eslint-plugin-import": "^2.22.1", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^4.2.1" + } }, "node_modules/eslint-config-standard-with-typescript": { - "version": "19.0.1", - "resolved": "https://registry.npmjs.org/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-19.0.1.tgz", - "integrity": "sha512-hAKj81+f4a+9lnvpHwZ4XSL672CbwSe5UJ7fTdL/RsQdqs4IjHudMETZuNQwwU7NlYpBTF9se7FRf5Pp7CVdag==", + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-20.0.0.tgz", + "integrity": "sha512-IoySf3r0a2+P3Z6GMjv8p1HuOQ6GWQbMpdt9G8uEbkGpnNWAGBXpgaiutbZHbaQAvG5pkVtYepCfHUxYbVDLCA==", "dev": true, "dependencies": { "@typescript-eslint/parser": "^4.0.0", - "eslint-config-standard": "^14.1.1" + "eslint-config-standard": "^16.0.0" + }, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": ">=4.0.1", + "eslint": ">=7.12.1", + "eslint-plugin-import": ">=2.22.1", + "eslint-plugin-node": ">=11.1.0", + "eslint-plugin-promise": ">=4.2.1", + "typescript": ">=3.9" } }, "node_modules/eslint-import-resolver-node": { @@ -7923,9 +7908,9 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.22.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.0.tgz", - "integrity": "sha512-66Fpf1Ln6aIS5Gr/55ts19eUuoDhAbZgnr6UxK5hbDx6l/QgQgx61AePq+BV4PP2uXQFClgMVzep5zZ94qqsxg==", + "version": "2.22.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz", + "integrity": "sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==", "dev": true, "dependencies": { "array-includes": "^3.1.1", @@ -7933,7 +7918,7 @@ "contains-path": "^0.1.0", "debug": "^2.6.9", "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.3", + "eslint-import-resolver-node": "^0.3.4", "eslint-module-utils": "^2.6.0", "has": "^1.0.3", "minimatch": "^3.0.4", @@ -7944,6 +7929,9 @@ }, "engines": { "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0" } }, "node_modules/eslint-plugin-import/node_modules/doctrine": { @@ -8023,9 +8011,9 @@ } }, "node_modules/eslint-plugin-markdown": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-markdown/-/eslint-plugin-markdown-2.0.0-rc.0.tgz", - "integrity": "sha512-B63Jk8TmHLEhRBtSl5U5w9wi+bPuPLuz+UsFmI6BOelpugOVD8mgGfq4D7isXkR1If1uerqPCNqlaWrMNyioQQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-markdown/-/eslint-plugin-markdown-2.0.0.tgz", + "integrity": "sha512-zt10JoexHeJFMTE5egDcetAJ34bn5k/92s0wAuRZfhDAyI0ryEj+O91JL2CbBExajie6BE5L63y47dN1Sbp6mQ==", "dev": true, "dependencies": { "remark-parse": "^5.0.0", @@ -8033,6 +8021,9 @@ }, "engines": { "node": "^8.10.0 || ^10.12.0 || >= 12.0.0" + }, + "peerDependencies": { + "eslint": ">=6.0.0" } }, "node_modules/eslint-plugin-markdown/node_modules/is-plain-obj": { @@ -8214,19 +8205,13 @@ "node": ">=6" } }, - "node_modules/eslint-plugin-standard": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.1.tgz", - "integrity": "sha512-v/KBnfyaOMPmZc/dmc6ozOdWqekGp7bBGq4jLAecEfPGmfKiWS4sA8sC0LqiV9w5qmXAtXVn4M3p1jSyhY85SQ==", - "dev": true - }, "node_modules/eslint-scope": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz", - "integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "dependencies": { - "esrecurse": "^4.1.0", + "esrecurse": "^4.3.0", "estraverse": "^4.1.1" }, "engines": { @@ -8246,9 +8231,9 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", - "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", "dev": true, "engines": { "node": ">=4" @@ -8298,7 +8283,7 @@ "node": ">=6" } }, - "node_modules/eslint/node_modules/eslint-visitor-keys": { + "node_modules/eslint/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", @@ -8307,6 +8292,15 @@ "node": ">=4" } }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/eslint/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -8392,28 +8386,19 @@ } }, "node_modules/espree": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.0.tgz", - "integrity": "sha512-dksIWsvKCixn1yrEXO8UosNSxaDoSYpq9reEjZSbHLpT5hpaCAKTLBwq0RHtLrIr+c0ByiYzWT8KTMRzoRCNlw==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", "dev": true, "dependencies": { "acorn": "^7.4.0", - "acorn-jsx": "^5.2.0", + "acorn-jsx": "^5.3.1", "eslint-visitor-keys": "^1.3.0" }, "engines": { "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -8428,9 +8413,9 @@ } }, "node_modules/esquery": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", - "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, "dependencies": { "estraverse": "^5.1.0" @@ -8449,21 +8434,21 @@ } }, "node_modules/esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "dependencies": { - "estraverse": "^4.1.0" + "estraverse": "^5.2.0" }, "engines": { "node": ">=4.0" } }, "node_modules/esrecurse/node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", "dev": true, "engines": { "node": ">=4.0" @@ -8917,15 +8902,15 @@ } }, "node_modules/file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.0.tgz", + "integrity": "sha512-fqoO76jZ3ZnYrXLDRxBR1YvOvc0k844kcOg40bgsPrE25LAb/PDqTY+ho64Xh2c8ZXgIKldchCFHczG2UVRcWA==", "dev": true, "dependencies": { - "flat-cache": "^2.0.1" + "flat-cache": "^3.0.4" }, "engines": { - "node": ">=4" + "node": "^10.12.0 || >=12.0.0" } }, "node_modules/file-uri-to-path": { @@ -9113,17 +9098,37 @@ } }, "node_modules/flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "dependencies": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" + "flatted": "^3.1.0", + "rimraf": "^3.0.2" }, "engines": { - "node": ">=4" + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flat-cache/node_modules/flatted": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", + "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", + "dev": true + }, + "node_modules/flat-cache/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/flat/node_modules/is-buffer": { @@ -10242,6 +10247,9 @@ }, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/globals/node_modules/type-fest": { @@ -11943,9 +11951,9 @@ } }, "node_modules/lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "node_modules/lodash._reinterpolate": { @@ -14416,6 +14424,15 @@ "node": ">=0.10.0" } }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", @@ -14760,28 +14777,55 @@ } }, "node_modules/slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, "dependencies": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" }, "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, - "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/slice-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/slice-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "node_modules/smartwrap": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/smartwrap/-/smartwrap-2.0.1.tgz", @@ -16195,6 +16239,9 @@ "dev": true, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/supports-color": { @@ -16210,69 +16257,47 @@ } }, "node_modules/table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", + "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==", "dev": true, "dependencies": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" + "ajv": "^7.0.2", + "lodash": "^4.17.20", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0" }, "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/table/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/table/node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "node_modules/table/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true, - "engines": { - "node": ">=4" + "node": ">=10.0.0" } }, - "node_modules/table/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "node_modules/table/node_modules/ajv": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.1.0.tgz", + "integrity": "sha512-svS9uILze/cXbH0z2myCK2Brqprx/+JJYK5pHicT/GQiBfzzhUVAIT6MwqJg8y4xV/zoGsUeuPuwtoiKSGE15g==", "dev": true, "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" }, - "engines": { - "node": ">=6" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/table/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } + "node_modules/table/node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true }, "node_modules/tapable": { "version": "1.1.3", @@ -18306,18 +18331,6 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, - "node_modules/write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, - "dependencies": { - "mkdirp": "^0.5.1" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/write-file-atomic": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", @@ -18772,12 +18785,12 @@ }, "dependencies": { "@babel/code-frame": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", - "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", "dev": true, "requires": { - "@babel/highlight": "^7.0.0" + "@babel/highlight": "^7.10.4" } }, "@babel/compat-data": { @@ -18929,17 +18942,6 @@ "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", "dev": true }, - "@babel/highlight": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", - "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "@babel/parser": { "version": "7.12.16", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.16.tgz", @@ -18985,17 +18987,6 @@ "to-fast-properties": "^2.0.0" } }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, "debug": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", @@ -19326,17 +19317,6 @@ "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", "dev": true }, - "@babel/highlight": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", - "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "@babel/parser": { "version": "7.12.16", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.16.tgz", @@ -19382,17 +19362,6 @@ "to-fast-properties": "^2.0.0" } }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, "debug": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", @@ -19417,25 +19386,16 @@ } }, "@babel/highlight": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", - "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", + "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", "dev": true, "requires": { + "@babel/helper-validator-identifier": "^7.12.11", "chalk": "^2.0.0", - "esutils": "^2.0.2", "js-tokens": "^4.0.0" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -19446,21 +19406,6 @@ "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } } } }, @@ -20154,28 +20099,6 @@ "requires": { "@babel/highlight": "^7.12.13" } - }, - "@babel/highlight": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", - "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } } } }, @@ -20205,28 +20128,6 @@ "@babel/highlight": "^7.12.13" } }, - "@babel/highlight": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", - "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, "debug": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", @@ -20769,9 +20670,9 @@ } }, "@eslint/eslintrc": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.1.3.tgz", - "integrity": "sha512-4YVwPkANLeNtRjMekzux1ci8hIaH5eGKktGqR0d3LWsKNn5B2X/1Z6Trxy7jQXl9EBGE6Yj02O+t09FMeRllaA==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.3.0.tgz", + "integrity": "sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -20781,15 +20682,15 @@ "ignore": "^4.0.6", "import-fresh": "^3.2.1", "js-yaml": "^3.13.1", - "lodash": "^4.17.19", + "lodash": "^4.17.20", "minimatch": "^3.0.4", "strip-json-comments": "^3.1.1" }, "dependencies": { "ajv": { - "version": "6.12.4", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz", - "integrity": "sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==", + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -20799,12 +20700,12 @@ } }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "fast-deep-equal": { @@ -20959,43 +20860,44 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.2.0.tgz", - "integrity": "sha512-zBNRkzvLSwo6y5TG0DVcmshZIYBHKtmzD4N+LYnfTFpzc4bc79o8jNRSb728WV7A4Cegbs+MV5IRAj8BKBgOVQ==", + "version": "4.15.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.15.1.tgz", + "integrity": "sha512-yW2epMYZSpNJXZy22Biu+fLdTG8Mn6b22kR3TqblVk50HGNV8Zya15WAXuQCr8tKw4Qf1BL4QtI6kv6PCkLoJw==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "4.2.0", - "@typescript-eslint/scope-manager": "4.2.0", + "@typescript-eslint/experimental-utils": "4.15.1", + "@typescript-eslint/scope-manager": "4.15.1", "debug": "^4.1.1", "functional-red-black-tree": "^1.0.1", + "lodash": "^4.17.15", "regexpp": "^3.0.0", "semver": "^7.3.2", "tsutils": "^3.17.1" }, "dependencies": { "@typescript-eslint/scope-manager": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.2.0.tgz", - "integrity": "sha512-Tb402cxxObSxWIVT+PnBp5ruT2V/36yj6gG4C9AjkgRlZpxrLAzWDk3neen6ToMBGeGdxtnfFLoJRUecGz9mYQ==", + "version": "4.15.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.15.1.tgz", + "integrity": "sha512-ibQrTFcAm7yG4C1iwpIYK7vDnFg+fKaZVfvyOm3sNsGAerKfwPVFtYft5EbjzByDJ4dj1WD8/34REJfw/9wdVA==", "dev": true, "requires": { - "@typescript-eslint/types": "4.2.0", - "@typescript-eslint/visitor-keys": "4.2.0" + "@typescript-eslint/types": "4.15.1", + "@typescript-eslint/visitor-keys": "4.15.1" } }, "@typescript-eslint/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.2.0.tgz", - "integrity": "sha512-xkv5nIsxfI/Di9eVwN+G9reWl7Me9R5jpzmZUch58uQ7g0/hHVuGUbbn4NcxcM5y/R4wuJIIEPKPDb5l4Fdmwg==", + "version": "4.15.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.15.1.tgz", + "integrity": "sha512-iGsaUyWFyLz0mHfXhX4zO6P7O3sExQpBJ2dgXB0G5g/8PRVfBBsmQIc3r83ranEQTALLR3Vko/fnCIVqmH+mPw==", "dev": true }, "@typescript-eslint/visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.2.0.tgz", - "integrity": "sha512-WIf4BNOlFOH2W+YqGWa6YKLcK/EB3gEj2apCrqLw6mme1RzBy0jtJ9ewJgnrZDB640zfnv8L+/gwGH5sYp/rGw==", + "version": "4.15.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.15.1.tgz", + "integrity": "sha512-tYzaTP9plooRJY8eNlpAewTOqtWW/4ff/5wBjNVaJ0S0wC4Gpq/zDVRTJa5bq2v1pCNQ08xxMCndcvR+h7lMww==", "dev": true, "requires": { - "@typescript-eslint/types": "4.2.0", + "@typescript-eslint/types": "4.15.1", "eslint-visitor-keys": "^2.0.0" } }, @@ -21029,65 +20931,64 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.2.0.tgz", - "integrity": "sha512-5BBj6BjgHEndBaQQpUVzRIPERz03LBc0MCQkHwUaH044FJFL08SwWv/sQftk7gf0ShZ2xZysz0LTwCwNt4Xu3w==", + "version": "4.15.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.15.1.tgz", + "integrity": "sha512-9LQRmOzBRI1iOdJorr4jEnQhadxK4c9R2aEAsm7WE/7dq8wkKD1suaV0S/JucTL8QlYUPU1y2yjqg+aGC0IQBQ==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.2.0", - "@typescript-eslint/types": "4.2.0", - "@typescript-eslint/typescript-estree": "4.2.0", + "@typescript-eslint/scope-manager": "4.15.1", + "@typescript-eslint/types": "4.15.1", + "@typescript-eslint/typescript-estree": "4.15.1", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" }, "dependencies": { "@typescript-eslint/scope-manager": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.2.0.tgz", - "integrity": "sha512-Tb402cxxObSxWIVT+PnBp5ruT2V/36yj6gG4C9AjkgRlZpxrLAzWDk3neen6ToMBGeGdxtnfFLoJRUecGz9mYQ==", + "version": "4.15.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.15.1.tgz", + "integrity": "sha512-ibQrTFcAm7yG4C1iwpIYK7vDnFg+fKaZVfvyOm3sNsGAerKfwPVFtYft5EbjzByDJ4dj1WD8/34REJfw/9wdVA==", "dev": true, "requires": { - "@typescript-eslint/types": "4.2.0", - "@typescript-eslint/visitor-keys": "4.2.0" + "@typescript-eslint/types": "4.15.1", + "@typescript-eslint/visitor-keys": "4.15.1" } }, "@typescript-eslint/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.2.0.tgz", - "integrity": "sha512-xkv5nIsxfI/Di9eVwN+G9reWl7Me9R5jpzmZUch58uQ7g0/hHVuGUbbn4NcxcM5y/R4wuJIIEPKPDb5l4Fdmwg==", + "version": "4.15.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.15.1.tgz", + "integrity": "sha512-iGsaUyWFyLz0mHfXhX4zO6P7O3sExQpBJ2dgXB0G5g/8PRVfBBsmQIc3r83ranEQTALLR3Vko/fnCIVqmH+mPw==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.2.0.tgz", - "integrity": "sha512-iWDLCB7z4MGkLipduF6EOotdHNtgxuNKnYD54nMS/oitFnsk4S3S/TE/UYXQTra550lHtlv9eGmp+dvN9pUDtA==", + "version": "4.15.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.15.1.tgz", + "integrity": "sha512-z8MN3CicTEumrWAEB2e2CcoZa3KP9+SMYLIA2aM49XW3cWIaiVSOAGq30ffR5XHxRirqE90fgLw3e6WmNx5uNw==", "dev": true, "requires": { - "@typescript-eslint/types": "4.2.0", - "@typescript-eslint/visitor-keys": "4.2.0", + "@typescript-eslint/types": "4.15.1", + "@typescript-eslint/visitor-keys": "4.15.1", "debug": "^4.1.1", "globby": "^11.0.1", "is-glob": "^4.0.1", - "lodash": "^4.17.15", "semver": "^7.3.2", "tsutils": "^3.17.1" } }, "@typescript-eslint/visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.2.0.tgz", - "integrity": "sha512-WIf4BNOlFOH2W+YqGWa6YKLcK/EB3gEj2apCrqLw6mme1RzBy0jtJ9ewJgnrZDB640zfnv8L+/gwGH5sYp/rGw==", + "version": "4.15.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.15.1.tgz", + "integrity": "sha512-tYzaTP9plooRJY8eNlpAewTOqtWW/4ff/5wBjNVaJ0S0wC4Gpq/zDVRTJa5bq2v1pCNQ08xxMCndcvR+h7lMww==", "dev": true, "requires": { - "@typescript-eslint/types": "4.2.0", + "@typescript-eslint/types": "4.15.1", "eslint-visitor-keys": "^2.0.0" } }, "debug": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", - "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -21099,6 +21000,15 @@ "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", "dev": true }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -21106,10 +21016,13 @@ "dev": true }, "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", - "dev": true + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } } } }, @@ -21413,16 +21326,17 @@ } }, "acorn": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.0.tgz", - "integrity": "sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w==", + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true }, "acorn-jsx": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", - "dev": true + "dev": true, + "requires": {} }, "add-stream": { "version": "1.0.0", @@ -21867,9 +21781,9 @@ "dev": true }, "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true }, "async-each": { @@ -25397,26 +25311,26 @@ "dev": true }, "eslint": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.9.0.tgz", - "integrity": "sha512-V6QyhX21+uXp4T+3nrNfI3hQNBDa/P8ga7LoQOenwrlEFXrEnUEE+ok1dMtaS3b6rmLXhT1TkTIsG75HMLbknA==", + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.20.0.tgz", + "integrity": "sha512-qGi0CTcOGP2OtCQBgWZlQjcTuP0XkIpYFj25XtRTQSHC+umNnp7UMshr2G8SLsRFYDdAPFeHOsiteadmMH02Yw==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "@eslint/eslintrc": "^0.1.3", + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.3.0", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", "enquirer": "^2.3.5", - "eslint-scope": "^5.1.0", + "eslint-scope": "^5.1.1", "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^1.3.0", - "espree": "^7.3.0", - "esquery": "^1.2.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", + "file-entry-cache": "^6.0.0", "functional-red-black-tree": "^1.0.1", "glob-parent": "^5.0.0", "globals": "^12.1.0", @@ -25427,7 +25341,7 @@ "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash": "^4.17.19", + "lodash": "^4.17.20", "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", @@ -25436,7 +25350,7 @@ "semver": "^7.2.1", "strip-ansi": "^6.0.0", "strip-json-comments": "^3.1.0", - "table": "^5.2.3", + "table": "^6.0.4", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, @@ -25474,12 +25388,20 @@ "dev": true, "requires": { "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } } }, "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", "dev": true }, "ms": { @@ -25542,19 +25464,20 @@ } }, "eslint-config-standard": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz", - "integrity": "sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg==", - "dev": true + "version": "16.0.2", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-16.0.2.tgz", + "integrity": "sha512-fx3f1rJDsl9bY7qzyX8SAtP8GBSk6MfXFaTfaGgk12aAYW4gJSyRm7dM790L6cbXv63fvjY4XeSzXnb4WM+SKw==", + "dev": true, + "requires": {} }, "eslint-config-standard-with-typescript": { - "version": "19.0.1", - "resolved": "https://registry.npmjs.org/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-19.0.1.tgz", - "integrity": "sha512-hAKj81+f4a+9lnvpHwZ4XSL672CbwSe5UJ7fTdL/RsQdqs4IjHudMETZuNQwwU7NlYpBTF9se7FRf5Pp7CVdag==", + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-20.0.0.tgz", + "integrity": "sha512-IoySf3r0a2+P3Z6GMjv8p1HuOQ6GWQbMpdt9G8uEbkGpnNWAGBXpgaiutbZHbaQAvG5pkVtYepCfHUxYbVDLCA==", "dev": true, "requires": { "@typescript-eslint/parser": "^4.0.0", - "eslint-config-standard": "^14.1.1" + "eslint-config-standard": "^16.0.0" } }, "eslint-import-resolver-node": { @@ -25599,9 +25522,9 @@ } }, "eslint-plugin-import": { - "version": "2.22.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.0.tgz", - "integrity": "sha512-66Fpf1Ln6aIS5Gr/55ts19eUuoDhAbZgnr6UxK5hbDx6l/QgQgx61AePq+BV4PP2uXQFClgMVzep5zZ94qqsxg==", + "version": "2.22.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz", + "integrity": "sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==", "dev": true, "requires": { "array-includes": "^3.1.1", @@ -25609,7 +25532,7 @@ "contains-path": "^0.1.0", "debug": "^2.6.9", "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.3", + "eslint-import-resolver-node": "^0.3.4", "eslint-module-utils": "^2.6.0", "has": "^1.0.3", "minimatch": "^3.0.4", @@ -25683,9 +25606,9 @@ } }, "eslint-plugin-markdown": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-markdown/-/eslint-plugin-markdown-2.0.0-rc.0.tgz", - "integrity": "sha512-B63Jk8TmHLEhRBtSl5U5w9wi+bPuPLuz+UsFmI6BOelpugOVD8mgGfq4D7isXkR1If1uerqPCNqlaWrMNyioQQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-markdown/-/eslint-plugin-markdown-2.0.0.tgz", + "integrity": "sha512-zt10JoexHeJFMTE5egDcetAJ34bn5k/92s0wAuRZfhDAyI0ryEj+O91JL2CbBExajie6BE5L63y47dN1Sbp6mQ==", "dev": true, "requires": { "remark-parse": "^5.0.0", @@ -25860,19 +25783,13 @@ "integrity": "sha512-bY2sGqyptzFBDLh/GMbAxfdJC+b0f23ME63FOE4+Jao0oZ3E1LEwFtWJX/1pGMJLiTtrSSern2CRM/g+dfc0eQ==", "dev": true }, - "eslint-plugin-standard": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.1.tgz", - "integrity": "sha512-v/KBnfyaOMPmZc/dmc6ozOdWqekGp7bBGq4jLAecEfPGmfKiWS4sA8sC0LqiV9w5qmXAtXVn4M3p1jSyhY85SQ==", - "dev": true - }, "eslint-scope": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz", - "integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "requires": { - "esrecurse": "^4.1.0", + "esrecurse": "^4.3.0", "estraverse": "^4.1.1" } }, @@ -25886,28 +25803,20 @@ } }, "eslint-visitor-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", - "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", "dev": true }, "espree": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.0.tgz", - "integrity": "sha512-dksIWsvKCixn1yrEXO8UosNSxaDoSYpq9reEjZSbHLpT5hpaCAKTLBwq0RHtLrIr+c0ByiYzWT8KTMRzoRCNlw==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", "dev": true, "requires": { "acorn": "^7.4.0", - "acorn-jsx": "^5.2.0", + "acorn-jsx": "^5.3.1", "eslint-visitor-keys": "^1.3.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } } }, "esprima": { @@ -25917,9 +25826,9 @@ "dev": true }, "esquery": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", - "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, "requires": { "estraverse": "^5.1.0" @@ -25934,18 +25843,18 @@ } }, "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "requires": { - "estraverse": "^4.1.0" + "estraverse": "^5.2.0" }, "dependencies": { "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", "dev": true } } @@ -26318,12 +26227,12 @@ } }, "file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.0.tgz", + "integrity": "sha512-fqoO76jZ3ZnYrXLDRxBR1YvOvc0k844kcOg40bgsPrE25LAb/PDqTY+ho64Xh2c8ZXgIKldchCFHczG2UVRcWA==", "dev": true, "requires": { - "flat-cache": "^2.0.1" + "flat-cache": "^3.0.4" } }, "file-uri-to-path": { @@ -26481,14 +26390,30 @@ } }, "flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "requires": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "dependencies": { + "flatted": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", + "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } } }, "flatted": { @@ -28741,9 +28666,9 @@ } }, "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "lodash._reinterpolate": { @@ -30762,6 +30687,12 @@ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true + }, "require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", @@ -31054,20 +30985,38 @@ "dev": true }, "slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" }, "dependencies": { - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true } } @@ -32259,54 +32208,40 @@ } }, "table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", + "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==", "dev": true, "requires": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" + "ajv": "^7.0.2", + "lodash": "^4.17.20", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0" }, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "ajv": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.1.0.tgz", + "integrity": "sha512-svS9uILze/cXbH0z2myCK2Brqprx/+JJYK5pHicT/GQiBfzzhUVAIT6MwqJg8y4xV/zoGsUeuPuwtoiKSGE15g==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" } }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true } } }, @@ -33991,15 +33926,6 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, - "write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, - "requires": { - "mkdirp": "^0.5.1" - } - }, "write-file-atomic": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", diff --git a/package.json b/package.json index 10bfd0e..e535463 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "@types/lodash.shuffle": "4.2.6", "@types/mathjs": "6.0.5", "@types/mocha": "8.0.3", - "@typescript-eslint/eslint-plugin": "4.2.0", + "@typescript-eslint/eslint-plugin": "4.15.1", "babel-loader": "8.1.0", "benchmark": "2.1.4", "chai": "4.2.0", @@ -42,13 +42,12 @@ "core-js": "3.6.5", "cross-env": "7.0.3", "editorconfig-checker": "3.2.0", - "eslint": "7.9.0", - "eslint-config-standard-with-typescript": "19.0.1", - "eslint-plugin-import": "2.22.0", - "eslint-plugin-markdown": "2.0.0-rc.0", + "eslint": "7.20.0", + "eslint-config-standard-with-typescript": "20.0.0", + "eslint-plugin-import": "2.22.1", + "eslint-plugin-markdown": "2.0.0", "eslint-plugin-node": "11.1.0", "eslint-plugin-promise": "4.3.1", - "eslint-plugin-standard": "4.0.1", "faker": "5.4.0", "globby": "11.0.2", "husky": "5.0.9", diff --git a/src/package/h.ts b/src/package/h.ts index b53a85a..0eb7296 100644 --- a/src/package/h.ts +++ b/src/package/h.ts @@ -23,10 +23,10 @@ export function h (sel: string, data: VNodeData | null): VNode export function h (sel: string, children: VNodeChildren): VNode export function h (sel: string, data: VNodeData | null, children: VNodeChildren): VNode export function h (sel: any, b?: any, c?: any): VNode { - var data: VNodeData = {} - var children: any - var text: any - var i: number + let data: VNodeData = {} + let children: any + let text: any + let i: number if (c !== undefined) { if (b !== null) { data = b diff --git a/src/package/modules/attributes.ts b/src/package/modules/attributes.ts index ecd80fa..19a66c9 100755 --- a/src/package/modules/attributes.ts +++ b/src/package/modules/attributes.ts @@ -9,10 +9,10 @@ const colonChar = 58 const xChar = 120 function updateAttrs (oldVnode: VNode, vnode: VNode): void { - var key: string - var elm: Element = vnode.elm as Element - var oldAttrs = (oldVnode.data as VNodeData).attrs - var attrs = (vnode.data as VNodeData).attrs + let key: string + const elm: Element = vnode.elm as Element + let oldAttrs = (oldVnode.data as VNodeData).attrs + let attrs = (vnode.data as VNodeData).attrs if (!oldAttrs && !attrs) return if (oldAttrs === attrs) return diff --git a/src/package/modules/class.ts b/src/package/modules/class.ts index 68e91e6..566d64e 100755 --- a/src/package/modules/class.ts +++ b/src/package/modules/class.ts @@ -4,11 +4,11 @@ import { Module } from './module' export type Classes = Record function updateClass (oldVnode: VNode, vnode: VNode): void { - var cur: any - var name: string - var elm: Element = vnode.elm as Element - var oldClass = (oldVnode.data as VNodeData).class - var klass = (vnode.data as VNodeData).class + let cur: any + let name: string + const elm: Element = vnode.elm as Element + let oldClass = (oldVnode.data as VNodeData).class + let klass = (vnode.data as VNodeData).class if (!oldClass && !klass) return if (oldClass === klass) return diff --git a/src/package/modules/eventlisteners.ts b/src/package/modules/eventlisteners.ts index e2e1bba..42e3b59 100755 --- a/src/package/modules/eventlisteners.ts +++ b/src/package/modules/eventlisteners.ts @@ -17,15 +17,15 @@ function invokeHandler (handler: SomeListen handler.call(vnode, event, vnode) } else if (typeof handler === 'object') { // call multiple handlers - for (var i = 0; i < handler.length; i++) { + for (let i = 0; i < handler.length; i++) { invokeHandler(handler[i], vnode, event) } } } function handleEvent (event: Event, vnode: VNode) { - var name = event.type - var on = (vnode.data as VNodeData).on + const name = event.type + const on = (vnode.data as VNodeData).on // call event handler(s) if exists if (on && on[name]) { @@ -40,12 +40,12 @@ function createListener () { } function updateEventListeners (oldVnode: VNode, vnode?: VNode): void { - var oldOn = (oldVnode.data as VNodeData).on - var oldListener = (oldVnode as any).listener - var oldElm: Element = oldVnode.elm as Element - var on = vnode && (vnode.data as VNodeData).on - var elm: Element = (vnode && vnode.elm) as Element - var name: string + const oldOn = (oldVnode.data as VNodeData).on + const oldListener = (oldVnode as any).listener + const oldElm: Element = oldVnode.elm as Element + const on = vnode && (vnode.data as VNodeData).on + const elm: Element = (vnode && vnode.elm) as Element + let name: string // optimization for reused immutable handlers if (oldOn === on) { @@ -73,7 +73,7 @@ function updateEventListeners (oldVnode: VNode, vnode?: VNode): void { // add new listeners which has not already attached if (on) { // reuse existing listener or create new - var listener = (vnode as any).listener = (oldVnode as any).listener || createListener() + const listener = (vnode as any).listener = (oldVnode as any).listener || createListener() // update vnode for listener listener.vnode = vnode diff --git a/src/package/modules/hero.ts b/src/package/modules/hero.ts index 15f5f1f..93adf6b 100755 --- a/src/package/modules/hero.ts +++ b/src/package/modules/hero.ts @@ -3,8 +3,8 @@ import { Module } from './module' export type Hero = { id: string } -var raf = (typeof window !== 'undefined' && window.requestAnimationFrame) || setTimeout -var nextFrame = function (fn: any) { +const raf = (typeof window !== 'undefined' && window.requestAnimationFrame) || setTimeout +const nextFrame = function (fn: any) { raf(function () { raf(fn) }) @@ -17,9 +17,9 @@ function setNextFrame (obj: any, prop: string, val: any): void { } function getTextNodeRect (textNode: Text): ClientRect | undefined { - var rect: ClientRect | undefined + let rect: ClientRect | undefined if (document.createRange) { - var range = document.createRange() + const range = document.createRange() range.selectNodeContents(textNode) if (range.getBoundingClientRect) { rect = range.getBoundingClientRect() @@ -36,8 +36,8 @@ function calcTransformOrigin ( if (isTextNode) { if (textRect) { // calculate pixels to center of text from left edge of bounding box - var relativeCenterX = textRect.left + textRect.width / 2 - boundingRect.left - var relativeCenterY = textRect.top + textRect.height / 2 - boundingRect.top + const relativeCenterX = textRect.left + textRect.width / 2 - boundingRect.left + const relativeCenterY = textRect.top + textRect.height / 2 - boundingRect.top return relativeCenterX + 'px ' + relativeCenterY + 'px' } } @@ -67,7 +67,7 @@ function isTextElement (elm: Element | Text): elm is Text { return elm.childNodes.length === 1 && elm.childNodes[0].nodeType === 3 } -var removed: any, created: any +let removed: any, created: any function pre () { removed = {} @@ -75,7 +75,7 @@ function pre () { } function create (oldVnode: VNode, vnode: VNode): void { - var hero = (vnode.data as VNodeData).hero + const hero = (vnode.data as VNodeData).hero if (hero && hero.id) { created.push(hero.id) created.push(vnode) @@ -83,20 +83,20 @@ function create (oldVnode: VNode, vnode: VNode): void { } function destroy (vnode: VNode): void { - var hero = (vnode.data as VNodeData).hero + const hero = (vnode.data as VNodeData).hero if (hero && hero.id) { - var elm = vnode.elm; + const elm = vnode.elm; (vnode as any).isTextNode = isTextElement(elm as Element | Text); // is this a text node? (vnode as any).boundingRect = (elm as Element).getBoundingClientRect(); // save the bounding rectangle to a new property on the vnode (vnode as any).textRect = (vnode as any).isTextNode ? getTextNodeRect((elm as Element).childNodes[0] as Text) : null // save bounding rect of inner text node - var computedStyle = window.getComputedStyle(elm as Element, undefined); // get current styles (includes inherited properties) + const computedStyle = window.getComputedStyle(elm as Element, undefined); // get current styles (includes inherited properties) (vnode as any).savedStyle = JSON.parse(JSON.stringify(computedStyle)) // save a copy of computed style values removed[hero.id] = vnode } } function post () { - var i: number, id: any, newElm: Element, oldVnode: VNode, oldElm: Element, + let i: number, id: any, newElm: Element, oldVnode: VNode, oldElm: Element, hRatio: number, wRatio: number, oldRect: ClientRect, newRect: ClientRect, dx: number, dy: number, origTransform: string | null, origTransition: string | null, @@ -146,11 +146,11 @@ function post () { setNextFrame(newStyle, 'transform', origTransform) setNextFrame(newStyle, 'opacity', '1') // Animate old element - for (var key in (oldVnode as any).savedStyle) { // re-apply saved inherited properties + for (const key in (oldVnode as any).savedStyle) { // re-apply saved inherited properties if (String(parseInt(key)) !== key) { - var ms = key.substring(0, 2) === 'ms' - var moz = key.substring(0, 3) === 'moz' - var webkit = key.substring(0, 6) === 'webkit' + const ms = key.substring(0, 2) === 'ms' + const moz = key.substring(0, 3) === 'moz' + const webkit = key.substring(0, 6) === 'webkit' if (!ms && !moz && !webkit) { // ignore prefixed style properties (oldStyle as any)[key] = (oldVnode as any).savedStyle[key] diff --git a/src/package/modules/props.ts b/src/package/modules/props.ts index c9a517a..ac01d24 100755 --- a/src/package/modules/props.ts +++ b/src/package/modules/props.ts @@ -4,12 +4,12 @@ import { Module } from './module' export type Props = Record function updateProps (oldVnode: VNode, vnode: VNode): void { - var key: string - var cur: any - var old: any - var elm = vnode.elm - var oldProps = (oldVnode.data as VNodeData).props - var props = (vnode.data as VNodeData).props + let key: string + let cur: any + let old: any + const elm = vnode.elm + let oldProps = (oldVnode.data as VNodeData).props + let props = (vnode.data as VNodeData).props if (!oldProps && !props) return if (oldProps === props) return diff --git a/src/package/modules/style.ts b/src/package/modules/style.ts index 550e25f..35b6120 100755 --- a/src/package/modules/style.ts +++ b/src/package/modules/style.ts @@ -7,13 +7,13 @@ export type VNodeStyle = Record & { } // Bindig `requestAnimationFrame` like this fixes a bug in IE/Edge. See #360 and #409. -var raf = (typeof window !== 'undefined' && (window.requestAnimationFrame).bind(window)) || setTimeout -var nextFrame = function (fn: any) { +const raf = (typeof window !== 'undefined' && (window.requestAnimationFrame).bind(window)) || setTimeout +const nextFrame = function (fn: any) { raf(function () { raf(fn) }) } -var reflowForced = false +let reflowForced = false function setNextFrame (obj: any, prop: string, val: any): void { nextFrame(function () { @@ -22,17 +22,17 @@ function setNextFrame (obj: any, prop: string, val: any): void { } function updateStyle (oldVnode: VNode, vnode: VNode): void { - var cur: any - var name: string - var elm = vnode.elm - var oldStyle = (oldVnode.data as VNodeData).style - var style = (vnode.data as VNodeData).style + let cur: any + let name: string + const elm = vnode.elm + let oldStyle = (oldVnode.data as VNodeData).style + let style = (vnode.data as VNodeData).style if (!oldStyle && !style) return if (oldStyle === style) return oldStyle = oldStyle || {} style = style || {} - var oldHasDel = 'delayed' in oldStyle + const oldHasDel = 'delayed' in oldStyle for (name in oldStyle) { if (!style[name]) { @@ -63,10 +63,10 @@ function updateStyle (oldVnode: VNode, vnode: VNode): void { } function applyDestroyStyle (vnode: VNode): void { - var style: any - var name: string - var elm = vnode.elm - var s = (vnode.data as VNodeData).style + let style: any + let name: string + const elm = vnode.elm + const s = (vnode.data as VNodeData).style if (!s || !(style = s.destroy)) return for (name in style) { (elm as any).style[name] = style[name] @@ -74,7 +74,7 @@ function applyDestroyStyle (vnode: VNode): void { } function applyRemoveStyle (vnode: VNode, rm: () => void): void { - var s = (vnode.data as VNodeData).style + const s = (vnode.data as VNodeData).style if (!s || !s.remove) { rm() return @@ -84,19 +84,18 @@ function applyRemoveStyle (vnode: VNode, rm: () => void): void { (vnode.elm as any).offsetLeft reflowForced = true } - var name: string - var elm = vnode.elm - var i = 0 - var compStyle: CSSStyleDeclaration - var style = s.remove - var amount = 0 - var applied: string[] = [] + let name: string + const elm = vnode.elm + let i = 0 + const style = s.remove + let amount = 0 + const applied: string[] = [] for (name in style) { applied.push(name); (elm as any).style[name] = style[name] } - compStyle = getComputedStyle(elm as Element) - var props = (compStyle as any)['transition-property'].split(', ') + const compStyle = getComputedStyle(elm as Element) + const props = (compStyle as any)['transition-property'].split(', ') for (; i < props.length; ++i) { if (applied.indexOf(props[i]) !== -1) amount++ } diff --git a/src/package/ts-transform-js-extension.cjs b/src/package/ts-transform-js-extension.cjs index f49b9d7..8e4769c 100644 --- a/src/package/ts-transform-js-extension.cjs +++ b/src/package/ts-transform-js-extension.cjs @@ -8,12 +8,12 @@ module.exports.transform = (ctx) => (sf) => ts.visitNode(sf, (node) => { node.moduleSpecifier ? node.moduleSpecifier.getText(sf).slice(1, -1) : ( - ts.isImportTypeNode(node) && + ts.isImportTypeNode(node) && ts.isLiteralTypeNode(node.argument) && ts.isStringLiteral(node.argument.literal) - ) - ? node.argument.literal.text - : null + ) + ? node.argument.literal.text + : null if (originalPath === null) return node const pathWithExtension = originalPath.endsWith('.js') diff --git a/src/test/unit/attachto.ts b/src/test/unit/attachto.ts index a2cd553..64cd4a0 100644 --- a/src/test/unit/attachto.ts +++ b/src/test/unit/attachto.ts @@ -4,16 +4,16 @@ import { RemoveHook } from '../../package/hooks' import { attachTo } from '../../package/helpers/attachto' import { h } from '../../package/h' -var patch = init([]) +const patch = init([]) describe('attachTo', function () { - var elm: any, vnode0: any + let elm: any, vnode0: any beforeEach(function () { elm = document.createElement('div') vnode0 = elm }) it('adds element to target', function () { - var vnode1 = h('div', [ + const vnode1 = h('div', [ h('div#wrapper', [ h('div', 'Some element'), attachTo(elm, h('div#attached', 'Test')), @@ -23,13 +23,13 @@ describe('attachTo', function () { assert.strictEqual(elm.children.length, 2) }) it('updates element at target', function () { - var vnode1 = h('div', [ + const vnode1 = h('div', [ h('div#wrapper', [ h('div', 'Some element'), attachTo(elm, h('div#attached', 'First text')), ]), ]) - var vnode2 = h('div', [ + const vnode2 = h('div', [ h('div#wrapper', [ h('div', 'Some element'), attachTo(elm, h('div#attached', 'New text')), @@ -41,13 +41,13 @@ describe('attachTo', function () { assert.strictEqual(elm.children[0].innerHTML, 'New text') }) it('element can be inserted before modal', function () { - var vnode1 = h('div', [ + const vnode1 = h('div', [ h('div#wrapper', [ h('div', 'Some element'), attachTo(elm, h('div#attached', 'Text')), ]), ]) - var vnode2 = h('div', [ + const vnode2 = h('div', [ h('div#wrapper', [ h('div', 'Some element'), h('div', 'A new element'), @@ -60,13 +60,13 @@ describe('attachTo', function () { assert.strictEqual(elm.children[0].innerHTML, 'Text') }) it('removes element at target', function () { - var vnode1 = h('div', [ + const vnode1 = h('div', [ h('div#wrapper', [ h('div', 'Some element'), attachTo(elm, h('div#attached', 'First text')), ]), ]) - var vnode2 = h('div', [ + const vnode2 = h('div', [ h('div#wrapper', [ h('div', 'Some element'), ]), @@ -83,13 +83,13 @@ describe('attachTo', function () { assert.strictEqual(elm.innerHTML, 'First text') cb() } - var vnode1 = h('div', [ + const vnode1 = h('div', [ h('div#wrapper', [ h('div', 'Some element'), attachTo(elm, h('div#attached', { hook: { remove: rm } }, 'First text')), ]), ]) - var vnode2 = h('div', [ + const vnode2 = h('div', [ h('div#wrapper', [ h('div', 'Some element'), ]), diff --git a/src/test/unit/attributes.ts b/src/test/unit/attributes.ts index b5409dd..a712c87 100644 --- a/src/test/unit/attributes.ts +++ b/src/test/unit/attributes.ts @@ -3,18 +3,18 @@ import { init } from '../../package/init' import { attributesModule } from '../../package/modules/attributes' import { h } from '../../package/h' -var patch = init([ +const patch = init([ attributesModule ]) describe('attributes', function () { - var elm: any, vnode0: any + let elm: any, vnode0: any beforeEach(function () { elm = document.createElement('div') vnode0 = elm }) it('have their provided values', function () { - var vnode1 = h('div', { attrs: { href: '/foo', minlength: 1, selected: true, disabled: false } }) + const vnode1 = h('div', { attrs: { href: '/foo', minlength: 1, selected: true, disabled: false } }) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.getAttribute('href'), '/foo') assert.strictEqual(elm.getAttribute('minlength'), '1') @@ -23,9 +23,9 @@ describe('attributes', function () { assert.strictEqual(elm.hasAttribute('disabled'), false) }) it('can be memoized', function () { - var cachedAttrs = { href: '/foo', minlength: 1, selected: true } - var vnode1 = h('div', { attrs: cachedAttrs }) - var vnode2 = h('div', { attrs: cachedAttrs }) + const cachedAttrs = { href: '/foo', minlength: 1, selected: true } + const vnode1 = h('div', { attrs: cachedAttrs }) + const vnode2 = h('div', { attrs: cachedAttrs }) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.getAttribute('href'), '/foo') assert.strictEqual(elm.getAttribute('minlength'), '1') @@ -36,7 +36,7 @@ describe('attributes', function () { assert.strictEqual(elm.getAttribute('selected'), '') }) it('are not omitted when falsy values are provided', function () { - var vnode1 = h('div', { attrs: { href: null as any, minlength: 0, value: '', title: 'undefined' } }) + const vnode1 = h('div', { attrs: { href: null as any, minlength: 0, value: '', title: 'undefined' } }) elm = patch(vnode0, vnode1).elm assert.ok(elm.hasAttribute('href')) assert.ok(elm.hasAttribute('minlength')) @@ -44,7 +44,7 @@ describe('attributes', function () { assert.ok(elm.hasAttribute('title')) }) it('are set correctly when namespaced', function () { - var vnode1 = h('div', { attrs: { 'xlink:href': '#foo' } }) + const vnode1 = h('div', { attrs: { 'xlink:href': '#foo' } }) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.getAttributeNS('http://www.w3.org/1999/xlink', 'href'), '#foo') }) @@ -53,7 +53,7 @@ describe('attributes', function () { elm.id = 'myId' elm.className = 'myClass' vnode0 = elm - var vnode1 = h('div#myId.myClass', { attrs: {} }, ['Hello']) + const vnode1 = h('div#myId.myClass', { attrs: {} }, ['Hello']) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.tagName, 'DIV') assert.strictEqual(elm.id, 'myId') @@ -62,7 +62,7 @@ describe('attributes', function () { }) describe('boolean attribute', function () { it('is present and empty string if the value is truthy', function () { - var vnode1 = h('div', { attrs: { required: true, readonly: 1, noresize: 'truthy' } }) + const vnode1 = h('div', { attrs: { required: true, readonly: 1, noresize: 'truthy' } }) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.hasAttribute('required'), true) assert.strictEqual(elm.getAttribute('required'), '') @@ -72,13 +72,13 @@ describe('attributes', function () { assert.strictEqual(elm.getAttribute('noresize'), 'truthy') }) it('is omitted if the value is false', function () { - var vnode1 = h('div', { attrs: { required: false } }) + const vnode1 = h('div', { attrs: { required: false } }) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.hasAttribute('required'), false) assert.strictEqual(elm.getAttribute('required'), null) }) it('is not omitted if the value is falsy', function () { - var vnode1 = h('div', { attrs: { readonly: 0, noresize: null as any } }) + const vnode1 = h('div', { attrs: { readonly: 0, noresize: null as any } }) elm = patch(vnode0, vnode1).elm assert.ok(elm.hasAttribute('readonly')) assert.ok(elm.hasAttribute('noresize')) @@ -86,11 +86,11 @@ describe('attributes', function () { }) describe('Object.prototype property', function () { it('is not considered as a boolean attribute and shouldn\'t be omitted', function () { - var vnode1 = h('div', { attrs: { constructor: true } }) + const vnode1 = h('div', { attrs: { constructor: true } }) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.hasAttribute('constructor'), true) assert.strictEqual(elm.getAttribute('constructor'), '') - var vnode2 = h('div', { attrs: { constructor: false } }) + const vnode2 = h('div', { attrs: { constructor: false } }) elm = patch(vnode0, vnode2).elm assert.strictEqual(elm.hasAttribute('constructor'), false) }) diff --git a/src/test/unit/core.ts b/src/test/unit/core.ts index 6b02da4..e16f23f 100644 --- a/src/test/unit/core.ts +++ b/src/test/unit/core.ts @@ -14,7 +14,7 @@ import { CreateHook, InsertHook, PrePatchHook, RemoveHook, InitHook, DestroyHook const hasSvgClassList = 'classList' in SVGElement.prototype -var patch = init([ +const patch = init([ classModule, propsModule, eventListenersModule @@ -27,17 +27,17 @@ function prop (name: string) { } function map (fn: any, list: any[]) { - var ret = [] - for (var i = 0; i < list.length; ++i) { + const ret = [] + for (let i = 0; i < list.length; ++i) { ret[i] = fn(list[i]) } return ret } -var inner = prop('innerHTML') +const inner = prop('innerHTML') describe('snabbdom', function () { - var elm: any, vnode0: any + let elm: any, vnode0: any beforeEach(function () { elm = document.createElement('div') vnode0 = elm @@ -48,46 +48,46 @@ describe('snabbdom', function () { assert.strictEqual(h('a').sel, 'a') }) it('can create vnode with children', function () { - var vnode = h('div', [h('span#hello'), h('b.world')]) + const vnode = h('div', [h('span#hello'), h('b.world')]) assert.strictEqual(vnode.sel, 'div') const children = vnode.children as [VNode, VNode] assert.strictEqual(children[0].sel, 'span#hello') assert.strictEqual(children[1].sel, 'b.world') }) it('can create vnode with one child vnode', function () { - var vnode = h('div', h('span#hello')) + const vnode = h('div', h('span#hello')) assert.strictEqual(vnode.sel, 'div') const children = vnode.children as [VNode] assert.strictEqual(children[0].sel, 'span#hello') }) it('can create vnode with props and one child vnode', function () { - var vnode = h('div', {}, h('span#hello')) + const vnode = h('div', {}, h('span#hello')) assert.strictEqual(vnode.sel, 'div') const children = vnode.children as [VNode] assert.strictEqual(children[0].sel, 'span#hello') }) it('can create vnode with text content', function () { - var vnode = h('a', ['I am a string']) + const vnode = h('a', ['I am a string']) const children = vnode.children as [VNode] assert.strictEqual(children[0].text, 'I am a string') }) it('can create vnode with text content in string', function () { - var vnode = h('a', 'I am a string') + const vnode = h('a', 'I am a string') assert.strictEqual(vnode.text, 'I am a string') }) it('can create vnode with props and text content in string', function () { - var vnode = h('a', {}, 'I am a string') + const vnode = h('a', {}, 'I am a string') assert.strictEqual(vnode.text, 'I am a string') }) it('can create vnode with null props', function () { - var vnode = h('a', null) + let vnode = h('a', null) assert.deepEqual(vnode.data, {}) vnode = h('a', null, ['I am a string']) const children = vnode.children as [VNode] assert.strictEqual(children[0].text, 'I am a string') }) it('can create vnode for comment', function () { - var vnode = h('!', 'test') + const vnode = h('!', 'test') assert.strictEqual(vnode.sel, '!') assert.strictEqual(vnode.text, 'test') }) @@ -98,9 +98,9 @@ describe('snabbdom', function () { assert.strictEqual(elm.tagName, 'DIV') }) it('has different tag and id', function () { - var elm = document.createElement('div') + const elm = document.createElement('div') vnode0.appendChild(elm) - var vnode1 = h('span#id') + const vnode1 = h('span#id') const patched = patch(elm, vnode1).elm as HTMLSpanElement assert.strictEqual(patched.tagName, 'SPAN') assert.strictEqual(patched.id, 'id') @@ -110,8 +110,8 @@ describe('snabbdom', function () { assert.strictEqual(elm.firstChild.id, 'unique') }) it('has correct namespace', function () { - var SVGNamespace = 'http://www.w3.org/2000/svg' - var XHTMLNamespace = 'http://www.w3.org/1999/xhtml' + const SVGNamespace = 'http://www.w3.org/2000/svg' + const XHTMLNamespace = 'http://www.w3.org/1999/xhtml' elm = patch(vnode0, h('div', [h('div', { ns: SVGNamespace })])).elm assert.strictEqual(elm.firstChild.namespaceURI, SVGNamespace) @@ -196,7 +196,7 @@ describe('snabbdom', function () { }) it('can create an element created inside an iframe', function (done) { // Only run if srcdoc is supported. - var frame = document.createElement('iframe') + const frame = document.createElement('iframe') if (typeof frame.srcdoc !== 'undefined') { frame.srcdoc = '
Thing 1
' frame.onload = function () { @@ -213,10 +213,10 @@ describe('snabbdom', function () { } }) it('is a patch of the root element', function () { - var elmWithIdAndClass = document.createElement('div') + const elmWithIdAndClass = document.createElement('div') elmWithIdAndClass.id = 'id' elmWithIdAndClass.className = 'class' - var vnode1 = h('div#id.class', [h('span', 'Hi')]) + const vnode1 = h('div#id.class', [h('span', 'Hi')]) elm = patch(elmWithIdAndClass, vnode1).elm assert.strictEqual(elm, elmWithIdAndClass) assert.strictEqual(elm.tagName, 'DIV') @@ -231,8 +231,8 @@ describe('snabbdom', function () { }) describe('patching an element', function () { it('changes the elements classes', function () { - var vnode1 = h('i', { class: { i: true, am: true, horse: true } }) - var vnode2 = h('i', { class: { i: true, am: true, horse: false } }) + const vnode1 = h('i', { class: { i: true, am: true, horse: true } }) + const vnode2 = h('i', { class: { i: true, am: true, horse: false } }) patch(vnode0, vnode1) elm = patch(vnode1, vnode2).elm assert(elm.classList.contains('i')) @@ -240,8 +240,8 @@ describe('snabbdom', function () { assert(!elm.classList.contains('horse')) }) it('changes classes in selector', function () { - var vnode1 = h('i', { class: { i: true, am: true, horse: true } }) - var vnode2 = h('i', { class: { i: true, am: true, horse: false } }) + const vnode1 = h('i', { class: { i: true, am: true, horse: true } }) + const vnode2 = h('i', { class: { i: true, am: true, horse: false } }) patch(vnode0, vnode1) elm = patch(vnode1, vnode2).elm assert(elm.classList.contains('i')) @@ -249,9 +249,9 @@ describe('snabbdom', function () { assert(!elm.classList.contains('horse')) }) it('preserves memoized classes', function () { - var cachedClass = { i: true, am: true, horse: false } - var vnode1 = h('i', { class: cachedClass }) - var vnode2 = h('i', { class: cachedClass }) + const cachedClass = { i: true, am: true, horse: false } + const vnode1 = h('i', { class: cachedClass }) + const vnode2 = h('i', { class: cachedClass }) elm = patch(vnode0, vnode1).elm assert(elm.classList.contains('i')) assert(elm.classList.contains('am')) @@ -262,8 +262,8 @@ describe('snabbdom', function () { assert(!elm.classList.contains('horse')) }) it('removes missing classes', function () { - var vnode1 = h('i', { class: { i: true, am: true, horse: true } }) - var vnode2 = h('i', { class: { i: true, am: true } }) + const vnode1 = h('i', { class: { i: true, am: true, horse: true } }) + const vnode2 = h('i', { class: { i: true, am: true } }) patch(vnode0, vnode1) elm = patch(vnode1, vnode2).elm assert(elm.classList.contains('i')) @@ -271,73 +271,73 @@ describe('snabbdom', function () { assert(!elm.classList.contains('horse')) }) it('changes an elements props', function () { - var vnode1 = h('a', { props: { src: 'http://other/' } }) - var vnode2 = h('a', { props: { src: 'http://localhost/' } }) + const vnode1 = h('a', { props: { src: 'http://other/' } }) + const vnode2 = h('a', { props: { src: 'http://localhost/' } }) patch(vnode0, vnode1) elm = patch(vnode1, vnode2).elm assert.strictEqual(elm.src, 'http://localhost/') }) it('can set prop value to `0`', function () { - var patch = init([propsModule, styleModule]) - var view = (scrollTop: number) => h('div', + const patch = init([propsModule, styleModule]) + const view = (scrollTop: number) => h('div', { style: { height: '100px', overflowY: 'scroll' }, props: { scrollTop }, }, [h('div', { style: { height: '200px' } })] ) - var vnode1 = view(0) - var mountPoint = document.body.appendChild(document.createElement('div')) - var { elm } = patch(mountPoint, vnode1) + const vnode1 = view(0) + const mountPoint = document.body.appendChild(document.createElement('div')) + const { elm } = patch(mountPoint, vnode1) if (!(elm instanceof HTMLDivElement)) throw new Error() assert.strictEqual(elm.scrollTop, 0) - var vnode2 = view(20) + const vnode2 = view(20) patch(vnode1, vnode2) assert.isAtLeast(elm.scrollTop, 18) assert.isAtMost(elm.scrollTop, 20) - var vnode3 = view(0) + const vnode3 = view(0) patch(vnode2, vnode3) assert.strictEqual(elm.scrollTop, 0) document.body.removeChild(mountPoint) }) it('can set prop value to empty string', function () { - var vnode1 = h('p', { props: { textContent: 'foo' } }) - var { elm } = patch(vnode0, vnode1) + const vnode1 = h('p', { props: { textContent: 'foo' } }) + const { elm } = patch(vnode0, vnode1) if (!(elm instanceof HTMLParagraphElement)) throw new Error() assert.strictEqual(elm.textContent, 'foo') - var vnode2 = h('p', { props: { textContent: '' } }) + const vnode2 = h('p', { props: { textContent: '' } }) patch(vnode1, vnode2) assert.strictEqual(elm.textContent, '') }) it('preserves memoized props', function () { - var cachedProps = { src: 'http://other/' } - var vnode1 = h('a', { props: cachedProps }) - var vnode2 = h('a', { props: cachedProps }) + const cachedProps = { src: 'http://other/' } + const vnode1 = h('a', { props: cachedProps }) + const vnode2 = h('a', { props: cachedProps }) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.src, 'http://other/') elm = patch(vnode1, vnode2).elm assert.strictEqual(elm.src, 'http://other/') }) it('removes custom props', function () { - var vnode1 = h('a', { props: { src: 'http://other/' } }) - var vnode2 = h('a') + const vnode1 = h('a', { props: { src: 'http://other/' } }) + const vnode2 = h('a') patch(vnode0, vnode1) patch(vnode1, vnode2) assert.strictEqual(elm.src, undefined) }) it('cannot remove native props', function () { - var vnode1 = h('a', { props: { href: 'http://example.com/' } }) - var vnode2 = h('a') - var { elm: elm1 } = patch(vnode0, vnode1) + const vnode1 = h('a', { props: { href: 'http://example.com/' } }) + const vnode2 = h('a') + const { elm: elm1 } = patch(vnode0, vnode1) if (!(elm1 instanceof HTMLAnchorElement)) throw new Error() assert.strictEqual(elm1.href, 'http://example.com/') - var { elm: elm2 } = patch(vnode1, vnode2) + const { elm: elm2 } = patch(vnode1, vnode2) if (!(elm2 instanceof HTMLAnchorElement)) throw new Error() assert.strictEqual(elm2.href, 'http://example.com/') }) it('does not delete custom props', function () { - var vnode1 = h('p', { props: { a: 'foo' } }) - var vnode2 = h('p') + const vnode1 = h('p', { props: { a: 'foo' } }) + const vnode2 = h('p') const { elm } = patch(vnode0, vnode1) if (!(elm instanceof HTMLParagraphElement)) throw new Error() assert.strictEqual((elm as any).a, 'foo') @@ -346,13 +346,13 @@ describe('snabbdom', function () { }) describe('using toVNode()', function () { it('can remove previous children of the root element', function () { - var h2 = document.createElement('h2') + const h2 = document.createElement('h2') h2.textContent = 'Hello' - var prevElm = document.createElement('div') + const prevElm = document.createElement('div') prevElm.id = 'id' prevElm.className = 'class' prevElm.appendChild(h2) - var nextVNode = h('div#id.class', [h('span', 'Hi')]) + const nextVNode = h('div#id.class', [h('span', 'Hi')]) elm = patch(toVNode(prevElm), nextVNode).elm assert.strictEqual(elm, prevElm) assert.strictEqual(elm.tagName, 'DIV') @@ -363,8 +363,8 @@ describe('snabbdom', function () { assert.strictEqual(elm.childNodes[0].textContent, 'Hi') }) it('can support patching in a DocumentFragment', function () { - var prevElm = document.createDocumentFragment() - var nextVNode = vnode('', {}, [ + const prevElm = document.createDocumentFragment() + const nextVNode = vnode('', {}, [ h('div#id.class', [h('span', 'Hi')]) ], undefined, prevElm as any) elm = patch(toVNode(prevElm), nextVNode).elm @@ -379,17 +379,17 @@ describe('snabbdom', function () { assert.strictEqual(elm.childNodes[0].childNodes[0].textContent, 'Hi') }) it('can remove some children of the root element', function () { - var h2 = document.createElement('h2') + const h2 = document.createElement('h2') h2.textContent = 'Hello' - var prevElm = document.createElement('div') + const prevElm = document.createElement('div') prevElm.id = 'id' prevElm.className = 'class' - var text = document.createTextNode('Foobar') + const text = document.createTextNode('Foobar') const reference = {}; (text as any).testProperty = reference // ensures we dont recreate the Text Node prevElm.appendChild(text) prevElm.appendChild(h2) - var nextVNode = h('div#id.class', ['Foobar']) + const nextVNode = h('div#id.class', ['Foobar']) elm = patch(toVNode(prevElm), nextVNode).elm assert.strictEqual(elm, prevElm) assert.strictEqual(elm.tagName, 'DIV') @@ -401,15 +401,15 @@ describe('snabbdom', function () { assert.strictEqual(elm.childNodes[0].testProperty, reference) }) it('can remove text elements', function () { - var h2 = document.createElement('h2') + const h2 = document.createElement('h2') h2.textContent = 'Hello' - var prevElm = document.createElement('div') + const prevElm = document.createElement('div') prevElm.id = 'id' prevElm.className = 'class' - var text = document.createTextNode('Foobar') + const text = document.createTextNode('Foobar') prevElm.appendChild(text) prevElm.appendChild(h2) - var nextVNode = h('div#id.class', [h('h2', 'Hello')]) + const nextVNode = h('div#id.class', [h('h2', 'Hello')]) elm = patch(toVNode(prevElm), nextVNode).elm assert.strictEqual(elm, prevElm) assert.strictEqual(elm.tagName, 'DIV') @@ -420,21 +420,21 @@ describe('snabbdom', function () { assert.strictEqual(elm.childNodes[0].textContent, 'Hello') }) it('can work with domApi', function () { - var domApi = { + const domApi = { ...htmlDomApi, tagName: function (elm: Element) { return 'x-' + elm.tagName.toUpperCase() } } - var h2 = document.createElement('h2') + const h2 = document.createElement('h2') h2.id = 'hx' h2.setAttribute('data-env', 'xyz') - var text = document.createTextNode('Foobar') - var elm = document.createElement('div') + const text = document.createTextNode('Foobar') + const elm = document.createElement('div') elm.id = 'id' elm.className = 'class other' elm.setAttribute('data', 'value') elm.appendChild(h2) elm.appendChild(text) - var vnode = toVNode(elm, domApi) + const vnode = toVNode(elm, domApi) assert.strictEqual(vnode.sel, 'x-div#id.class.other') assert.deepEqual(vnode.data, { attrs: { data: 'value' } }) const children = vnode.children as [VNode, VNode] @@ -455,8 +455,8 @@ describe('snabbdom', function () { } describe('addition of elements', function () { it('appends elements', function () { - var vnode1 = h('span', [1].map(spanNum)) - var vnode2 = h('span', [1, 2, 3].map(spanNum)) + const vnode1 = h('span', [1].map(spanNum)) + const vnode2 = h('span', [1, 2, 3].map(spanNum)) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.children.length, 1) elm = patch(vnode1, vnode2).elm @@ -465,16 +465,16 @@ describe('snabbdom', function () { assert.strictEqual(elm.children[2].innerHTML, '3') }) it('prepends elements', function () { - var vnode1 = h('span', [4, 5].map(spanNum)) - var vnode2 = h('span', [1, 2, 3, 4, 5].map(spanNum)) + const vnode1 = h('span', [4, 5].map(spanNum)) + const vnode2 = h('span', [1, 2, 3, 4, 5].map(spanNum)) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.children.length, 2) elm = patch(vnode1, vnode2).elm assert.deepEqual(map(inner, elm.children), ['1', '2', '3', '4', '5']) }) it('add elements in the middle', function () { - var vnode1 = h('span', [1, 2, 4, 5].map(spanNum)) - var vnode2 = h('span', [1, 2, 3, 4, 5].map(spanNum)) + const vnode1 = h('span', [1, 2, 4, 5].map(spanNum)) + const vnode2 = h('span', [1, 2, 3, 4, 5].map(spanNum)) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.children.length, 4) assert.strictEqual(elm.children.length, 4) @@ -482,32 +482,32 @@ describe('snabbdom', function () { assert.deepEqual(map(inner, elm.children), ['1', '2', '3', '4', '5']) }) it('add elements at begin and end', function () { - var vnode1 = h('span', [2, 3, 4].map(spanNum)) - var vnode2 = h('span', [1, 2, 3, 4, 5].map(spanNum)) + const vnode1 = h('span', [2, 3, 4].map(spanNum)) + const vnode2 = h('span', [1, 2, 3, 4, 5].map(spanNum)) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.children.length, 3) elm = patch(vnode1, vnode2).elm assert.deepEqual(map(inner, elm.children), ['1', '2', '3', '4', '5']) }) it('adds children to parent with no children', function () { - var vnode1 = h('span', { key: 'span' }) - var vnode2 = h('span', { key: 'span' }, [1, 2, 3].map(spanNum)) + const vnode1 = h('span', { key: 'span' }) + const vnode2 = h('span', { key: 'span' }, [1, 2, 3].map(spanNum)) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.children.length, 0) elm = patch(vnode1, vnode2).elm assert.deepEqual(map(inner, elm.children), ['1', '2', '3']) }) it('removes all children from parent', function () { - var vnode1 = h('span', { key: 'span' }, [1, 2, 3].map(spanNum)) - var vnode2 = h('span', { key: 'span' }) + const vnode1 = h('span', { key: 'span' }, [1, 2, 3].map(spanNum)) + const vnode2 = h('span', { key: 'span' }) elm = patch(vnode0, vnode1).elm assert.deepEqual(map(inner, elm.children), ['1', '2', '3']) elm = patch(vnode1, vnode2).elm assert.strictEqual(elm.children.length, 0) }) it('update one child with same key but different sel', function () { - var vnode1 = h('span', { key: 'span' }, [1, 2, 3].map(spanNum)) - var vnode2 = h('span', { key: 'span' }, [spanNum(1), h('i', { key: 2 }, '2'), spanNum(3)]) + const vnode1 = h('span', { key: 'span' }, [1, 2, 3].map(spanNum)) + const vnode2 = h('span', { key: 'span' }, [spanNum(1), h('i', { key: 2 }, '2'), spanNum(3)]) elm = patch(vnode0, vnode1).elm assert.deepEqual(map(inner, elm.children), ['1', '2', '3']) elm = patch(vnode1, vnode2).elm @@ -518,16 +518,16 @@ describe('snabbdom', function () { }) describe('removal of elements', function () { it('removes elements from the beginning', function () { - var vnode1 = h('span', [1, 2, 3, 4, 5].map(spanNum)) - var vnode2 = h('span', [3, 4, 5].map(spanNum)) + const vnode1 = h('span', [1, 2, 3, 4, 5].map(spanNum)) + const vnode2 = h('span', [3, 4, 5].map(spanNum)) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.children.length, 5) elm = patch(vnode1, vnode2).elm assert.deepEqual(map(inner, elm.children), ['3', '4', '5']) }) it('removes elements from the end', function () { - var vnode1 = h('span', [1, 2, 3, 4, 5].map(spanNum)) - var vnode2 = h('span', [1, 2, 3].map(spanNum)) + const vnode1 = h('span', [1, 2, 3, 4, 5].map(spanNum)) + const vnode2 = h('span', [1, 2, 3].map(spanNum)) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.children.length, 5) elm = patch(vnode1, vnode2).elm @@ -537,8 +537,8 @@ describe('snabbdom', function () { assert.strictEqual(elm.children[2].innerHTML, '3') }) it('removes elements from the middle', function () { - var vnode1 = h('span', [1, 2, 3, 4, 5].map(spanNum)) - var vnode2 = h('span', [1, 2, 4, 5].map(spanNum)) + const vnode1 = h('span', [1, 2, 3, 4, 5].map(spanNum)) + const vnode2 = h('span', [1, 2, 4, 5].map(spanNum)) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.children.length, 5) elm = patch(vnode1, vnode2).elm @@ -552,8 +552,8 @@ describe('snabbdom', function () { }) describe('element reordering', function () { it('moves element forward', function () { - var vnode1 = h('span', [1, 2, 3, 4].map(spanNum)) - var vnode2 = h('span', [2, 3, 1, 4].map(spanNum)) + const vnode1 = h('span', [1, 2, 3, 4].map(spanNum)) + const vnode2 = h('span', [2, 3, 1, 4].map(spanNum)) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.children.length, 4) elm = patch(vnode1, vnode2).elm @@ -564,8 +564,8 @@ describe('snabbdom', function () { assert.strictEqual(elm.children[3].innerHTML, '4') }) it('moves element to end', function () { - var vnode1 = h('span', [1, 2, 3].map(spanNum)) - var vnode2 = h('span', [2, 3, 1].map(spanNum)) + const vnode1 = h('span', [1, 2, 3].map(spanNum)) + const vnode2 = h('span', [2, 3, 1].map(spanNum)) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.children.length, 3) elm = patch(vnode1, vnode2).elm @@ -575,8 +575,8 @@ describe('snabbdom', function () { assert.strictEqual(elm.children[2].innerHTML, '1') }) it('moves element backwards', function () { - var vnode1 = h('span', [1, 2, 3, 4].map(spanNum)) - var vnode2 = h('span', [1, 4, 2, 3].map(spanNum)) + const vnode1 = h('span', [1, 2, 3, 4].map(spanNum)) + const vnode2 = h('span', [1, 4, 2, 3].map(spanNum)) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.children.length, 4) elm = patch(vnode1, vnode2).elm @@ -587,8 +587,8 @@ describe('snabbdom', function () { assert.strictEqual(elm.children[3].innerHTML, '3') }) it('swaps first and last', function () { - var vnode1 = h('span', [1, 2, 3, 4].map(spanNum)) - var vnode2 = h('span', [4, 2, 3, 1].map(spanNum)) + const vnode1 = h('span', [1, 2, 3, 4].map(spanNum)) + const vnode2 = h('span', [4, 2, 3, 1].map(spanNum)) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.children.length, 4) elm = patch(vnode1, vnode2).elm @@ -601,8 +601,8 @@ describe('snabbdom', function () { }) describe('combinations of additions, removals and reorderings', function () { it('move to left and replace', function () { - var vnode1 = h('span', [1, 2, 3, 4, 5].map(spanNum)) - var vnode2 = h('span', [4, 1, 2, 3, 6].map(spanNum)) + const vnode1 = h('span', [1, 2, 3, 4, 5].map(spanNum)) + const vnode2 = h('span', [4, 1, 2, 3, 6].map(spanNum)) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.children.length, 5) elm = patch(vnode1, vnode2).elm @@ -614,16 +614,16 @@ describe('snabbdom', function () { assert.strictEqual(elm.children[4].innerHTML, '6') }) it('moves to left and leaves hole', function () { - var vnode1 = h('span', [1, 4, 5].map(spanNum)) - var vnode2 = h('span', [4, 6].map(spanNum)) + const vnode1 = h('span', [1, 4, 5].map(spanNum)) + const vnode2 = h('span', [4, 6].map(spanNum)) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.children.length, 3) elm = patch(vnode1, vnode2).elm assert.deepEqual(map(inner, elm.children), ['4', '6']) }) it('handles moved and set to undefined element ending at the end', function () { - var vnode1 = h('span', [2, 4, 5].map(spanNum)) - var vnode2 = h('span', [4, 5, 3].map(spanNum)) + const vnode1 = h('span', [2, 4, 5].map(spanNum)) + const vnode2 = h('span', [4, 5, 3].map(spanNum)) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.children.length, 3) elm = patch(vnode1, vnode2).elm @@ -633,8 +633,8 @@ describe('snabbdom', function () { assert.strictEqual(elm.children[2].innerHTML, '3') }) it('moves a key in non-keyed nodes with a size up', function () { - var vnode1 = h('span', [1, 'a', 'b', 'c'].map(spanNum)) - var vnode2 = h('span', ['d', 'a', 'b', 'c', 1, 'e'].map(spanNum)) + const vnode1 = h('span', [1, 'a', 'b', 'c'].map(spanNum)) + const vnode2 = h('span', ['d', 'a', 'b', 'c', 1, 'e'].map(spanNum)) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.childNodes.length, 4) assert.strictEqual(elm.textContent, '1abc') @@ -644,28 +644,28 @@ describe('snabbdom', function () { }) }) it('reverses elements', function () { - var vnode1 = h('span', [1, 2, 3, 4, 5, 6, 7, 8].map(spanNum)) - var vnode2 = h('span', [8, 7, 6, 5, 4, 3, 2, 1].map(spanNum)) + const vnode1 = h('span', [1, 2, 3, 4, 5, 6, 7, 8].map(spanNum)) + const vnode2 = h('span', [8, 7, 6, 5, 4, 3, 2, 1].map(spanNum)) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.children.length, 8) elm = patch(vnode1, vnode2).elm assert.deepEqual(map(inner, elm.children), ['8', '7', '6', '5', '4', '3', '2', '1']) }) it('something', function () { - var vnode1 = h('span', [0, 1, 2, 3, 4, 5].map(spanNum)) - var vnode2 = h('span', [4, 3, 2, 1, 5, 0].map(spanNum)) + const vnode1 = h('span', [0, 1, 2, 3, 4, 5].map(spanNum)) + const vnode2 = h('span', [4, 3, 2, 1, 5, 0].map(spanNum)) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.children.length, 6) elm = patch(vnode1, vnode2).elm assert.deepEqual(map(inner, elm.children), ['4', '3', '2', '1', '5', '0']) }) it('handles random shuffles', function () { - var n - var i - var arr = [] - var opacities: string[] = [] - var elms = 14 - var samples = 5 + let n + let i + const arr = [] + const opacities: string[] = [] + const elms = 14 + const samples = 5 function spanNumWithOpacity (n: number, o: string) { return h('span', { key: n, style: { opacity: o } }, n.toString()) } @@ -673,17 +673,17 @@ describe('snabbdom', function () { arr[n] = n } for (n = 0; n < samples; ++n) { - var vnode1 = h('span', arr.map(function (n) { + const vnode1 = h('span', arr.map(function (n) { return spanNumWithOpacity(n, '1') })) - var shufArr = shuffle(arr.slice(0)) - var elm: HTMLDivElement | HTMLSpanElement = document.createElement('div') + const shufArr = shuffle(arr.slice(0)) + let elm: HTMLDivElement | HTMLSpanElement = document.createElement('div') elm = patch(elm, vnode1).elm as HTMLSpanElement for (i = 0; i < elms; ++i) { assert.strictEqual(elm.children[i].innerHTML, i.toString()) opacities[i] = Math.random().toFixed(5).toString() } - var vnode2 = h('span', arr.map(function (n) { + const vnode2 = h('span', arr.map(function (n) { return spanNumWithOpacity(shufArr[n], opacities[n]) })) elm = patch(vnode1, vnode2).elm as HTMLSpanElement @@ -695,17 +695,17 @@ describe('snabbdom', function () { } }) it('supports null/undefined children', function () { - var vnode1 = h('i', [0, 1, 2, 3, 4, 5].map(spanNum)) - var vnode2 = h('i', [null, 2, undefined, null, 1, 0, null, 5, 4, null, 3, undefined].map(spanNum)) + const vnode1 = h('i', [0, 1, 2, 3, 4, 5].map(spanNum)) + const vnode2 = h('i', [null, 2, undefined, null, 1, 0, null, 5, 4, null, 3, undefined].map(spanNum)) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.children.length, 6) elm = patch(vnode1, vnode2).elm assert.deepEqual(map(inner, elm.children), ['2', '1', '0', '5', '4', '3']) }) it('supports all null/undefined children', function () { - var vnode1 = h('i', [0, 1, 2, 3, 4, 5].map(spanNum)) - var vnode2 = h('i', [null, null, undefined, null, null, undefined]) - var vnode3 = h('i', [5, 4, 3, 2, 1, 0].map(spanNum)) + const vnode1 = h('i', [0, 1, 2, 3, 4, 5].map(spanNum)) + const vnode2 = h('i', [null, null, undefined, null, null, undefined]) + const vnode3 = h('i', [5, 4, 3, 2, 1, 0].map(spanNum)) patch(vnode0, vnode1) elm = patch(vnode1, vnode2).elm assert.strictEqual(elm.children.length, 0) @@ -713,15 +713,15 @@ describe('snabbdom', function () { assert.deepEqual(map(inner, elm.children), ['5', '4', '3', '2', '1', '0']) }) it('handles random shuffles with null/undefined children', function () { - var i - var j - var r - var len - var arr - var maxArrLen = 15 - var samples = 5 - var vnode1 = vnode0 - var vnode2 + let i + let j + let r + let len + let arr + const maxArrLen = 15 + const samples = 5 + let vnode1 = vnode0 + let vnode2 for (i = 0; i < samples; ++i, vnode1 = vnode2) { len = Math.floor(Math.random() * maxArrLen) arr = [] @@ -741,64 +741,64 @@ describe('snabbdom', function () { }) describe('updating children without keys', function () { it('appends elements', function () { - var vnode1 = h('div', [h('span', 'Hello')]) - var vnode2 = h('div', [h('span', 'Hello'), h('span', 'World')]) + const vnode1 = h('div', [h('span', 'Hello')]) + const vnode2 = h('div', [h('span', 'Hello'), h('span', 'World')]) elm = patch(vnode0, vnode1).elm assert.deepEqual(map(inner, elm.children), ['Hello']) elm = patch(vnode1, vnode2).elm assert.deepEqual(map(inner, elm.children), ['Hello', 'World']) }) it('handles unmoved text nodes', function () { - var vnode1 = h('div', ['Text', h('span', 'Span')]) - var vnode2 = h('div', ['Text', h('span', 'Span')]) + const vnode1 = h('div', ['Text', h('span', 'Span')]) + const vnode2 = h('div', ['Text', h('span', 'Span')]) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.childNodes[0].textContent, 'Text') elm = patch(vnode1, vnode2).elm assert.strictEqual(elm.childNodes[0].textContent, 'Text') }) it('handles changing text children', function () { - var vnode1 = h('div', ['Text', h('span', 'Span')]) - var vnode2 = h('div', ['Text2', h('span', 'Span')]) + const vnode1 = h('div', ['Text', h('span', 'Span')]) + const vnode2 = h('div', ['Text2', h('span', 'Span')]) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.childNodes[0].textContent, 'Text') elm = patch(vnode1, vnode2).elm assert.strictEqual(elm.childNodes[0].textContent, 'Text2') }) it('handles unmoved comment nodes', function () { - var vnode1 = h('div', [h('!', 'Text'), h('span', 'Span')]) - var vnode2 = h('div', [h('!', 'Text'), h('span', 'Span')]) + const vnode1 = h('div', [h('!', 'Text'), h('span', 'Span')]) + const vnode2 = h('div', [h('!', 'Text'), h('span', 'Span')]) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.childNodes[0].textContent, 'Text') elm = patch(vnode1, vnode2).elm assert.strictEqual(elm.childNodes[0].textContent, 'Text') }) it('handles changing comment text', function () { - var vnode1 = h('div', [h('!', 'Text'), h('span', 'Span')]) - var vnode2 = h('div', [h('!', 'Text2'), h('span', 'Span')]) + const vnode1 = h('div', [h('!', 'Text'), h('span', 'Span')]) + const vnode2 = h('div', [h('!', 'Text2'), h('span', 'Span')]) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.childNodes[0].textContent, 'Text') elm = patch(vnode1, vnode2).elm assert.strictEqual(elm.childNodes[0].textContent, 'Text2') }) it('handles changing empty comment', function () { - var vnode1 = h('div', [h('!'), h('span', 'Span')]) - var vnode2 = h('div', [h('!', 'Test'), h('span', 'Span')]) + const vnode1 = h('div', [h('!'), h('span', 'Span')]) + const vnode2 = h('div', [h('!', 'Test'), h('span', 'Span')]) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.childNodes[0].textContent, '') elm = patch(vnode1, vnode2).elm assert.strictEqual(elm.childNodes[0].textContent, 'Test') }) it('prepends element', function () { - var vnode1 = h('div', [h('span', 'World')]) - var vnode2 = h('div', [h('span', 'Hello'), h('span', 'World')]) + const vnode1 = h('div', [h('span', 'World')]) + const vnode2 = h('div', [h('span', 'Hello'), h('span', 'World')]) elm = patch(vnode0, vnode1).elm assert.deepEqual(map(inner, elm.children), ['World']) elm = patch(vnode1, vnode2).elm assert.deepEqual(map(inner, elm.children), ['Hello', 'World']) }) it('prepends element of different tag type', function () { - var vnode1 = h('div', [h('span', 'World')]) - var vnode2 = h('div', [h('div', 'Hello'), h('span', 'World')]) + const vnode1 = h('div', [h('span', 'World')]) + const vnode2 = h('div', [h('div', 'Hello'), h('span', 'World')]) elm = patch(vnode0, vnode1).elm assert.deepEqual(map(inner, elm.children), ['World']) elm = patch(vnode1, vnode2).elm @@ -806,32 +806,32 @@ describe('snabbdom', function () { assert.deepEqual(map(inner, elm.children), ['Hello', 'World']) }) it('removes elements', function () { - var vnode1 = h('div', [h('span', 'One'), h('span', 'Two'), h('span', 'Three')]) - var vnode2 = h('div', [h('span', 'One'), h('span', 'Three')]) + const vnode1 = h('div', [h('span', 'One'), h('span', 'Two'), h('span', 'Three')]) + const vnode2 = h('div', [h('span', 'One'), h('span', 'Three')]) elm = patch(vnode0, vnode1).elm assert.deepEqual(map(inner, elm.children), ['One', 'Two', 'Three']) elm = patch(vnode1, vnode2).elm assert.deepEqual(map(inner, elm.children), ['One', 'Three']) }) it('removes a single text node', function () { - var vnode1 = h('div', 'One') - var vnode2 = h('div') + const vnode1 = h('div', 'One') + const vnode2 = h('div') patch(vnode0, vnode1) assert.strictEqual(elm.textContent, 'One') patch(vnode1, vnode2) assert.strictEqual(elm.textContent, '') }) it('removes a single text node when children are updated', function () { - var vnode1 = h('div', 'One') - var vnode2 = h('div', [h('div', 'Two'), h('span', 'Three')]) + const vnode1 = h('div', 'One') + const vnode2 = h('div', [h('div', 'Two'), h('span', 'Three')]) patch(vnode0, vnode1) assert.strictEqual(elm.textContent, 'One') patch(vnode1, vnode2) assert.deepEqual(map(prop('textContent'), elm.childNodes), ['Two', 'Three']) }) it('removes a text node among other elements', function () { - var vnode1 = h('div', ['One', h('span', 'Two')]) - var vnode2 = h('div', [h('div', 'Three')]) + const vnode1 = h('div', ['One', h('span', 'Two')]) + const vnode2 = h('div', [h('div', 'Three')]) patch(vnode0, vnode1) assert.deepEqual(map(prop('textContent'), elm.childNodes), ['One', 'Two']) patch(vnode1, vnode2) @@ -840,8 +840,8 @@ describe('snabbdom', function () { assert.strictEqual(elm.childNodes[0].textContent, 'Three') }) it('reorders elements', function () { - var vnode1 = h('div', [h('span', 'One'), h('div', 'Two'), h('b', 'Three')]) - var vnode2 = h('div', [h('b', 'Three'), h('span', 'One'), h('div', 'Two')]) + const vnode1 = h('div', [h('span', 'One'), h('div', 'Two'), h('b', 'Three')]) + const vnode2 = h('div', [h('b', 'Three'), h('span', 'One'), h('div', 'Two')]) elm = patch(vnode0, vnode1).elm assert.deepEqual(map(inner, elm.children), ['One', 'Two', 'Three']) elm = patch(vnode1, vnode2).elm @@ -849,9 +849,9 @@ describe('snabbdom', function () { assert.deepEqual(map(inner, elm.children), ['Three', 'One', 'Two']) }) it('supports null/undefined children', function () { - var vnode1 = h('i', [null, h('i', '1'), h('i', '2'), null]) - var vnode2 = h('i', [h('i', '2'), undefined, undefined, h('i', '1'), undefined]) - var vnode3 = h('i', [null, h('i', '1'), undefined, null, h('i', '2'), undefined, null]) + const vnode1 = h('i', [null, h('i', '1'), h('i', '2'), null]) + const vnode2 = h('i', [h('i', '2'), undefined, undefined, h('i', '1'), undefined]) + const vnode3 = h('i', [null, h('i', '1'), undefined, null, h('i', '2'), undefined, null]) elm = patch(vnode0, vnode1).elm assert.deepEqual(map(inner, elm.children), ['1', '2']) elm = patch(vnode1, vnode2).elm @@ -860,9 +860,9 @@ describe('snabbdom', function () { assert.deepEqual(map(inner, elm.children), ['1', '2']) }) it('supports all null/undefined children', function () { - var vnode1 = h('i', [h('i', '1'), h('i', '2')]) - var vnode2 = h('i', [null, undefined]) - var vnode3 = h('i', [h('i', '2'), h('i', '1')]) + const vnode1 = h('i', [h('i', '1'), h('i', '2')]) + const vnode2 = h('i', [null, undefined]) + const vnode3 = h('i', [h('i', '2'), h('i', '1')]) patch(vnode0, vnode1) elm = patch(vnode1, vnode2).elm assert.strictEqual(elm.children.length, 0) @@ -874,14 +874,14 @@ describe('snabbdom', function () { describe('hooks', function () { describe('element hooks', function () { it('calls `create` listener before inserted into parent but after children', function () { - var result = [] + const result = [] const cb: CreateHook = (empty, vnode) => { assert(vnode.elm instanceof Element) assert.strictEqual((vnode.elm as HTMLDivElement).children.length, 2) assert.strictEqual(vnode.elm!.parentNode, null) result.push(vnode) } - var vnode1 = h('div', [ + const vnode1 = h('div', [ h('span', 'First sibling'), h('div', { hook: { create: cb } }, [ h('span', 'Child 1'), @@ -893,14 +893,14 @@ describe('snabbdom', function () { assert.strictEqual(1, result.length) }) it('calls `insert` listener after both parents, siblings and children have been inserted', function () { - var result = [] + const result = [] const cb: InsertHook = (vnode) => { assert(vnode.elm instanceof Element) assert.strictEqual((vnode.elm as HTMLDivElement).children.length, 2) assert.strictEqual(vnode.elm!.parentNode!.children.length, 3) result.push(vnode) } - var vnode1 = h('div', [ + const vnode1 = h('div', [ h('span', 'First sibling'), h('div', { hook: { insert: cb } }, [ h('span', 'Child 1'), @@ -912,20 +912,20 @@ describe('snabbdom', function () { assert.strictEqual(1, result.length) }) it('calls `prepatch` listener', function () { - var result = [] + const result = [] const cb: PrePatchHook = (oldVnode, vnode) => { assert.strictEqual(oldVnode, vnode1.children![1]) assert.strictEqual(vnode, vnode2.children![1]) result.push(vnode) } - var vnode1 = h('div', [ + const vnode1 = h('div', [ h('span', 'First sibling'), h('div', { hook: { prepatch: cb } }, [ h('span', 'Child 1'), h('span', 'Child 2'), ]), ]) - var vnode2 = h('div', [ + const vnode2 = h('div', [ h('span', 'First sibling'), h('div', { hook: { prepatch: cb } }, [ h('span', 'Child 1'), @@ -937,8 +937,8 @@ describe('snabbdom', function () { assert.strictEqual(result.length, 1) }) it('calls `postpatch` after `prepatch` listener', function () { - var pre = 0 - var post = 0 + let pre = 0 + let post = 0 function preCb () { pre++ } @@ -946,14 +946,14 @@ describe('snabbdom', function () { assert.strictEqual(pre, post + 1) post++ } - var vnode1 = h('div', [ + const vnode1 = h('div', [ h('span', 'First sibling'), h('div', { hook: { prepatch: preCb, postpatch: postCb } }, [ h('span', 'Child 1'), h('span', 'Child 2'), ]), ]) - var vnode2 = h('div', [ + const vnode2 = h('div', [ h('span', 'First sibling'), h('div', { hook: { prepatch: preCb, postpatch: postCb } }, [ h('span', 'Child 1'), @@ -966,8 +966,8 @@ describe('snabbdom', function () { assert.strictEqual(post, 1) }) it('calls `update` listener', function () { - var result1: VNode[] = [] - var result2: VNode[] = [] + const result1: VNode[] = [] + const result2: VNode[] = [] function cb (result: VNode[], oldVnode: VNode, vnode: VNode) { if (result.length > 0) { console.log(result[result.length - 1]) @@ -976,14 +976,14 @@ describe('snabbdom', function () { } result.push(vnode) } - var vnode1 = h('div', [ + const vnode1 = h('div', [ h('span', 'First sibling'), h('div', { hook: { update: cb.bind(null, result1) } }, [ h('span', 'Child 1'), h('span', { hook: { update: cb.bind(null, result2) } }, 'Child 2'), ]), ]) - var vnode2 = h('div', [ + const vnode2 = h('div', [ h('span', 'First sibling'), h('div', { hook: { update: cb.bind(null, result1) } }, [ h('span', 'Child 1'), @@ -996,9 +996,9 @@ describe('snabbdom', function () { assert.strictEqual(result2.length, 1) }) it('calls `remove` listener', function () { - var result = [] + const result = [] const cb: RemoveHook = (vnode, rm) => { - var parent = vnode.elm!.parentNode as HTMLDivElement + const parent = vnode.elm!.parentNode as HTMLDivElement assert(vnode.elm instanceof Element) assert.strictEqual((vnode.elm as HTMLDivElement).children.length, 2) assert.strictEqual(parent.children.length, 2) @@ -1006,14 +1006,14 @@ describe('snabbdom', function () { rm() assert.strictEqual(parent.children.length, 1) } - var vnode1 = h('div', [ + const vnode1 = h('div', [ h('span', 'First sibling'), h('div', { hook: { remove: cb } }, [ h('span', 'Child 1'), h('span', 'Child 2'), ]), ]) - var vnode2 = h('div', [ + const vnode2 = h('div', [ h('span', 'First sibling'), ]) patch(vnode0, vnode1) @@ -1021,22 +1021,22 @@ describe('snabbdom', function () { assert.strictEqual(1, result.length) }) it('calls `destroy` listener when patching text node over node with children', function () { - var calls = 0 + let calls = 0 function cb () { calls++ } - var vnode1 = h('div', [ + const vnode1 = h('div', [ h('div', { hook: { destroy: cb } }, [ h('span', 'Child 1'), ]), ]) - var vnode2 = h('div', 'Text node') + const vnode2 = h('div', 'Text node') patch(vnode0, vnode1) patch(vnode1, vnode2) assert.strictEqual(calls, 1) }) it('calls `init` and `prepatch` listeners on root', function () { - var count = 0 + let count = 0 const init: InitHook = (vnode) => { assert.strictEqual(vnode, vnode2) count += 1 @@ -1045,27 +1045,27 @@ describe('snabbdom', function () { assert.strictEqual(vnode, vnode1) count += 1 } - var vnode1 = h('div', { hook: { init: init, prepatch: prepatch } }) + const vnode1 = h('div', { hook: { init: init, prepatch: prepatch } }) patch(vnode0, vnode1) assert.strictEqual(1, count) - var vnode2 = h('span', { hook: { init: init, prepatch: prepatch } }) + const vnode2 = h('span', { hook: { init: init, prepatch: prepatch } }) patch(vnode1, vnode2) assert.strictEqual(2, count) }) it('removes element when all remove listeners are done', function () { - var rm1, rm2, rm3 - var patch = init([ + let rm1, rm2, rm3 + const patch = init([ { remove: function (_, rm) { rm1 = rm } }, { remove: function (_, rm) { rm2 = rm } }, ]) - var vnode1 = h('div', [h('a', { + const vnode1 = h('div', [h('a', { hook: { remove: function (_, rm) { rm3 = rm } } })]) - var vnode2 = h('div', []) + const vnode2 = h('div', []) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.children.length, 1) elm = patch(vnode1, vnode2).elm @@ -1078,19 +1078,19 @@ describe('snabbdom', function () { assert.strictEqual(elm.children.length, 0) }) it('invokes remove hook on replaced root', function () { - var result = [] - var parent = document.createElement('div') - var vnode0 = document.createElement('div') + const result = [] + const parent = document.createElement('div') + const vnode0 = document.createElement('div') parent.appendChild(vnode0) const cb: RemoveHook = (vnode, rm) => { result.push(vnode) rm() } - var vnode1 = h('div', { hook: { remove: cb } }, [ + const vnode1 = h('div', { hook: { remove: cb } }, [ h('b', 'Child 1'), h('i', 'Child 2'), ]) - var vnode2 = h('span', [ + const vnode2 = h('span', [ h('b', 'Child 1'), h('i', 'Child 2'), ]) @@ -1101,93 +1101,93 @@ describe('snabbdom', function () { }) describe('module hooks', function () { it('invokes `pre` and `post` hook', function () { - var result: string[] = [] - var patch = init([ + const result: string[] = [] + const patch = init([ { pre: function () { result.push('pre') } }, { post: function () { result.push('post') } }, ]) - var vnode1 = h('div') + const vnode1 = h('div') patch(vnode0, vnode1) assert.deepEqual(result, ['pre', 'post']) }) it('invokes global `destroy` hook for all removed children', function () { - var result = [] + const result = [] const cb: DestroyHook = (vnode) => { result.push(vnode) } - var vnode1 = h('div', [ + const vnode1 = h('div', [ h('span', 'First sibling'), h('div', [ h('span', { hook: { destroy: cb } }, 'Child 1'), h('span', 'Child 2'), ]), ]) - var vnode2 = h('div') + const vnode2 = h('div') patch(vnode0, vnode1) patch(vnode1, vnode2) assert.strictEqual(result.length, 1) }) it('handles text vnodes with `undefined` `data` property', function () { - var vnode1 = h('div', [ + const vnode1 = h('div', [ ' ' ]) - var vnode2 = h('div', []) + const vnode2 = h('div', []) patch(vnode0, vnode1) patch(vnode1, vnode2) }) it('invokes `destroy` module hook for all removed children', function () { - var created = 0 - var destroyed = 0 - var patch = init([ + let created = 0 + let destroyed = 0 + const patch = init([ { create: function () { created++ } }, { destroy: function () { destroyed++ } }, ]) - var vnode1 = h('div', [ + const vnode1 = h('div', [ h('span', 'First sibling'), h('div', [ h('span', 'Child 1'), h('span', 'Child 2'), ]), ]) - var vnode2 = h('div') + const vnode2 = h('div') patch(vnode0, vnode1) patch(vnode1, vnode2) assert.strictEqual(created, 4) assert.strictEqual(destroyed, 4) }) it('does not invoke `create` and `remove` module hook for text nodes', function () { - var created = 0 - var removed = 0 - var patch = init([ + let created = 0 + let removed = 0 + const patch = init([ { create: function () { created++ } }, { remove: function () { removed++ } }, ]) - var vnode1 = h('div', [ + const vnode1 = h('div', [ h('span', 'First child'), '', h('span', 'Third child'), ]) - var vnode2 = h('div') + const vnode2 = h('div') patch(vnode0, vnode1) patch(vnode1, vnode2) assert.strictEqual(created, 2) assert.strictEqual(removed, 2) }) it('does not invoke `destroy` module hook for text nodes', function () { - var created = 0 - var destroyed = 0 - var patch = init([ + let created = 0 + let destroyed = 0 + const patch = init([ { create: function () { created++ } }, { destroy: function () { destroyed++ } }, ]) - var vnode1 = h('div', [ + const vnode1 = h('div', [ h('span', 'First sibling'), h('div', [ h('span', 'Child 1'), h('span', ['Text 1', 'Text 2']), ]), ]) - var vnode2 = h('div') + const vnode2 = h('div') patch(vnode0, vnode1) patch(vnode1, vnode2) assert.strictEqual(created, 4) @@ -1197,11 +1197,11 @@ describe('snabbdom', function () { }) describe('short circuiting', function () { it('does not update strictly equal vnodes', function () { - var result = [] + const result = [] const cb: UpdateHook = (vnode) => { result.push(vnode) } - var vnode1 = h('div', [ + const vnode1 = h('div', [ h('span', { hook: { update: cb } }, 'Hello'), h('span', 'there'), ]) @@ -1210,15 +1210,15 @@ describe('snabbdom', function () { assert.strictEqual(result.length, 0) }) it('does not update strictly equal children', function () { - var result = [] + const result = [] function cb (vnode: VNode) { result.push(vnode) } - var vnode1 = h('div', [ + const vnode1 = h('div', [ h('span', { hook: { patch: cb } as any }, 'Hello'), h('span', 'there'), ]) - var vnode2 = h('div') + const vnode2 = h('div') vnode2.children = vnode1.children patch(vnode0, vnode1) patch(vnode1, vnode2) diff --git a/src/test/unit/dataset.ts b/src/test/unit/dataset.ts index c50f5e3..2bbaed9 100644 --- a/src/test/unit/dataset.ts +++ b/src/test/unit/dataset.ts @@ -4,7 +4,7 @@ import { datasetModule } from '../../package/modules/dataset' import { init } from '../../package/init' import { h } from '../../package/h' -var patch = init([ +const patch = init([ datasetModule ]) @@ -15,7 +15,7 @@ describe('dataset', function () { } }) - var elm: any, vnode0: any + let elm: any, vnode0: any beforeEach(function () { elm = document.createElement('div') vnode0 = elm @@ -25,8 +25,8 @@ describe('dataset', function () { assert.strictEqual(elm.dataset.foo, 'foo') }) it('updates dataset', function () { - var vnode1 = h('i', { dataset: { foo: 'foo', bar: 'bar' } }) - var vnode2 = h('i', { dataset: { baz: 'baz' } }) + const vnode1 = h('i', { dataset: { foo: 'foo', bar: 'bar' } }) + const vnode2 = h('i', { dataset: { baz: 'baz' } }) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.dataset.foo, 'foo') assert.strictEqual(elm.dataset.bar, 'bar') @@ -35,9 +35,9 @@ describe('dataset', function () { assert.strictEqual(elm.dataset.foo, undefined) }) it('can be memoized', function () { - var cachedDataset = { foo: 'foo', bar: 'bar' } - var vnode1 = h('i', { dataset: cachedDataset }) - var vnode2 = h('i', { dataset: cachedDataset }) + const cachedDataset = { foo: 'foo', bar: 'bar' } + const vnode1 = h('i', { dataset: cachedDataset }) + const vnode2 = h('i', { dataset: cachedDataset }) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.dataset.foo, 'foo') assert.strictEqual(elm.dataset.bar, 'bar') @@ -46,7 +46,7 @@ describe('dataset', function () { assert.strictEqual(elm.dataset.bar, 'bar') }) it('handles string conversions', function () { - var vnode1 = h('i', { dataset: { empty: '', dash: '-', dashed: 'foo-bar', camel: 'fooBar', integer: 0 as any, float: 0.1 as any } }) + const vnode1 = h('i', { dataset: { empty: '', dash: '-', dashed: 'foo-bar', camel: 'fooBar', integer: 0 as any, float: 0.1 as any } }) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.dataset.empty, '') diff --git a/src/test/unit/eventlisteners.ts b/src/test/unit/eventlisteners.ts index 60fb875..90f01ef 100644 --- a/src/test/unit/eventlisteners.ts +++ b/src/test/unit/eventlisteners.ts @@ -5,22 +5,22 @@ import { init } from '../../package/init' import { eventListenersModule } from '../../package/modules/eventlisteners' import { h } from '../../package/h' -var patch = init([ +const patch = init([ eventListenersModule ]) describe('event listeners', function () { - var elm: any, vnode0: any + let elm: any, vnode0: any beforeEach(function () { elm = document.createElement('div') vnode0 = elm }) it('attaches click event handler to element', function () { - var result = [] + const result = [] function clicked (ev: Event) { result.push(ev) } - var vnode = h('div', { on: { click: clicked } }, [ + const vnode = h('div', { on: { click: clicked } }, [ h('a', 'Click my parent'), ]) elm = patch(vnode0, vnode).elm @@ -28,9 +28,9 @@ describe('event listeners', function () { assert.strictEqual(1, result.length) }) it('does not attach new listener', function () { - var result: number[] = [] + const result: number[] = [] // function clicked(ev) { result.push(ev); } - var vnode1 = h('div', { + const vnode1 = h('div', { on: { click: function (ev) { result.push(1) @@ -39,7 +39,7 @@ describe('event listeners', function () { }, [ h('a', 'Click my parent'), ]) - var vnode2 = h('div', { + const vnode2 = h('div', { on: { click: function (ev) { result.push(2) @@ -55,17 +55,17 @@ describe('event listeners', function () { assert.deepEqual(result, [1, 2]) }) it('detach attached click event handler to element', function () { - var result: Event[] = [] + const result: Event[] = [] function clicked (ev: Event) { result.push(ev) } - var vnode1 = h('div', { on: { click: clicked } }, [ + const vnode1 = h('div', { on: { click: clicked } }, [ h('a', 'Click my parent'), ]) elm = patch(vnode0, vnode1).elm elm.click() assert.strictEqual(1, result.length) - var vnode2 = h('div', { on: {} }, [ + const vnode2 = h('div', { on: {} }, [ h('a', 'Click my parent'), ]) elm = patch(vnode1, vnode2).elm @@ -73,7 +73,7 @@ describe('event listeners', function () { assert.strictEqual(1, result.length) }) it('multiple event handlers for same event on same element', function () { - var called = 0 + let called = 0 function clicked (ev: Event, vnode: VNode) { ++called // Check that the first argument is an event @@ -81,13 +81,13 @@ describe('event listeners', function () { // Check that the second argument was a vnode assert.strictEqual(vnode.sel, 'div') } - var vnode1 = h('div', { on: { click: [clicked, clicked, clicked] } }, [ + const vnode1 = h('div', { on: { click: [clicked, clicked, clicked] } }, [ h('a', 'Click my parent'), ]) elm = patch(vnode0, vnode1).elm elm.click() assert.strictEqual(3, called) - var vnode2 = h('div', { on: { click: [clicked, clicked] } }, [ + const vnode2 = h('div', { on: { click: [clicked, clicked] } }, [ h('a', 'Click my parent'), ]) elm = patch(vnode1, vnode2).elm @@ -95,12 +95,12 @@ describe('event listeners', function () { assert.strictEqual(5, called) }) it('access to virtual node in event handler', function () { - var result: VNode[] = [] + const result: VNode[] = [] function clicked (this: VNode, ev: Event, vnode: VNode) { result.push(this) result.push(vnode) } - var vnode1 = h('div', { on: { click: clicked } }, [ + const vnode1 = h('div', { on: { click: clicked } }, [ h('a', 'Click my parent'), ]) elm = patch(vnode0, vnode1).elm @@ -110,11 +110,11 @@ describe('event listeners', function () { assert.strictEqual(vnode1, result[1]) }) it('shared handlers in parent and child nodes', function () { - var result = [] - var sharedHandlers = { + const result = [] + const sharedHandlers = { click: function (ev: Event) { result.push(ev) } } - var vnode1 = h('div', { on: sharedHandlers }, [ + const vnode1 = h('div', { on: sharedHandlers }, [ h('a', { on: sharedHandlers }, 'Click my parent'), ]) elm = patch(vnode0, vnode1).elm diff --git a/src/test/unit/htmldomapi.ts b/src/test/unit/htmldomapi.ts index f504079..f592735 100644 --- a/src/test/unit/htmldomapi.ts +++ b/src/test/unit/htmldomapi.ts @@ -4,39 +4,39 @@ import { init } from '../../package/init' import { h } from '../../package/h' import { attributesModule } from '../../package/modules/attributes' -var patch = init([ +const patch = init([ attributesModule ]) describe('svg', function () { - var elm: any, vnode0: any + let elm: any, vnode0: any beforeEach(function () { elm = document.createElement('svg') vnode0 = elm }) it('removes child svg elements', function () { - var a = h('svg', {}, [ + const a = h('svg', {}, [ h('g'), h('g') ]) - var b = h('svg', {}, [ + const b = h('svg', {}, [ h('g') ]) - var result = patch(patch(vnode0, a), b).elm as SVGElement + const result = patch(patch(vnode0, a), b).elm as SVGElement assert.strictEqual(result.childNodes.length, 1) }) it('adds correctly xlink namespaced attribute', function () { - var xlinkNS = 'http://www.w3.org/1999/xlink' - var testUrl = '/test' - var a = h('svg', {}, [ + const xlinkNS = 'http://www.w3.org/1999/xlink' + const testUrl = '/test' + const a = h('svg', {}, [ h('use', { attrs: { 'xlink:href': testUrl } }, []) ]) - var result = patch(vnode0, a).elm as SVGElement + const result = patch(vnode0, a).elm as SVGElement assert.strictEqual(result.childNodes.length, 1) const child = result.childNodes[0] as SVGUseElement assert.strictEqual(child.getAttribute('xlink:href'), testUrl) @@ -44,11 +44,11 @@ describe('svg', function () { }) it('adds correctly xml namespaced attribute', function () { - var xmlNS = 'http://www.w3.org/XML/1998/namespace' - var testAttrValue = 'und' - var a = h('svg', { attrs: { 'xml:lang': testAttrValue } }, []) + const xmlNS = 'http://www.w3.org/XML/1998/namespace' + const testAttrValue = 'und' + const a = h('svg', { attrs: { 'xml:lang': testAttrValue } }, []) - var result = patch(vnode0, a).elm as SVGElement + const result = patch(vnode0, a).elm as SVGElement assert.strictEqual(result.getAttributeNS(xmlNS, 'lang'), testAttrValue) assert.strictEqual(result.getAttribute('xml:lang'), testAttrValue) }) diff --git a/src/test/unit/style.ts b/src/test/unit/style.ts index 80172b5..a0ff1a1 100644 --- a/src/test/unit/style.ts +++ b/src/test/unit/style.ts @@ -5,7 +5,7 @@ import { styleModule } from '../../package/modules/style' import { h } from '../../package/h' import { toVNode } from '../../package/tovnode' -var patch = init([ +const patch = init([ styleModule ]) @@ -14,7 +14,7 @@ featureDiscoveryElm.style.setProperty('--foo', 'foo') const hasCssVariables = featureDiscoveryElm.style.getPropertyValue('--foo') === 'foo' describe('style', function () { - var elm: any, vnode0: any + let elm: any, vnode0: any beforeEach(function () { elm = document.createElement('div') vnode0 = elm @@ -24,9 +24,9 @@ describe('style', function () { assert.strictEqual(elm.style.fontSize, '12px') }) it('can be memoized', function () { - var cachedStyles = { fontSize: '14px', display: 'inline' } - var vnode1 = h('i', { style: cachedStyles }) - var vnode2 = h('i', { style: cachedStyles }) + const cachedStyles = { fontSize: '14px', display: 'inline' } + const vnode1 = h('i', { style: cachedStyles }) + const vnode2 = h('i', { style: cachedStyles }) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.style.fontSize, '14px') assert.strictEqual(elm.style.display, 'inline') @@ -35,9 +35,9 @@ describe('style', function () { assert.strictEqual(elm.style.display, 'inline') }) it('updates styles', function () { - var vnode1 = h('i', { style: { fontSize: '14px', display: 'inline' } }) - var vnode2 = h('i', { style: { fontSize: '12px', display: 'block' } }) - var vnode3 = h('i', { style: { fontSize: '10px', display: 'block' } }) + const vnode1 = h('i', { style: { fontSize: '14px', display: 'inline' } }) + const vnode2 = h('i', { style: { fontSize: '12px', display: 'block' } }) + const vnode3 = h('i', { style: { fontSize: '10px', display: 'block' } }) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.style.fontSize, '14px') assert.strictEqual(elm.style.display, 'inline') @@ -49,9 +49,9 @@ describe('style', function () { assert.strictEqual(elm.style.display, 'block') }) it('explicialy removes styles', function () { - var vnode1 = h('i', { style: { fontSize: '14px' } }) - var vnode2 = h('i', { style: { fontSize: '' } }) - var vnode3 = h('i', { style: { fontSize: '10px' } }) + const vnode1 = h('i', { style: { fontSize: '14px' } }) + const vnode2 = h('i', { style: { fontSize: '' } }) + const vnode3 = h('i', { style: { fontSize: '10px' } }) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.style.fontSize, '14px') patch(vnode1, vnode2) @@ -60,9 +60,9 @@ describe('style', function () { assert.strictEqual(elm.style.fontSize, '10px') }) it('implicially removes styles from element', function () { - var vnode1 = h('div', [h('i', { style: { fontSize: '14px' } })]) - var vnode2 = h('div', [h('i')]) - var vnode3 = h('div', [h('i', { style: { fontSize: '10px' } })]) + const vnode1 = h('div', [h('i', { style: { fontSize: '14px' } })]) + const vnode2 = h('div', [h('i')]) + const vnode3 = h('div', [h('i', { style: { fontSize: '10px' } })]) patch(vnode0, vnode1) assert.strictEqual(elm.firstChild.style.fontSize, '14px') patch(vnode1, vnode2) @@ -74,9 +74,9 @@ describe('style', function () { if (!hasCssVariables) { this.skip() } else { - var vnode1 = h('div', { style: { '--myVar': 1 as any } }) - var vnode2 = h('div', { style: { '--myVar': 2 as any } }) - var vnode3 = h('div', { style: { '--myVar': 3 as any } }) + const vnode1 = h('div', { style: { '--myVar': 1 as any } }) + const vnode2 = h('div', { style: { '--myVar': 2 as any } }) + const vnode3 = h('div', { style: { '--myVar': 3 as any } }) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.style.getPropertyValue('--myVar'), '1') elm = patch(vnode1, vnode2).elm @@ -89,9 +89,9 @@ describe('style', function () { if (!hasCssVariables) { this.skip() } else { - var vnode1 = h('i', { style: { '--myVar': 1 as any } }) - var vnode2 = h('i', { style: { '--myVar': '' } }) - var vnode3 = h('i', { style: { '--myVar': 2 as any } }) + const vnode1 = h('i', { style: { '--myVar': 1 as any } }) + const vnode2 = h('i', { style: { '--myVar': '' } }) + const vnode3 = h('i', { style: { '--myVar': 2 as any } }) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.style.getPropertyValue('--myVar'), '1') patch(vnode1, vnode2) @@ -104,9 +104,9 @@ describe('style', function () { if (!hasCssVariables) { this.skip() } else { - var vnode1 = h('div', [h('i', { style: { '--myVar': 1 as any } })]) - var vnode2 = h('div', [h('i')]) - var vnode3 = h('div', [h('i', { style: { '--myVar': 2 as any } })]) + const vnode1 = h('div', [h('i', { style: { '--myVar': 1 as any } })]) + const vnode2 = h('div', [h('i')]) + const vnode3 = h('div', [h('i', { style: { '--myVar': 2 as any } })]) patch(vnode0, vnode1) assert.strictEqual(elm.firstChild.style.getPropertyValue('--myVar'), '1') patch(vnode1, vnode2) @@ -116,8 +116,8 @@ describe('style', function () { } }) it('updates delayed styles in next frame', function (done) { - var vnode1 = h('i', { style: { fontSize: '14px', delayed: { fontSize: '16px' } as any } }) - var vnode2 = h('i', { style: { fontSize: '18px', delayed: { fontSize: '20px' } as any } }) + const vnode1 = h('i', { style: { fontSize: '14px', delayed: { fontSize: '16px' } as any } }) + const vnode2 = h('i', { style: { fontSize: '18px', delayed: { fontSize: '20px' } as any } }) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.style.fontSize, '14px') requestAnimationFrame(() => { @@ -135,14 +135,14 @@ describe('style', function () { }) }) it('applies tranform as transition on remove', function (done) { - var btn = h('button', { + const btn = h('button', { style: { transition: 'transform 0.1s', remove: { transform: 'translateY(100%)' } as any } }, ['A button']) - var vnode1 = h('div.parent', {}, [btn]) - var vnode2 = h('div.parent', {}, [null]) + const vnode1 = h('div.parent', {}, [btn]) + const vnode2 = h('div.parent', {}, [null]) document.body.appendChild(vnode0) patch(vnode0, vnode1) patch(vnode1, vnode2) @@ -155,10 +155,10 @@ describe('style', function () { }) describe('using toVNode()', function () { it('handles (ignoring) comment nodes', function () { - var comment = document.createComment('yolo') - var prevElm = document.createElement('div') + const comment = document.createComment('yolo') + const prevElm = document.createElement('div') prevElm.appendChild(comment) - var nextVNode = h('div', [h('span', 'Hi')]) + const nextVNode = h('div', [h('span', 'Hi')]) elm = patch(toVNode(prevElm), nextVNode).elm assert.strictEqual(elm, prevElm) assert.strictEqual(elm.tagName, 'DIV') diff --git a/src/test/unit/thunk.ts b/src/test/unit/thunk.ts index b537a7e..d2cc06a 100644 --- a/src/test/unit/thunk.ts +++ b/src/test/unit/thunk.ts @@ -5,11 +5,11 @@ import { h } from '../../package/h' import { thunk } from '../../package/thunk' import { VNode } from '../../package/vnode' -var patch = init([ +const patch = init([ ]) describe('thunk', function () { - var elm: any, vnode0: any + let elm: any, vnode0: any beforeEach(function () { elm = vnode0 = document.createElement('div') }) @@ -17,21 +17,21 @@ describe('thunk', function () { function numberInSpan (n: number) { return h('span', 'Number is ' + n) } - var vnode = thunk('span', 'num', numberInSpan, [22]) + const vnode = thunk('span', 'num', numberInSpan, [22]) assert.deepEqual(vnode.sel, 'span') assert.deepEqual(vnode.data.key, 'num') assert.deepEqual(vnode.data.args, [22]) }) it('calls render function once on data change', function () { - var called = 0 + let called = 0 function numberInSpan (n: number) { called++ return h('span', { key: 'num' }, 'Number is ' + n) } - var vnode1 = h('div', [ + const vnode1 = h('div', [ thunk('span', 'num', numberInSpan, [1]) ]) - var vnode2 = h('div', [ + const vnode2 = h('div', [ thunk('span', 'num', numberInSpan, [2]) ]) patch(vnode0, vnode1) @@ -40,15 +40,15 @@ describe('thunk', function () { assert.strictEqual(called, 2) }) it('does not call render function on data unchanged', function () { - var called = 0 + let called = 0 function numberInSpan (n: number) { called++ return h('span', { key: 'num' }, 'Number is ' + n) } - var vnode1 = h('div', [ + const vnode1 = h('div', [ thunk('span', 'num', numberInSpan, [1]) ]) - var vnode2 = h('div', [ + const vnode2 = h('div', [ thunk('span', 'num', numberInSpan, [1]) ]) patch(vnode0, vnode1) @@ -57,15 +57,15 @@ describe('thunk', function () { assert.strictEqual(called, 1) }) it('calls render function once on data-length change', function () { - var called = 0 + let called = 0 function numberInSpan (n: number) { called++ return h('span', { key: 'num' }, 'Number is ' + n) } - var vnode1 = h('div', [ + const vnode1 = h('div', [ thunk('span', 'num', numberInSpan, [1]) ]) - var vnode2 = h('div', [ + const vnode2 = h('div', [ thunk('span', 'num', numberInSpan, [1, 2]) ]) patch(vnode0, vnode1) @@ -74,7 +74,7 @@ describe('thunk', function () { assert.strictEqual(called, 2) }) it('calls render function once on function change', function () { - var called = 0 + let called = 0 function numberInSpan (n: number) { called++ return h('span', { key: 'num' }, 'Number is ' + n) @@ -83,10 +83,10 @@ describe('thunk', function () { called++ return h('span', { key: 'num' }, 'Number really is ' + n) } - var vnode1 = h('div', [ + const vnode1 = h('div', [ thunk('span', 'num', numberInSpan, [1]) ]) - var vnode2 = h('div', [ + const vnode2 = h('div', [ thunk('span', 'num', numberInSpan2, [1]) ]) patch(vnode0, vnode1) @@ -95,18 +95,18 @@ describe('thunk', function () { assert.strictEqual(called, 2) }) it('renders correctly', function () { - var called = 0 + let called = 0 function numberInSpan (n: number) { called++ return h('span', { key: 'num' }, 'Number is ' + n) } - var vnode1 = h('div', [ + const vnode1 = h('div', [ thunk('span', 'num', numberInSpan, [1]) ]) - var vnode2 = h('div', [ + const vnode2 = h('div', [ thunk('span', 'num', numberInSpan, [1]) ]) - var vnode3 = h('div', [ + const vnode3 = h('div', [ thunk('span', 'num', numberInSpan, [2]) ]) elm = patch(vnode0, vnode1).elm @@ -124,19 +124,19 @@ describe('thunk', function () { function vnodeFn (s: string) { return h('span.number', 'Hello ' + s) } - var vnode1 = thunk('span.number', vnodeFn, ['World!']) + const vnode1 = thunk('span.number', vnodeFn, ['World!']) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.innerText, 'Hello World!') }) it('renders correctly when root', function () { - var called = 0 + let called = 0 function numberInSpan (n: number) { called++ return h('span', { key: 'num' }, 'Number is ' + n) } - var vnode1 = thunk('span', 'num', numberInSpan, [1]) - var vnode2 = thunk('span', 'num', numberInSpan, [1]) - var vnode3 = thunk('span', 'num', numberInSpan, [2]) + const vnode1 = thunk('span', 'num', numberInSpan, [1]) + const vnode2 = thunk('span', 'num', numberInSpan, [1]) + const vnode3 = thunk('span', 'num', numberInSpan, [2]) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.tagName.toLowerCase(), 'span') @@ -156,11 +156,11 @@ describe('thunk', function () { return h('span', { key: 'num' }, 'Number is ' + n) } function oddEven (n: number): VNode { - var prefix = (n % 2) === 0 ? 'Even' : 'Odd' + const prefix = (n % 2) === 0 ? 'Even' : 'Odd' return h('div', { key: oddEven as any }, prefix + ': ' + n) } - var vnode1 = h('div', [thunk('span', 'num', numberInSpan, [1])]) - var vnode2 = h('div', [thunk('div', 'oddEven', oddEven, [4])]) + const vnode1 = h('div', [thunk('span', 'num', numberInSpan, [1])]) + const vnode2 = h('div', [thunk('div', 'oddEven', oddEven, [4])]) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.firstChild.tagName.toLowerCase(), 'span') @@ -175,11 +175,11 @@ describe('thunk', function () { return h('span', { key: 'num' }, 'Number is ' + n) } function oddEven (n: number): VNode { - var prefix = (n % 2) === 0 ? 'Even' : 'Odd' + const prefix = (n % 2) === 0 ? 'Even' : 'Odd' return h('div', { key: oddEven as any }, prefix + ': ' + n) } - var vnode1 = thunk('span', 'num', numberInSpan, [1]) - var vnode2 = thunk('div', 'oddEven', oddEven, [4]) + const vnode1 = thunk('span', 'num', numberInSpan, [1]) + const vnode2 = thunk('div', 'oddEven', oddEven, [4]) elm = patch(vnode0, vnode1).elm assert.strictEqual(elm.tagName.toLowerCase(), 'span') @@ -190,19 +190,19 @@ describe('thunk', function () { assert.strictEqual(elm.innerHTML, 'Even: 4') }) it('invokes destroy hook on thunks', function () { - var called = 0 + let called = 0 function destroyHook () { called++ } function numberInSpan (n: number) { return h('span', { key: 'num', hook: { destroy: destroyHook } }, 'Number is ' + n) } - var vnode1 = h('div', [ + const vnode1 = h('div', [ h('div', 'Foo'), thunk('span', 'num', numberInSpan, [1]), h('div', 'Foo') ]) - var vnode2 = h('div', [ + const vnode2 = h('div', [ h('div', 'Foo'), h('div', 'Foo') ]) @@ -211,19 +211,19 @@ describe('thunk', function () { assert.strictEqual(called, 1) }) it('invokes remove hook on thunks', function () { - var called = 0 + let called = 0 function hook () { called++ } function numberInSpan (n: number) { return h('span', { key: 'num', hook: { remove: hook } }, 'Number is ' + n) } - var vnode1 = h('div', [ + const vnode1 = h('div', [ h('div', 'Foo'), thunk('span', 'num', numberInSpan, [1]), h('div', 'Foo') ]) - var vnode2 = h('div', [ + const vnode2 = h('div', [ h('div', 'Foo'), h('div', 'Foo') ])