From ccbe0133f2220db90ad8fbce0ceaae8c479196a2 Mon Sep 17 00:00:00 2001 From: Florian Schade Date: Wed, 2 Jun 2021 11:43:19 +0200 Subject: [PATCH 01/39] skip resource loading on personal view route redirect --- packages/web-app-files/src/views/Personal.vue | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/packages/web-app-files/src/views/Personal.vue b/packages/web-app-files/src/views/Personal.vue index 1fc32c22b68..5c63d10346e 100644 --- a/packages/web-app-files/src/views/Personal.vue +++ b/packages/web-app-files/src/views/Personal.vue @@ -145,8 +145,18 @@ export default { watch: { $route: { handler: function(to, from) { + if (isNil(this.$route.params.item)) { + this.$router.push({ + name: 'files-personal', + params: { + item: this.homeFolder + } + }) + + return + } + const sameRoute = to.name === from?.name - this.checkHomeFallback() this.loadResources(sameRoute) this.$_filesListPagination_updateCurrentPage() }, @@ -176,17 +186,6 @@ export default { ]), ...mapMutations(['SET_QUOTA']), - checkHomeFallback() { - if (isNil(this.$route.params.item)) { - this.$router.push({ - name: 'files-personal', - params: { - item: this.homeFolder - } - }) - } - }, - async loadResources(sameRoute) { this.loading = true this.CLEAR_CURRENT_FILES_LIST() From 71f7c793a1d889231aab49ecf80d9ca7ec7e807b Mon Sep 17 00:00:00 2001 From: Florian Schade Date: Wed, 2 Jun 2021 19:14:00 +0200 Subject: [PATCH 02/39] add basic support for typescript --- .eslintrc.js | 48 ++++ .eslintrc.json | 39 ---- package.json | 17 +- rollup.config.js | 2 + tests/unit/config/jest.config.js | 3 +- tsconfig.json | 5 + yarn.lock | 377 ++++++++++--------------------- 7 files changed, 189 insertions(+), 302 deletions(-) create mode 100644 .eslintrc.js delete mode 100644 .eslintrc.json create mode 100644 tsconfig.json diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000000..2408b8c546f --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,48 @@ +module.exports = { + env: { + browser: true, + es6: true, + amd: true + }, + extends: [ + /** + * TODO: fix promise project issues and then enable it + * 'plugin:promise/recommended', + */ + 'standard', + 'prettier/standard', + 'plugin:prettier/recommended', + 'plugin:jest/recommended' + ], + parserOptions: { + parser: 'babel-eslint', + sourceType: 'module' + }, + rules: { + /** + * TODO: fix project import issues and then enable it + * 'sort-imports': 'warn', + */ + 'require-await': 'warn' + }, + globals: { + require: false, + requirejs: false + }, + plugins: ['jest'], + overrides: [ + { + files: ['**/*.vue'], + extends: ['plugin:vue/recommended', 'prettier/vue'] + }, + { + files: ['**/*.ts'], + parser: '@typescript-eslint/parser', + extends: ['plugin:@typescript-eslint/recommended'] + }, + { + files: ['**/*.spec.js'], + extends: ['plugin:jest/recommended'] + } + ] +} diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index fc4f257e006..00000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "env": { - "browser": true, - "es6": true, - "amd": true - }, - "extends": [ - "standard", - "plugin:vue/recommended", - "plugin:prettier/recommended", - "prettier/standard", - "prettier/vue", - "plugin:jest/recommended", - "plugin:vuejs-accessibility/recommended" - ], - "parserOptions": { - "parser": "babel-eslint", - "sourceType": "module" - }, - "rules": { - "require-await": "warn", - "vuejs-accessibility/label-has-for": "off", - "vuejs-accessibility/anchor-has-content": [ - "error", - { - "accessibleChildren": ["span"] - } - ], - "vuejs-accessibility/media-has-caption": "off" - }, - "globals": { - "require": false, - "requirejs": false - }, - "plugins": [ - "jest", - "vuejs-accessibility" - ] -} diff --git a/package.json b/package.json index c95be6c3f2b..ac596692199 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "build": "rollup -c", "build:w": "rollup -c -w", "depcheck": "depcheck", - "lint": "eslint packages/*/src packages/*/tests tests --ext vue --ext js --color", + "lint": "eslint packages/**/*/src packages/**/*/tests --color", "serve": "SERVER=true yarn build:w", "test:acceptance:drone": "cucumber-js --retry 1 --require-module @babel/register --require-module @babel/polyfill --require tests/acceptance/setup.js --require tests/acceptance/stepDefinitions --format node_modules/cucumber-pretty", "test:acceptance:oc10": "cucumber-js --require-module @babel/register --require-module @babel/polyfill --require tests/acceptance/setup.js --require tests/acceptance/stepDefinitions --format node_modules/cucumber-pretty -t \"${TEST_TAGS:-not @skip and not @skipOnOC10}\"", @@ -40,9 +40,11 @@ "@rollup/plugin-commonjs": "^17.0.0", "@rollup/plugin-html": "^0.2.0", "@rollup/plugin-json": "^4.1.0", - "@testing-library/jest-dom": "^5.13.0", - "@testing-library/vue": "^5.6.2", "@types/jest-axe": "^3.5.1", + "@rollup/plugin-typescript": "^8.2.1", + "@types/jest": "^26.0.23", + "@typescript-eslint/eslint-plugin": "^4.26.0", + "@typescript-eslint/parser": "^4.26.0", "@vue/test-utils": "^1.1.2", "archiver": "^3.0.0", "autoprefixer": "^10.2.4", @@ -59,12 +61,9 @@ "eslint": "6.8.0", "eslint-config-prettier": "^6.10.0", "eslint-config-standard": "^14.1.0", - "eslint-plugin-import": "^2.18.2", "eslint-plugin-jest": "^24.1.3", - "eslint-plugin-node": "^11.0.0", "eslint-plugin-prettier": "^3.1.2", "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-standard": "^4.0.0", "eslint-plugin-vue": "^6.2.2", "eslint-plugin-vuejs-accessibility": "^0.6.1", "focus-trap": "^6.4.0", @@ -76,7 +75,6 @@ "jest-serializer-vue": "^2.0.2", "jest-svg-transformer": "^1.0.0", "join-path": "^1.1.1", - "jsdom": "^16.6.0", "ldapjs": "^2.2.3", "lodash": "^4.17.21", "nightwatch": "1.5.1", @@ -101,6 +99,11 @@ "rollup-plugin-terser": "^7.0.2", "rollup-plugin-visualizer": "^4.2.0", "rollup-plugin-vue": "^5.1.4", + "ts-jest": "^26.5.6", + "typescript": "^4.3.2", + "@testing-library/jest-dom": "^5.13.0", + "@testing-library/vue": "^5.6.2", + "jsdom": "^16.6.0", "sync-fetch": "^0.3.0", "url-search-params-polyfill": "^8.0.0", "vue-jest": "^3.0.7", diff --git a/rollup.config.js b/rollup.config.js index 7fd33827cb3..70212abae15 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -19,6 +19,7 @@ import serve from 'rollup-plugin-serve' import livereload from 'rollup-plugin-livereload' import html from '@rollup/plugin-html' import globals from 'rollup-plugin-node-globals' +import typescript from '@rollup/plugin-typescript' const production = !process.env.ROLLUP_WATCH @@ -55,6 +56,7 @@ const plugins = [ 'l(o.instance+p,{method:e,body:d.body,headers:h})': 'l(o.instance+p,{method:e,body:d.body,headers:h}).catch(function(e){return r(e)})' }), + typescript(), globals(), json(), copy({ diff --git a/tests/unit/config/jest.config.js b/tests/unit/config/jest.config.js index a7199f91da2..9ef15dae28b 100644 --- a/tests/unit/config/jest.config.js +++ b/tests/unit/config/jest.config.js @@ -4,8 +4,9 @@ const rootDir = path.resolve(__dirname, '../../../') module.exports = { rootDir, modulePaths: [''], - moduleFileExtensions: ['js', 'json', 'vue'], + moduleFileExtensions: ['js', 'ts', 'json', 'vue'], transform: { + '^.+\\.(ts|tsx)$': 'ts-jest', '^.+\\.js$': ['babel-jest', { configFile: path.join(rootDir, '.babelrc') }], '.*\\.(vue)$': 'vue-jest', '^.+\\.svg$': 'jest-svg-transformer' diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000000..4475713c7e4 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,5 @@ +{ + "compilerOptions": { + "target": "es6" + } +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index d5979f64e0e..4babec4fb0e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1179,6 +1179,14 @@ dependencies: "@rollup/pluginutils" "^3.0.8" +"@rollup/plugin-typescript@^8.2.1": + version "8.2.1" + resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-8.2.1.tgz#f1a32d4030cc83432ce36a80a922280f0f0b5d44" + integrity sha512-Qd2E1pleDR4bwyFxqbjt4eJf+wB0UKVMLc7/BAFDGVdAXQMCsD4DUv5/7/ww47BZCYxWtJqe1Lo0KVNswBJlRw== + dependencies: + "@rollup/pluginutils" "^3.1.0" + resolve "^1.17.0" + "@rollup/pluginutils@^3.0.8", "@rollup/pluginutils@^3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b" @@ -1352,7 +1360,7 @@ "@types/jest" "*" axe-core "^3.5.5" -"@types/jest@*": +"@types/jest@*", "@types/jest@^26.0.23": version "26.0.23" resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.23.tgz#a1b7eab3c503b80451d019efb588ec63522ee4e7" integrity sha512-ZHLmWMJ9jJ9PTiT58juykZpL7KjwJywFN3Rr2pTSkyQfydf/rk22yS7W8p5DaVUMQ2BQC7oYiU3FjbTM/mYrOA== @@ -1365,11 +1373,6 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== -"@types/json5@^0.0.29": - version "0.0.29" - resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" - integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= - "@types/minimatch@*", "@types/minimatch@^3.0.3": version "3.0.4" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.4.tgz#f0ec25dbf2f0e4b18647313ac031134ca5b24b21" @@ -1448,7 +1451,21 @@ dependencies: "@types/node" "*" -"@typescript-eslint/experimental-utils@^4.0.1": +"@typescript-eslint/eslint-plugin@^4.26.0": + version "4.27.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.27.0.tgz#0b7fc974e8bc9b2b5eb98ed51427b0be529b4ad0" + integrity sha512-DsLqxeUfLVNp3AO7PC3JyaddmEHTtI9qTSAs+RB6ja27QvIM0TA8Cizn1qcS6vOu+WDLFJzkwkgweiyFhssDdQ== + dependencies: + "@typescript-eslint/experimental-utils" "4.27.0" + "@typescript-eslint/scope-manager" "4.27.0" + debug "^4.3.1" + functional-red-black-tree "^1.0.1" + lodash "^4.17.21" + regexpp "^3.1.0" + semver "^7.3.5" + tsutils "^3.21.0" + +"@typescript-eslint/experimental-utils@4.27.0", "@typescript-eslint/experimental-utils@^4.0.1": version "4.27.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.27.0.tgz#78192a616472d199f084eab8f10f962c0757cd1c" integrity sha512-n5NlbnmzT2MXlyT+Y0Jf0gsmAQzCnQSWXKy4RGSXVStjDvS5we9IWbh7qRVKdGcxT0WYlgcCYUK/HRg7xFhvjQ== @@ -1460,6 +1477,16 @@ eslint-scope "^5.1.1" eslint-utils "^3.0.0" +"@typescript-eslint/parser@^4.26.0": + version "4.27.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.27.0.tgz#85447e573364bce4c46c7f64abaa4985aadf5a94" + integrity sha512-XpbxL+M+gClmJcJ5kHnUpBGmlGdgNvy6cehgR6ufyxkEJMGP25tZKCaKyC0W/JVpuhU3VU1RBn7SYUPKSMqQvQ== + dependencies: + "@typescript-eslint/scope-manager" "4.27.0" + "@typescript-eslint/types" "4.27.0" + "@typescript-eslint/typescript-estree" "4.27.0" + debug "^4.3.1" + "@typescript-eslint/scope-manager@4.27.0": version "4.27.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.27.0.tgz#b0b1de2b35aaf7f532e89c8e81d0fa298cae327d" @@ -1876,17 +1903,6 @@ array-differ@^3.0.0: resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b" integrity sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg== -array-includes@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.3.tgz#c7f619b382ad2afaf5326cddfdc0afc61af7690a" - integrity sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.18.0-next.2" - get-intrinsic "^1.1.1" - is-string "^1.0.5" - array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" @@ -1897,15 +1913,6 @@ array-unique@^0.3.2: resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= -array.prototype.flat@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz#6ef638b43312bd401b4c6199fdec7e2dc9e9a123" - integrity sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - es-abstract "^1.18.0-next.1" - arrify@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" @@ -2135,12 +2142,12 @@ babel-plugin-polyfill-corejs2@^0.2.2: semver "^6.1.1" babel-plugin-polyfill-corejs3@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.2.tgz#7424a1682ee44baec817327710b1b094e5f8f7f5" - integrity sha512-l1Cf8PKk12eEk5QP/NQ6TH8A1pee6wWDJ96WjxrMXFLHLOBFzYM4moG80HFgduVhTqAFez4alnZKEhP/bYHg0A== + version "0.2.3" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.3.tgz#72add68cf08a8bf139ba6e6dfc0b1d504098e57b" + integrity sha512-rCOFzEIJpJEAU14XCcV/erIf/wZQMmMT5l5vXOpL5uoznyOGfDIjPj6FVytMvtzaKSTSVKouOCTPJ5OMUZH30g== dependencies: "@babel/helper-define-polyfill-provider" "^0.2.2" - core-js-compat "^3.9.1" + core-js-compat "^3.14.0" babel-plugin-polyfill-regenerator@^0.2.2: version "0.2.2" @@ -2473,6 +2480,13 @@ browserslist@^4.0.0, browserslist@^4.16.6: escalade "^3.1.1" node-releases "^1.1.71" +bs-logger@0.x: + version "0.2.6" + resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" + integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== + dependencies: + fast-json-stable-stringify "2.x" + bser@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" @@ -2495,16 +2509,16 @@ buffer-es6@^4.9.2, buffer-es6@^4.9.3: resolved "https://registry.yarnpkg.com/buffer-es6/-/buffer-es6-4.9.3.tgz#f26347b82df76fd37e18bcb5288c4970cfd5c404" integrity sha1-8mNHuC33b9N+GLy1KIxJcM/VxAQ= +buffer-from@1.x, buffer-from@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + buffer-from@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-0.1.2.tgz#15f4b9bcef012044df31142c14333caf6e0260d0" integrity sha512-RiWIenusJsmI2KcvqQABB83tLxCByE3upSP8QU3rJDMVFGPWLvPQJt/O1Su9moRWeH7d+Q2HYb68f6+v+tw2vg== -buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== - buffer-xor@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" @@ -3063,7 +3077,7 @@ copy-to-clipboard@^3.3.1: dependencies: toggle-selection "^1.0.6" -core-js-compat@^3.14.0, core-js-compat@^3.9.1: +core-js-compat@^3.14.0: version "3.14.0" resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.14.0.tgz#b574dabf29184681d5b16357bd33d104df3d29a5" integrity sha512-R4NS2eupxtiJU+VwgkF9WTpnSfZW4pogwKHd8bclWU2sp93Pr5S1uYJI84cMOubJRou7bcfL0vmwtLslWN5p3A== @@ -3515,7 +3529,7 @@ deasync@^0.1.15: bindings "^1.5.0" node-addon-api "^1.7.1" -debug@2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: +debug@2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -3543,7 +3557,7 @@ debug@4, debug@4.3.1, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0, de dependencies: ms "2.1.2" -debug@^3.1.0, debug@^3.2.7: +debug@^3.1.0: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== @@ -3750,13 +3764,6 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" -doctrine@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" - integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== - dependencies: - esutils "^2.0.2" - doctrine@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" @@ -4002,7 +4009,7 @@ error-stack-parser@^2.0.6: dependencies: stackframe "^1.1.1" -es-abstract@^1.17.2, es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2, es-abstract@^1.18.2: +es-abstract@^1.17.2, es-abstract@^1.18.0-next.2, es-abstract@^1.18.2: version "1.18.3" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.3.tgz#25c4c3380a27aa203c44b2b685bba94da31b63e0" integrity sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw== @@ -4127,51 +4134,6 @@ eslint-config-standard@^14.1.0: resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz#830a8e44e7aef7de67464979ad06b406026c56ea" integrity sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg== -eslint-import-resolver-node@^0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" - integrity sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA== - dependencies: - debug "^2.6.9" - resolve "^1.13.1" - -eslint-module-utils@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.1.tgz#b51be1e473dd0de1c5ea638e22429c2490ea8233" - integrity sha512-ZXI9B8cxAJIH4nfkhTwcRTEAnrVfobYqwjWy/QMCZ8rHkZHFjf9yO4BzpiF9kCSfNlMG54eKigISHpX0+AaT4A== - dependencies: - debug "^3.2.7" - pkg-dir "^2.0.0" - -eslint-plugin-es@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893" - integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ== - dependencies: - eslint-utils "^2.0.0" - regexpp "^3.0.0" - -eslint-plugin-import@^2.18.2: - version "2.23.4" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.23.4.tgz#8dceb1ed6b73e46e50ec9a5bb2411b645e7d3d97" - integrity sha512-6/wP8zZRsnQFiR3iaPFgh5ImVRM1WN5NUWfTIRqwOdeiGJlBcSk82o1FEVq8yXmy4lkIzTo7YhHCIxlU/2HyEQ== - dependencies: - array-includes "^3.1.3" - array.prototype.flat "^1.2.4" - debug "^2.6.9" - doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.4" - eslint-module-utils "^2.6.1" - find-up "^2.0.0" - has "^1.0.3" - is-core-module "^2.4.0" - minimatch "^3.0.4" - object.values "^1.1.3" - pkg-up "^2.0.0" - read-pkg-up "^3.0.0" - resolve "^1.20.0" - tsconfig-paths "^3.9.0" - eslint-plugin-jest@^24.1.3: version "24.3.6" resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.3.6.tgz#5f0ca019183c3188c5ad3af8e80b41de6c8e9173" @@ -4179,18 +4141,6 @@ eslint-plugin-jest@^24.1.3: dependencies: "@typescript-eslint/experimental-utils" "^4.0.1" -eslint-plugin-node@^11.0.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d" - integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g== - dependencies: - eslint-plugin-es "^3.0.0" - eslint-utils "^2.0.0" - ignore "^5.1.1" - minimatch "^3.0.4" - resolve "^1.10.1" - semver "^6.1.0" - eslint-plugin-prettier@^3.1.2: version "3.4.0" resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.0.tgz#cdbad3bf1dbd2b177e9825737fe63b476a08f0c7" @@ -4203,11 +4153,6 @@ eslint-plugin-promise@^4.2.1: resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.3.1.tgz#61485df2a359e03149fdafc0a68b0e030ad2ac45" integrity sha512-bY2sGqyptzFBDLh/GMbAxfdJC+b0f23ME63FOE4+Jao0oZ3E1LEwFtWJX/1pGMJLiTtrSSern2CRM/g+dfc0eQ== -eslint-plugin-standard@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.1.0.tgz#0c3bf3a67e853f8bbbc580fb4945fbf16f41b7c5" - integrity sha512-ZL7+QRixjTR6/528YNGyDotyffm5OQst/sGxKDwGb9Uqs4In5Egi4+jbobhqJoyoCM6/7v/1A5fhQ7ScMtDjaQ== - eslint-plugin-vue@^6.2.2: version "6.2.2" resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-6.2.2.tgz#27fecd9a3a24789b0f111ecdd540a9e56198e0fe" @@ -4241,13 +4186,6 @@ eslint-utils@^1.4.3: dependencies: eslint-visitor-keys "^1.1.0" -eslint-utils@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" - integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== - dependencies: - eslint-visitor-keys "^1.1.0" - eslint-utils@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" @@ -4557,7 +4495,7 @@ fast-glob@^3.0.3, fast-glob@^3.1.1: micromatch "^4.0.2" picomatch "^2.2.1" -fast-json-stable-stringify@^2.0.0: +fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== @@ -4685,13 +4623,6 @@ find-up@3.0.0, find-up@^3.0.0: dependencies: locate-path "^3.0.0" -find-up@^2.0.0, find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= - dependencies: - locate-path "^2.0.0" - find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -5027,9 +4958,9 @@ globby@^10.0.1: slash "^3.0.0" globby@^11.0.1, globby@^11.0.3: - version "11.0.3" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.3.tgz#9b1f0cb523e171dd1ad8c7b2a9fb4b644b9593cb" - integrity sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg== + version "11.0.4" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.4.tgz#2cbaff77c2f2a62e71e9b2813a67b97a3a3001a5" + integrity sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg== dependencies: array-union "^2.1.0" dir-glob "^3.0.1" @@ -5540,7 +5471,7 @@ is-color-stop@^1.0.0: rgb-regex "^1.0.1" rgba-regex "^1.0.0" -is-core-module@^2.2.0, is-core-module@^2.4.0: +is-core-module@^2.2.0: version "2.4.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.4.0.tgz#8e9fc8e15027b011418026e98f0e6f4d86305cc1" integrity sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A== @@ -6244,7 +6175,7 @@ jest-svg-transformer@^1.0.0: resolved "https://registry.yarnpkg.com/jest-svg-transformer/-/jest-svg-transformer-1.0.0.tgz#e38884ca4cd8b2295cdfa2a0b24667920c3a8a6d" integrity sha1-44iEykzYsilc36KgskZnkgw6im0= -jest-util@^26.6.2: +jest-util@^26.1.0, jest-util@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.2.tgz#907535dbe4d5a6cb4c47ac9b926f6af29576cbc1" integrity sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q== @@ -6459,6 +6390,13 @@ json-stringify-safe@~5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= +json5@2.x, json5@^2.1.2, json5@^2.1.3: + version "2.2.0" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3" + integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA== + dependencies: + minimist "^1.2.5" + json5@^0.5.0, json5@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" @@ -6471,13 +6409,6 @@ json5@^1.0.1: dependencies: minimist "^1.2.0" -json5@^2.1.2, json5@^2.1.3: - version "2.2.0" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3" - integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA== - dependencies: - minimist "^1.2.5" - jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -6759,16 +6690,6 @@ load-bmfont@^1.2.3: xhr "^2.0.1" xtend "^4.0.0" -load-json-file@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" - integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs= - dependencies: - graceful-fs "^4.1.2" - parse-json "^4.0.0" - pify "^3.0.0" - strip-bom "^3.0.0" - loader-utils@^0.2.16: version "0.2.17" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" @@ -6788,14 +6709,6 @@ loader-utils@^1.1.0: emojis-list "^3.0.0" json5 "^1.0.1" -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" @@ -7009,7 +6922,7 @@ lodash.uniqby@4.5.0: lodash._baseiteratee "~4.7.0" lodash._baseuniq "~4.6.0" -lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.7.0: +lodash@4.x, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.7.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -7113,6 +7026,11 @@ make-dir@^3.0.0: dependencies: semver "^6.0.0" +make-error@1.x: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + makeerror@1.0.x: version "1.0.11" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" @@ -7305,6 +7223,11 @@ mkdirp@0.5.4: dependencies: minimist "^1.2.5" +mkdirp@1.x, mkdirp@^1.0.4, mkdirp@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + mkdirp@^0.5.1, mkdirp@~0.5.1: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" @@ -7312,11 +7235,6 @@ mkdirp@^0.5.1, mkdirp@~0.5.1: dependencies: minimist "^1.2.5" -mkdirp@^1.0.4, mkdirp@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - mkpath@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/mkpath/-/mkpath-1.0.0.tgz#ebb3a977e7af1c683ae6fda12b545a6ba6c5853d" @@ -7561,7 +7479,7 @@ nopt@^5.0.0: dependencies: abbrev "1" -normalize-package-data@^2.3.2, normalize-package-data@^2.5.0: +normalize-package-data@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== @@ -7707,7 +7625,7 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" -object.values@^1.1.0, object.values@^1.1.3: +object.values@^1.1.0: version "1.1.4" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.4.tgz#0d273762833e816b693a637d30073e7051535b30" integrity sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg== @@ -7833,13 +7751,6 @@ p-finally@^1.0.0: resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - p-limit@^2.0.0, p-limit@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" @@ -7854,13 +7765,6 @@ p-limit@^3.1.0: dependencies: yocto-queue "^0.1.0" -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= - dependencies: - p-limit "^1.1.0" - p-locate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" @@ -7904,11 +7808,6 @@ p-timeout@^3.2.0: dependencies: p-finally "^1.0.0" -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= - p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -8057,13 +7956,6 @@ path-posix@^1.0.0: resolved "https://registry.yarnpkg.com/path-posix/-/path-posix-1.0.0.tgz#06b26113f56beab042545a23bfa88003ccac260f" integrity sha1-BrJhE/Vr6rBCVFojv6iAA8ysJg8= -path-type@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" - integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== - dependencies: - pify "^3.0.0" - path-type@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" @@ -8100,11 +7992,6 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.2.3: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= - pify@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" @@ -8136,13 +8023,6 @@ pixelmatch@^4.0.0: dependencies: pngjs "^3.0.0" -pkg-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" - integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= - dependencies: - find-up "^2.1.0" - pkg-dir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" @@ -8157,13 +8037,6 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" -pkg-up@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f" - integrity sha1-yBmscoBZpGHKscOImivjxJoATX8= - dependencies: - find-up "^2.1.0" - please-upgrade-node@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942" @@ -8567,9 +8440,9 @@ postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.27, postcss@^7.0.36: supports-color "^6.1.0" postcss@^8.1.10, postcss@^8.2.15: - version "8.3.4" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.4.tgz#41ece1c43f2f7c74dc7d90144047ce052757b822" - integrity sha512-/tZY0PXExXXnNhKv3TOvZAOUYRyuqcCbBm2c17YMDK0PlVII3K7/LKdt3ScHL+hhouddjUWi+1sKDf9xXW+8YA== + version "8.3.5" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.5.tgz#982216b113412bc20a86289e91eb994952a5b709" + integrity sha512-NxTuJocUhYGsMiMFHDUkmjSKT3EdH4/WbGF6GCi1NDGk+vbcUTun4fpbOqaPtD8IIsztA2ilZm2DhYCuyN58gA== dependencies: colorette "^1.2.2" nanoid "^3.1.23" @@ -8921,14 +8794,6 @@ read-chunk@^1.0.1: resolved "https://registry.yarnpkg.com/read-chunk/-/read-chunk-1.0.1.tgz#5f68cab307e663f19993527d9b589cace4661194" integrity sha1-X2jKswfmY/GZk1J9m1icrORmEZQ= -read-pkg-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" - integrity sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc= - dependencies: - find-up "^2.0.0" - read-pkg "^3.0.0" - read-pkg-up@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" @@ -8938,15 +8803,6 @@ read-pkg-up@^7.0.1: read-pkg "^5.2.0" type-fest "^0.8.1" -read-pkg@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" - integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k= - dependencies: - load-json-file "^4.0.0" - normalize-package-data "^2.3.2" - path-type "^3.0.0" - read-pkg@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" @@ -9056,7 +8912,7 @@ regexpp@^2.0.1: resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== -regexpp@^3.0.0: +regexpp@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== @@ -9195,7 +9051,7 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.15.1, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.3.3: +resolve@^1.10.0, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.14.2, resolve@^1.15.1, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.19.0, resolve@^1.3.3: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== @@ -9405,9 +9261,9 @@ rollup-pluginutils@^2.3.1, rollup-pluginutils@^2.8.1, rollup-pluginutils@^2.8.2: estree-walker "^0.6.1" rollup@^2.38.5: - version "2.52.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.52.0.tgz#9df3de6028fae79569a985942b81110205a5a411" - integrity sha512-lSkBDGsVoXjqaBf7dsHwxBJz+p+hJEP72P+LOitA0yVs+Nzxj76FidkZE2thrmhjwGqLYiJo39opi7mAfaQ/Vg== + version "2.52.1" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.52.1.tgz#dd1cc178d70cf35c48d943fc06fdc32d546e6876" + integrity sha512-/SPqz8UGnp4P1hq6wc9gdTqA2bXQXGx13TtoL03GBm6qGRI6Hm3p4Io7GeiHNLl0BsQAne1JNYY+q/apcY933w== optionalDependencies: fsevents "~2.3.2" @@ -9524,18 +9380,18 @@ semver@7.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== -semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -semver@^7.3.2, semver@^7.3.5: +semver@7.x, semver@^7.3.2, semver@^7.3.5: version "7.3.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== dependencies: lru-cache "^6.0.0" +semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + serialize-error@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-4.1.0.tgz#63e1e33ede20bcd89d9f0528ea4c15fbf0f2b78a" @@ -10371,15 +10227,21 @@ tr46@^2.1.0: dependencies: punycode "^2.1.1" -tsconfig-paths@^3.9.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz#098547a6c4448807e8fcb8eae081064ee9a3c90b" - integrity sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw== - dependencies: - "@types/json5" "^0.0.29" - json5 "^1.0.1" - minimist "^1.2.0" - strip-bom "^3.0.0" +ts-jest@^26.5.6: + version "26.5.6" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.5.6.tgz#c32e0746425274e1dfe333f43cd3c800e014ec35" + integrity sha512-rua+rCP8DxpA8b4DQD/6X2HQS8Zy/xzViVYfEs2OQu68tkCuKLV0Md8pmX55+W24uRIyAsf/BajRfxOs+R2MKA== + dependencies: + bs-logger "0.x" + buffer-from "1.x" + fast-json-stable-stringify "2.x" + jest-util "^26.1.0" + json5 "2.x" + lodash "4.x" + make-error "1.x" + mkdirp "1.x" + semver "7.x" + yargs-parser "20.x" tsconfig@^7.0.0: version "7.0.0" @@ -10492,6 +10354,11 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= +typescript@^4.3.2: + version "4.3.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.3.tgz#5401db69bd3203daf1851a1a74d199cb3112c11a" + integrity sha512-rUvLW0WtF7PF2b9yenwWUi9Da9euvDRhmH7BLyBG4DCFfOJ850LGNknmRpp8Z8kXNUPObdZQEfKOiHtXuQHHKA== + uikit@3.5.16: version "3.5.16" resolved "https://registry.yarnpkg.com/uikit/-/uikit-3.5.16.tgz#c1803f03ab8891884b6a826838390e74c6636f47" @@ -11077,9 +10944,9 @@ write@1.0.3: mkdirp "^0.5.1" ws@^7.4.3, ws@^7.4.5: - version "7.4.6" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" - integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== + version "7.5.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.0.tgz#0033bafea031fb9df041b2026fc72a571ca44691" + integrity sha512-6ezXvzOZupqKj4jUqbQ9tXuJNo+BR2gU8fFRk3XCP3e0G6WT414u5ELe6Y0vtp7kmSJ3F7YWObSNr1ESsgi4vw== xhr@^2.0.1, xhr@^2.5.0: version "2.6.0" @@ -11204,6 +11071,11 @@ yargs-parser@13.1.2, yargs-parser@^13.1.2: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@20.x, yargs-parser@^20.2.2: + version "20.2.7" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.7.tgz#61df85c113edfb5a7a4e36eb8aa60ef423cbc90a" + integrity sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw== + yargs-parser@^18.1.2: version "18.1.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" @@ -11212,11 +11084,6 @@ yargs-parser@^18.1.2: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^20.2.2: - version "20.2.7" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.7.tgz#61df85c113edfb5a7a4e36eb8aa60ef423cbc90a" - integrity sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw== - yargs-unparser@1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" From 65efc27b5e9eb4d71256bdae0204b5169ebcbeeb Mon Sep 17 00:00:00 2001 From: Florian Schade Date: Thu, 3 Jun 2021 09:19:50 +0200 Subject: [PATCH 03/39] update eslint and install some packages to make eslint-config-standard happy --- .eslintrc.js | 4 - package.json | 8 +- yarn.lock | 592 +++++++++++++++++++++++++++++++++++---------------- 3 files changed, 410 insertions(+), 194 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 2408b8c546f..5ee6140311f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -5,10 +5,6 @@ module.exports = { amd: true }, extends: [ - /** - * TODO: fix promise project issues and then enable it - * 'plugin:promise/recommended', - */ 'standard', 'prettier/standard', 'plugin:prettier/recommended', diff --git a/package.json b/package.json index ac596692199..a661f26a2cc 100644 --- a/package.json +++ b/package.json @@ -58,12 +58,14 @@ "cucumber-pretty": ">=6.0.0", "depcheck": "^1.3.1", "ejs": "^3.1.5", - "eslint": "6.8.0", + "eslint": "^7.27.0", "eslint-config-prettier": "^6.10.0", - "eslint-config-standard": "^14.1.0", + "eslint-config-standard": "^16.0.3", + "eslint-plugin-import": "^2.23.4", "eslint-plugin-jest": "^24.1.3", + "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.1.2", - "eslint-plugin-promise": "^4.2.1", + "eslint-plugin-promise": "^5.1.0", "eslint-plugin-vue": "^6.2.2", "eslint-plugin-vuejs-accessibility": "^0.6.1", "focus-trap": "^6.4.0", diff --git a/yarn.lock b/yarn.lock index 4babec4fb0e..91297012e2d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,13 @@ # yarn lockfile v1 +"@babel/code-frame@7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" + integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== + dependencies: + "@babel/highlight" "^7.10.4" + "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.14.5.tgz#23b08d740e83f49c5e59945fbf1b43e80bbf4edb" @@ -242,7 +249,7 @@ "@babel/traverse" "^7.14.5" "@babel/types" "^7.14.5" -"@babel/highlight@^7.14.5": +"@babel/highlight@^7.10.4", "@babel/highlight@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9" integrity sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg== @@ -941,6 +948,21 @@ crypto-browserify "^3.11.0" process-es6 "^0.11.2" +"@eslint/eslintrc@^0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.2.tgz#f63d0ef06f5c0c57d76c4ab5f63d3835c51b0179" + integrity sha512-8nmGq/4ycLpIwzvhI4tNDmQztZ8sp+hI7cyG8i1nQDhkAbRzHpXPidRAHlNvCZQpJTKw5ItIpMw9RSToGF00mg== + dependencies: + ajv "^6.12.4" + debug "^4.1.1" + espree "^7.3.0" + globals "^13.9.0" + ignore "^4.0.6" + import-fresh "^3.2.1" + js-yaml "^3.13.1" + minimatch "^3.0.4" + strip-json-comments "^3.1.1" + "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -1373,6 +1395,11 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= + "@types/minimatch@*", "@types/minimatch@^3.0.3": version "3.0.4" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.4.tgz#f0ec25dbf2f0e4b18647313ac031134ca5b24b21" @@ -1665,7 +1692,7 @@ acorn-globals@^6.0.0: acorn "^7.1.1" acorn-walk "^7.1.1" -acorn-jsx@^5.2.0: +acorn-jsx@^5.2.0, acorn-jsx@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b" integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng== @@ -1752,7 +1779,7 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.3: +ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -1762,6 +1789,16 @@ ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.3: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ajv@^8.0.1: + version "8.6.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.6.0.tgz#60cc45d9c46a477d80d92c48076d972c342e5720" + integrity sha512-cnUG4NSBiM4YFBxgZIj/In3/6KX+rQ2l2YPRVcvAMQGWEPKuXoPIhxzwqh31jA3IPbI4qEOp/5ILI4ynioXsGQ== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + alphanum-sort@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" @@ -1772,6 +1809,11 @@ ansi-colors@3.2.3: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== +ansi-colors@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + ansi-escapes@^4.2.1: version "4.3.2" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" @@ -1903,6 +1945,17 @@ array-differ@^3.0.0: resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b" integrity sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg== +array-includes@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.3.tgz#c7f619b382ad2afaf5326cddfdc0afc61af7690a" + integrity sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.2" + get-intrinsic "^1.1.1" + is-string "^1.0.5" + array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" @@ -1913,6 +1966,15 @@ array-unique@^0.3.2: resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= +array.prototype.flat@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz#6ef638b43312bd401b4c6199fdec7e2dc9e9a123" + integrity sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.1" + arrify@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" @@ -1986,10 +2048,10 @@ ast-types@0.x.x: dependencies: tslib "^2.0.1" -astral-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" - integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== async@0.9.x: version "0.9.2" @@ -2687,11 +2749,6 @@ character-parser@^2.2.0: dependencies: is-regex "^1.0.3" -chardet@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" - integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== - charenc@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667" @@ -2812,11 +2869,6 @@ cli-table3@^0.5.1: optionalDependencies: colors "^1.1.2" -cli-width@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" - integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== - cliui@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" @@ -3179,7 +3231,7 @@ cross-fetch@^3.0.4, cross-fetch@^3.0.6: dependencies: node-fetch "2.6.1" -cross-spawn@^6.0.0, cross-spawn@^6.0.5: +cross-spawn@^6.0.0: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== @@ -3190,7 +3242,7 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^7.0.0: +cross-spawn@^7.0.0, cross-spawn@^7.0.2: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -3529,7 +3581,7 @@ deasync@^0.1.15: bindings "^1.5.0" node-addon-api "^1.7.1" -debug@2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8: +debug@2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -3557,7 +3609,7 @@ debug@4, debug@4.3.1, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0, de dependencies: ms "2.1.2" -debug@^3.1.0: +debug@^3.1.0, debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== @@ -3764,6 +3816,13 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + dependencies: + esutils "^2.0.2" + doctrine@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" @@ -3978,6 +4037,13 @@ end-of-stream@^1.1.0, end-of-stream@^1.4.1: dependencies: once "^1.4.0" +enquirer@^2.3.5: + version "2.3.6" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" + integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== + dependencies: + ansi-colors "^4.1.1" + entities@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" @@ -4009,7 +4075,7 @@ error-stack-parser@^2.0.6: dependencies: stackframe "^1.1.1" -es-abstract@^1.17.2, es-abstract@^1.18.0-next.2, es-abstract@^1.18.2: +es-abstract@^1.17.2, es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2, es-abstract@^1.18.2: version "1.18.3" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.3.tgz#25c4c3380a27aa203c44b2b685bba94da31b63e0" integrity sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw== @@ -4098,6 +4164,11 @@ escape-string-regexp@^2.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + escodegen@1.x.x: version "1.14.3" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" @@ -4129,10 +4200,55 @@ eslint-config-prettier@^6.10.0: dependencies: get-stdin "^6.0.0" -eslint-config-standard@^14.1.0: - version "14.1.1" - resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz#830a8e44e7aef7de67464979ad06b406026c56ea" - integrity sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg== +eslint-config-standard@^16.0.3: + version "16.0.3" + resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-16.0.3.tgz#6c8761e544e96c531ff92642eeb87842b8488516" + integrity sha512-x4fmJL5hGqNJKGHSjnLdgA6U6h1YW/G2dW9fA+cyVur4SK6lyue8+UgNKWlZtUDTXvgKDD/Oa3GQjmB5kjtVvg== + +eslint-import-resolver-node@^0.3.4: + version "0.3.4" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" + integrity sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA== + dependencies: + debug "^2.6.9" + resolve "^1.13.1" + +eslint-module-utils@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.1.tgz#b51be1e473dd0de1c5ea638e22429c2490ea8233" + integrity sha512-ZXI9B8cxAJIH4nfkhTwcRTEAnrVfobYqwjWy/QMCZ8rHkZHFjf9yO4BzpiF9kCSfNlMG54eKigISHpX0+AaT4A== + dependencies: + debug "^3.2.7" + pkg-dir "^2.0.0" + +eslint-plugin-es@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893" + integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ== + dependencies: + eslint-utils "^2.0.0" + regexpp "^3.0.0" + +eslint-plugin-import@^2.23.4: + version "2.23.4" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.23.4.tgz#8dceb1ed6b73e46e50ec9a5bb2411b645e7d3d97" + integrity sha512-6/wP8zZRsnQFiR3iaPFgh5ImVRM1WN5NUWfTIRqwOdeiGJlBcSk82o1FEVq8yXmy4lkIzTo7YhHCIxlU/2HyEQ== + dependencies: + array-includes "^3.1.3" + array.prototype.flat "^1.2.4" + debug "^2.6.9" + doctrine "^2.1.0" + eslint-import-resolver-node "^0.3.4" + eslint-module-utils "^2.6.1" + find-up "^2.0.0" + has "^1.0.3" + is-core-module "^2.4.0" + minimatch "^3.0.4" + object.values "^1.1.3" + pkg-up "^2.0.0" + read-pkg-up "^3.0.0" + resolve "^1.20.0" + tsconfig-paths "^3.9.0" eslint-plugin-jest@^24.1.3: version "24.3.6" @@ -4141,6 +4257,18 @@ eslint-plugin-jest@^24.1.3: dependencies: "@typescript-eslint/experimental-utils" "^4.0.1" +eslint-plugin-node@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d" + integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g== + dependencies: + eslint-plugin-es "^3.0.0" + eslint-utils "^2.0.0" + ignore "^5.1.1" + minimatch "^3.0.4" + resolve "^1.10.1" + semver "^6.1.0" + eslint-plugin-prettier@^3.1.2: version "3.4.0" resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.0.tgz#cdbad3bf1dbd2b177e9825737fe63b476a08f0c7" @@ -4148,10 +4276,10 @@ eslint-plugin-prettier@^3.1.2: dependencies: prettier-linter-helpers "^1.0.0" -eslint-plugin-promise@^4.2.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.3.1.tgz#61485df2a359e03149fdafc0a68b0e030ad2ac45" - integrity sha512-bY2sGqyptzFBDLh/GMbAxfdJC+b0f23ME63FOE4+Jao0oZ3E1LEwFtWJX/1pGMJLiTtrSSern2CRM/g+dfc0eQ== +eslint-plugin-promise@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-5.1.0.tgz#fb2188fb734e4557993733b41aa1a688f46c6f24" + integrity sha512-NGmI6BH5L12pl7ScQHbg7tvtk4wPxxj8yPHH47NvSmMtFneC077PSeY3huFj06ZWZvtbfxSPt3RuOQD5XcR4ng== eslint-plugin-vue@^6.2.2: version "6.2.2" @@ -4179,10 +4307,10 @@ eslint-scope@^5.0.0, eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-utils@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" - integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== +eslint-utils@^2.0.0, eslint-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" + integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== dependencies: eslint-visitor-keys "^1.1.0" @@ -4193,7 +4321,7 @@ eslint-utils@^3.0.0: dependencies: eslint-visitor-keys "^2.0.0" -eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: +eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== @@ -4203,50 +4331,52 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== -eslint@6.8.0: - version "6.8.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.8.0.tgz#62262d6729739f9275723824302fb227c8c93ffb" - integrity sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig== +eslint@^7.27.0: + version "7.28.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.28.0.tgz#435aa17a0b82c13bb2be9d51408b617e49c1e820" + integrity sha512-UMfH0VSjP0G4p3EWirscJEQ/cHqnT/iuH6oNZOB94nBjWbMnhGEPxsZm1eyIW0C/9jLI0Fow4W5DXLjEI7mn1g== dependencies: - "@babel/code-frame" "^7.0.0" + "@babel/code-frame" "7.12.11" + "@eslint/eslintrc" "^0.4.2" ajv "^6.10.0" - chalk "^2.1.0" - cross-spawn "^6.0.5" + chalk "^4.0.0" + cross-spawn "^7.0.2" debug "^4.0.1" doctrine "^3.0.0" - eslint-scope "^5.0.0" - eslint-utils "^1.4.3" - eslint-visitor-keys "^1.1.0" - espree "^6.1.2" - esquery "^1.0.1" + enquirer "^2.3.5" + escape-string-regexp "^4.0.0" + eslint-scope "^5.1.1" + eslint-utils "^2.1.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" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" functional-red-black-tree "^1.0.1" - glob-parent "^5.0.0" - globals "^12.1.0" + glob-parent "^5.1.2" + globals "^13.6.0" ignore "^4.0.6" import-fresh "^3.0.0" imurmurhash "^0.1.4" - inquirer "^7.0.0" is-glob "^4.0.0" js-yaml "^3.13.1" json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.3.0" - lodash "^4.17.14" + levn "^0.4.1" + lodash.merge "^4.6.2" minimatch "^3.0.4" - mkdirp "^0.5.1" natural-compare "^1.4.0" - optionator "^0.8.3" + optionator "^0.9.1" progress "^2.0.0" - regexpp "^2.0.1" - semver "^6.1.2" - strip-ansi "^5.2.0" - strip-json-comments "^3.0.1" - table "^5.2.3" + regexpp "^3.1.0" + semver "^7.2.1" + strip-ansi "^6.0.0" + strip-json-comments "^3.1.0" + table "^6.0.9" text-table "^0.2.0" v8-compile-cache "^2.0.3" -espree@^6.1.2, espree@^6.2.1: +espree@^6.2.1: version "6.2.1" resolved "https://registry.yarnpkg.com/espree/-/espree-6.2.1.tgz#77fc72e1fd744a2052c20f38a5b575832e82734a" integrity sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw== @@ -4255,6 +4385,15 @@ espree@^6.1.2, espree@^6.2.1: acorn-jsx "^5.2.0" eslint-visitor-keys "^1.1.0" +espree@^7.3.0, espree@^7.3.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" + integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== + dependencies: + acorn "^7.4.0" + acorn-jsx "^5.3.1" + eslint-visitor-keys "^1.3.0" + esprima@3.x.x: version "3.1.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" @@ -4265,7 +4404,7 @@ esprima@^4.0.0, esprima@^4.0.1: resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.0.1, esquery@^1.4.0: +esquery@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== @@ -4422,15 +4561,6 @@ extend@^3.0.2, extend@~3.0.2: resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== -external-editor@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" - integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== - dependencies: - chardet "^0.7.0" - iconv-lite "^0.4.24" - tmp "^0.0.33" - extglob@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" @@ -4473,7 +4603,7 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= -fast-deep-equal@^3.1.1: +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== @@ -4500,7 +4630,7 @@ fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== -fast-levenshtein@~2.0.6: +fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= @@ -4543,12 +4673,12 @@ figures@^3.0.0: dependencies: escape-string-regexp "^1.0.5" -file-entry-cache@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" - integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== dependencies: - flat-cache "^2.0.1" + flat-cache "^3.0.4" file-type@^3.1.0: version "3.9.0" @@ -4623,6 +4753,13 @@ find-up@3.0.0, find-up@^3.0.0: dependencies: locate-path "^3.0.0" +find-up@^2.0.0, find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= + dependencies: + locate-path "^2.0.0" + find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -4631,14 +4768,13 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" -flat-cache@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" - integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== +flat-cache@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" + integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== dependencies: - flatted "^2.0.0" - rimraf "2.6.3" - write "1.0.3" + flatted "^3.1.0" + rimraf "^3.0.2" flat@^4.1.0: version "4.1.1" @@ -4652,6 +4788,11 @@ flatted@^2.0.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== +flatted@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.1.tgz#c4b489e80096d9df1dfc97c79871aea7c617c469" + integrity sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA== + flow-parser@^0.153.0: version "0.153.0" resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.153.0.tgz#bac7e977c79f380b07088d36fd0fccea24435db8" @@ -4873,7 +5014,7 @@ gherkin@5.0.0: resolved "https://registry.yarnpkg.com/gherkin/-/gherkin-5.0.0.tgz#96def41198ec3908258b511af74f655a2764d2a1" integrity sha1-lt70EZjsOQgli1Ea909lWidk0qE= -glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@~5.1.2: +glob-parent@^5.1.0, glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== @@ -4917,12 +5058,12 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^12.1.0: - version "12.4.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8" - integrity sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg== +globals@^13.6.0, globals@^13.9.0: + version "13.9.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.9.0.tgz#4bf2bf635b334a173fb1daf7c5e6b218ecdc06cb" + integrity sha512-74/FduwI/JaIrr1H8e71UbDE+5x7pIPs1C2rrwC52SszOo043CsWOZEMW7o2Y58xwm9b+0RBKDxY5n2sUpEFxA== dependencies: - type-fest "^0.8.1" + type-fest "^0.20.2" globals@^9.18.0: version "9.18.0" @@ -5213,7 +5354,7 @@ human-signals@^1.1.1: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== -iconv-lite@0.4.24, iconv-lite@^0.4.24: +iconv-lite@0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -5341,25 +5482,6 @@ ini@^1.3.4: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== -inquirer@^7.0.0: - version "7.3.3" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003" - integrity sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA== - dependencies: - ansi-escapes "^4.2.1" - chalk "^4.1.0" - cli-cursor "^3.1.0" - cli-width "^3.0.0" - external-editor "^3.0.3" - figures "^3.0.0" - lodash "^4.17.19" - mute-stream "0.0.8" - run-async "^2.4.0" - rxjs "^6.6.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - through "^2.3.6" - invariant@2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" @@ -5471,7 +5593,7 @@ is-color-stop@^1.0.0: rgb-regex "^1.0.1" rgba-regex "^1.0.0" -is-core-module@^2.2.0: +is-core-module@^2.2.0, is-core-module@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.4.0.tgz#8e9fc8e15027b011418026e98f0e6f4d86305cc1" integrity sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A== @@ -6375,6 +6497,11 @@ json-schema-traverse@^0.4.1: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" @@ -6643,7 +6770,15 @@ leven@^3.1.0: resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== -levn@^0.3.0, levn@~0.3.0: +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + +levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= @@ -6690,6 +6825,16 @@ load-bmfont@^1.2.3: xhr "^2.0.1" xtend "^4.0.0" +load-json-file@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" + integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs= + dependencies: + graceful-fs "^4.1.2" + parse-json "^4.0.0" + pify "^3.0.0" + strip-bom "^3.0.0" + loader-utils@^0.2.16: version "0.2.17" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" @@ -6709,6 +6854,14 @@ loader-utils@^1.1.0: emojis-list "^3.0.0" json5 "^1.0.1" +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" @@ -6904,6 +7057,11 @@ lodash.throttle@^4.1.1: resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4" integrity sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ= +lodash.truncate@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" + integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= + lodash.union@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88" @@ -7228,7 +7386,7 @@ mkdirp@1.x, mkdirp@^1.0.4, mkdirp@~1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -mkdirp@^0.5.1, mkdirp@~0.5.1: +mkdirp@~0.5.1: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== @@ -7479,7 +7637,7 @@ nopt@^5.0.0: dependencies: abbrev "1" -normalize-package-data@^2.5.0: +normalize-package-data@^2.3.2, normalize-package-data@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== @@ -7625,7 +7783,7 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" -object.values@^1.1.0: +object.values@^1.1.0, object.values@^1.1.3: version "1.1.4" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.4.tgz#0d273762833e816b693a637d30073e7051535b30" integrity sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg== @@ -7676,7 +7834,7 @@ opener@1: resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== -optionator@^0.8.1, optionator@^0.8.3: +optionator@^0.8.1: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== @@ -7688,6 +7846,18 @@ optionator@^0.8.1, optionator@^0.8.3: type-check "~0.3.2" word-wrap "~1.2.3" +optionator@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" + integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.3" + "opts@>= 1.2.0": version "2.0.2" resolved "https://registry.yarnpkg.com/opts/-/opts-2.0.2.tgz#a17e189fbbfee171da559edd8a42423bc5993ce1" @@ -7707,11 +7877,6 @@ ora@^4.0.3: strip-ansi "^6.0.0" wcwidth "^1.0.1" -os-tmpdir@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= - ospec@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/ospec/-/ospec-3.1.0.tgz#d36b8e10110f58f63a463df2390a7a73fe9579a8" @@ -7751,6 +7916,13 @@ p-finally@^1.0.0: resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + p-limit@^2.0.0, p-limit@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" @@ -7765,6 +7937,13 @@ p-limit@^3.1.0: dependencies: yocto-queue "^0.1.0" +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + dependencies: + p-limit "^1.1.0" + p-locate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" @@ -7808,6 +7987,11 @@ p-timeout@^3.2.0: dependencies: p-finally "^1.0.0" +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= + p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -7956,6 +8140,13 @@ path-posix@^1.0.0: resolved "https://registry.yarnpkg.com/path-posix/-/path-posix-1.0.0.tgz#06b26113f56beab042545a23bfa88003ccac260f" integrity sha1-BrJhE/Vr6rBCVFojv6iAA8ysJg8= +path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== + dependencies: + pify "^3.0.0" + path-type@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" @@ -7992,6 +8183,11 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.2.3: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + pify@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" @@ -8023,6 +8219,13 @@ pixelmatch@^4.0.0: dependencies: pngjs "^3.0.0" +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= + dependencies: + find-up "^2.1.0" + pkg-dir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" @@ -8037,6 +8240,13 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" +pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f" + integrity sha1-yBmscoBZpGHKscOImivjxJoATX8= + dependencies: + find-up "^2.1.0" + please-upgrade-node@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942" @@ -8453,6 +8663,11 @@ precond@0.2: resolved "https://registry.yarnpkg.com/precond/-/precond-0.2.3.tgz#aa9591bcaa24923f1e0f4849d240f47efc1075ac" integrity sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw= +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -8794,6 +9009,14 @@ read-chunk@^1.0.1: resolved "https://registry.yarnpkg.com/read-chunk/-/read-chunk-1.0.1.tgz#5f68cab307e663f19993527d9b589cace4661194" integrity sha1-X2jKswfmY/GZk1J9m1icrORmEZQ= +read-pkg-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" + integrity sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc= + dependencies: + find-up "^2.0.0" + read-pkg "^3.0.0" + read-pkg-up@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" @@ -8803,6 +9026,15 @@ read-pkg-up@^7.0.1: read-pkg "^5.2.0" type-fest "^0.8.1" +read-pkg@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" + integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k= + dependencies: + load-json-file "^4.0.0" + normalize-package-data "^2.3.2" + path-type "^3.0.0" + read-pkg@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" @@ -8907,12 +9139,7 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexpp@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" - integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== - -regexpp@^3.1.0: +regexpp@^3.0.0, regexpp@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== @@ -9004,6 +9231,11 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + require-main-filename@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" @@ -9051,7 +9283,7 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.10.0, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.14.2, resolve@^1.15.1, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.19.0, resolve@^1.3.3: +resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.15.1, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.3.3: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== @@ -9092,13 +9324,6 @@ rgba-regex@^1.0.0: resolved "https://registry.yarnpkg.com/rgba-regex/-/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3" integrity sha1-QzdOLiyglosO8VI0YLfXMP8i7rM= -rimraf@2.6.3: - version "2.6.3" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" - integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== - dependencies: - glob "^7.1.3" - rimraf@^3.0.0, rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" @@ -9272,11 +9497,6 @@ rsvp@^4.8.4: resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== -run-async@^2.4.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" - integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== - run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -9284,13 +9504,6 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -rxjs@^6.6.0: - version "6.6.7" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" - integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== - dependencies: - tslib "^1.9.0" - safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -9380,14 +9593,14 @@ semver@7.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== -semver@7.x, semver@^7.3.2, semver@^7.3.5: +semver@7.x, semver@^7.2.1, semver@^7.3.2, semver@^7.3.5: version "7.3.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== dependencies: lru-cache "^6.0.0" -semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: +semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -9497,14 +9710,14 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -slice-ansi@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" - integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== 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" smart-buffer@^4.1.0: version "4.1.0" @@ -9902,7 +10115,7 @@ strip-json-comments@2.0.1, strip-json-comments@^2.0.0: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= -strip-json-comments@^3.0.1: +strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -10020,15 +10233,17 @@ tabbable@^5.2.0: resolved "https://registry.yarnpkg.com/tabbable/-/tabbable-5.2.0.tgz#4fba60991d8bb89d06e5d9455c92b453acf88fb2" integrity sha512-0uyt8wbP0P3T4rrsfYg/5Rg3cIJ8Shl1RJ54QMqYxm1TLdWqJD1u6+RQjr2Lor3wmfT7JRHkirIwy99ydBsyPg== -table@^5.2.3: - version "5.4.6" - resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" - integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== +table@^6.0.9: + version "6.7.1" + resolved "https://registry.yarnpkg.com/table/-/table-6.7.1.tgz#ee05592b7143831a8c94f3cee6aae4c1ccef33e2" + integrity sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg== dependencies: - ajv "^6.10.2" - lodash "^4.17.14" - slice-ansi "^2.1.0" - string-width "^3.0.0" + ajv "^8.0.1" + lodash.clonedeep "^4.5.0" + lodash.truncate "^4.4.2" + slice-ansi "^4.0.0" + string-width "^4.2.0" + strip-ansi "^6.0.0" tar-stream@^2.1.0: version "2.2.0" @@ -10099,11 +10314,6 @@ throat@^5.0.0: resolved "https://registry.yarnpkg.com/throat/-/throat-5.0.0.tgz#c5199235803aad18754a667d659b5e72ce16764b" integrity sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA== -through@^2.3.6: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= - thunkify@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/thunkify/-/thunkify-2.1.2.tgz#faa0e9d230c51acc95ca13a361ac05ca7e04553d" @@ -10134,13 +10344,6 @@ title-case@^2.1.1: no-case "^2.2.0" upper-case "^1.0.3" -tmp@^0.0.33: - version "0.0.33" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" - integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== - dependencies: - os-tmpdir "~1.0.2" - tmpl@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" @@ -10243,6 +10446,16 @@ ts-jest@^26.5.6: semver "7.x" yargs-parser "20.x" +tsconfig-paths@^3.9.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz#098547a6c4448807e8fcb8eae081064ee9a3c90b" + integrity sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.1" + minimist "^1.2.0" + strip-bom "^3.0.0" + tsconfig@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/tsconfig/-/tsconfig-7.0.0.tgz#84538875a4dc216e5c4a5432b3a4dec3d54e91b7" @@ -10253,7 +10466,7 @@ tsconfig@^7.0.0: strip-bom "^3.0.0" strip-json-comments "^2.0.0" -tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0: +tslib@^1.10.0, tslib@^1.8.1: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -10295,6 +10508,13 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0: resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" @@ -10312,6 +10532,11 @@ type-detect@4.0.8: resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + type-fest@^0.21.3: version "0.21.3" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" @@ -10889,7 +11114,7 @@ with@^7.0.0: assert-never "^1.2.1" babel-walk "3.0.0-canary-5" -word-wrap@~1.2.3: +word-wrap@^1.2.3, word-wrap@~1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== @@ -10936,13 +11161,6 @@ write-file-atomic@^3.0.0: signal-exit "^3.0.2" typedarray-to-buffer "^3.1.5" -write@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" - integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== - dependencies: - mkdirp "^0.5.1" - ws@^7.4.3, ws@^7.4.5: version "7.5.0" resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.0.tgz#0033bafea031fb9df041b2026fc72a571ca44691" From d6b4dba00854510c30ab26478397a06e789c817c Mon Sep 17 00:00:00 2001 From: Florian Schade Date: Thu, 3 Jun 2021 09:24:39 +0200 Subject: [PATCH 04/39] fix unnecessary usage of var fix linebreaks reported by eslint fix wrong array find usage fix unnecessary usage of map without return value --- packages/web-app-draw-io/src/App.vue | 6 +++--- packages/web-app-files/src/mixins.js | 6 +----- packages/web-app-files/src/mixins/actions/rename.js | 8 +++----- .../web-runtime/src/components/Notifications.vue | 2 +- packages/web-runtime/src/plugins/upload.js | 2 +- tests/acceptance/customCommands/angryClick.js | 2 +- .../waitForAjaxCallsToStartAndFinish.js | 8 ++++---- tests/acceptance/helpers/ldapHelper.js | 2 +- tests/acceptance/helpers/sharingHelper.js | 12 +++++++++++- tests/acceptance/helpers/webdavHelper.js | 8 ++++---- .../FilesPageElement/publicLinksDialog.js | 2 +- tests/acceptance/stepDefinitions/sharingContext.js | 4 ++-- tests/acceptance/stepDefinitions/webdavContext.js | 1 + 13 files changed, 34 insertions(+), 29 deletions(-) diff --git a/packages/web-app-draw-io/src/App.vue b/packages/web-app-draw-io/src/App.vue index 634af9ed6f0..d8fa73307e9 100644 --- a/packages/web-app-draw-io/src/App.vue +++ b/packages/web-app-draw-io/src/App.vue @@ -57,7 +57,7 @@ export default { this.checkPermissions() window.addEventListener('message', event => { if (event.data.length > 0) { - var payload = JSON.parse(event.data) + const payload = JSON.parse(event.data) switch (payload.event) { case 'init': this.fileExtension === 'vsdx' ? this.importVisio() : this.load() @@ -137,8 +137,8 @@ export default { return resp.arrayBuffer() }) .then(arrayBuffer => { - var blob = new Blob([arrayBuffer], { type: 'application/vnd.visio' }) - var reader = new FileReader() + const blob = new Blob([arrayBuffer], { type: 'application/vnd.visio' }) + const reader = new FileReader() reader.onloadend = () => { this.$refs.drawIoEditor.contentWindow.postMessage( JSON.stringify({ diff --git a/packages/web-app-files/src/mixins.js b/packages/web-app-files/src/mixins.js index e641aa36ccc..db5ee9fb41e 100644 --- a/packages/web-app-files/src/mixins.js +++ b/packages/web-app-files/src/mixins.js @@ -124,11 +124,7 @@ export default { }, checkIfElementExists(element) { const name = element.name || element - return this.files.find(n => { - if (n.name === name) { - return n - } - }) + return this.files.find(file => file.name === name) }, processDirectoryEntryRecursively(directory) { return this.$client.files.createFolder(this.rootPath + directory.fullPath).then(() => { diff --git a/packages/web-app-files/src/mixins/actions/rename.js b/packages/web-app-files/src/mixins/actions/rename.js index 8ba29c9e90c..610757be35b 100644 --- a/packages/web-app-files/src/mixins/actions/rename.js +++ b/packages/web-app-files/src/mixins/actions/rename.js @@ -87,11 +87,9 @@ export default { } if (!this.flatFileList) { - const exists = this.activeFiles.find(n => { - if (n.name === newName && currentName !== newName) { - return n - } - }) + const exists = this.activeFiles.find( + file => file.name === newName && currentName !== newName + ) if (exists) { const translated = this.$gettext('The name "%{name}" is already taken') diff --git a/packages/web-runtime/src/components/Notifications.vue b/packages/web-runtime/src/components/Notifications.vue index 9f3f9ef2439..de83d67d023 100644 --- a/packages/web-runtime/src/components/Notifications.vue +++ b/packages/web-runtime/src/components/Notifications.vue @@ -79,7 +79,7 @@ export default { notification: notificationId }) res.json().then(json => { - json.ocs.data.map(item => { + json.ocs.data.forEach(item => { const path = item.path.substr(0, item.path.lastIndexOf('/') + 1) const absolutePath = this.$route.params.item ? this.$route.params.item : '/' if (path === absolutePath) this.reloadFilesList(path) diff --git a/packages/web-runtime/src/plugins/upload.js b/packages/web-runtime/src/plugins/upload.js index 47253e770f3..37af63f05fc 100644 --- a/packages/web-runtime/src/plugins/upload.js +++ b/packages/web-runtime/src/plugins/upload.js @@ -13,7 +13,7 @@ export default { return new Promise((resolve, reject) => { const headers = this.$client.helpers.buildHeaders() delete headers['OCS-APIREQUEST'] - var mtime = null + let mtime = null if (file.lastModifiedDate) { mtime = file.lastModifiedDate.getTime() / 1000 } diff --git a/tests/acceptance/customCommands/angryClick.js b/tests/acceptance/customCommands/angryClick.js index 40d753535b9..2b37b554583 100644 --- a/tests/acceptance/customCommands/angryClick.js +++ b/tests/acceptance/customCommands/angryClick.js @@ -5,7 +5,7 @@ // Try dismissing lightboxes/overlays by clicking on the body tag, // then click again. exports.command = function angryClick(selector, callback) { - var self = this + const self = this return this.click(selector, function(result) { if (result.status === 0) { // click succeeded, handle callback diff --git a/tests/acceptance/customCommands/waitForAjaxCallsToStartAndFinish.js b/tests/acceptance/customCommands/waitForAjaxCallsToStartAndFinish.js index 818b6ad567b..27057ad3e88 100644 --- a/tests/acceptance/customCommands/waitForAjaxCallsToStartAndFinish.js +++ b/tests/acceptance/customCommands/waitForAjaxCallsToStartAndFinish.js @@ -1,8 +1,8 @@ -var numAjaxRequestsStart = 0 -var start = 0 -var end = 0 +let numAjaxRequestsStart = 0 +let start = 0 +let end = 0 const sleepWhenNoNewAjaxCallsStarted = function(result) { - var currentTime = Date.now() + const currentTime = Date.now() if (result.value <= numAjaxRequestsStart && currentTime < end) { this.pause(this.globals.waitForConditionPollInterval) checkSumStartedAjaxRequests(this) diff --git a/tests/acceptance/helpers/ldapHelper.js b/tests/acceptance/helpers/ldapHelper.js index ded8fadda26..1fd6bb5a7c5 100644 --- a/tests/acceptance/helpers/ldapHelper.js +++ b/tests/acceptance/helpers/ldapHelper.js @@ -200,7 +200,7 @@ exports.addUserToGroup = function(client, user, group) { client.search(groupCn, { attributes: [] }, (err, res) => { if (err) reject(err) res.on('searchEntry', function(entry) { - var memberUid + let memberUid if (entry.object.memberUid) { if ( entry.object.memberUid === user || diff --git a/tests/acceptance/helpers/sharingHelper.js b/tests/acceptance/helpers/sharingHelper.js index dfe9fd6fbaa..859bfea79f8 100644 --- a/tests/acceptance/helpers/sharingHelper.js +++ b/tests/acceptance/helpers/sharingHelper.js @@ -36,7 +36,7 @@ module.exports = { humanReadablePermissions = humanReadablePermissions.map(function(s) { return String.prototype.trim.apply(s) }) - for (var i = 0; i < humanReadablePermissions.length; i++) { + for (let i = 0; i < humanReadablePermissions.length; i++) { if (humanReadablePermissions[i] in this.PERMISSION_TYPES) { permissionBitMask = permissionBitMask + this.PERMISSION_TYPES[humanReadablePermissions[i]] } else { @@ -301,6 +301,11 @@ module.exports = { if (elementsToDecline.length < 1) { throw new Error('Could not find the share to be declined') } + /** + * TODO: loop only run once because the return + * needs tests and further debugging why it's this way + */ + /* eslint-disable-next-line no-unreachable-loop */ for (const element of elementsToDecline) { const shareID = element.id const apiURL = `apps/files_sharing/api/v1/shares/pending/${shareID}` @@ -346,6 +351,11 @@ module.exports = { if (elementsToAccept.length < 1) { throw new Error('Could not find the share to be accepted') } + /** + * TODO: loop only run once because the return + * needs tests and further debugging why it's this way + */ + /* eslint-disable-next-line no-unreachable-loop */ for (const element of elementsToAccept) { const shareID = element.id const apiURL = `apps/files_sharing/api/v1/shares/pending/${shareID}` diff --git a/tests/acceptance/helpers/webdavHelper.js b/tests/acceptance/helpers/webdavHelper.js index 3a3f6f1a66d..d08a8e7ec2b 100644 --- a/tests/acceptance/helpers/webdavHelper.js +++ b/tests/acceptance/helpers/webdavHelper.js @@ -95,7 +95,7 @@ exports.move = function(userId, fromName, toName) { exports.propfind = function(path, userId, properties, folderDepth = '1') { const davPath = encodeURI(path) let propertyBody = '' - properties.map(prop => { + properties.forEach(prop => { propertyBody += `<${prop}/>` }) const body = ` @@ -144,7 +144,7 @@ exports.getTrashBinElements = function(user, depth = 2) { if (!Array.isArray(trashData)) { trashData = [trashData] } - trashData.map(trash => { + trashData.forEach(trash => { if (trash['d:propstat']['d:prop'] === undefined) { reject(new Error('trashbin data not defined')) } else { @@ -235,7 +235,7 @@ exports.getProperties = function(path, userId, requestedProps) { return reject(new Error(errMsg + JSON.stringify(str))) } const properties = {} - requestedProps.map(propertyName => { + requestedProps.forEach(propertyName => { properties[propertyName] = receivedProps[propertyName]._text }) return resolve(properties) @@ -271,7 +271,7 @@ exports.getFavouritedResources = function(user) { .then(res => { const favData = convert.xml2js(res, { compact: true })['d:multistatus']['d:response'] const favItems = [] - favData.map(favourite => { + favData.forEach(favourite => { favItems.push({ resource: filename(favourite['d:href']._text), isFolder: !(Object.keys(favourite['d:propstat']['d:prop']['d:resourcetype']).length === 0) diff --git a/tests/acceptance/pageObjects/FilesPageElement/publicLinksDialog.js b/tests/acceptance/pageObjects/FilesPageElement/publicLinksDialog.js index 1275617d2f8..2bf0eb09638 100644 --- a/tests/acceptance/pageObjects/FilesPageElement/publicLinksDialog.js +++ b/tests/acceptance/pageObjects/FilesPageElement/publicLinksDialog.js @@ -297,7 +297,7 @@ module.exports = { selector: publicLinkUrlXpath, abortOnFailure: false }).api.elements('xpath', publicLinkUrlXpath, result => { - result.value.map(item => { + result.value.forEach(item => { promiseList.push( new Promise(resolve => { this.api.elementIdAttribute(item.ELEMENT, 'href', href => { diff --git a/tests/acceptance/stepDefinitions/sharingContext.js b/tests/acceptance/stepDefinitions/sharingContext.js index 05412ec746a..143ecdbc01a 100644 --- a/tests/acceptance/stepDefinitions/sharingContext.js +++ b/tests/acceptance/stepDefinitions/sharingContext.js @@ -794,8 +794,8 @@ Then( .then(itemsList => { itemsList.forEach(item => { const displayedName = item.split('\n')[0] - var found = false - for (var userId in userSettings.getCreatedUsers()) { + let found = false + for (const userId in userSettings.getCreatedUsers()) { const userDisplayName = userSettings.getDisplayNameForUser(userId) if ( userDisplayName === displayedName && diff --git a/tests/acceptance/stepDefinitions/webdavContext.js b/tests/acceptance/stepDefinitions/webdavContext.js index 267ffd6bd5f..b338a6b4dfa 100644 --- a/tests/acceptance/stepDefinitions/webdavContext.js +++ b/tests/acceptance/stepDefinitions/webdavContext.js @@ -19,6 +19,7 @@ function fileExists(userId, element) { const davPath = webdavHelper.createDavPath(userId, element) return httpHelper.propfind(davPath, userId) } + /** * request a single file * @param {string} userId - username From d3528ef26d386fe89578b6841f858ccc4fdc1cbf Mon Sep 17 00:00:00 2001 From: Florian Schade Date: Thu, 3 Jun 2021 09:29:08 +0200 Subject: [PATCH 05/39] configure jest to use typescript specs also --- tsconfig.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 4475713c7e4..4526c6edd37 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { - "target": "es6" + "target": "es6", + "esModuleInterop": true } } \ No newline at end of file From b8f2a3613ab96187708ce2b7386aa38495c69c85 Mon Sep 17 00:00:00 2001 From: Florian Schade Date: Thu, 3 Jun 2021 12:36:20 +0200 Subject: [PATCH 06/39] basic cache implementation --- packages/web-pkg/src/utils/cache.spec.ts | 110 +++++++++++++++++++++++ packages/web-pkg/src/utils/cache.ts | 90 +++++++++++++++++++ 2 files changed, 200 insertions(+) create mode 100644 packages/web-pkg/src/utils/cache.spec.ts create mode 100644 packages/web-pkg/src/utils/cache.ts diff --git a/packages/web-pkg/src/utils/cache.spec.ts b/packages/web-pkg/src/utils/cache.spec.ts new file mode 100644 index 00000000000..12d917ffdb8 --- /dev/null +++ b/packages/web-pkg/src/utils/cache.spec.ts @@ -0,0 +1,110 @@ +import { Cache } from './cache' + +const newCache = (vs: T[], ttl?: number, capacity?: number): Cache => { + const cache = new Cache({ ttl, capacity }) + vs.forEach((v, i) => cache.set(i, v)) + return cache +} + +describe('cache', () => { + it('can set and get entries', () => { + const cacheValues: number[] = [1, 2, 3, 4] + const cache = newCache(cacheValues) + + cacheValues.forEach((v, i) => { + expect(cache.get(i)).toBe(v) + }) + + cache.set(4, 5) + expect(cache.get(4)).toBe(5) + }) + + it('return all keys', async () => { + const cache = newCache([1, 2, 3, 4]) + expect(cache.keys()).toMatchObject([0, 1, 2, 3]) + }) + + it('return all values', async () => { + const cacheValues: number[] = [1, 2, 3, 4] + const cache = newCache(cacheValues) + expect(cache.values()).toMatchObject(cacheValues) + }) + + it('return all entries', async () => { + const cache = newCache([1, 2, 3, 4]) + expect(cache.entries()).toMatchObject([ + [0, 1], + [1, 2], + [2, 3], + [3, 4] + ]) + }) + + it('can handle ttl', async () => { + jest.useFakeTimers('modern') + const cacheValues: number[] = [] + const cache = newCache(cacheValues, 50) + + cache.set(1, 1) + jest.setSystemTime(new Date().getTime() + 10) + cache.set(2, 2) + + expect(cache.get(1)).toBe(1) + expect(cache.get(2)).toBe(2) + expect(cache.values().length).toBe(2) + expect(cache.keys().length).toBe(2) + expect(cache.entries().length).toBe(2) + + jest.setSystemTime(new Date().getTime() + 41) + + expect(cache.get(1)).toBeFalsy() + expect(cache.get(2)).toBe(2) + expect(cache.values().length).toBe(1) + expect(cache.keys().length).toBe(1) + expect(cache.entries().length).toBe(1) + + jest.setSystemTime(new Date().getTime() + 10) + + expect(cache.get(2)).toBeFalsy() + expect(cache.values().length).toBe(0) + expect(cache.keys().length).toBe(0) + expect(cache.entries().length).toBe(0) + + cache.set(3, 3, 10) + cache.set(4, 4, 20) + + expect(cache.get(3)).toBe(3) + expect(cache.get(4)).toBe(4) + expect(cache.values().length).toBe(2) + expect(cache.keys().length).toBe(2) + expect(cache.entries().length).toBe(2) + + jest.setSystemTime(new Date().getTime() + 11) + + expect(cache.get(3)).toBeFalsy() + expect(cache.get(4)).toBe(4) + expect(cache.values().length).toBe(1) + expect(cache.keys().length).toBe(1) + expect(cache.entries().length).toBe(1) + + jest.setSystemTime(new Date().getTime() + 10) + + expect(cache.get(4)).toBeFalsy() + expect(cache.values().length).toBe(0) + expect(cache.keys().length).toBe(0) + expect(cache.entries().length).toBe(0) + }) + + it('can handle capacity', async () => { + const initialValues: number[] = [1, 2, 3, 4, 5] + const newValues: number[] = [6, 7, 8, 9, 10] + const capacity = 5 + const cache = newCache(initialValues, 0, capacity) + + newValues.forEach(v => { + cache.set(v, v) + expect(cache.get(v)).toBe(v) + expect(cache.entries().length).toBe(capacity) + }) + }) +}) diff --git a/packages/web-pkg/src/utils/cache.ts b/packages/web-pkg/src/utils/cache.ts new file mode 100644 index 00000000000..7f6483e4ad7 --- /dev/null +++ b/packages/web-pkg/src/utils/cache.ts @@ -0,0 +1,90 @@ +class Entry { + public value: T + public expires: number + + constructor(value: T, ttl: number) { + this.value = value + this.expires = ttl === 0 ? 0 : new Date().getTime() + ttl + } + + get expired(): boolean { + return this.expires > 0 && this.expires < new Date().getTime() + } +} + +export class Cache { + private map: Map> + private readonly ttl: number + private readonly capacity: number + + constructor({ ttl, capacity }: { ttl?: number; capacity?: number } = {}) { + this.ttl = ttl || 0 + this.capacity = capacity || 0 + + this.map = new Map() + } + + public set(key: K, value: V, ttl?: number): V { + this.map.set(key, new Entry(value, ttl || this.ttl)) + + if (this.capacity && this.map.size > this.capacity) { + const itemsToDelete = this.map.size - this.capacity + let i = 1 + for (const [mk] of this.map.entries()) { + if (i > itemsToDelete) { + break + } + this.delete(mk) + i++ + } + } + + return value + } + + public get(key: K): V { + const entry = this.map.get(key) + if (!entry || entry.expired) { + this.delete(key) + return undefined + } + + return entry.value + } + + public delete(key: K): boolean { + return this.map.delete(key) + } + + public clear(): void { + return this.map.clear() + } + + public entries(): [K, V][] { + const kv: [K, V][] = [] + + this.map.forEach((mv, mk) => { + if (mv.expired) { + this.delete(mk) + return + } + kv.push([mk, mv.value]) + }) + + return kv + } + + public keys(): K[] { + const k: K[] = [] + this.entries().forEach(e => k.push(e[0])) + + return k + } + + public values(): V[] { + const v: V[] = [] + this.entries().forEach(e => v.push(e[1])) + + return v + } +} From 255adb041a9609487d4bfa26bd9579ee7cc157c9 Mon Sep 17 00:00:00 2001 From: Florian Schade Date: Fri, 4 Jun 2021 02:25:50 +0200 Subject: [PATCH 07/39] add elementIsVisible util which enables us to only run functions if a element enters or exiting other element like viewport --- packages/web-pkg/src/utils/element/index.ts | 1 + .../web-pkg/src/utils/element/visible.spec.ts | 65 +++++++++++ packages/web-pkg/src/utils/element/visible.ts | 103 ++++++++++++++++++ 3 files changed, 169 insertions(+) create mode 100644 packages/web-pkg/src/utils/element/index.ts create mode 100644 packages/web-pkg/src/utils/element/visible.spec.ts create mode 100644 packages/web-pkg/src/utils/element/visible.ts diff --git a/packages/web-pkg/src/utils/element/index.ts b/packages/web-pkg/src/utils/element/index.ts new file mode 100644 index 00000000000..011b6ce7cde --- /dev/null +++ b/packages/web-pkg/src/utils/element/index.ts @@ -0,0 +1 @@ +export { default as ElementIsVisible } from './visible' diff --git a/packages/web-pkg/src/utils/element/visible.spec.ts b/packages/web-pkg/src/utils/element/visible.spec.ts new file mode 100644 index 00000000000..a9ee812b17c --- /dev/null +++ b/packages/web-pkg/src/utils/element/visible.spec.ts @@ -0,0 +1,65 @@ +import ElementIsVisible from './visible' + +let callback +let mockIntersectionObserver +const reset = () => { + mockIntersectionObserver = { + observe: jest.fn(), + disconnect: jest.fn(), + unobserve: jest.fn() + } + window.IntersectionObserver = jest.fn().mockImplementation(cb => { + callback = cb + return mockIntersectionObserver + }) +} + +beforeEach(reset) + +window.document.body.innerHTML = `
foo
` + +describe('ElementIsVisible', () => { + it.each([ + { onEnter: jest.fn() }, + { onExit: jest.fn() }, + { + onEnter: jest.fn(), + onExit: jest.fn() + }, + {} + ])('observes %p', cb => { + new ElementIsVisible(document.getElementById('target'), cb) + expect(mockIntersectionObserver.observe).toBeCalledTimes(Object.keys(cb).length ? 1 : 0) + }) + + it('handles entered and exited callbacks', () => { + const onEnter = jest.fn() + const onExit = jest.fn() + new ElementIsVisible(document.getElementById('target'), { onEnter, onExit }) + callback([{ isIntersecting: false, intersectionRatio: -1 }]) + expect(onEnter).toBeCalledTimes(0) + expect(onExit).toBeCalledTimes(0) + callback([{ isIntersecting: true, intersectionRatio: 1 }]) + expect(onEnter).toBeCalledTimes(1) + expect(onExit).toBeCalledTimes(0) + callback([{ isIntersecting: false, intersectionRatio: -1 }]) + expect(onEnter).toBeCalledTimes(1) + expect(onExit).toBeCalledTimes(1) + }) + + it.each(['disconnect', 'unobserve'])('handles %p', m => { + const onEnter = jest.fn() + const onExit = jest.fn() + const obs = new ElementIsVisible(document.getElementById('target'), { onEnter, onExit }) + obs[m]() + callback([{ isIntersecting: false, intersectionRatio: -1 }]) + expect(onEnter).toBeCalledTimes(0) + expect(onExit).toBeCalledTimes(0) + callback([{ isIntersecting: true, intersectionRatio: 1 }]) + expect(onEnter).toBeCalledTimes(0) + expect(onExit).toBeCalledTimes(0) + callback([{ isIntersecting: false, intersectionRatio: -1 }]) + expect(onEnter).toBeCalledTimes(0) + expect(onExit).toBeCalledTimes(0) + }) +}) diff --git a/packages/web-pkg/src/utils/element/visible.ts b/packages/web-pkg/src/utils/element/visible.ts new file mode 100644 index 00000000000..74ccf510ff5 --- /dev/null +++ b/packages/web-pkg/src/utils/element/visible.ts @@ -0,0 +1,103 @@ +enum state { + created, + entered, + exited +} + +export default class Visible { + private intersectionObserver: IntersectionObserver + private observing: boolean + private state: state + private readonly element: Element + private readonly options: IntersectionObserverInit + private readonly onEnter: (ElementIsVisible) => void + private readonly onExit: (ElementIsVisible) => void + + constructor( + element: Element, + { + onEnter, + onExit + }: { + onEnter?: (ElementIsVisible?) => void + onExit?: (ElementIsVisible?) => void + }, + { root, rootMargin, threshold }: IntersectionObserverInit = {} + ) { + this.element = element + this.options = { + root, + rootMargin, + threshold: threshold || 0 + } + this.onEnter = onEnter + this.onExit = onExit + this.state = state.created + this.observe() + } + + public observe(): void { + if (this.observing || (!this.onEnter && !this.onExit)) { + return + } + + if (!this.intersectionObserver) { + this.intersectionObserver = new IntersectionObserver(this.callback.bind(this), this.options) + } + + this.intersectionObserver.observe(this.element) + this.observing = true + } + + public unobserve(): void { + if (!this.observing) { + return + } + + this.intersectionObserver.unobserve(this.element) + this.observing = false + } + + public disconnect(): void { + if (!this.observing) { + return + } + + this.intersectionObserver.disconnect() + this.observing = false + } + + private entered(): void { + this.state = state.entered + + if (!this.onEnter) { + return + } + + this.onEnter(this) + } + + private exited(): void { + this.state = state.exited + + if (!this.onExit) { + return + } + + this.onExit(this) + } + + private callback(entries) { + if (!this.observing) { + return + } + + entries.forEach(entry => { + if (entry.isIntersecting && entry.intersectionRatio > this.options.threshold) { + ;(this.state === state.created || this.state === state.exited) && this.entered() + } else { + this.state === state.entered && this.exited() + } + }) + } +} From 4b40edf03cebd661a83b0aa2f71f561a45e8b002 Mon Sep 17 00:00:00 2001 From: Florian Schade Date: Mon, 7 Jun 2021 09:10:04 +0200 Subject: [PATCH 08/39] make it possible for visibility observer to observe multiple elements with one intersectionObserver make it possible for visibility observer callbacks to be called n times restructure web-pkg --- .../src/{utils => cache}/cache.spec.ts | 15 +- .../web-pkg/src/{utils => cache}/cache.ts | 10 +- packages/web-pkg/src/cache/index.ts | 1 + packages/web-pkg/src/common/index.ts | 1 + packages/web-pkg/src/common/object.spec.ts | 19 ++ .../src/{utils/object.js => common/object.ts} | 3 +- packages/web-pkg/src/observer/index.ts | 1 + .../visibility.spec.ts} | 30 ++-- packages/web-pkg/src/observer/visibility.ts | 164 ++++++++++++++++++ packages/web-pkg/src/utils/element/index.ts | 1 - packages/web-pkg/src/utils/element/visible.ts | 103 ----------- .../web-pkg/tests/unit/utils/object.spec.js | 19 -- .../tests/unit/store/config.spec.js | 6 +- 13 files changed, 221 insertions(+), 152 deletions(-) rename packages/web-pkg/src/{utils => cache}/cache.spec.ts (91%) rename packages/web-pkg/src/{utils => cache}/cache.ts (87%) create mode 100644 packages/web-pkg/src/cache/index.ts create mode 100644 packages/web-pkg/src/common/index.ts create mode 100644 packages/web-pkg/src/common/object.spec.ts rename packages/web-pkg/src/{utils/object.js => common/object.ts} (80%) create mode 100644 packages/web-pkg/src/observer/index.ts rename packages/web-pkg/src/{utils/element/visible.spec.ts => observer/visibility.spec.ts} (58%) create mode 100644 packages/web-pkg/src/observer/visibility.ts delete mode 100644 packages/web-pkg/src/utils/element/index.ts delete mode 100644 packages/web-pkg/src/utils/element/visible.ts diff --git a/packages/web-pkg/src/utils/cache.spec.ts b/packages/web-pkg/src/cache/cache.spec.ts similarity index 91% rename from packages/web-pkg/src/utils/cache.spec.ts rename to packages/web-pkg/src/cache/cache.spec.ts index 12d917ffdb8..fab70060a6e 100644 --- a/packages/web-pkg/src/utils/cache.spec.ts +++ b/packages/web-pkg/src/cache/cache.spec.ts @@ -1,4 +1,4 @@ -import { Cache } from './cache' +import Cache from './cache' const newCache = (vs: T[], ttl?: number, capacity?: number): Cache => { const cache = new Cache({ ttl, capacity }) @@ -6,7 +6,7 @@ const newCache = (vs: T[], ttl?: number, capacity?: number): Cache return cache } -describe('cache', () => { +describe('Cache', () => { it('can set and get entries', () => { const cacheValues: number[] = [1, 2, 3, 4] const cache = newCache(cacheValues) @@ -17,20 +17,21 @@ describe('cache', () => { cache.set(4, 5) expect(cache.get(4)).toBe(5) + expect(cache.set(5, 6)).toBe(6) }) - it('return all keys', async () => { + it('return all keys', () => { const cache = newCache([1, 2, 3, 4]) expect(cache.keys()).toMatchObject([0, 1, 2, 3]) }) - it('return all values', async () => { + it('return all values', () => { const cacheValues: number[] = [1, 2, 3, 4] const cache = newCache(cacheValues) expect(cache.values()).toMatchObject(cacheValues) }) - it('return all entries', async () => { + it('return all entries', () => { const cache = newCache([1, 2, 3, 4]) expect(cache.entries()).toMatchObject([ [0, 1], @@ -40,7 +41,7 @@ describe('cache', () => { ]) }) - it('can handle ttl', async () => { + it('can handle ttl', () => { jest.useFakeTimers('modern') const cacheValues: number[] = [] const cache = newCache(cacheValues, 50) @@ -95,7 +96,7 @@ describe('cache', () => { expect(cache.entries().length).toBe(0) }) - it('can handle capacity', async () => { + it('can handle capacity', () => { const initialValues: number[] = [1, 2, 3, 4, 5] const newValues: number[] = [6, 7, 8, 9, 10] const capacity = 5 diff --git a/packages/web-pkg/src/utils/cache.ts b/packages/web-pkg/src/cache/cache.ts similarity index 87% rename from packages/web-pkg/src/utils/cache.ts rename to packages/web-pkg/src/cache/cache.ts index 7f6483e4ad7..59ce10af0e8 100644 --- a/packages/web-pkg/src/utils/cache.ts +++ b/packages/web-pkg/src/cache/cache.ts @@ -1,4 +1,4 @@ -class Entry { +class CacheElement { public value: T public expires: number @@ -12,8 +12,8 @@ class Entry { } } -export class Cache { - private map: Map> +export default class Cache { + private map: Map> private readonly ttl: number private readonly capacity: number @@ -21,11 +21,11 @@ export class Cache { this.ttl = ttl || 0 this.capacity = capacity || 0 - this.map = new Map() + this.map = new Map>() } public set(key: K, value: V, ttl?: number): V { - this.map.set(key, new Entry(value, ttl || this.ttl)) + this.map.set(key, new CacheElement(value, ttl || ttl === 0 ? 0 : this.ttl)) if (this.capacity && this.map.size > this.capacity) { const itemsToDelete = this.map.size - this.capacity diff --git a/packages/web-pkg/src/cache/index.ts b/packages/web-pkg/src/cache/index.ts new file mode 100644 index 00000000000..f348ba1bb44 --- /dev/null +++ b/packages/web-pkg/src/cache/index.ts @@ -0,0 +1 @@ +export { default as Cache } from './cache' diff --git a/packages/web-pkg/src/common/index.ts b/packages/web-pkg/src/common/index.ts new file mode 100644 index 00000000000..a71977d8805 --- /dev/null +++ b/packages/web-pkg/src/common/index.ts @@ -0,0 +1 @@ +export * from './object' diff --git a/packages/web-pkg/src/common/object.spec.ts b/packages/web-pkg/src/common/object.spec.ts new file mode 100644 index 00000000000..2e7757c5b6c --- /dev/null +++ b/packages/web-pkg/src/common/object.spec.ts @@ -0,0 +1,19 @@ +import { objectKeys } from './object' + +describe('objectKeys', () => { + it('should return the correct keys', () => { + expect( + objectKeys({ + foo1: { bar1: { baz1: 1, baz2: 1 }, bar2: { baz1: 1, baz2: 1 }, bar3: 1 }, + foo2: 1 + }) + ).toMatchObject([ + 'foo1.bar1.baz1', + 'foo1.bar1.baz2', + 'foo1.bar2.baz1', + 'foo1.bar2.baz2', + 'foo1.bar3', + 'foo2' + ]) + }) +}) diff --git a/packages/web-pkg/src/utils/object.js b/packages/web-pkg/src/common/object.ts similarity index 80% rename from packages/web-pkg/src/utils/object.js rename to packages/web-pkg/src/common/object.ts index 489cd3eba59..eaef4c3735f 100644 --- a/packages/web-pkg/src/utils/object.js +++ b/packages/web-pkg/src/common/object.ts @@ -1,6 +1,6 @@ import isPlainObject from 'lodash-es/isPlainObject' -export const keysDeep = obj => { +export const objectKeys = (obj: Record): string[] => { const paths = [] const walk = (o, p = '') => @@ -13,5 +13,6 @@ export const keysDeep = obj => { }) walk(obj) + return paths } diff --git a/packages/web-pkg/src/observer/index.ts b/packages/web-pkg/src/observer/index.ts new file mode 100644 index 00000000000..5204051139c --- /dev/null +++ b/packages/web-pkg/src/observer/index.ts @@ -0,0 +1 @@ +export * from './visibility' diff --git a/packages/web-pkg/src/utils/element/visible.spec.ts b/packages/web-pkg/src/observer/visibility.spec.ts similarity index 58% rename from packages/web-pkg/src/utils/element/visible.spec.ts rename to packages/web-pkg/src/observer/visibility.spec.ts index a9ee812b17c..a8984fc1788 100644 --- a/packages/web-pkg/src/utils/element/visible.spec.ts +++ b/packages/web-pkg/src/observer/visibility.spec.ts @@ -1,4 +1,4 @@ -import ElementIsVisible from './visible' +import { VisibilityObserver } from './visibility' let callback let mockIntersectionObserver @@ -18,7 +18,7 @@ beforeEach(reset) window.document.body.innerHTML = `
foo
` -describe('ElementIsVisible', () => { +describe('VisibilityObserver', () => { it.each([ { onEnter: jest.fn() }, { onExit: jest.fn() }, @@ -28,37 +28,41 @@ describe('ElementIsVisible', () => { }, {} ])('observes %p', cb => { - new ElementIsVisible(document.getElementById('target'), cb) + const observer = new VisibilityObserver() + observer.observe(document.getElementById('target'), cb) expect(mockIntersectionObserver.observe).toBeCalledTimes(Object.keys(cb).length ? 1 : 0) }) it('handles entered and exited callbacks', () => { const onEnter = jest.fn() const onExit = jest.fn() - new ElementIsVisible(document.getElementById('target'), { onEnter, onExit }) - callback([{ isIntersecting: false, intersectionRatio: -1 }]) + const observer = new VisibilityObserver() + const target = document.getElementById('target') + observer.observe(target, { onEnter, onExit }) + callback([{ isIntersecting: false, intersectionRatio: -1, target }]) expect(onEnter).toBeCalledTimes(0) expect(onExit).toBeCalledTimes(0) - callback([{ isIntersecting: true, intersectionRatio: 1 }]) + callback([{ isIntersecting: true, intersectionRatio: 1, target }]) expect(onEnter).toBeCalledTimes(1) expect(onExit).toBeCalledTimes(0) - callback([{ isIntersecting: false, intersectionRatio: -1 }]) + callback([{ isIntersecting: false, intersectionRatio: -1, target }]) expect(onEnter).toBeCalledTimes(1) expect(onExit).toBeCalledTimes(1) }) - it.each(['disconnect', 'unobserve'])('handles %p', m => { const onEnter = jest.fn() const onExit = jest.fn() - const obs = new ElementIsVisible(document.getElementById('target'), { onEnter, onExit }) - obs[m]() - callback([{ isIntersecting: false, intersectionRatio: -1 }]) + const observer = new VisibilityObserver() + const target = document.getElementById('target') + observer.observe(target, { onEnter, onExit }) + observer[m](target) + callback([{ isIntersecting: false, intersectionRatio: -1, target }]) expect(onEnter).toBeCalledTimes(0) expect(onExit).toBeCalledTimes(0) - callback([{ isIntersecting: true, intersectionRatio: 1 }]) + callback([{ isIntersecting: true, intersectionRatio: 1, target }]) expect(onEnter).toBeCalledTimes(0) expect(onExit).toBeCalledTimes(0) - callback([{ isIntersecting: false, intersectionRatio: -1 }]) + callback([{ isIntersecting: false, intersectionRatio: -1, target }]) expect(onEnter).toBeCalledTimes(0) expect(onExit).toBeCalledTimes(0) }) diff --git a/packages/web-pkg/src/observer/visibility.ts b/packages/web-pkg/src/observer/visibility.ts new file mode 100644 index 00000000000..3564daf57d8 --- /dev/null +++ b/packages/web-pkg/src/observer/visibility.ts @@ -0,0 +1,164 @@ +enum States { + enter, + exit +} + +type Callback = ({ + element, + callCount, + unobserve +}: { + element: Element + callCount: number + unobserve: () => void +}) => void + +type Options = { + root?: Element | Document | null + rootMargin?: string + threshold?: number +} + +type Unobserver = (element: Element) => void + +class Target { + private state: States + private observeEnter: boolean + private observeExit: boolean + private onEnterCallCount: number + private onExitCallCount: number + private readonly onEnter: Callback + private readonly onExit: Callback + public readonly threshold: number + public readonly unobserver: Unobserver + + constructor( + unobserver: Unobserver, + threshold: number, + { + onEnter, + onExit + }: { + onEnter?: Callback + onExit?: Callback + } + ) { + this.unobserver = unobserver + this.threshold = threshold + this.onEnter = onEnter + this.onExit = onExit + this.observeEnter = true + this.observeExit = true + this.onEnterCallCount = 0 + this.onExitCallCount = 0 + } + + public propagateEvent(state: States, element: Element) { + const sharedProps = { + element: element, + unobserve: () => this.unobserve(state, element) + } + + if (state === States.enter && this.observeEnter && this.onEnter) { + this.onEnterCallCount++ + this.onEnter({ + callCount: this.onEnterCallCount, + ...sharedProps + }) + } else if ( + this.state === States.enter && + state === States.exit && + this.observeExit && + this.onExit + ) { + this.onExitCallCount++ + this.onExit({ + callCount: this.onExitCallCount, + ...sharedProps + }) + } + + this.state = state + } + + private unobserve(state: States, element: Element) { + if (state === States.enter) { + this.observeEnter = false + } else if (state === States.exit) { + this.observeExit = false + } + + if (!this.observeEnter && !this.observeExit) { + this.unobserver(element) + } + } +} + +export class VisibilityObserver { + private targets: WeakMap + private readonly intersectionObserver: IntersectionObserver + private readonly options: Options + + constructor({ root, rootMargin, threshold }: Options = {}) { + this.options = { + root, + rootMargin, + threshold: threshold || 0 + } + this.targets = new WeakMap() + this.intersectionObserver = new IntersectionObserver(this.trigger.bind(this), this.options) + } + + public observe( + element: Element, + { + onEnter, + onExit + }: { + onEnter?: Callback + onExit?: Callback + } = {}, + threshold?: number + ): void { + if (!onEnter && !onExit) { + return + } + + this.targets.set( + element, + new Target(this.unobserve, threshold || this.options.threshold, { + onEnter, + onExit + }) + ) + this.intersectionObserver.observe(element) + } + + public unobserve(element: Element): void { + if (this.targets.delete(element)) { + this.intersectionObserver.unobserve(element) + } + } + + public disconnect(): void { + this.targets = new WeakMap() + this.intersectionObserver.disconnect() + } + + private trigger(entries) { + entries.forEach((entry: IntersectionObserverEntry) => { + const observedElement = this.targets.get(entry.target) + + if (!observedElement) { + return + } + + observedElement.propagateEvent( + entry.isIntersecting && entry.intersectionRatio > observedElement.threshold + ? States.enter + : States.exit, + entry.target + ) + }) + } +} diff --git a/packages/web-pkg/src/utils/element/index.ts b/packages/web-pkg/src/utils/element/index.ts deleted file mode 100644 index 011b6ce7cde..00000000000 --- a/packages/web-pkg/src/utils/element/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default as ElementIsVisible } from './visible' diff --git a/packages/web-pkg/src/utils/element/visible.ts b/packages/web-pkg/src/utils/element/visible.ts deleted file mode 100644 index 74ccf510ff5..00000000000 --- a/packages/web-pkg/src/utils/element/visible.ts +++ /dev/null @@ -1,103 +0,0 @@ -enum state { - created, - entered, - exited -} - -export default class Visible { - private intersectionObserver: IntersectionObserver - private observing: boolean - private state: state - private readonly element: Element - private readonly options: IntersectionObserverInit - private readonly onEnter: (ElementIsVisible) => void - private readonly onExit: (ElementIsVisible) => void - - constructor( - element: Element, - { - onEnter, - onExit - }: { - onEnter?: (ElementIsVisible?) => void - onExit?: (ElementIsVisible?) => void - }, - { root, rootMargin, threshold }: IntersectionObserverInit = {} - ) { - this.element = element - this.options = { - root, - rootMargin, - threshold: threshold || 0 - } - this.onEnter = onEnter - this.onExit = onExit - this.state = state.created - this.observe() - } - - public observe(): void { - if (this.observing || (!this.onEnter && !this.onExit)) { - return - } - - if (!this.intersectionObserver) { - this.intersectionObserver = new IntersectionObserver(this.callback.bind(this), this.options) - } - - this.intersectionObserver.observe(this.element) - this.observing = true - } - - public unobserve(): void { - if (!this.observing) { - return - } - - this.intersectionObserver.unobserve(this.element) - this.observing = false - } - - public disconnect(): void { - if (!this.observing) { - return - } - - this.intersectionObserver.disconnect() - this.observing = false - } - - private entered(): void { - this.state = state.entered - - if (!this.onEnter) { - return - } - - this.onEnter(this) - } - - private exited(): void { - this.state = state.exited - - if (!this.onExit) { - return - } - - this.onExit(this) - } - - private callback(entries) { - if (!this.observing) { - return - } - - entries.forEach(entry => { - if (entry.isIntersecting && entry.intersectionRatio > this.options.threshold) { - ;(this.state === state.created || this.state === state.exited) && this.entered() - } else { - this.state === state.entered && this.exited() - } - }) - } -} diff --git a/packages/web-pkg/tests/unit/utils/object.spec.js b/packages/web-pkg/tests/unit/utils/object.spec.js index ab442b92874..e69de29bb2d 100644 --- a/packages/web-pkg/tests/unit/utils/object.spec.js +++ b/packages/web-pkg/tests/unit/utils/object.spec.js @@ -1,19 +0,0 @@ -import { keysDeep } from 'web-pkg/src/utils/object' - -describe('keysDeep', () => { - it('should return the correct keys', () => { - expect( - keysDeep({ - foo1: { bar1: { baz1: 1, baz2: 1 }, bar2: { baz1: 1, baz2: 1 }, bar3: 1 }, - foo2: 1 - }) - ).toMatchObject([ - 'foo1.bar1.baz1', - 'foo1.bar1.baz2', - 'foo1.bar2.baz1', - 'foo1.bar2.baz2', - 'foo1.bar3', - 'foo2' - ]) - }) -}) diff --git a/packages/web-runtime/tests/unit/store/config.spec.js b/packages/web-runtime/tests/unit/store/config.spec.js index 272c5b75f8c..d923d5f81a8 100644 --- a/packages/web-runtime/tests/unit/store/config.spec.js +++ b/packages/web-runtime/tests/unit/store/config.spec.js @@ -22,15 +22,15 @@ describe('config theme bootstrap', () => { const { theme, name } = await loadTheme() await store.dispatch('loadTheme', { theme, name }) - keysDeep(theme).forEach(k => { + objectKeys(theme).forEach(k => { expect(get(store.getters.configuration.theme, k)).toBe(get(theme, k)) }) }) it('should not overwrite keys that are not part of theme', async () => { const { theme, name } = await loadTheme() - const storeThemeKeys = keysDeep(store.getters.configuration.theme) - const loadedThemeKeys = keysDeep(theme) + const storeThemeKeys = objectKeys(store.getters.configuration.theme) + const loadedThemeKeys = objectKeys(theme) const diffThemeKeys = difference(storeThemeKeys, loadedThemeKeys) await store.dispatch('loadTheme', { theme, name }) From 161d50f6bd0bee81a15db8015a4f77d5a1b0a0a5 Mon Sep 17 00:00:00 2001 From: Florian Schade Date: Wed, 9 Jun 2021 19:26:13 +0200 Subject: [PATCH 09/39] implement lazy loading for images and avatars --- .babelrc | 12 +- .eslintrc.js | 14 +- .prettierrc.json | 4 +- package.json | 14 +- .../web-app-files/src/helpers/resources.js | 68 +------ .../src/helpers/{user.js => user2.js} | 0 packages/web-app-files/src/store/actions.js | 83 ++++++++ .../web-app-files/src/views/Favorites.vue | 37 +++- packages/web-app-files/src/views/Personal.vue | 54 ++++-- .../web-app-files/src/views/PublicFiles.vue | 36 ++-- .../web-app-files/src/views/SharedViaLink.vue | 38 ++-- .../web-app-files/src/views/SharedWithMe.vue | 44 +++-- .../src/views/SharedWithOthers.vue | 40 ++-- packages/web-pkg/package.json | 1 + packages/web-pkg/src/cache/cache.ts | 68 +++---- packages/web-pkg/src/common/index.ts | 1 - packages/web-pkg/src/observer/visibility.ts | 117 +++++------- .../objectKeys.spec.ts} | 2 +- .../{common/object.ts => utils/objectKeys.ts} | 0 rollup.config.js | 16 +- tests/unit/config/jest.config.js | 2 +- tests/unit/config/jest.init.js | 1 + tsconfig.json | 89 ++++++++- yarn.lock | 180 +++++++++++++++--- 24 files changed, 615 insertions(+), 306 deletions(-) rename packages/web-app-files/src/helpers/{user.js => user2.js} (100%) delete mode 100644 packages/web-pkg/src/common/index.ts rename packages/web-pkg/src/{common/object.spec.ts => utils/objectKeys.spec.ts} (90%) rename packages/web-pkg/src/{common/object.ts => utils/objectKeys.ts} (100%) diff --git a/.babelrc b/.babelrc index bb93ece6dce..cedf24f1a5d 100644 --- a/.babelrc +++ b/.babelrc @@ -1,15 +1,5 @@ { "presets": [ - [ - "@babel/preset-env", - { - "useBuiltIns": "usage", - "shippedProposals": true, - "corejs": { - "version": 3, - "proposals": true - } - } - ] + "@babel/preset-env" ] } \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 5ee6140311f..aef92da42fa 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -19,7 +19,9 @@ module.exports = { * TODO: fix project import issues and then enable it * 'sort-imports': 'warn', */ - 'require-await': 'warn' + 'require-await': 'warn', + 'no-new': 'off', + 'node/no-callback-literal': 'off' }, globals: { require: false, @@ -34,11 +36,11 @@ module.exports = { { files: ['**/*.ts'], parser: '@typescript-eslint/parser', - extends: ['plugin:@typescript-eslint/recommended'] - }, - { - files: ['**/*.spec.js'], - extends: ['plugin:jest/recommended'] + extends: ['plugin:@typescript-eslint/recommended'], + rules: { + '@typescript-eslint/no-extra-semi': 'off', + '@typescript-eslint/no-explicit-any': 'off' + } } ] } diff --git a/.prettierrc.json b/.prettierrc.json index e866155b4c3..292029b8efc 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,5 +1,5 @@ { "printWidth": 100, - "semi": false, - "singleQuote": true + "singleQuote": true, + "semi": false } diff --git a/package.json b/package.json index a661f26a2cc..6cb0f1c99ec 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "devDependencies": { "@babel/core": "^7.12.10", "@babel/polyfill": "^7.12.1", - "@babel/preset-env": "^7.12.11", + "@babel/preset-env": "^7.14.4", "@babel/register": "^7.13.16", "@erquhart/rollup-plugin-node-builtins": "^2.1.5", "@rollup/plugin-commonjs": "^17.0.0", @@ -53,9 +53,8 @@ "babel-eslint": "^10.1.0", "babel-jest": "^26.6.3", "chromedriver": "^89.0.0", - "core-js": "^3.10.0", "cucumber": ">=6.0.5", - "cucumber-pretty": ">=6.0.0", + "cucumber-pretty": "^6.0.0", "depcheck": "^1.3.1", "ejs": "^3.1.5", "eslint": "^7.27.0", @@ -64,7 +63,7 @@ "eslint-plugin-import": "^2.23.4", "eslint-plugin-jest": "^24.1.3", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.1.2", + "eslint-plugin-prettier": "^3.4.0", "eslint-plugin-promise": "^5.1.0", "eslint-plugin-vue": "^6.2.2", "eslint-plugin-vuejs-accessibility": "^0.6.1", @@ -85,8 +84,9 @@ "node-fetch": "^2.6.1", "p-limit": "^3.1.0", "postcss": "^8.2.15", + "regenerator-runtime": "^0.13.7", "requirejs": "^2.3.6", - "rollup": "^2.38.5", + "rollup": "^2.51.1", "rollup-plugin-babel": "^4.4.0", "rollup-plugin-copy-watch": "^0.0.1", "rollup-plugin-delete": "^2.0.0", @@ -99,9 +99,11 @@ "rollup-plugin-progress": "^1.1.2", "rollup-plugin-serve": "^1.1.0", "rollup-plugin-terser": "^7.0.2", + "rollup-plugin-ts": "^1.4.0", "rollup-plugin-visualizer": "^4.2.0", "rollup-plugin-vue": "^5.1.4", "ts-jest": "^26.5.6", + "tslib": "^2.2.0", "typescript": "^4.3.2", "@testing-library/jest-dom": "^5.13.0", "@testing-library/vue": "^5.6.2", @@ -114,6 +116,6 @@ "xml-js": "^1.6.11" }, "engines": { - "node": ">=10 <=15" + "node": ">=10 <=16" } } diff --git a/packages/web-app-files/src/helpers/resources.js b/packages/web-app-files/src/helpers/resources.js index fce42c5d0bf..b557a8a7a4c 100644 --- a/packages/web-app-files/src/helpers/resources.js +++ b/packages/web-app-files/src/helpers/resources.js @@ -7,7 +7,6 @@ import { getIndicators } from './statusIndicators' import { bitmaskToRole, checkPermission, permissionsBitmask } from './collaborators' import { shareTypes, userShareTypes } from './shareTypes' import { $gettext } from '../gettext' -import { getAvatarSrc } from './user' // Should we move this to ODS? export function getFileIcon(extension) { @@ -96,24 +95,18 @@ export function attachIndicators(resource, sharesTree) { * @param {Boolean} allowSharePerm Asserts whether the reshare permission is available * @param {String} server The url of the backend * @param {String} token The access token of the authenticated user - * @param {Object} client The ownCloud SDK client - * @param {Function} updateFn The closure action that gets called on update */ export function aggregateResourceShares( shares, incomingShares = false, allowSharePerm, server, - token, - client, - updateFn + token ) { if (incomingShares) { return _.chain(shares) .orderBy(['file_target', 'permissions'], ['asc', 'desc']) - .map(share => - buildSharedResource(share, incomingShares, allowSharePerm, server, token, client, updateFn) - ) + .map(share => buildSharedResource(share, incomingShares, allowSharePerm)) .value() } @@ -160,20 +153,10 @@ export function aggregateResourceShares( resources.push(share) } - return resources.map(share => - buildSharedResource(share, incomingShares, allowSharePerm, server, token, client, updateFn) - ) + return resources.map(share => buildSharedResource(share, incomingShares, allowSharePerm)) } -export function buildSharedResource( - share, - incomingShares = false, - allowSharePerm, - server, - token, - client, - updateFn -) { +export function buildSharedResource(share, incomingShares = false, allowSharePerm) { const resource = { id: share.item_source, type: share.item_type @@ -221,49 +204,6 @@ export function buildSharedResource( resource.icon = isFolder ? 'folder' : getFileIcon(resource.extension) resource.sdate = share.stime * 1000 - updateResource(async () => { - const avatars = new Map() - ;['sharedWith', 'owner'].forEach(k => { - ;(resource[k] || []).forEach((obj, i) => { - if (!_.has(obj, 'avatar')) { - return - } - avatars.set(`${k}.[${i}].avatar`, obj.username) - }) - }) - - if (!avatars.size) { - return - } - - await Promise.all( - Array.from(avatars).map(avatar => - (async () => { - let url - try { - url = await getAvatarSrc(avatar[1], server, token, client) - } catch (e) { - avatars.delete(avatar[0]) - return - } - - avatars.set(avatar[0], url) - })() - ) - ) - - if (!avatars.size) { - return - } - - const cResource = _.cloneDeep(resource) - avatars.forEach((value, key) => { - _.set(cResource, key, value) - }) - - return cResource - }, updateFn) - return resource } diff --git a/packages/web-app-files/src/helpers/user.js b/packages/web-app-files/src/helpers/user2.js similarity index 100% rename from packages/web-app-files/src/helpers/user.js rename to packages/web-app-files/src/helpers/user2.js diff --git a/packages/web-app-files/src/store/actions.js b/packages/web-app-files/src/store/actions.js index c744437061c..14ed05b8d17 100644 --- a/packages/web-app-files/src/store/actions.js +++ b/packages/web-app-files/src/store/actions.js @@ -5,6 +5,9 @@ import { getParentPaths } from '../helpers/path' import { shareTypes } from '../helpers/shareTypes' import { buildResource, buildShare, buildCollaboratorShare } from '../helpers/resources' import { $gettext, $gettextInterpolate } from '../gettext' +import { privatePreviewBlob, publicPreviewUrl } from '../helpers/resource' +import { avatarUrl } from '../helpers/user' +import _ from 'lodash' export default { updateFileProgress({ commit }, progress) { @@ -504,6 +507,86 @@ export default { commit('LOAD_INDICATORS') }, + async loadAvatars({ commit, rootGetters }, { resource }) { + const avatars = new Map() + + ;['sharedWith', 'owner'].forEach(k => { + ;(resource[k] || []).forEach((obj, i) => { + if (!_.has(obj, 'avatar')) { + return + } + avatars.set(`${k}.[${i}].avatar`, obj.username) + }) + }) + + if (!avatars.size) { + return + } + + await Promise.all( + Array.from(avatars).map(avatar => + (async () => { + let url + try { + url = await avatarUrl( + { + username: avatar[1], + server: rootGetters.configuration.server, + token: rootGetters.getToken + }, + true + ) + } catch (e) { + avatars.delete(avatar[0]) + return + } + + avatars.set(avatar[0], url) + })() + ) + ) + + if (!avatars.size) { + return + } + + const cResource = _.cloneDeep(resource) + avatars.forEach((value, key) => { + _.set(cResource, key, value) + }) + + commit('UPDATE_RESOURCE', cResource) + }, + + async loadPreview({ commit, rootGetters }, { resource, isPublic, dimensions }) { + if ( + resource.type === 'folder' || + !resource.extension || + (rootGetters.previewFileExtensions.length && + !rootGetters.previewFileExtensions.includes(resource.extension)) + ) { + return + } + + let preview + if (isPublic) { + preview = await publicPreviewUrl({ resource, dimensions }) + } else { + preview = await privatePreviewBlob({ + server: rootGetters.configuration.server, + userId: rootGetters.user.id, + token: rootGetters.getToken, + resource, + dimensions + }) + } + + if (preview) { + resource.preview = preview + commit('UPDATE_RESOURCE', resource) + } + }, + async loadPreviews({ commit, rootGetters }, { resources, isPublic, mediaSource, encodePath }) { let dimensions diff --git a/packages/web-app-files/src/views/Favorites.vue b/packages/web-app-files/src/views/Favorites.vue index a5ba74106ba..c66fec55468 100644 --- a/packages/web-app-files/src/views/Favorites.vue +++ b/packages/web-app-files/src/views/Favorites.vue @@ -21,6 +21,7 @@ :header-position="headerPosition" @showDetails="setHighlightedFile" @fileClick="$_fileActions_triggerDefaultAction" + @rowMounted="rowMounted" >