diff --git a/.eslintrc.json b/.eslintrc.json index 54a4ab0c1..44d565f08 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,22 +1,111 @@ { - "parser": "@babel/eslint-parser", - "extends": ["standard", "standard-jsx"], + "extends": ["transloadit"], "env": { - "browser": true, + "es6": true, + "jest": true, "node": true, - "jest": true + // extra: + "browser": true }, "globals": { "window": true, "hexo": true }, - "plugins": ["jest", "compat", "jsdoc", "@babel/eslint-plugin"], + "plugins": [ + "@babel/eslint-plugin", + "jest", + "node", + "prefer-import", + "promise", + "react", + // extra: + "compat", + "jsdoc" + ], + "parser": "@babel/eslint-parser", + "parserOptions": { + "ecmaVersion": 2020, + "ecmaFeatures": { + "jsx": true + } + }, "rules": { - "jsx-quotes": ["error", "prefer-double"], - "compat/compat": ["error"], - "react/jsx-handler-names": ["off"], - "react/react-in-jsx-scope": ["error"], + // transloadit rules we are actually ok with in the uppy repo + //////////////////////////////////////////////////////////// + "guard-for-in": ["off"], + "import/extensions": ["off"], + "strict": ["off"], + "key-spacing": ["off"], + // transloadit rules we would like to enforce in the future + // but will require separate PRs to gradually get there + // and so the meantime: just warn + //////////////////////////////////////////////////////////// + "array-callback-return": ["warn"], + "block-scoped-var": ["warn"], + "class-methods-use-this": ["warn"], + "consistent-return": ["warn"], + "default-case": ["warn"], + "global-require": ["warn"], + "implicit-arrow-linebreak": ["warn"], + "import/no-dynamic-require": ["warn"], + "import/no-unresolved": ["warn"], + "import/order": ["warn"], + "jsx-a11y/alt-text": ["warn"], + "jsx-a11y/anchor-has-content": ["warn"], + "jsx-a11y/click-events-have-key-events": ["warn"], + "jsx-a11y/control-has-associated-label": ["warn"], + "jsx-a11y/label-has-associated-control": ["warn"], + "jsx-a11y/media-has-caption": ["warn"], + "jsx-a11y/mouse-events-have-key-events": ["warn"], + "jsx-a11y/no-interactive-element-to-noninteractive-role": ["warn"], + "jsx-a11y/no-noninteractive-element-interactions": ["warn"], + "jsx-a11y/no-static-element-interactions": ["warn"], + "no-await-in-loop": ["warn"], + "no-bitwise": ["warn"], + "no-continue": ["warn"], + "no-empty": ["warn"], + "no-lonely-if": ["warn"], + "no-mixed-operators": ["warn"], + "no-nested-ternary": ["warn"], + "no-param-reassign": ["warn"], + "no-redeclare": ["warn"], + "no-restricted-globals": ["warn"], + "no-restricted-properties": ["warn"], + "no-restricted-syntax": ["warn"], + "no-return-assign": ["warn"], + "no-shadow": ["warn"], + "no-underscore-dangle": ["warn"], + "no-unused-expressions": ["warn"], + "no-unused-vars": ["warn"], + "no-use-before-define": ["warn"], + "no-useless-concat": ["warn"], + "no-var": ["warn"], + "node/handle-callback-err": ["warn"], + "prefer-destructuring": ["warn"], + "prefer-spread": ["warn"], + "radix": ["warn"], + "react/button-has-type": ["warn"], + "react/destructuring-assignment": ["warn"], + "react/forbid-prop-types": ["warn"], + "react/jsx-props-no-spreading": ["warn"], + "react/no-access-state-in-setstate": ["warn"], + "react/no-array-index-key": ["warn"], + "react/no-deprecated": ["warn"], + "react/no-this-in-sfc": ["warn"], + "react/no-will-update-set-state": ["warn"], + "react/prefer-stateless-function": ["warn"], + "react/sort-comp": ["warn"], + "react/style-prop-object": ["warn"], + "vars-on-top": ["warn"], + "import/no-extraneous-dependencies": ["warn"], + + // compat + //////////////////////////////////////////////////////////// + "compat/compat": ["error"], + + // jsdoc + //////////////////////////////////////////////////////////// "jsdoc/check-alignment": ["warn"], "jsdoc/check-examples": ["warn"], "jsdoc/check-param-names": ["warn"], @@ -41,24 +130,103 @@ "document.querySelector" ] }, - "overrides": [{ - "files": [ - "*.test.js", - "test/endtoend/*.js", - "website/*.js", - "bin/*.js" - ], - "rules": { - "compat/compat": "off" - } - },{ - "files": [ - "packages/@uppy/locales/src/*.js", - "packages/@uppy/locales/template.js" - ], - "rules": { - "camelcase": "off", - "quote-props": "off" - } - }] + "overrides": [ + { + "files": [ + "*.test.js", + "test/endtoend/*.js", + "website/*.js", + "bin/*.js" + ], + "rules": { + "compat/compat": ["off"] + } + }, + { + "files": [ + "packages/@uppy/locales/src/*.js", + "packages/@uppy/locales/template.js" + ], + "rules": { + "camelcase": ["off"], + "quote-props": ["off"] + } + }, + { + "files": [ + "website/themes/uppy/source/js/*.js" + ], + "rules": { + "prefer-const": ["off"] + } + }, + + { "files": ["bin/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"devDependencies": true}] } }, + + + { "files": ["packages/uppy/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/uppy/"}] } }, + + { "files": ["packages/@uppy/aws-s3/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/aws-s3/"}] } }, + { "files": ["packages/@uppy/aws-s3-multipart/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/aws-s3-multipart/"}] } }, + { "files": ["packages/@uppy/box/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/box/"}] } }, + { "files": ["packages/@uppy/companion/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/companion/"}] } }, + { "files": ["packages/@uppy/companion-client/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/companion-client/"}] } }, + { "files": ["packages/@uppy/core/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/core/"}] } }, + { "files": ["packages/@uppy/dashboard/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/dashboard/"}] } }, + { "files": ["packages/@uppy/drag-drop/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/drag-drop/"}] } }, + { "files": ["packages/@uppy/dropbox/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/dropbox/"}] } }, + { "files": ["packages/@uppy/facebook/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/facebook/"}] } }, + { "files": ["packages/@uppy/file-input/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/file-input/"}] } }, + { "files": ["packages/@uppy/form/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/form/"}] } }, + { "files": ["packages/@uppy/golden-retriever/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/golden-retriever/"}] } }, + { "files": ["packages/@uppy/google-drive/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/google-drive/"}] } }, + { "files": ["packages/@uppy/image-editor/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/image-editor/"}] } }, + { "files": ["packages/@uppy/informer/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/informer/"}] } }, + { "files": ["packages/@uppy/instagram/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/instagram/"}] } }, + { "files": ["packages/@uppy/locales/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/locales/"}] } }, + { "files": ["packages/@uppy/onedrive/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/onedrive/"}] } }, + { "files": ["packages/@uppy/progress-bar/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/progress-bar/"}] } }, + { "files": ["packages/@uppy/provider-views/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/provider-views/"}] } }, + { "files": ["packages/@uppy/react/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/react/"}] } }, + { "files": ["packages/@uppy/react-native/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/react-native/"}] } }, + { "files": ["packages/@uppy/redux-dev-tools/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/redux-dev-tools/"}] } }, + { "files": ["packages/@uppy/robodog/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/robodog/"}] } }, + { "files": ["packages/@uppy/screen-capture/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/screen-capture/"}] } }, + { "files": ["packages/@uppy/status-bar/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/status-bar/"}] } }, + { "files": ["packages/@uppy/store-default/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/store-default/"}] } }, + { "files": ["packages/@uppy/store-redux/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/store-redux/"}] } }, + { "files": ["packages/@uppy/svelte/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/svelte/"}] } }, + { "files": ["packages/@uppy/thumbnail-generator/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/thumbnail-generator/"}] } }, + { "files": ["packages/@uppy/transloadit/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/transloadit/"}] } }, + { "files": ["packages/@uppy/tus/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/tus/"}] } }, + { "files": ["packages/@uppy/unsplash/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/unsplash/"}] } }, + { "files": ["packages/@uppy/url/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/url/"}] } }, + { "files": ["packages/@uppy/utils/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/utils/"}] } }, + { "files": ["packages/@uppy/vue/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/vue/"}] } }, + { "files": ["packages/@uppy/webcam/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/webcam/"}] } }, + { "files": ["packages/@uppy/xhr-upload/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/xhr-upload/"}] } }, + { "files": ["packages/@uppy/zoom/**.js"], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "packages/@uppy/zoom/"}] } }, + + + { "files": ["examples/aws-companion/**.js" ], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "examples/aws-companion/"}] } }, + { "files": ["examples/aws-presigned-url/**.js" ], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "examples/aws-presigned-url/"}] } }, + { "files": ["examples/bundled/**.js" ], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "examples/bundled/"}] } }, + { "files": ["examples/cdn-example/**.js" ], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "examples/cdn-example/"}] } }, + { "files": ["examples/custom-provider/**.js" ], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "examples/custom-provider/"}] } }, + { "files": ["examples/dev/**.js" ], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "examples/dev/"}] } }, + { "files": ["examples/digitalocean-spaces/**.js" ], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "examples/digitalocean-spaces/"}] } }, + { "files": ["examples/multiple-instances/**.js" ], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "examples/multiple-instances/"}] } }, + { "files": ["examples/node-xhr/**.js" ], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "examples/node-xhr/"}] } }, + { "files": ["examples/php-xhr/**.js" ], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "examples/php-xhr/"}] } }, + { "files": ["examples/python-xhr/**.js" ], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "examples/python-xhr/"}] } }, + { "files": ["examples/react-example/**.js" ], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "examples/react-example/"}] } }, + { "files": ["examples/react-native-expo/**.js" ], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "examples/react-native-expo/"}] } }, + { "files": ["examples/redux/**.js" ], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "examples/redux/"}] } }, + { "files": ["examples/svelte-example/**.js" ], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "examples/svelte-example/"}] } }, + { "files": ["examples/transloadit/**.js" ], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "examples/transloadit/"}] } }, + { "files": ["examples/transloadit-textarea/**.js" ], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "examples/transloadit-textarea/"}] } }, + { "files": ["examples/uppy-with-companion/**.js" ], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "examples/uppy-with-companion/"}] } }, + { "files": ["examples/vue/**.js" ], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "examples/vue/"}] } }, + { "files": ["examples/xhr-bundle/**.js" ], "rules": { "import/no-extraneous-dependencies": ["warn", {"packageDir": "examples/xhr-bundle/"}] } } + ] } diff --git a/.vscode/uppy.code-workspace b/.vscode/uppy.code-workspace new file mode 100644 index 000000000..6666e589a --- /dev/null +++ b/.vscode/uppy.code-workspace @@ -0,0 +1,29 @@ +{ + "folders": [ + { + "path": ".." + } + ], + "settings": { + "workbench.colorCustomizations": { + "titleBar.activeForeground": "#ffffff", + "titleBar.activeBackground": "#ff009d", + }, + "search.exclude": { + "website/public/": true, + "node_modules/": true, + "website/node_modules/": true, + "dist/": true, + "lib/": true, + "package-lock.json": true, + "website/package-lock.json": true, + "yarn-error.log": true, + "website/.deploy_git": true, + "npm-debug.log": true, + "website/npm-debug.log": true, + "website/debug.log": true, + "nohup.out": true, + "yarn.lock": true + } + } +} diff --git a/uppy.code-workspace b/.vscode/uppy.code-workspace.bak similarity index 100% rename from uppy.code-workspace rename to .vscode/uppy.code-workspace.bak diff --git a/babel.config.js b/babel.config.js index 476f6bd12..fcafb3dcb 100644 --- a/babel.config.js +++ b/babel.config.js @@ -9,14 +9,14 @@ module.exports = (api) => { ['@babel/preset-env', { modules: false, loose: true, - targets - }] + targets, + }], ], plugins: [ ['@babel/plugin-proposal-class-properties', { loose: true }], '@babel/plugin-transform-object-assign', ['@babel/plugin-transform-react-jsx', { pragma: 'h' }], - process.env.IS_RELEASE_BUILD && 'babel-plugin-inline-package-json' - ].filter(Boolean) + process.env.IS_RELEASE_BUILD && 'babel-plugin-inline-package-json', + ].filter(Boolean), } } diff --git a/bin/after-version-bump.js b/bin/after-version-bump.js index 17c862b37..947d6f12e 100755 --- a/bin/after-version-bump.js +++ b/bin/after-version-bump.js @@ -16,6 +16,7 @@ const { promisify } = require('util') const once = require('events.once') const globby = require('globby') const fs = require('fs') + const readFile = promisify(fs.readFile) const writeFile = promisify(fs.writeFile) @@ -36,7 +37,7 @@ async function updateVersions (files, packageName) { const urlPart = packageName === 'uppy' ? packageName : packageName.slice(1) const replacements = new Map([ - [RegExp(`${urlPart}/v\\d+\\.\\d+\\.\\d+\\/`, 'g'), `${urlPart}/v${version}/`] + [RegExp(`${urlPart}/v\\d+\\.\\d+\\.\\d+\\/`, 'g'), `${urlPart}/v${version}/`], // maybe more later ]) @@ -62,8 +63,8 @@ async function npmRunBuild () { env: { ...process.env, FRESH: true, // force rebuild everything - IS_RELEASE_BUILD: true - } + IS_RELEASE_BUILD: true, + }, }) const [exitCode] = await once(npmRun, 'exit') if (exitCode !== 0) { @@ -91,7 +92,7 @@ async function main () { 'website/src/docs/**', 'website/src/examples/**', 'website/themes/uppy/layout/**', - '!**/node_modules/**' + '!**/node_modules/**', ]) await updateVersions(files, 'uppy') @@ -106,7 +107,7 @@ async function main () { await npmRunBuild() } -main().catch(function (err) { +main().catch((err) => { console.error(err.stack) process.exit(1) }) diff --git a/bin/build-bundle.js b/bin/build-bundle.js index c6f0978cf..7f8656c8a 100644 --- a/bin/build-bundle.js +++ b/bin/build-bundle.js @@ -20,12 +20,12 @@ function buildBundle (srcFile, bundleFile, { minify = false, standalone = '' } = b.transform(babelify) b.on('error', handleErr) - return new Promise(function (resolve, reject) { + return new Promise((resolve, reject) => { b.bundle() - .pipe(exorcist(bundleFile + '.map')) + .pipe(exorcist(`${bundleFile}.map`)) .pipe(fs.createWriteStream(bundleFile), 'utf8') .on('error', handleErr) - .on('finish', function () { + .on('finish', () => { if (minify) { console.info(chalk.green(`✓ Built Minified Bundle [${standalone}]:`), chalk.magenta(bundleFile)) } else { @@ -60,7 +60,7 @@ const methods = [ './packages/@uppy/robodog/bundle.js', './packages/@uppy/robodog/dist/robodog.min.js', { standalone: 'Robodog', minify: true } - ) + ), ] // Build minified versions of all the locales @@ -76,6 +76,6 @@ glob.sync(localePackagePath).forEach((localePath) => { ) }) -Promise.all(methods).then(function () { +Promise.all(methods).then(() => { console.info(chalk.yellow('✓ JS bundles 🎉')) }) diff --git a/bin/build-css.js b/bin/build-css.js index 4dc88cff2..fdced3f47 100644 --- a/bin/build-css.js +++ b/bin/build-css.js @@ -32,7 +32,7 @@ async function compileCSS () { resolve(url, { basedir: path.dirname(from), filename: from, - extensions: ['.scss'] + extensions: ['.scss'], }, (err, res) => { if (err) return done(err) @@ -43,17 +43,17 @@ async function compileCSS () { done({ file: res }) }) - } + }, }) const plugins = [ autoprefixer, postcssLogical(), - postcssDirPseudoClass() + postcssDirPseudoClass(), ] const postcssResult = await postcss(plugins) .process(scssResult.css, { from: file }) - postcssResult.warnings().forEach(function (warn) { + postcssResult.warnings().forEach((warn) => { console.warn(warn.toString()) }) @@ -76,9 +76,9 @@ async function compileCSS () { ) const minifiedResult = await postcss([ - cssnano({ safe: true }) + cssnano({ safe: true }), ]).process(postcssResult.css, { from: outfile }) - minifiedResult.warnings().forEach(function (warn) { + minifiedResult.warnings().forEach((warn) => { console.warn(warn.toString()) }) await writeFile(outfile.replace(/\.css$/, '.min.css'), minifiedResult.css) diff --git a/bin/build-lib.js b/bin/build-lib.js index 7db4872b1..4941be4bc 100644 --- a/bin/build-lib.js +++ b/bin/build-lib.js @@ -18,7 +18,7 @@ const META_FILES = [ 'babel.config.js', 'package.json', 'package-lock.json', - 'bin/build-lib.js' + 'bin/build-lib.js', ] function lastModified (file) { @@ -27,8 +27,7 @@ function lastModified (file) { async function buildLib () { const metaMtimes = await Promise.all(META_FILES.map((filename) => - lastModified(path.join(__dirname, '..', filename)) - )) + lastModified(path.join(__dirname, '..', filename)))) const metaMtime = Math.max(...metaMtimes) const files = await glob(SOURCE) @@ -51,13 +50,14 @@ async function buildLib () { await mkdirp(path.dirname(libFile)) await Promise.all([ writeFile(libFile, code), - writeFile(libFile + '.map', JSON.stringify(map)) + writeFile(`${libFile}.map`, JSON.stringify(map)), ]) console.log(chalk.green('Compiled lib:'), chalk.magenta(libFile)) } } console.log('Using Babel version:', require('@babel/core/package.json').version) + buildLib().catch((err) => { console.error(err.stack) process.exit(1) diff --git a/bin/check-npm-version.js b/bin/check-npm-version.js index 944d23a9a..146b35108 100644 --- a/bin/check-npm-version.js +++ b/bin/check-npm-version.js @@ -1,4 +1,5 @@ #!/usr/bin/env node + 'use strict' const userAgent = process.env.npm_config_user_agent diff --git a/bin/disc.js b/bin/disc.js index b4fea787f..221d323be 100644 --- a/bin/disc.js +++ b/bin/disc.js @@ -14,7 +14,7 @@ function minifyify (filename) { return minify({ sourceMap: false, toplevel: true, - compress: { unsafe: true } + compress: { unsafe: true }, }) } return new PassThrough() @@ -22,7 +22,7 @@ function minifyify (filename) { const bundler = browserify(path.join(__dirname, '../packages/uppy/index.js'), { fullPaths: true, - standalone: 'Uppy' + standalone: 'Uppy', }) bundler.transform(babelify) diff --git a/bin/locale-packs.js b/bin/locale-packs.js index e6259f069..0c6c1c7a0 100644 --- a/bin/locale-packs.js +++ b/bin/locale-packs.js @@ -4,6 +4,7 @@ const chalk = require('chalk') const path = require('path') const stringifyObject = require('stringify-object') const fs = require('fs') + const uppy = new Uppy() let localePack = {} const plugins = {} @@ -23,7 +24,7 @@ if (mode === 'build') { function getSources (pluginName) { const dependencies = { // because 'provider-views' doesn't have its own locale, it uses Core's defaultLocale - core: ['provider-views'] + core: ['provider-views'], } const globPath = path.join(__dirname, '..', 'packages', '@uppy', pluginName, 'lib', '**', '*.js') @@ -52,10 +53,10 @@ function buildPluginsList () { for (const file of files) { const dirName = path.dirname(file) const pluginName = path.basename(dirName) - if (pluginName === 'locales' || - pluginName === 'react-native' || - pluginName === 'vue' || - pluginName === 'svelte') { + if (pluginName === 'locales' + || pluginName === 'react-native' + || pluginName === 'vue' + || pluginName === 'svelte') { continue } const Plugin = require(dirName) @@ -69,24 +70,24 @@ function buildPluginsList () { global.navigator = { userAgent: '' } global.localStorage = { key: () => { }, - getItem: () => { } + getItem: () => { }, } global.window = { indexedDB: { - open: () => { return {} } - } + open: () => { return {} }, + }, } global.document = { createElement: () => { return { style: {} } - } + }, } try { if (pluginName === 'provider-views') { plugin = new Plugin(plugins['drag-drop'], { companionPattern: '', - companionUrl: 'https://companion.uppy.io' + companionUrl: 'https://companion.uppy.io', }) } else if (pluginName === 'store-redux') { plugin = new Plugin({ store: { dispatch: () => { } } }) @@ -96,9 +97,9 @@ function buildPluginsList () { companionUrl: 'https://companion.uppy.io', params: { auth: { - key: 'x' - } - } + key: 'x', + }, + }, }) } } catch (err) { @@ -150,7 +151,7 @@ function checkForUnused (fileContents, pluginName, localePack) { } function sortObjectAlphabetically (obj, sortFunc) { - return Object.keys(obj).sort(sortFunc).reduce(function (result, key) { + return Object.keys(obj).sort(sortFunc).reduce((result, key) => { result[key] = obj[key] return result }, {}) @@ -164,14 +165,14 @@ function createTypeScriptLocale (plugin, pluginName) { const pluginClassName = pluginName === 'core' ? 'Core' : plugin.id const localePath = path.join(__dirname, '..', 'packages', '@uppy', pluginName, 'types', 'generatedLocale.d.ts') - const localeTypes = - 'import Uppy = require(\'@uppy/core\')\n' + - '\n' + - `type ${pluginClassName}Locale = Uppy.Locale` + '<\n' + - allowedStringTypes + '\n' + - '>\n' + - '\n' + - `export = ${pluginClassName}Locale\n` + const localeTypes + = `${'import Uppy = require(\'@uppy/core\')\n' + + '\n' + + `type ${pluginClassName}Locale = Uppy.Locale` + '<\n'}${ + allowedStringTypes}\n` + + `>\n` + + `\n` + + `export = ${pluginClassName}Locale\n` fs.writeFileSync(localePath, localeTypes) } @@ -196,13 +197,13 @@ function build () { const prettyLocale = stringifyObject(localePack, { indent: ' ', singleQuotes: true, - inlineCharacterLimit: 12 + inlineCharacterLimit: 12, }) const localeTemplatePath = path.join(__dirname, '..', 'packages', '@uppy', 'locales', 'template.js') const template = fs.readFileSync(localeTemplatePath, 'utf-8') - const finalLocale = template.replace('en_US.strings = {}', 'en_US.strings = ' + prettyLocale) + const finalLocale = template.replace('en_US.strings = {}', `en_US.strings = ${prettyLocale}`) const localePackagePath = path.join(__dirname, '..', 'packages', '@uppy', 'locales', 'src', 'en_US.js') fs.writeFileSync(localePackagePath, finalLocale, 'utf-8') diff --git a/bin/run-example.js b/bin/run-example.js index 32baa1390..7da917f2a 100644 --- a/bin/run-example.js +++ b/bin/run-example.js @@ -13,6 +13,7 @@ const path = require('path') const { execSync } = require('child_process') + const exampleName = process.argv[2] if (!exampleName) { diff --git a/bin/update-contributors.js b/bin/update-contributors.js index 31dc68564..fb01dcffc 100644 --- a/bin/update-contributors.js +++ b/bin/update-contributors.js @@ -11,7 +11,7 @@ async function updateContributorsListInReadme () { '--cols', '6', '--format', 'md', '--showlogin', 'true', - '--sortOrder', 'desc' + '--sortOrder', 'desc', ] if (process.env.GITHUB_TOKEN) { diff --git a/bin/upload-to-cdn.js b/bin/upload-to-cdn.js index 87a71e380..3008404aa 100644 --- a/bin/upload-to-cdn.js +++ b/bin/upload-to-cdn.js @@ -85,7 +85,7 @@ async function getLocalDistFiles (packagePath) { const entries = await Promise.all( files.map(async (f) => [ f, - await readFile(path.join(packagePath, 'dist', f)) + await readFile(path.join(packagePath, 'dist', f)), ]) ) @@ -112,9 +112,9 @@ async function main (packageName, version) { const s3 = new AWS.S3({ credentials: new AWS.Credentials({ accessKeyId: process.env.EDGLY_KEY, - secretAccessKey: process.env.EDGLY_SECRET + secretAccessKey: process.env.EDGLY_SECRET, }), - region: AWS_REGION + region: AWS_REGION, }) const remote = !!version @@ -145,7 +145,7 @@ async function main (packageName, version) { const { Contents: existing } = await s3.listObjects({ Bucket: AWS_BUCKET, - Prefix: outputPath + Prefix: outputPath, }).promise() if (existing.length > 0) { if (process.argv.includes('--force')) { @@ -177,7 +177,7 @@ async function main (packageName, version) { Bucket: AWS_BUCKET, Key: key, ContentType: mime.lookup(filename), - Body: buffer + Body: buffer, }).promise() } } diff --git a/examples/aws-companion/main.js b/examples/aws-companion/main.js index ba3586ac2..22de35693 100644 --- a/examples/aws-companion/main.js +++ b/examples/aws-companion/main.js @@ -6,18 +6,18 @@ const AwsS3 = require('@uppy/aws-s3') const uppy = new Uppy({ debug: true, - autoProceed: false + autoProceed: false, }) uppy.use(GoogleDrive, { - companionUrl: 'http://localhost:3020' + companionUrl: 'http://localhost:3020', }) uppy.use(Webcam) uppy.use(Dashboard, { inline: true, target: 'body', - plugins: ['GoogleDrive', 'Webcam'] + plugins: ['GoogleDrive', 'Webcam'], }) uppy.use(AwsS3, { - companionUrl: 'http://localhost:3020' + companionUrl: 'http://localhost:3020', }) diff --git a/examples/aws-companion/server.js b/examples/aws-companion/server.js index 6620e31f5..89db872c2 100644 --- a/examples/aws-companion/server.js +++ b/examples/aws-companion/server.js @@ -8,19 +8,19 @@ const DATA_DIR = path.join(__dirname, 'tmp') app.use(require('cors')({ origin: true, - credentials: true + credentials: true, })) app.use(require('cookie-parser')()) app.use(require('body-parser').json()) app.use(require('express-session')({ - secret: 'hello planet' + secret: 'hello planet', })) const options = { providerOptions: { drive: { key: process.env.COMPANION_GOOGLE_KEY, - secret: process.env.COMPANION_GOOGLE_SECRET + secret: process.env.COMPANION_GOOGLE_SECRET, }, s3: { getKey: (req, filename) => @@ -29,13 +29,13 @@ const options = { secret: process.env.COMPANION_AWS_SECRET, bucket: process.env.COMPANION_AWS_BUCKET, region: process.env.COMPANION_AWS_REGION, - endpoint: process.env.COMPANION_AWS_ENDPOINT - } + endpoint: process.env.COMPANION_AWS_ENDPOINT, + }, }, server: { host: 'localhost:3020' }, filePath: DATA_DIR, secret: 'blah blah', - debug: true + debug: true, } // Create the data directory here for the sake of the example. @@ -44,7 +44,7 @@ try { } catch (err) { fs.mkdirSync(DATA_DIR) } -process.on('exit', function () { +process.on('exit', () => { rimraf.sync(DATA_DIR) }) diff --git a/examples/aws-presigned-url/main.js b/examples/aws-presigned-url/main.js index 406dec4af..12ed1877c 100644 --- a/examples/aws-presigned-url/main.js +++ b/examples/aws-presigned-url/main.js @@ -3,12 +3,12 @@ const Dashboard = require('@uppy/dashboard') const AwsS3 = require('@uppy/aws-s3') const uppy = new Uppy({ - debug: true + debug: true, }) uppy.use(Dashboard, { inline: true, - target: 'body' + target: 'body', }) uppy.use(AwsS3, { getUploadParameters (file) { @@ -18,12 +18,12 @@ uppy.use(AwsS3, { // Send and receive JSON. headers: { accept: 'application/json', - 'content-type': 'application/json' + 'content-type': 'application/json', }, body: JSON.stringify({ filename: file.name, - contentType: file.type - }) + contentType: file.type, + }), }).then((response) => { // Parse the JSON response. return response.json() @@ -33,8 +33,8 @@ uppy.use(AwsS3, { method: data.method, url: data.url, fields: data.fields, - headers: data.headers + headers: data.headers, } }) - } + }, }) diff --git a/examples/aws-presigned-url/serve.js b/examples/aws-presigned-url/serve.js index d0fc76ee7..6fc218f10 100644 --- a/examples/aws-presigned-url/serve.js +++ b/examples/aws-presigned-url/serve.js @@ -13,7 +13,7 @@ const b = browserify({ cache: {}, packageCache: {}, debug: true, - entries: path.join(__dirname, './main.js') + entries: path.join(__dirname, './main.js'), }) b.plugin(watchify) @@ -21,8 +21,8 @@ b.plugin(watchify) b.transform(babelify) b.transform(aliasify, { aliases: { - '@uppy': path.join(__dirname, '../../packages/@uppy') - } + '@uppy': path.join(__dirname, '../../packages/@uppy'), + }, }) function bundle () { @@ -43,6 +43,6 @@ console.log('bundling...') bundle().on('finish', () => { // Start the PHP delevopment server. spawn('php', ['-S', `localhost:${port}`], { - stdio: 'inherit' + stdio: 'inherit', }) }) diff --git a/examples/bundled/index.js b/examples/bundled/index.js index 294e42914..6df562565 100644 --- a/examples/bundled/index.js +++ b/examples/bundled/index.js @@ -17,8 +17,8 @@ const uppy = new Uppy({ debug: true, meta: { username: 'John', - license: 'Creative Commons' - } + license: 'Creative Commons', + }, }) .use(Dashboard, { trigger: '#pick-files', @@ -27,11 +27,11 @@ const uppy = new Uppy({ replaceTargetContent: true, metaFields: [ { id: 'license', name: 'License', placeholder: 'specify license' }, - { id: 'caption', name: 'Caption', placeholder: 'add caption' } + { id: 'caption', name: 'Caption', placeholder: 'add caption' }, ], showProgressDetails: true, proudlyDisplayPoweredByUppy: true, - note: '2 files, images and video only' + note: '2 files, images and video only', }) .use(GoogleDrive, { target: Dashboard, companionUrl: 'http://localhost:3020' }) .use(Instagram, { target: Dashboard, companionUrl: 'http://localhost:3020' }) diff --git a/examples/bundled/sw.js b/examples/bundled/sw.js index e7d9d13b2..a6b254dd1 100644 --- a/examples/bundled/sw.js +++ b/examples/bundled/sw.js @@ -45,8 +45,8 @@ function removeFile (store, fileID) { function getFiles (store) { sendMessageToAllClients({ type: 'uppy/ALL_FILES', - store: store, - files: getCache(store) + store, + files: getCache(store), }) } diff --git a/examples/custom-provider/babel.config.js b/examples/custom-provider/babel.config.js index 58a80f20c..69d931573 100644 --- a/examples/custom-provider/babel.config.js +++ b/examples/custom-provider/babel.config.js @@ -4,11 +4,11 @@ module.exports = (api) => { presets: [ ['@babel/preset-env', { modules: false, - loose: true - }] + loose: true, + }], ], plugins: [ - ['@babel/plugin-transform-react-jsx', { pragma: 'h' }] - ].filter(Boolean) + ['@babel/plugin-transform-react-jsx', { pragma: 'h' }], + ].filter(Boolean), } } diff --git a/examples/custom-provider/client/MyCustomProvider.js b/examples/custom-provider/client/MyCustomProvider.js index d92412355..dd9309a86 100644 --- a/examples/custom-provider/client/MyCustomProvider.js +++ b/examples/custom-provider/client/MyCustomProvider.js @@ -13,7 +13,7 @@ module.exports = class MyCustomProvider extends Plugin { this.title = 'MyUnsplash' this.icon = () => ( - + ) @@ -21,7 +21,7 @@ module.exports = class MyCustomProvider extends Plugin { companionUrl: this.opts.companionUrl, companionHeaders: this.opts.companionHeaders || this.opts.serverHeaders, provider: 'myunsplash', - pluginId: this.id + pluginId: this.id, }) this.files = [] @@ -29,12 +29,12 @@ module.exports = class MyCustomProvider extends Plugin { this.render = this.render.bind(this) // merge default options with the ones set by user - this.opts = Object.assign({}, opts) + this.opts = { ...opts } } install () { this.view = new ProviderViews(this, { - provider: this.provider + provider: this.provider, }) const target = this.opts.target diff --git a/examples/custom-provider/client/main.js b/examples/custom-provider/client/main.js index 6f553b222..a54675e5e 100644 --- a/examples/custom-provider/client/main.js +++ b/examples/custom-provider/client/main.js @@ -5,21 +5,21 @@ const MyCustomProvider = require('./MyCustomProvider') const Dashboard = require('@uppy/dashboard') const uppy = new Uppy({ - debug: true + debug: true, }) uppy.use(GoogleDrive, { - companionUrl: 'http://localhost:3020' + companionUrl: 'http://localhost:3020', }) uppy.use(MyCustomProvider, { - companionUrl: 'http://localhost:3020' + companionUrl: 'http://localhost:3020', }) uppy.use(Dashboard, { inline: true, target: 'body', - plugins: ['GoogleDrive', 'MyCustomProvider'] + plugins: ['GoogleDrive', 'MyCustomProvider'], }) uppy.use(Tus, { endpoint: 'https://tusd.tusdemo.net/files/' }) diff --git a/examples/custom-provider/server/customprovider.js b/examples/custom-provider/server/customprovider.js index 04c9e3e12..45d01c194 100644 --- a/examples/custom-provider/server/customprovider.js +++ b/examples/custom-provider/server/customprovider.js @@ -1,4 +1,5 @@ const request = require('request') + const BASE_URL = 'https://api.unsplash.com' /** @@ -16,8 +17,8 @@ class MyCustomProvider { method: 'GET', json: true, headers: { - Authorization: `Bearer ${token}` - } + Authorization: `Bearer ${token}`, + }, } request(options, (err, resp, body) => { @@ -37,8 +38,8 @@ class MyCustomProvider { method: 'GET', json: true, headers: { - Authorization: `Bearer ${token}` - } + Authorization: `Bearer ${token}`, + }, } request(options, (err, resp, body) => { @@ -61,8 +62,8 @@ class MyCustomProvider { method: 'GET', json: true, headers: { - Authorization: `Bearer ${token}` - } + Authorization: `Bearer ${token}`, + }, } request(options, (err, resp, body) => { @@ -80,14 +81,14 @@ class MyCustomProvider { const data = { username: null, items: [], - nextPagePath: null + nextPagePath: null, } const items = res items.forEach((item) => { const isFolder = !!item.published_at data.items.push({ - isFolder: isFolder, + isFolder, icon: isFolder ? item.cover_photo.urls.thumb : item.urls.thumb, name: item.title || item.description, mimeType: isFolder ? null : 'image/jpeg', @@ -95,7 +96,7 @@ class MyCustomProvider { thumbnail: isFolder ? item.cover_photo.urls.thumb : item.urls.thumb, requestPath: item.id, modifiedDate: item.updated_at, - size: null + size: null, }) }) diff --git a/examples/custom-provider/server/index.js b/examples/custom-provider/server/index.js index ff5571cc8..c0d78afe5 100644 --- a/examples/custom-provider/server/index.js +++ b/examples/custom-provider/server/index.js @@ -11,7 +11,7 @@ app.use(bodyParser.json()) app.use(session({ secret: 'some-secret', resave: true, - saveUninitialized: true + saveUninitialized: true, })) app.use((req, res, next) => { @@ -42,8 +42,8 @@ const uppyOptions = { providerOptions: { drive: { key: 'your google drive key', - secret: 'your google drive secret' - } + secret: 'your google drive secret', + }, }, customProviders: { myunsplash: { @@ -53,19 +53,19 @@ const uppyOptions = { access_url: ACCESS_URL, oauth: 2, key: 'your unsplash key here', - secret: 'your unsplash secret here' + secret: 'your unsplash secret here', }, // you provider module - module: require('./customprovider') - } + module: require('./customprovider'), + }, }, server: { host: 'localhost:3020', - protocol: 'http' + protocol: 'http', }, filePath: './output', secret: 'some-secret', - debug: true + debug: true, } app.use(uppy.app(uppyOptions)) diff --git a/examples/dev/Dashboard.js b/examples/dev/Dashboard.js index e0feaa36c..1127081f9 100644 --- a/examples/dev/Dashboard.js +++ b/examples/dev/Dashboard.js @@ -52,8 +52,8 @@ module.exports = () => { logger: Uppy.debugLogger, meta: { username: 'John', - license: 'Creative Commons' - } + license: 'Creative Commons', + }, }) .use(Dashboard, { trigger: '#pick-files', @@ -61,11 +61,11 @@ module.exports = () => { target: '.foo', metaFields: [ { id: 'license', name: 'License', placeholder: 'specify license' }, - { id: 'caption', name: 'Caption', placeholder: 'add caption' } + { id: 'caption', name: 'Caption', placeholder: 'add caption' }, ], showProgressDetails: true, proudlyDisplayPoweredByUppy: true, - note: '2 files, images and video only' + note: '2 files, images and video only', }) .use(GoogleDrive, { target: Dashboard, companionUrl: COMPANION_URL }) .use(Instagram, { target: Dashboard, companionUrl: COMPANION_URL }) @@ -79,7 +79,7 @@ module.exports = () => { .use(Webcam, { target: Dashboard, showVideoSourceDropdown: true, - showRecordingLength: true + showRecordingLength: true, }) .use(ScreenCapture, { target: Dashboard }) .use(Form, { target: '#upload-form' }) @@ -103,8 +103,8 @@ module.exports = () => { waitForEncoding: true, params: { auth: { key: TRANSLOADIT_KEY }, - template_id: TRANSLOADIT_TEMPLATE - } + template_id: TRANSLOADIT_TEMPLATE, + }, }) break case 'transloadit-s3': @@ -114,22 +114,22 @@ module.exports = () => { importFromUploadURLs: true, params: { auth: { key: TRANSLOADIT_KEY }, - template_id: TRANSLOADIT_TEMPLATE - } + template_id: TRANSLOADIT_TEMPLATE, + }, }) break case 'transloadit-xhr': uppyDashboard.setMeta({ params: JSON.stringify({ auth: { key: TRANSLOADIT_KEY }, - template_id: TRANSLOADIT_TEMPLATE - }) + template_id: TRANSLOADIT_TEMPLATE, + }), }) uppyDashboard.use(XHRUpload, { method: 'POST', endpoint: 'https://api2.transloadit.com/assemblies', metaFields: ['params'], - bundle: true + bundle: true, }) break } diff --git a/examples/dev/DragDrop.js b/examples/dev/DragDrop.js index 5f60b323e..79f013766 100644 --- a/examples/dev/DragDrop.js +++ b/examples/dev/DragDrop.js @@ -7,10 +7,10 @@ const ProgressBar = require('@uppy/progress-bar/src') module.exports = () => { const uppyDragDrop = new Uppy({ debug: true, - autoProceed: true + autoProceed: true, }) .use(DragDrop, { - target: '#uppyDragDrop' + target: '#uppyDragDrop', }) .use(ProgressBar, { target: '#uppyDragDrop-progress', hideAfterFinish: false }) .use(Tus, { endpoint: 'https://tusd.tusdemo.net/files/' }) diff --git a/examples/dev/index.js b/examples/dev/index.js index 37e2abb9a..f04d3540c 100644 --- a/examples/dev/index.js +++ b/examples/dev/index.js @@ -19,6 +19,6 @@ if ('serviceWorker' in navigator) { console.log('ServiceWorker registration successful with scope: ', registration.scope) }) .catch((error) => { - console.log('Registration failed with ' + error) + console.log(`Registration failed with ${error}`) }) } diff --git a/examples/dev/sw.js b/examples/dev/sw.js index 975f0de01..0add3404f 100644 --- a/examples/dev/sw.js +++ b/examples/dev/sw.js @@ -41,8 +41,8 @@ function removeFile (store, fileID) { function getFiles (store) { sendMessageToAllClients({ type: 'uppy/ALL_FILES', - store: store, - files: getCache(store) + store, + files: getCache(store), }) } diff --git a/examples/digitalocean-spaces/main.js b/examples/digitalocean-spaces/main.js index ad3bb7747..0afed6fb3 100644 --- a/examples/digitalocean-spaces/main.js +++ b/examples/digitalocean-spaces/main.js @@ -3,12 +3,12 @@ const Dashboard = require('@uppy/dashboard') const AwsS3 = require('@uppy/aws-s3') const uppy = new Uppy({ - debug: true + debug: true, }) uppy.use(Dashboard, { inline: true, - target: 'body' + target: 'body', }) // No client side changes needed! diff --git a/examples/digitalocean-spaces/server.js b/examples/digitalocean-spaces/server.js index d8fd1bec7..84994f5f5 100644 --- a/examples/digitalocean-spaces/server.js +++ b/examples/digitalocean-spaces/server.js @@ -26,6 +26,7 @@ const app = router() // Set up the /params endpoint that will create signed URLs for us. app.use(require('cors')()) app.use(require('body-parser').json()) + app.use('/companion', companion.app({ providerOptions: { s3: { @@ -36,10 +37,10 @@ app.use('/companion', companion.app({ key: process.env.COMPANION_AWS_KEY, secret: process.env.COMPANION_AWS_SECRET, bucket: process.env.COMPANION_AWS_BUCKET, - region: process.env.COMPANION_AWS_REGION - } + region: process.env.COMPANION_AWS_REGION, + }, }, - server: { serverUrl: `localhost:${PORT}` } + server: { serverUrl: `localhost:${PORT}` }, })) // Serve the built CSS file. @@ -59,9 +60,9 @@ budo(path.join(__dirname, 'main.js'), { 'babelify', ['aliasify', { aliases: { - '@uppy': path.join(__dirname, '../../packages/@uppy') - } - }] - ] - } + '@uppy': path.join(__dirname, '../../packages/@uppy'), + }, + }], + ], + }, }) diff --git a/examples/multiple-instances/main.js b/examples/multiple-instances/main.js index 07c3f61fb..d325b8b34 100644 --- a/examples/multiple-instances/main.js +++ b/examples/multiple-instances/main.js @@ -6,23 +6,23 @@ const GoldenRetriever = require('@uppy/golden-retriever') // but with different `id`s. const a = new Uppy({ id: 'a', - debug: true + debug: true, }) .use(Dashboard, { target: '#a', inline: true, - width: 400 + width: 400, }) .use(GoldenRetriever, { serviceWorker: false }) const b = new Uppy({ id: 'b', - debug: true + debug: true, }) .use(Dashboard, { target: '#b', inline: true, - width: 400 + width: 400, }) .use(GoldenRetriever, { serviceWorker: false }) diff --git a/examples/node-xhr/main.js b/examples/node-xhr/main.js index 8cec54702..3f3a20faf 100644 --- a/examples/node-xhr/main.js +++ b/examples/node-xhr/main.js @@ -5,15 +5,15 @@ const xhr = require('@uppy/xhr-upload') const uppy = new Uppy({ debug: true, - autoProceed: false + autoProceed: false, }) uppy.use(Webcam) uppy.use(Dashboard, { inline: true, target: 'body', - plugins: ['Webcam'] + plugins: ['Webcam'], }) uppy.use(xhr, { - endpoint: 'http://localhost:3020/upload' + endpoint: 'http://localhost:3020/upload', }) diff --git a/examples/node-xhr/server.js b/examples/node-xhr/server.js index 5b0c4bfb1..9264d4fe1 100644 --- a/examples/node-xhr/server.js +++ b/examples/node-xhr/server.js @@ -1,12 +1,12 @@ var formidable = require('formidable') var http = require('http') -http.createServer(function (req, res) { +http.createServer((req, res) => { const headers = { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'OPTIONS, POST, GET', - 'Access-Control-Max-Age': 2592000 // 30 days + 'Access-Control-Max-Age': 2592000, // 30 days /** add other headers as per requirement */ } @@ -21,7 +21,7 @@ http.createServer(function (req, res) { form.uploadDir = './uploads' form.keepExtensions = true - form.parse(req, function (err, fields, files) { + form.parse(req, (err, fields, files) => { if (err) { console.log('some error', err) res.writeHead(200, headers) diff --git a/examples/php-xhr/main.js b/examples/php-xhr/main.js index a1a7b01e9..0fd6963f9 100644 --- a/examples/php-xhr/main.js +++ b/examples/php-xhr/main.js @@ -5,15 +5,15 @@ const XHRUpload = require('@uppy/xhr-upload') const uppy = new Uppy({ debug: true, - autoProceed: false + autoProceed: false, }) uppy.use(Webcam) uppy.use(Dashboard, { inline: true, target: 'body', - plugins: ['Webcam'] + plugins: ['Webcam'], }) uppy.use(XHRUpload, { - endpoint: 'http://localhost:3020/upload.php' + endpoint: 'http://localhost:3020/upload.php', }) diff --git a/examples/python-xhr/main.js b/examples/python-xhr/main.js index cdb0da714..670a844cd 100644 --- a/examples/python-xhr/main.js +++ b/examples/python-xhr/main.js @@ -5,15 +5,15 @@ const XHRUpload = require('@uppy/xhr-upload') const uppy = new Uppy({ debug: true, - autoProceed: false + autoProceed: false, }) uppy.use(Webcam) uppy.use(Dashboard, { inline: true, target: 'body', - plugins: ['Webcam'] + plugins: ['Webcam'], }) uppy.use(XHRUpload, { - endpoint: 'http://localhost:3020/upload' + endpoint: 'http://localhost:3020/upload', }) diff --git a/examples/react-native-expo/App.js b/examples/react-native-expo/App.js index 6d483a77e..afaa4c8e6 100644 --- a/examples/react-native-expo/App.js +++ b/examples/react-native-expo/App.js @@ -29,12 +29,12 @@ export default class App extends React.Component { uploadStarted: false, uploadComplete: false, info: null, - totalProgress: 0 + totalProgress: 0, } - this.isReactNative = (typeof navigator !== 'undefined' && - typeof navigator.product === 'string' && - navigator.product.toLowerCase() === 'reactnative') + this.isReactNative = (typeof navigator !== 'undefined' + && typeof navigator.product === 'string' + && navigator.product.toLowerCase() === 'reactnative') this.showFilePicker = this.showFilePicker.bind(this) this.hideFilePicker = this.hideFilePicker.bind(this) @@ -46,14 +46,14 @@ export default class App extends React.Component { endpoint: 'https://tusd.tusdemo.net/files/', urlStorage: AsyncStorage, fileReader: getTusFileReader, - chunkSize: 10 * 1024 * 1024 // keep the chunk size small to avoid memory exhaustion + chunkSize: 10 * 1024 * 1024, // keep the chunk size small to avoid memory exhaustion }) this.uppy.on('upload-progress', (file, progress) => { this.setState({ progress: progress.bytesUploaded, total: progress.bytesTotal, totalProgress: this.uppy.state.totalProgress, - uploadStarted: true + uploadStarted: true, }) }) this.uppy.on('upload-success', (file, response) => { @@ -64,7 +64,7 @@ export default class App extends React.Component { status: 'Upload complete ✅', uploadURL: result.successful[0] ? result.successful[0].uploadURL : null, uploadComplete: true, - uploadStarted: false + uploadStarted: false, }) console.log('Upload complete:', result) }) @@ -72,14 +72,14 @@ export default class App extends React.Component { this.uppy.on('info-visible', () => { const info = this.uppy.getState().info this.setState({ - info: info + info, }) console.log('uppy-info:', info) }) this.uppy.on('info-hidden', () => { this.setState({ - info: null + info: null, }) }) } @@ -88,13 +88,13 @@ export default class App extends React.Component { this.setState({ isFilePickerVisible: true, uploadStarted: false, - uploadComplete: false + uploadComplete: false, }) } hideFilePicker () { this.setState({ - isFilePickerVisible: false + isFilePickerVisible: false, }) } @@ -102,12 +102,12 @@ export default class App extends React.Component { if (this.state.isPaused) { this.uppy.resumeAll() this.setState({ - isPaused: false + isPaused: false, }) } else { this.uppy.pauseAll() this.setState({ - isPaused: true + isPaused: true, }) } } @@ -118,15 +118,16 @@ export default class App extends React.Component { paddingTop: 100, paddingLeft: 50, paddingRight: 50, - flex: 1 + flex: 1, }} > Uppy in React Native + > + Uppy in React Native {this.state.info.message} diff --git a/examples/react-native-expo/FileList.js b/examples/react-native-expo/FileList.js index 131fa6038..baf75260b 100644 --- a/examples/react-native-expo/FileList.js +++ b/examples/react-native-expo/FileList.js @@ -36,7 +36,7 @@ function UppyDashboardFileIcon (props) { {props.isPaused ? 'Resume' : 'Pause'} + > + {props.isPaused ? 'Resume' : 'Pause'} ) @@ -22,11 +23,11 @@ export default function PauseResumeButton (props) { const styles = StyleSheet.create({ button: { backgroundColor: '#cc0077', - padding: 10 + padding: 10, }, text: { color: '#fff', textAlign: 'center', - fontSize: 17 - } + fontSize: 17, + }, }) diff --git a/examples/react-native-expo/ProgressBar.js b/examples/react-native-expo/ProgressBar.js index e1a1521d1..0206a2689 100644 --- a/examples/react-native-expo/ProgressBar.js +++ b/examples/react-native-expo/ProgressBar.js @@ -10,24 +10,24 @@ export default function ProgressBar (props) { return ( - {progress ? progress + '%' : null} + {progress ? `${progress}%` : null} ) } diff --git a/examples/react-native-expo/SelectFilesButton.js b/examples/react-native-expo/SelectFilesButton.js index af0db97cd..0392550c0 100644 --- a/examples/react-native-expo/SelectFilesButton.js +++ b/examples/react-native-expo/SelectFilesButton.js @@ -15,11 +15,11 @@ export default function SelectFiles (props) { const styles = StyleSheet.create({ button: { backgroundColor: '#cc0077', - padding: 15 + padding: 15, }, text: { color: '#fff', textAlign: 'center', - fontSize: 17 - } + fontSize: 17, + }, }) diff --git a/examples/react-native-expo/babel.config.js b/examples/react-native-expo/babel.config.js index d799d652a..e1e3637af 100644 --- a/examples/react-native-expo/babel.config.js +++ b/examples/react-native-expo/babel.config.js @@ -1,6 +1,6 @@ module.exports = function (api) { api.cache(true) return { - presets: ['babel-preset-expo'] + presets: ['babel-preset-expo'], } } diff --git a/examples/react-native-expo/tusFileReader.js b/examples/react-native-expo/tusFileReader.js index 3b36b1c43..cc816a651 100644 --- a/examples/react-native-expo/tusFileReader.js +++ b/examples/react-native-expo/tusFileReader.js @@ -18,7 +18,7 @@ class TusFileReader { const options = { encoding: Expo.FileSystem.EncodingTypes.Base64, length: end - start, - position: start + position: start, } Expo.FileSystem.readAsStringAsync(this.file.uri, options).then((data) => { cb(null, base64.toByteArray(data)) diff --git a/examples/redux/main.js b/examples/redux/main.js index 6362757e0..52e573df4 100644 --- a/examples/redux/main.js +++ b/examples/redux/main.js @@ -17,10 +17,10 @@ function counter (state = 0, action) { } const reducer = combineReducers({ - counter: counter, + counter, // You don't have to use the `uppy` key. But if you don't, // you need to provide a custom `selector` to the `uppyReduxStore` call below. - uppy: uppyReduxStore.reducer + uppy: uppyReduxStore.reducer, }) let enhancer = applyMiddleware( @@ -61,7 +61,7 @@ document.querySelector('#incrementAsync').onclick = () => { // Uppy using the same store const uppy = new Uppy({ id: 'redux', - store: uppyReduxStore({ store: store }), + store: uppyReduxStore({ store }), // If we had placed our `reducer` elsewhere in Redux, eg. under an `uppy` key in the state for a profile page, // we'd do something like: // @@ -70,12 +70,12 @@ const uppy = new Uppy({ // id: 'avatar', // selector: state => state.pages.profile.uppy // }), - debug: true + debug: true, }) uppy.use(Dashboard, { target: '#app', inline: true, - width: 400 + width: 400, }) uppy.use(Tus, { endpoint: 'https://tusd.tusdemo.net/' }) diff --git a/examples/svelte-example/postcss.config.js b/examples/svelte-example/postcss.config.js index c600f4b5d..8f15746a1 100644 --- a/examples/svelte-example/postcss.config.js +++ b/examples/svelte-example/postcss.config.js @@ -1,5 +1,5 @@ module.exports = { plugins: [ - require('postcss-import')() - ] + require('postcss-import')(), + ], } diff --git a/examples/svelte-example/rollup.config.js b/examples/svelte-example/rollup.config.js index a4dd165ab..2af765a60 100644 --- a/examples/svelte-example/rollup.config.js +++ b/examples/svelte-example/rollup.config.js @@ -21,12 +21,12 @@ function serve () { if (server) return server = require('child_process').spawn('npm', ['run', 'start', '--', '--dev'], { stdio: ['ignore', 'inherit', 'inherit'], - shell: true + shell: true, }) process.on('SIGTERM', toExit) process.on('exit', toExit) - } + }, } } @@ -36,17 +36,17 @@ export default { sourcemap: true, format: 'iife', name: 'app', - file: 'public/build/bundle.js' + file: 'public/build/bundle.js', }, plugins: [ svelte({ preprocess: sveltePreprocess({ - postcss: true + postcss: true, }), compilerOptions: { // enable run-time checks when not in production - dev: !production - } + dev: !production, + }, }), // we'll extract any component CSS out into // a separate file - better for performance @@ -59,12 +59,12 @@ export default { // https://github.com/rollup/plugins/tree/master/packages/commonjs resolve({ browser: true, - dedupe: ['svelte', '@uppy/core'] + dedupe: ['svelte', '@uppy/core'], }), commonjs(), typescript({ sourceMap: !production, - inlineSources: !production + inlineSources: !production, }), // In dev mode, call `npm run start` once @@ -77,9 +77,9 @@ export default { // If we're building for production (npm run build // instead of npm run dev), minify - production && terser() + production && terser(), ], watch: { - clearScreen: false - } + clearScreen: false, + }, } diff --git a/examples/transloadit-textarea/main.js b/examples/transloadit-textarea/main.js index 6adf7e6cc..23a4e5214 100644 --- a/examples/transloadit-textarea/main.js +++ b/examples/transloadit-textarea/main.js @@ -26,7 +26,8 @@ class MarkdownTextarea { this.uploadLine.classList.add('mdtxt-upload') this.uploadLine.appendChild( - document.createTextNode('Upload an attachment')) + document.createTextNode('Upload an attachment') + ) } install () { @@ -106,8 +107,8 @@ class MarkdownTextarea { waitForEncoding: true, params: { auth: { key: TRANSLOADIT_EXAMPLE_KEY }, - template_id: TRANSLOADIT_EXAMPLE_TEMPLATE - } + template_id: TRANSLOADIT_EXAMPLE_TEMPLATE, + }, }).then((result) => { // Was cancelled if (result == null) return @@ -125,8 +126,8 @@ class MarkdownTextarea { waitForEncoding: true, params: { auth: { key: TRANSLOADIT_EXAMPLE_KEY }, - template_id: TRANSLOADIT_EXAMPLE_TEMPLATE - } + template_id: TRANSLOADIT_EXAMPLE_TEMPLATE, + }, }).then((result) => { // Was cancelled if (result == null) return @@ -141,7 +142,8 @@ class MarkdownTextarea { } const textarea = new MarkdownTextarea( - document.querySelector('#new textarea')) + document.querySelector('#new textarea') +) textarea.install() function renderSnippet (title, text) { @@ -173,8 +175,8 @@ function loadSnippets () { document.querySelector('#new').addEventListener('submit', (event) => { event.preventDefault() - const title = event.target.querySelector('input[name="title"]').value || - 'Unnamed Snippet' + const title = event.target.querySelector('input[name="title"]').value + || 'Unnamed Snippet' const text = textarea.element.value saveSnippet(title, text) diff --git a/examples/transloadit/main.js b/examples/transloadit/main.js index c9096a09e..8a76dd105 100644 --- a/examples/transloadit/main.js +++ b/examples/transloadit/main.js @@ -24,15 +24,15 @@ const formUppy = robodog.form('#test-form', { debug: true, fields: ['message'], restrictions: { - allowedFileTypes: ['.png'] + allowedFileTypes: ['.png'], }, waitForEncoding: true, params: { auth: { key: TRANSLOADIT_KEY }, - template_id: TEMPLATE_ID + template_id: TEMPLATE_ID, }, modal: true, - progressBar: '#test-form .progress' + progressBar: '#test-form .progress', }) formUppy.on('error', (err) => { @@ -51,15 +51,15 @@ const formUppyWithDashboard = robodog.form('#dashboard-form', { debug: true, fields: ['message'], restrictions: { - allowedFileTypes: ['.png'] + allowedFileTypes: ['.png'], }, waitForEncoding: true, note: 'Only PNG files please!', params: { auth: { key: TRANSLOADIT_KEY }, - template_id: TEMPLATE_ID + template_id: TEMPLATE_ID, }, - dashboard: '#dashboard-form .dashboard' + dashboard: '#dashboard-form .dashboard', }) window.formUppyWithDashboard = formUppyWithDashboard @@ -70,8 +70,8 @@ const dashboard = robodog.dashboard('#dashboard', { note: 'Images will be resized with Transloadit', params: { auth: { key: TRANSLOADIT_KEY }, - template_id: TEMPLATE_ID - } + template_id: TEMPLATE_ID, + }, }) window.dashboard = dashboard @@ -83,16 +83,16 @@ window.dashboard = dashboard function openModal () { robodog.pick({ restrictions: { - allowedFileTypes: ['.png'] + allowedFileTypes: ['.png'], }, waitForEncoding: true, params: { auth: { key: TRANSLOADIT_KEY }, - template_id: TEMPLATE_ID + template_id: TEMPLATE_ID, }, providers: [ - 'webcam' - ] + 'webcam', + ], // if providers need custom config // webcam: { // option: 'whatever' @@ -113,8 +113,8 @@ window.doUpload = (event) => { waitForEncoding: true, params: { auth: { key: TRANSLOADIT_KEY }, - template_id: TEMPLATE_ID - } + template_id: TEMPLATE_ID, + }, }).then((result) => { resultEl.classList.remove('hidden') errorEl.classList.add('hidden') diff --git a/examples/uppy-with-companion/server/index.js b/examples/uppy-with-companion/server/index.js index 92d789321..28a270dfe 100644 --- a/examples/uppy-with-companion/server/index.js +++ b/examples/uppy-with-companion/server/index.js @@ -9,7 +9,7 @@ app.use(bodyParser.json()) app.use(session({ secret: 'some-secret', resave: true, - saveUninitialized: true + saveUninitialized: true, })) app.use((req, res, next) => { @@ -36,29 +36,29 @@ const uppyOptions = { providerOptions: { drive: { key: 'your google key', - secret: 'your google secret' + secret: 'your google secret', }, instagram: { key: 'your instagram key', - secret: 'your instagram secret' + secret: 'your instagram secret', }, dropbox: { key: 'your dropbox key', - secret: 'your dropbox secret' + secret: 'your dropbox secret', }, box: { key: 'your box key', - secret: 'your box secret' - } + secret: 'your box secret', + }, // you can also add options for additional providers here }, server: { host: 'localhost:3020', - protocol: 'http' + protocol: 'http', }, filePath: './output', secret: 'some-secret', - debug: true + debug: true, } app.use(companion.app(uppyOptions)) diff --git a/examples/vue/babel.config.js b/examples/vue/babel.config.js index e9558405f..df195386e 100644 --- a/examples/vue/babel.config.js +++ b/examples/vue/babel.config.js @@ -1,5 +1,5 @@ module.exports = { presets: [ - '@vue/cli-plugin-babel/preset' - ] + '@vue/cli-plugin-babel/preset', + ], } diff --git a/examples/vue/src/main.js b/examples/vue/src/main.js index fca74cfc9..63eb05f71 100644 --- a/examples/vue/src/main.js +++ b/examples/vue/src/main.js @@ -4,5 +4,5 @@ import App from './App.vue' Vue.config.productionTip = false new Vue({ - render: h => h(App) + render: h => h(App), }).$mount('#app') diff --git a/examples/xhr-bundle/main.js b/examples/xhr-bundle/main.js index 54425a199..dc773108f 100644 --- a/examples/xhr-bundle/main.js +++ b/examples/xhr-bundle/main.js @@ -4,19 +4,19 @@ const XHRUpload = require('@uppy/xhr-upload') const uppy = new Uppy({ debug: true, - meta: { something: 'xyz' } + meta: { something: 'xyz' }, }) uppy.use(Dashboard, { target: '#app', inline: true, hideRetryButton: true, - hideCancelButton: true + hideCancelButton: true, }) uppy.use(XHRUpload, { bundle: true, endpoint: 'http://localhost:9967/upload', metaFields: ['something'], - fieldName: 'files' + fieldName: 'files', }) diff --git a/examples/xhr-bundle/serve.js b/examples/xhr-bundle/serve.js index 4d8aa6af7..6fcc62545 100644 --- a/examples/xhr-bundle/serve.js +++ b/examples/xhr-bundle/serve.js @@ -3,7 +3,7 @@ var cors = require('cors') var multer = require('multer') var upload = multer({ - storage: multer.memoryStorage() + storage: multer.memoryStorage(), }) app.use(cors()) @@ -13,9 +13,9 @@ app.listen(9967) function uploadRoute (req, res) { res.json({ - files: req.files.map(function (file) { + files: req.files.map((file) => { delete file.buffer return file - }) + }), }) } diff --git a/package-lock.json b/package-lock.json index 9f8de5ab3..268fbec40 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1195,7 +1195,6 @@ "version": "7.12.5", "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.12.5.tgz", "integrity": "sha512-roGr54CsTmNPPzZoCP1AmDXuBoNao7tnSA83TXTwt+UK5QVyh1DIJnrgYRPWKCF2flqZQXwa7Yr8v7VmLzF0YQ==", - "dev": true, "requires": { "core-js-pure": "^3.0.0", "regenerator-runtime": "^0.13.4" @@ -1243,6 +1242,51 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "@eslint/eslintrc": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", + "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.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" + }, + "dependencies": { + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "requires": { + "type-fest": "^0.8.1" + } + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" + } + } + }, "@evocateur/libnpmaccess": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@evocateur/libnpmaccess/-/libnpmaccess-3.1.2.tgz", @@ -6622,7 +6666,6 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", "integrity": "sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==", - "dev": true, "requires": { "@nodelib/fs.stat": "2.0.3", "run-parallel": "^1.1.9" @@ -6631,8 +6674,7 @@ "@nodelib/fs.stat": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz", - "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==", - "dev": true + "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==" } } }, @@ -6645,7 +6687,6 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz", "integrity": "sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==", - "dev": true, "requires": { "@nodelib/fs.scandir": "2.1.3", "fastq": "^1.6.0" @@ -7342,14 +7383,12 @@ "@types/json-schema": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.6.tgz", - "integrity": "sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==", - "dev": true + "integrity": "sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==" }, "@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", - "dev": true + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=" }, "@types/jsonwebtoken": { "version": "8.3.7", @@ -7623,6 +7662,20 @@ "eslint-utils": "^2.0.0" } }, + "@typescript-eslint/scope-manager": { + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.17.0.tgz", + "integrity": "sha512-OJ+CeTliuW+UZ9qgULrnGpPQ1bhrZNFpfT/Bc0pzNeyZwMik7/ykJ0JHnQ7krHanFN9wcnPK89pwn84cRUmYjw==", + "requires": { + "@typescript-eslint/types": "4.17.0", + "@typescript-eslint/visitor-keys": "4.17.0" + } + }, + "@typescript-eslint/types": { + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.17.0.tgz", + "integrity": "sha512-RN5z8qYpJ+kXwnLlyzZkiJwfW2AY458Bf8WqllkondQIcN2ZxQowAToGSd9BlAUZDB5Ea8I6mqL2quGYCLT+2g==" + }, "@typescript-eslint/typescript-estree": { "version": "2.34.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz", @@ -7646,6 +7699,22 @@ } } }, + "@typescript-eslint/visitor-keys": { + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.17.0.tgz", + "integrity": "sha512-WfuMN8mm5SSqXuAr9NM+fItJ0SVVphobWYkWOwQ1odsfC014Vdxk/92t4JwS1Q6fCA/ABfCKpa3AVtpUKTNKGQ==", + "requires": { + "@typescript-eslint/types": "4.17.0", + "eslint-visitor-keys": "^2.0.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==" + } + } + }, "@uppy-example/aws-companion": { "version": "file:examples/aws-companion", "requires": { @@ -10106,8 +10175,7 @@ "acorn-jsx": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", - "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", - "dev": true + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==" }, "acorn-node": { "version": "1.8.2", @@ -10452,6 +10520,15 @@ "resolved": "https://registry.npmjs.org/argsarray/-/argsarray-0.0.1.tgz", "integrity": "sha1-bnIHtOzbObCviDA/pa4ivajfYcs=" }, + "aria-query": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz", + "integrity": "sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==", + "requires": { + "@babel/runtime": "^7.10.2", + "@babel/runtime-corejs3": "^7.10.2" + } + }, "arr-diff": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", @@ -10510,7 +10587,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz", "integrity": "sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==", - "dev": true, "requires": { "define-properties": "^1.1.3", "es-abstract": "^1.17.0", @@ -10566,7 +10642,6 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz", "integrity": "sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==", - "dev": true, "requires": { "define-properties": "^1.1.3", "es-abstract": "^1.17.0-next.1" @@ -10686,6 +10761,11 @@ "integrity": "sha512-tKHdBe8N/Vq2nLAm4YPBVREVZjMux6KrqyPfNQgIbDl0t7HaNSmy8w4OyVHYg/cvyn5BW7o7pVwpjPte89Zhcg==", "dev": true }, + "ast-types-flow": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", + "integrity": "sha1-9wtzXGvKGlycItmCw+Oef+ujva0=" + }, "astral-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", @@ -10854,6 +10934,11 @@ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, + "axe-core": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.1.3.tgz", + "integrity": "sha512-vwPpH4Aj4122EW38mxO/fxhGKtwWTMLDIJfZ1He0Edbtjcfna/R3YB67yVhezUMzqc3Jr3+Ii50KRntlENL4xQ==" + }, "axios": { "version": "0.19.0", "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz", @@ -10891,6 +10976,11 @@ } } }, + "axobject-query": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz", + "integrity": "sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA==" + }, "babel-code-frame": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", @@ -14327,6 +14417,11 @@ } } }, + "confusing-browser-globals": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz", + "integrity": "sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA==" + }, "connect": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", @@ -14433,8 +14528,7 @@ "contains-path": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", - "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", - "dev": true + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=" }, "content-disposition": { "version": "0.5.3", @@ -15321,8 +15415,7 @@ "core-js-pure": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.7.0.tgz", - "integrity": "sha512-EZD2ckZysv8MMt4J6HSvS9K2GdtlZtdBncKAmF9lr2n0c9dJUaUN88PSTjvgwCgQPWKTkERXITgS6JJRAnljtg==", - "dev": true + "integrity": "sha512-EZD2ckZysv8MMt4J6HSvS9K2GdtlZtdBncKAmF9lr2n0c9dJUaUN88PSTjvgwCgQPWKTkERXITgS6JJRAnljtg==" }, "core-util-is": { "version": "1.0.2", @@ -16042,6 +16135,11 @@ "integrity": "sha1-vEZ0gAQ3iyGjYMn8fPUjF5B2L7g=", "dev": true }, + "damerau-levenshtein": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.6.tgz", + "integrity": "sha512-JVrozIeElnj3QzfUIt8tB8YMluBJom4Vw9qTPpjGYQ9fYlB3D/rb6OordUxf3xeFB35LKWs0xqcO5U6ySvBtug==" + }, "dargs": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/dargs/-/dargs-4.1.0.tgz", @@ -16751,7 +16849,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, "requires": { "esutils": "^2.0.2" } @@ -17254,7 +17351,6 @@ "version": "2.3.6", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, "requires": { "ansi-colors": "^4.1.1" }, @@ -17262,8 +17358,7 @@ "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==" } } }, @@ -17796,6 +17891,26 @@ } } }, + "eslint-config-airbnb": { + "version": "18.2.1", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-18.2.1.tgz", + "integrity": "sha512-glZNDEZ36VdlZWoxn/bUR1r/sdFKPd1mHPbqUtkctgNG4yT2DLLtJ3D+yCV+jzZCc2V1nBVkmdknOJBZ5Hc0fg==", + "requires": { + "eslint-config-airbnb-base": "^14.2.1", + "object.assign": "^4.1.2", + "object.entries": "^1.1.2" + } + }, + "eslint-config-airbnb-base": { + "version": "14.2.1", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz", + "integrity": "sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA==", + "requires": { + "confusing-browser-globals": "^1.0.10", + "object.assign": "^4.1.2", + "object.entries": "^1.1.2" + } + }, "eslint-config-standard": { "version": "14.1.1", "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz", @@ -17808,6 +17923,864 @@ "integrity": "sha512-ULVC8qH8qCqbU792ZOO6DaiaZyHNS/5CZt3hKqHkEhVlhPEPN3nfBqqxJCyp59XrjIBZPu1chMYe9T2DXZ7TMw==", "dev": true }, + "eslint-config-transloadit": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/eslint-config-transloadit/-/eslint-config-transloadit-1.1.4.tgz", + "integrity": "sha512-d9vg+9jY6evyEFjnNCgl8MIAI3gXo6H3IG7i+oqYNOzIdJR0i+yMyJhYLB+B31chAgyK4q1W3d8gYGxXdVOesQ==", + "requires": { + "@babel/core": "^7.13.10", + "@babel/eslint-parser": "7.13.10", + "eslint": "7.22.0", + "eslint-config-airbnb": "^18.2.1", + "eslint-plugin-import": "^2.22.1", + "eslint-plugin-jest": "24.3.1", + "eslint-plugin-jsx-a11y": "^6.4.1", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prefer-import": "^0.0.1", + "eslint-plugin-promise": "^4.3.1", + "eslint-plugin-react-hooks": "4.2.0", + "fakefile": "^1.0.0", + "typescript": "4.2.3" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "requires": { + "@babel/highlight": "^7.12.13" + } + }, + "@babel/compat-data": { + "version": "7.13.11", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.11.tgz", + "integrity": "sha512-BwKEkO+2a67DcFeS3RLl0Z3Gs2OvdXewuWjc1Hfokhb5eQWP9YRYH1/+VrVZvql2CfjOiNGqSAFOYt4lsqTHzg==" + }, + "@babel/core": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.10.tgz", + "integrity": "sha512-bfIYcT0BdKeAZrovpMqX2Mx5NrgAckGbwT982AkdS5GNfn3KMGiprlBAtmBcFZRUmpaufS6WZFP8trvx8ptFDw==", + "requires": { + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.13.9", + "@babel/helper-compilation-targets": "^7.13.10", + "@babel/helper-module-transforms": "^7.13.0", + "@babel/helpers": "^7.13.10", + "@babel/parser": "^7.13.10", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.13.0", + "@babel/types": "^7.13.0", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.1.2", + "lodash": "^4.17.19", + "semver": "^6.3.0", + "source-map": "^0.5.0" + } + }, + "@babel/eslint-parser": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.13.10.tgz", + "integrity": "sha512-/I1HQ3jGPhIpeBFeI3wO9WwWOnBYpuR0pX0KlkdGcRQAVX9prB/FCS2HBpL7BiFbzhny1YCiBH8MTZD2jJa7Hg==", + "requires": { + "eslint-scope": "5.1.0", + "eslint-visitor-keys": "^1.3.0", + "semver": "^6.3.0" + } + }, + "@babel/generator": { + "version": "7.13.9", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.9.tgz", + "integrity": "sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw==", + "requires": { + "@babel/types": "^7.13.0", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.10.tgz", + "integrity": "sha512-/Xju7Qg1GQO4mHZ/Kcs6Au7gfafgZnwm+a7sy/ow/tV1sHeraRUHbjdat8/UvDor4Tez+siGKDk6zIKtCPKVJA==", + "requires": { + "@babel/compat-data": "^7.13.8", + "@babel/helper-validator-option": "^7.12.17", + "browserslist": "^4.14.5", + "semver": "^6.3.0" + } + }, + "@babel/helper-function-name": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", + "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", + "requires": { + "@babel/helper-get-function-arity": "^7.12.13", + "@babel/template": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", + "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", + "requires": { + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.0.tgz", + "integrity": "sha512-yvRf8Ivk62JwisqV1rFRMxiSMDGnN6KH1/mDMmIrij4jztpQNRoHqqMG3U6apYbGRPJpgPalhva9Yd06HlUxJQ==", + "requires": { + "@babel/types": "^7.13.0" + } + }, + "@babel/helper-module-imports": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.13.tgz", + "integrity": "sha512-NGmfvRp9Rqxy0uHSSVP+SRIW1q31a7Ji10cLBcqSDUngGentY4FRiHOFZFE1CLU5eiL0oE8reH7Tg1y99TDM/g==", + "requires": { + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-module-transforms": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.13.0.tgz", + "integrity": "sha512-Ls8/VBwH577+pw7Ku1QkUWIyRRNHpYlts7+qSqBBFCW3I8QteB9DxfcZ5YJpOwH6Ihe/wn8ch7fMGOP1OhEIvw==", + "requires": { + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-replace-supers": "^7.13.0", + "@babel/helper-simple-access": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/helper-validator-identifier": "^7.12.11", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.13.0", + "@babel/types": "^7.13.0", + "lodash": "^4.17.19" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz", + "integrity": "sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA==", + "requires": { + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-replace-supers": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.0.tgz", + "integrity": "sha512-Segd5me1+Pz+rmN/NFBOplMbZG3SqRJOBlY+mA0SxAv6rjj7zJqr1AVr3SfzUVTLCv7ZLU5FycOM/SBGuLPbZw==", + "requires": { + "@babel/helper-member-expression-to-functions": "^7.13.0", + "@babel/helper-optimise-call-expression": "^7.12.13", + "@babel/traverse": "^7.13.0", + "@babel/types": "^7.13.0" + } + }, + "@babel/helper-simple-access": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.12.13.tgz", + "integrity": "sha512-0ski5dyYIHEfwpWGx5GPWhH35j342JaflmCeQmsPWcrOQDtCN6C1zKAVRFVbK53lPW2c9TsuLLSUDf0tIGJ5hA==", + "requires": { + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz", + "integrity": "sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==", + "requires": { + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==" + }, + "@babel/helper-validator-option": { + "version": "7.12.17", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz", + "integrity": "sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw==" + }, + "@babel/helpers": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.13.10.tgz", + "integrity": "sha512-4VO883+MWPDUVRF3PhiLBUFHoX/bsLTGFpFK/HqvvfBZz2D57u9XzPVNFVBTc0PW/CWR9BXTOKt8NF4DInUHcQ==", + "requires": { + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.13.0", + "@babel/types": "^7.13.0" + } + }, + "@babel/highlight": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", + "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", + "requires": { + "@babel/helper-validator-identifier": "^7.12.11", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.13.11", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.11.tgz", + "integrity": "sha512-PhuoqeHoO9fc4ffMEVk4qb/w/s2iOSWohvbHxLtxui0eBg3Lg5gN1U8wp1V1u61hOWkPQJJyJzGH6Y+grwkq8Q==" + }, + "@babel/template": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", + "integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==", + "requires": { + "@babel/code-frame": "^7.12.13", + "@babel/parser": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "@babel/traverse": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.0.tgz", + "integrity": "sha512-xys5xi5JEhzC3RzEmSGrs/b3pJW/o87SypZ+G/PhaE7uqVQNv/jlmVIBXuoh5atqQ434LfXV+sf23Oxj0bchJQ==", + "requires": { + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.13.0", + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/parser": "^7.13.0", + "@babel/types": "^7.13.0", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.19" + } + }, + "@babel/types": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz", + "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==", + "requires": { + "@babel/helper-validator-identifier": "^7.12.11", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz", + "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==" + }, + "@typescript-eslint/experimental-utils": { + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.17.0.tgz", + "integrity": "sha512-ZR2NIUbnIBj+LGqCFGQ9yk2EBQrpVVFOh9/Kd0Lm6gLpSAcCuLLe5lUCibKGCqyH9HPwYC0GIJce2O1i8VYmWA==", + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/scope-manager": "4.17.0", + "@typescript-eslint/types": "4.17.0", + "@typescript-eslint/typescript-estree": "4.17.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^2.0.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.17.0.tgz", + "integrity": "sha512-lRhSFIZKUEPPWpWfwuZBH9trYIEJSI0vYsrxbvVvNyIUDoKWaklOAelsSkeh3E2VBSZiNe9BZ4E5tYBZbUczVQ==", + "requires": { + "@typescript-eslint/types": "4.17.0", + "@typescript-eslint/visitor-keys": "4.17.0", + "debug": "^4.1.1", + "globby": "^11.0.1", + "is-glob": "^4.0.1", + "semver": "^7.3.2", + "tsutils": "^3.17.1" + }, + "dependencies": { + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" + }, + "astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==" + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "requires": { + "fill-range": "^7.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "requires": { + "path-type": "^4.0.0" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "eslint": { + "version": "7.22.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.22.0.tgz", + "integrity": "sha512-3VawOtjSJUQiiqac8MQc+w457iGLfuNGLFn8JmF051tTKbh5/x/0vlcEj8OgDCaw7Ysa2Jn8paGshV7x2abKXg==", + "requires": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.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": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash": "^4.17.21", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.4", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "eslint-visitor-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==" + }, + "globals": { + "version": "13.6.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.6.0.tgz", + "integrity": "sha512-YFKCX0SiPg7l5oKYCJ2zZGxcXprVXHcSnVuvzrT3oSENQonVLqM5pf9fN5dLGZGyCjhw8TN8Btwe/jKnZ0pjvQ==", + "requires": { + "type-fest": "^0.20.2" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "eslint-plugin-import": { + "version": "2.22.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz", + "integrity": "sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==", + "requires": { + "array-includes": "^3.1.1", + "array.prototype.flat": "^1.2.3", + "contains-path": "^0.1.0", + "debug": "^2.6.9", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "^0.3.4", + "eslint-module-utils": "^2.6.0", + "has": "^1.0.3", + "minimatch": "^3.0.4", + "object.values": "^1.1.1", + "read-pkg-up": "^2.0.0", + "resolve": "^1.17.0", + "tsconfig-paths": "^3.9.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "requires": { + "esutils": "^2.0.2", + "isarray": "^1.0.0" + } + } + } + }, + "eslint-plugin-jest": { + "version": "24.3.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-24.3.1.tgz", + "integrity": "sha512-RQt59rfMSHyvedImT72iaf8JcvCcR4P7Uq499dALtjY8mrCjbwWrFi1UceG4sid2wVIeDi+0tjxXZ8CZEVO7Zw==", + "requires": { + "@typescript-eslint/experimental-utils": "^4.0.1" + } + }, + "eslint-plugin-promise": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.3.1.tgz", + "integrity": "sha512-bY2sGqyptzFBDLh/GMbAxfdJC+b0f23ME63FOE4+Jao0oZ3E1LEwFtWJX/1pGMJLiTtrSSern2CRM/g+dfc0eQ==" + }, + "espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "requires": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + } + }, + "esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" + } + } + }, + "fakefile": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fakefile/-/fakefile-1.0.0.tgz", + "integrity": "sha512-2FRMEwkz/qNlQ6AvAj0KzdCcvzrhVM9XtuwOWmBuYkpv18l08b14nwfEw7wV5PlP2pLl+Vci+oY8yZfxOTlr6w==", + "requires": { + "fs-extra": "0.26.5" + } + }, + "fast-glob": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", + "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==", + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.0", + "merge2": "^1.3.0", + "micromatch": "^4.0.2", + "picomatch": "^2.2.1" + } + }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "requires": { + "flat-cache": "^3.0.4" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", + "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==" + }, + "fs-extra": { + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.5.tgz", + "integrity": "sha1-U6x0Znygg/0twXEsgTA5yjLWmn8=", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "klaw": "^1.0.0", + "path-is-absolute": "^1.0.0", + "rimraf": "^2.2.8" + }, + "dependencies": { + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "requires": { + "is-glob": "^4.0.1" + } + }, + "globby": { + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.2.tgz", + "integrity": "sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og==", + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + }, + "dependencies": { + "ignore": { + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==" + } + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "requires": { + "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" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==" + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "requires": { + "glob": "^7.1.3" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" + }, + "slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + } + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + }, + "table": { + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", + "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==", + "requires": { + "ajv": "^7.0.2", + "lodash": "^4.17.20", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0" + }, + "dependencies": { + "ajv": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.2.1.tgz", + "integrity": "sha512-+nu0HDv7kNSOua9apAVc979qd932rrZeb3WOvoiD31A/p1mIE5/9bN2027pE2rOPYEdS3UHzsvof4hY+lM9/WQ==", + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + } + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" + }, + "typescript": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz", + "integrity": "sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw==" + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } + }, "eslint-formatter-pretty": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/eslint-formatter-pretty/-/eslint-formatter-pretty-1.3.0.tgz", @@ -17842,7 +18815,6 @@ "version": "0.3.4", "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz", "integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==", - "dev": true, "requires": { "debug": "^2.6.9", "resolve": "^1.13.1" @@ -17852,7 +18824,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, "requires": { "ms": "2.0.0" } @@ -17860,8 +18831,7 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, @@ -17869,7 +18839,6 @@ "version": "2.6.0", "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz", "integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==", - "dev": true, "requires": { "debug": "^2.6.9", "pkg-dir": "^2.0.0" @@ -17879,7 +18848,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, "requires": { "ms": "2.0.0" } @@ -17887,14 +18855,12 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "pkg-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, "requires": { "find-up": "^2.1.0" } @@ -17990,7 +18956,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", - "dev": true, "requires": { "eslint-utils": "^2.0.0", "regexpp": "^3.0.0" @@ -18082,11 +19047,149 @@ } } }, + "eslint-plugin-jsx-a11y": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.4.1.tgz", + "integrity": "sha512-0rGPJBbwHoGNPU73/QCLP/vveMlM1b1Z9PponxO87jfr6tuH5ligXbDT6nHSSzBC8ovX2Z+BQu7Bk5D/Xgq9zg==", + "requires": { + "@babel/runtime": "^7.11.2", + "aria-query": "^4.2.2", + "array-includes": "^3.1.1", + "ast-types-flow": "^0.0.7", + "axe-core": "^4.0.2", + "axobject-query": "^2.2.0", + "damerau-levenshtein": "^1.0.6", + "emoji-regex": "^9.0.0", + "has": "^1.0.3", + "jsx-ast-utils": "^3.1.0", + "language-tags": "^1.0.5" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + }, + "es-abstract": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0.tgz", + "integrity": "sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==", + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.2", + "is-string": "^1.0.5", + "object-inspect": "^1.9.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.0" + }, + "dependencies": { + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" + } + } + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "is-callable": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", + "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==" + }, + "is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==" + }, + "is-regex": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz", + "integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==", + "requires": { + "call-bind": "^1.0.2", + "has-symbols": "^1.0.1" + } + }, + "jsx-ast-utils": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.2.0.tgz", + "integrity": "sha512-EIsmt3O3ljsU6sot/J4E1zDRxfBNrhjyf/OKjlydwgEimQuznlM4Wv7U+ueONJMyEn1WRE0K8dhi3dVAXYT24Q==", + "requires": { + "array-includes": "^3.1.2", + "object.assign": "^4.1.2" + }, + "dependencies": { + "array-includes": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz", + "integrity": "sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==", + "requires": { + "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" + } + } + } + }, + "object-inspect": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", + "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==" + }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + } + } + }, "eslint-plugin-node": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", - "dev": true, "requires": { "eslint-plugin-es": "^3.0.0", "eslint-utils": "^2.0.0", @@ -18099,17 +19202,20 @@ "ignore": { "version": "5.1.8", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", - "dev": true + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==" }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" } } }, + "eslint-plugin-prefer-import": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prefer-import/-/eslint-plugin-prefer-import-0.0.1.tgz", + "integrity": "sha1-DfThF9opEJ71YdNV7Bn0HfCtpvY=" + }, "eslint-plugin-promise": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz", @@ -18146,6 +19252,11 @@ } } }, + "eslint-plugin-react-hooks": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.2.0.tgz", + "integrity": "sha512-623WEiZJqxR7VdxFCKLI6d6LLpwJkGPYKODnkH3D7WpOG5KM8yWueBd8TLsNAetEJNF5iJmolaAKO3F8yzyVBQ==" + }, "eslint-plugin-standard": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.1.tgz", @@ -18162,7 +19273,6 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz", "integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==", - "dev": true, "requires": { "esrecurse": "^4.1.0", "estraverse": "^4.1.1" @@ -18172,7 +19282,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, "requires": { "eslint-visitor-keys": "^1.1.0" } @@ -18180,14 +19289,12 @@ "eslint-visitor-keys": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" }, "espree": { "version": "7.3.0", "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.0.tgz", "integrity": "sha512-dksIWsvKCixn1yrEXO8UosNSxaDoSYpq9reEjZSbHLpT5hpaCAKTLBwq0RHtLrIr+c0ByiYzWT8KTMRzoRCNlw==", - "dev": true, "requires": { "acorn": "^7.4.0", "acorn-jsx": "^5.2.0", @@ -18226,7 +19333,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, "requires": { "estraverse": "^5.2.0" }, @@ -18234,8 +19340,7 @@ "estraverse": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" } } }, @@ -19630,7 +20735,6 @@ "version": "1.9.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.9.0.tgz", "integrity": "sha512-i7FVWL8HhVY+CTkwFxkN2mk3h+787ixS5S63eb78diVRc1MCssarHq3W5cj0av7YDSwmaV928RNag+U1etRQ7w==", - "dev": true, "requires": { "reusify": "^1.0.4" } @@ -20164,8 +21268,7 @@ "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" }, "functions-have-names": { "version": "1.2.1", @@ -21158,6 +22261,11 @@ "ansi-regex": "^0.2.0" } }, + "has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==" + }, "has-binary2": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", @@ -22873,8 +23981,7 @@ "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" }, "ignore-by-default": { "version": "1.0.1", @@ -23308,6 +24415,11 @@ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" }, + "is-bigint": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.1.tgz", + "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==" + }, "is-binary-path": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", @@ -23636,8 +24748,7 @@ "is-number-object": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", - "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", - "dev": true + "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==" }, "is-obj": { "version": "2.0.0", @@ -23791,8 +24902,7 @@ "is-string": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", - "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", - "dev": true + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==" }, "is-subset": { "version": "0.1.1", @@ -23882,27 +24992,6 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, - "iso-3166-1-alpha-2": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/iso-3166-1-alpha-2/-/iso-3166-1-alpha-2-1.0.0.tgz", - "integrity": "sha1-vJ4LuU5YTfVGipMpl6KFUuJvl6w=", - "requires": { - "mout": "^0.11.0" - } - }, - "iso-639-1": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/iso-639-1/-/iso-639-1-2.1.4.tgz", - "integrity": "sha512-pwJRHnpz1sCR5saQ+Hm1E2YESw2eLGKP5TzsYKXuQ7SIfvKWMRb9CHhptqunYpCIcRCpq3LgLuhYG5hiLPRbFQ==" - }, - "iso-639-1-zh": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/iso-639-1-zh/-/iso-639-1-zh-2.0.4.tgz", - "integrity": "sha1-YbV30U7osMLI5zaXo8iU/gLb1UE=", - "requires": { - "iso-639-1": "^2.0.0" - } - }, "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", @@ -27429,8 +28518,7 @@ "json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" }, "json-stringify-safe": { "version": "5.0.1", @@ -27562,6 +28650,19 @@ "stream-splicer": "^2.0.0" } }, + "language-subtag-registry": { + "version": "0.3.21", + "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.21.tgz", + "integrity": "sha512-L0IqwlIXjilBVVYKFT37X9Ih11Um5NEl9cbJIuU/SwP/zEEAbBPOnEeeuxVMf45ydWQRDQN3Nqc96OgbH1K+Pg==" + }, + "language-tags": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.5.tgz", + "integrity": "sha1-0yHbxNowuovzAk4ED6XBRmH5GTo=", + "requires": { + "language-subtag-registry": "~0.3.2" + } + }, "last-call-webpack-plugin": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/last-call-webpack-plugin/-/last-call-webpack-plugin-3.0.0.tgz", @@ -28407,15 +29508,6 @@ "resolved": "https://registry.npmjs.org/local-access/-/local-access-1.1.0.tgz", "integrity": "sha512-XfegD5pyTAfb+GY6chk283Ox5z8WexG56OvM06RWLpAc/UHozO8X6xAxEkIitZOtsSMM1Yr3DkHgW5W+onLhCw==" }, - "locale-code": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/locale-code/-/locale-code-2.0.2.tgz", - "integrity": "sha512-wNcUMwk6Nlc10pnZZXWtKArAOZHhH8p2vohPEIENg7ImwMrib/CwKSvyV4g9Wm7KjylyHzXnEMz4i/W3w57wlw==", - "requires": { - "iso-3166-1-alpha-2": "~1.0.0", - "iso-639-1-zh": "^2.0.4" - } - }, "localtunnel": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/localtunnel/-/localtunnel-2.0.0.tgz", @@ -30737,11 +31829,6 @@ } } }, - "mout": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/mout/-/mout-0.11.1.tgz", - "integrity": "sha1-ujYR318OWx/7/QEWa48C0fX6K5k=" - }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -31026,8 +32113,7 @@ "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" }, "ncp": { "version": "2.0.0", @@ -31938,7 +33024,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.2.tgz", "integrity": "sha512-BQdB9qKmb/HyNdMNWVr7O3+z5MUIx3aiegEIJqjMBbBf0YT9RRxTJSim4mzFqtyr7PDAHigq0N9dO0m0tRakQA==", - "dev": true, "requires": { "define-properties": "^1.1.3", "es-abstract": "^1.17.5", @@ -32742,7 +33827,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, "requires": { "callsites": "^3.0.0" }, @@ -32750,8 +33834,7 @@ "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" } } }, @@ -34795,8 +35878,7 @@ "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" }, "promise": { "version": "7.3.1", @@ -35979,8 +37061,7 @@ "regexpp": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", - "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", - "dev": true + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==" }, "regexpu-core": { "version": "4.7.1", @@ -36623,6 +37704,11 @@ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" + }, "require-main-filename": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", @@ -36773,8 +37859,7 @@ "reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" }, "rfdc": { "version": "1.1.4", @@ -40865,7 +41950,6 @@ "version": "3.9.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz", "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==", - "dev": true, "requires": { "@types/json5": "^0.0.29", "json5": "^1.0.1", @@ -40877,7 +41961,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, "requires": { "minimist": "^1.2.0" } @@ -41092,7 +42175,6 @@ "version": "3.17.1", "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", - "dev": true, "requires": { "tslib": "^1.8.1" } @@ -41347,6 +42429,17 @@ } } }, + "unbox-primitive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.0.tgz", + "integrity": "sha512-P/51NX+JXyxK/aigg1/ZgyccdAxm5K1+n8+tvqSntjOivPt19gvm1VC49RWYetsiub8WViUchdxl/KWHHB0kzA==", + "requires": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.0", + "has-symbols": "^1.0.0", + "which-boxed-primitive": "^1.0.1" + } + }, "unbzip2-stream": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", @@ -42103,7 +43196,6 @@ "hexo-server": "^1.0.0", "hexo-util": "^1.9.1", "js-yaml": "^3.13.1", - "locale-code": "^2.0.2", "marked": "^0.7.0", "mdast-util-inject": "1.1.0", "mkdirp": "0.5.1", @@ -43277,6 +44369,28 @@ "isexe": "^2.0.0" } }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "dependencies": { + "is-boolean-object": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", + "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", + "requires": { + "call-bind": "^1.0.0" + } + } + } + }, "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", diff --git a/package.json b/package.json index 0d27d575a..81bd4a1e3 100644 --- a/package.json +++ b/package.json @@ -79,6 +79,7 @@ "@uppy/xhr-upload": "file:packages/@uppy/xhr-upload", "@uppy/zoom": "file:packages/@uppy/zoom", "deep-freeze": "0.0.1", + "eslint-config-transloadit": "^1.1.4", "remark-lint-uppy": "file:private/remark-lint-uppy", "uppy": "file:packages/uppy", "uppy.io": "file:website" @@ -149,6 +150,7 @@ "eslint-plugin-jest": "23.20.0", "eslint-plugin-jsdoc": "30.2.2", "eslint-plugin-node": "11.1.0", + "eslint-plugin-prefer-import": "0.0.1", "eslint-plugin-promise": "4.2.1", "eslint-plugin-react": "7.20.6", "eslint-plugin-standard": "4.0.1", diff --git a/packages/@uppy/aws-s3-multipart/src/MultipartUploader.js b/packages/@uppy/aws-s3-multipart/src/MultipartUploader.js index aecef2717..cc63713aa 100644 --- a/packages/@uppy/aws-s3-multipart/src/MultipartUploader.js +++ b/packages/@uppy/aws-s3-multipart/src/MultipartUploader.js @@ -15,7 +15,7 @@ const defaultOptions = { onSuccess () {}, onError (err) { throw err - } + }, } function ensureInt (value) { @@ -32,7 +32,7 @@ class MultipartUploader { constructor (file, options) { this.options = { ...defaultOptions, - ...options + ...options, } // Use default `getChunkSize` if it was null or something if (!this.options.getChunkSize) { @@ -96,20 +96,19 @@ class MultipartUploader { this.chunkState = chunks.map(() => ({ uploaded: 0, busy: false, - done: false + done: false, })) } _createUpload () { this.createdPromise = Promise.resolve().then(() => - this.options.createMultipartUpload() - ) + this.options.createMultipartUpload()) return this.createdPromise.then((result) => { if (this._aborted()) throw createAbortError() - const valid = typeof result === 'object' && result && - typeof result.uploadId === 'string' && - typeof result.key === 'string' + const valid = typeof result === 'object' && result + && typeof result.uploadId === 'string' + && typeof result.key === 'string' if (!valid) { throw new TypeError('AwsS3/Multipart: Got incorrect result from `createMultipartUpload()`, expected an object `{ uploadId, key }`.') } @@ -128,9 +127,8 @@ class MultipartUploader { return Promise.resolve().then(() => this.options.listParts({ uploadId: this.uploadId, - key: this.key - }) - ).then((parts) => { + key: this.key, + })).then((parts) => { if (this._aborted()) throw createAbortError() parts.forEach((part) => { @@ -139,14 +137,14 @@ class MultipartUploader { this.chunkState[i] = { uploaded: ensureInt(part.Size), etag: part.ETag, - done: true + done: true, } // Only add if we did not yet know about this part. if (!this.parts.some((p) => p.PartNumber === part.PartNumber)) { this.parts.push({ PartNumber: part.PartNumber, - ETag: part.ETag + ETag: part.ETag, }) } }) @@ -211,9 +209,8 @@ class MultipartUploader { if (shouldRetry(err) && retryAttempt < retryDelays.length) { return delay(retryDelays[retryAttempt], { signal }) .then(() => doAttempt(retryAttempt + 1)) - } else { - throw err } + throw err }) return doAttempt(0).then((result) => { @@ -233,7 +230,7 @@ class MultipartUploader { attempt: () => this._uploadPart(index), after: () => { this.partsInProgress -= 1 - } + }, }) } @@ -246,11 +243,10 @@ class MultipartUploader { key: this.key, uploadId: this.uploadId, body, - number: index + 1 - }) - ).then((result) => { - const valid = typeof result === 'object' && result && - typeof result.url === 'string' + number: index + 1, + })).then((result) => { + const valid = typeof result === 'object' && result + && typeof result.url === 'string' if (!valid) { throw new TypeError('AwsS3/Multipart: Got incorrect result from `prepareUploadPart()`, expected an object `{ url }`.') } @@ -279,7 +275,7 @@ class MultipartUploader { const part = { PartNumber: index + 1, - ETag: etag + ETag: etag, } this.parts.push(part) @@ -371,9 +367,8 @@ class MultipartUploader { this.options.completeMultipartUpload({ key: this.key, uploadId: this.uploadId, - parts: this.parts - }) - ).then((result) => { + parts: this.parts, + })).then((result) => { this.options.onSuccess(result) }, (err) => { this._onError(err) @@ -386,7 +381,7 @@ class MultipartUploader { this.createdPromise.then(() => { this.options.abortMultipartUpload({ key: this.key, - uploadId: this.uploadId + uploadId: this.uploadId, }) }, () => { // if the creation failed we do not need to abort diff --git a/packages/@uppy/aws-s3-multipart/src/index.js b/packages/@uppy/aws-s3-multipart/src/index.js index fe5d9fca4..ecf6ffa94 100644 --- a/packages/@uppy/aws-s3-multipart/src/index.js +++ b/packages/@uppy/aws-s3-multipart/src/index.js @@ -33,7 +33,7 @@ module.exports = class AwsS3Multipart extends Plugin { listParts: this.listParts.bind(this), prepareUploadPart: this.prepareUploadPart.bind(this), abortMultipartUpload: this.abortMultipartUpload.bind(this), - completeMultipartUpload: this.completeMultipartUpload.bind(this) + completeMultipartUpload: this.completeMultipartUpload.bind(this), } this.opts = { ...defaultOptions, ...opts } @@ -89,7 +89,7 @@ module.exports = class AwsS3Multipart extends Plugin { return this.client.post('s3/multipart', { filename: file.name, type: file.type, - metadata + metadata, }).then(assertServerError) } @@ -135,16 +135,16 @@ module.exports = class AwsS3Multipart extends Plugin { s3Multipart: { ...cFile.s3Multipart, key: data.key, - uploadId: data.uploadId - } + uploadId: data.uploadId, + }, }) } const onProgress = (bytesUploaded, bytesTotal) => { this.uppy.emit('upload-progress', file, { uploader: this, - bytesUploaded: bytesUploaded, - bytesTotal: bytesTotal + bytesUploaded, + bytesTotal, }) } @@ -160,9 +160,9 @@ module.exports = class AwsS3Multipart extends Plugin { const onSuccess = (result) => { const uploadResp = { body: { - ...result + ...result, }, - uploadURL: result.location + uploadURL: result.location, } queuedRequest.done() @@ -171,7 +171,7 @@ module.exports = class AwsS3Multipart extends Plugin { this.uppy.emit('upload-success', file, uploadResp) if (result.location) { - this.uppy.log('Download ' + upload.file.name + ' from ' + result.location) + this.uppy.log(`Download ${upload.file.name} from ${result.location}`) } resolve(upload) @@ -203,7 +203,7 @@ module.exports = class AwsS3Multipart extends Plugin { limit: this.opts.limit || 5, retryDelays: this.opts.retryDelays || [], - ...file.s3Multipart + ...file.s3Multipart, }) this.uploaders[file.id] = upload @@ -286,7 +286,7 @@ module.exports = class AwsS3Multipart extends Plugin { ...file.remote.body, protocol: 's3-multipart', size: file.data.size, - metadata: file.meta + metadata: file.meta, } ).then((res) => { this.uppy.setFileState(file.id, { serverToken: res.token }) @@ -384,7 +384,7 @@ module.exports = class AwsS3Multipart extends Plugin { socket.on('success', (data) => { const uploadResp = { - uploadURL: data.url + uploadURL: data.url, } this.uppy.emit('upload-success', file, uploadResp) @@ -474,8 +474,8 @@ module.exports = class AwsS3Multipart extends Plugin { this.uppy.setState({ capabilities: { ...capabilities, - resumableUploads: true - } + resumableUploads: true, + }, }) this.uppy.addUploader(this.upload) } @@ -485,8 +485,8 @@ module.exports = class AwsS3Multipart extends Plugin { this.uppy.setState({ capabilities: { ...capabilities, - resumableUploads: false - } + resumableUploads: false, + }, }) this.uppy.removeUploader(this.upload) } diff --git a/packages/@uppy/aws-s3/src/MiniXHRUpload.js b/packages/@uppy/aws-s3/src/MiniXHRUpload.js index 7cb53f836..4bc8afc56 100644 --- a/packages/@uppy/aws-s3/src/MiniXHRUpload.js +++ b/packages/@uppy/aws-s3/src/MiniXHRUpload.js @@ -40,7 +40,7 @@ module.exports = class MiniXHRUpload { validateStatus (status, responseText, response) { return status >= 200 && status < 300 }, - ...opts + ...opts, } this.requests = opts.__queue @@ -56,7 +56,7 @@ module.exports = class MiniXHRUpload { ...this.opts, ...(overrides || {}), ...(file.xhrUpload || {}), - headers: {} + headers: {}, } Object.assign(opts.headers, this.opts.headers) if (overrides) { @@ -176,7 +176,7 @@ module.exports = class MiniXHRUpload { this.uppy.emit('upload-progress', file, { uploader: this, bytesUploaded: ev.loaded, - bytesTotal: ev.total + bytesTotal: ev.total, }) } }) @@ -197,7 +197,7 @@ module.exports = class MiniXHRUpload { const uploadResp = { status: ev.target.status, body, - uploadURL + uploadURL, } this.uppy.emit('upload-success', file, uploadResp) @@ -207,18 +207,17 @@ module.exports = class MiniXHRUpload { } return resolve(file) - } else { - const body = opts.getResponseData(xhr.responseText, xhr) - const error = buildResponseError(xhr, opts.getResponseError(xhr.responseText, xhr)) - - const response = { - status: ev.target.status, - body - } - - this.uppy.emit('upload-error', file, error, response) - return reject(error) } + const body = opts.getResponseData(xhr.responseText, xhr) + const error = buildResponseError(xhr, opts.getResponseError(xhr.responseText, xhr)) + + const response = { + status: ev.target.status, + body, + } + + this.uppy.emit('upload-error', file, error, response) + return reject(error) }) xhr.addEventListener('error', (ev) => { @@ -293,7 +292,7 @@ module.exports = class MiniXHRUpload { metadata: fields, httpMethod: opts.method, useFormData: opts.formData, - headers: opts.headers + headers: opts.headers, }).then((res) => { const token = res.token const host = getSocketHost(file.remote.companionUrl) @@ -331,7 +330,7 @@ module.exports = class MiniXHRUpload { const uploadResp = { status: data.response.status, body, - uploadURL + uploadURL, } this.uppy.emit('upload-success', file, uploadResp) diff --git a/packages/@uppy/aws-s3/src/index.js b/packages/@uppy/aws-s3/src/index.js index 5685d1eca..726248b7c 100644 --- a/packages/@uppy/aws-s3/src/index.js +++ b/packages/@uppy/aws-s3/src/index.js @@ -81,15 +81,15 @@ module.exports = class AwsS3 extends Plugin { this.defaultLocale = { strings: { - timedOut: 'Upload stalled for %{seconds} seconds, aborting.' - } + timedOut: 'Upload stalled for %{seconds} seconds, aborting.', + }, } const defaultOptions = { timeout: 30 * 1000, limit: 0, metaFields: [], // have to opt in - getUploadParameters: this.getUploadParameters.bind(this) + getUploadParameters: this.getUploadParameters.bind(this), } this.opts = { ...defaultOptions, ...opts } @@ -132,9 +132,9 @@ module.exports = class AwsS3 extends Plugin { } validateParameters (file, params) { - const valid = typeof params === 'object' && params && - typeof params.url === 'string' && - (typeof params.fields === 'object' || params.fields == null) + const valid = typeof params === 'object' && params + && typeof params.url === 'string' + && (typeof params.fields === 'object' || params.fields == null) if (!valid) { const err = new TypeError(`AwsS3: got incorrect result from 'getUploadParameters()' for file '${file.name}', expected an object '{ url, method, fields, headers }' but got '${JSON.stringify(params)}' instead.\nSee https://uppy.io/docs/aws-s3/#getUploadParameters-file for more on the expected format.`) @@ -191,13 +191,13 @@ module.exports = class AwsS3 extends Plugin { method = 'post', url, fields, - headers + headers, } = params const xhrOpts = { method, formData: method.toLowerCase() === 'post', endpoint: url, - metaFields: fields ? Object.keys(fields) : [] + metaFields: fields ? Object.keys(fields) : [], } if (headers) { @@ -206,7 +206,7 @@ module.exports = class AwsS3 extends Plugin { this.uppy.setFileState(file.id, { meta: { ...file.meta, ...fields }, - xhrUpload: xhrOpts + xhrUpload: xhrOpts, }) return this._uploader.uploadFile(file.id, index, numberOfFiles) @@ -262,7 +262,7 @@ module.exports = class AwsS3 extends Plugin { location: resolveUrl(xhr.responseURL, getXmlValue(content, 'Location')), bucket: getXmlValue(content, 'Bucket'), key: getXmlValue(content, 'Key'), - etag: getXmlValue(content, 'ETag') + etag: getXmlValue(content, 'ETag'), } } @@ -286,7 +286,7 @@ module.exports = class AwsS3 extends Plugin { __queue: this.requests, responseType: 'text', getResponseData: this.opts.getResponseData || defaultGetResponseData, - getResponseError: defaultGetResponseError + getResponseError: defaultGetResponseError, } // Only for MiniXHRUpload, remove once we can depend on XHRUpload directly again diff --git a/packages/@uppy/aws-s3/src/index.test.js b/packages/@uppy/aws-s3/src/index.test.js index 22f2094a1..15e260b7f 100644 --- a/packages/@uppy/aws-s3/src/index.test.js +++ b/packages/@uppy/aws-s3/src/index.test.js @@ -1,6 +1,6 @@ require('whatwg-fetch') const Core = require('@uppy/core') -const AwsS3 = require('./') +const AwsS3 = require('.') describe('AwsS3', () => { it('Registers AwsS3 upload plugin', () => { @@ -27,8 +27,8 @@ describe('AwsS3', () => { const file = { meta: { name: 'foo.jpg', - type: 'image/jpg' - } + type: 'image/jpg', + }, } expect(() => awsS3.opts.getUploadParameters(file)).not.toThrow() diff --git a/packages/@uppy/aws-s3/src/isXml.test.js b/packages/@uppy/aws-s3/src/isXml.test.js index 49234c525..262049bae 100644 --- a/packages/@uppy/aws-s3/src/isXml.test.js +++ b/packages/@uppy/aws-s3/src/isXml.test.js @@ -5,59 +5,59 @@ describe('AwsS3', () => { it('returns true for XML documents', () => { const content = 'image.jpg' expect(isXml(content, { - getResponseHeader: () => 'application/xml' + getResponseHeader: () => 'application/xml', })).toEqual(true) expect(isXml(content, { - getResponseHeader: () => 'text/xml' + getResponseHeader: () => 'text/xml', })).toEqual(true) expect(isXml(content, { - getResponseHeader: () => 'text/xml; charset=utf-8' + getResponseHeader: () => 'text/xml; charset=utf-8', })).toEqual(true) expect(isXml(content, { - getResponseHeader: () => 'application/xml; charset=iso-8859-1' + getResponseHeader: () => 'application/xml; charset=iso-8859-1', })).toEqual(true) }) it('returns true for GCS XML documents', () => { const content = 'image.jpg' expect(isXml(content, { - getResponseHeader: () => 'text/html' + getResponseHeader: () => 'text/html', })).toEqual(true) expect(isXml(content, { - getResponseHeader: () => 'text/html; charset=utf8' + getResponseHeader: () => 'text/html; charset=utf8', })).toEqual(true) }) it('returns true for remote response objects', () => { const content = 'image.jpg' expect(isXml(content, { - headers: { 'content-type': 'application/xml' } + headers: { 'content-type': 'application/xml' }, })).toEqual(true) expect(isXml(content, { - headers: { 'content-type': 'application/xml' } + headers: { 'content-type': 'application/xml' }, })).toEqual(true) expect(isXml(content, { - headers: { 'content-type': 'text/html' } + headers: { 'content-type': 'text/html' }, })).toEqual(true) }) it('returns false when content-type is missing', () => { const content = 'image.jpg' expect(isXml(content, { - getResponseHeader: () => null + getResponseHeader: () => null, })).toEqual(false) expect(isXml(content, { - headers: { 'content-type': null } + headers: { 'content-type': null }, })).toEqual(false) expect(isXml(content, { - headers: {} + headers: {}, })).toEqual(false) }) it('returns false for HTML documents', () => { const content = '' expect(isXml(content, { - getResponseHeader: () => 'text/html' + getResponseHeader: () => 'text/html', })).toEqual(false) }) }) diff --git a/packages/@uppy/box/src/index.js b/packages/@uppy/box/src/index.js index 2ebfa7508..3d4f24fb1 100644 --- a/packages/@uppy/box/src/index.js +++ b/packages/@uppy/box/src/index.js @@ -13,9 +13,9 @@ module.exports = class Box extends Plugin { this.title = this.opts.title || 'Box' this.icon = () => ( - Uppy + Uppy ) // Support both the old word-order-insensitive string `poweredBy` and the new word-order-sensitive string `poweredBy2` const linkText = this.props.i18nArray('poweredBy2', { backwardsCompat: this.props.i18n('poweredBy'), - uppy: uppyBranding + uppy: uppyBranding, }) return ( {linkText} @@ -53,15 +53,15 @@ class AddFiles extends Component { renderHiddenInput = (isFolder, refCallback) => { return ( @@ -71,25 +71,25 @@ class AddFiles extends Component { renderMyDeviceAcquirer = () => { return ( ) @@ -100,8 +100,8 @@ class AddFiles extends Component { return ( ) @@ -203,7 +203,7 @@ class AddFiles extends Component { const lastTwoAcquirers = acquirersWithoutLastTwo.splice(acquirers.length - 2, acquirers.length) return ( -
+
{this.renderMyDeviceAcquirer()} {acquirersWithoutLastTwo.map((acquirer) => this.renderAcquirer(acquirer))} @@ -215,13 +215,13 @@ class AddFiles extends Component { render () { return ( -
+
{this.renderHiddenInput(false, (ref) => { this.fileInput = ref })} {this.renderHiddenInput(true, (ref) => { this.folderInput = ref })} {this.renderDropPasteBrowseTagline()} {this.props.acquirers.length > 0 && this.renderAcquirers(this.props.acquirers)} -
- {this.props.note &&
{this.props.note}
} +
+ {this.props.note &&
{this.props.note}
} {this.props.proudlyDisplayPoweredByUppy && this.renderPoweredByUppy(this.props)}
diff --git a/packages/@uppy/dashboard/src/components/AddFilesPanel.js b/packages/@uppy/dashboard/src/components/AddFilesPanel.js index 652f5260f..59323f50a 100644 --- a/packages/@uppy/dashboard/src/components/AddFilesPanel.js +++ b/packages/@uppy/dashboard/src/components/AddFilesPanel.js @@ -5,19 +5,20 @@ const AddFiles = require('./AddFiles') const AddFilesPanel = (props) => { return (
-
-
+
+
{props.i18n('addingMoreFiles')}
diff --git a/packages/@uppy/dashboard/src/components/Dashboard.js b/packages/@uppy/dashboard/src/components/Dashboard.js index 252cf483e..4bd30aa62 100644 --- a/packages/@uppy/dashboard/src/components/Dashboard.js +++ b/packages/@uppy/dashboard/src/components/Dashboard.js @@ -23,7 +23,7 @@ module.exports = function Dashboard (props) { const isSizeMD = props.containerWidth > WIDTH_MD const wrapperClassName = classNames({ - 'uppy-Root': props.isTargetDOMEl + 'uppy-Root': props.isTargetDOMEl, }) const dashboardClassName = classNames({ @@ -38,7 +38,7 @@ module.exports = function Dashboard (props) { 'uppy-size--xl': props.containerWidth > WIDTH_XL, 'uppy-size--height-md': props.containerHeight > HEIGHT_MD, 'uppy-Dashboard--isAddFilesPanelVisible': props.showAddFilesPanel, - 'uppy-Dashboard--isInnerWrapVisible': props.areInsidesReadyToBeVisible + 'uppy-Dashboard--isInnerWrapVisible': props.areInsidesReadyToBeVisible, }) // Important: keep these in sync with the percent width values in `src/components/FileItem/index.scss`. @@ -55,48 +55,48 @@ module.exports = function Dashboard (props) { const dashboard = (
{!props.inline ? ( ) : null} -
-
+
+
{props.i18n('dropHint')}
@@ -127,7 +127,7 @@ module.exports = function Dashboard (props) { {props.showFileEditor ? : null} -
+
{props.progressindicators.map((target) => { return props.getPlugin(target.id).render(props.state) })} @@ -139,7 +139,7 @@ module.exports = function Dashboard (props) { return ( // Wrap it for RTL language support -
+
{dashboard}
) diff --git a/packages/@uppy/dashboard/src/components/EditorPanel.js b/packages/@uppy/dashboard/src/components/EditorPanel.js index c4643f33d..35dd7c8e6 100644 --- a/packages/@uppy/dashboard/src/components/EditorPanel.js +++ b/packages/@uppy/dashboard/src/components/EditorPanel.js @@ -6,26 +6,26 @@ function EditorPanel (props) { return (
-
-
+
+
{props.i18nArray('editing', { - file: {file.meta ? file.meta.name : file.name} + file: {file.meta ? file.meta.name : file.name}, })}
-
+
{props.editors.map((target) => { return props.getPlugin(target.id).render(props.state) })} diff --git a/packages/@uppy/dashboard/src/components/FileCard/index.js b/packages/@uppy/dashboard/src/components/FileCard/index.js index 9231d97d2..394b939ef 100644 --- a/packages/@uppy/dashboard/src/components/FileCard/index.js +++ b/packages/@uppy/dashboard/src/components/FileCard/index.js @@ -17,7 +17,7 @@ class FileCard extends Component { }) this.state = { - formState: storedMetaData + formState: storedMetaData, } } @@ -34,8 +34,8 @@ class FileCard extends Component { this.setState({ formState: { ...this.state.formState, - [name]: newVal - } + [name]: newVal, + }, }) } @@ -51,31 +51,31 @@ class FileCard extends Component { renderMetaFields = () => { const metaFields = this.props.metaFields || [] const fieldCSSClasses = { - text: 'uppy-u-reset uppy-c-textInput uppy-Dashboard-FileCard-input' + text: 'uppy-u-reset uppy-c-textInput uppy-Dashboard-FileCard-input', } return metaFields.map((field) => { const id = `uppy-Dashboard-FileCard-input-${field.id}` return ( -
- +
+ {field.render !== undefined ? field.render({ value: this.state.formState[field.id], onChange: (newVal) => this.updateMeta(newVal, field.id), - fieldCSSClasses: fieldCSSClasses + fieldCSSClasses, }, h) : ( this.updateMeta(ev.target.value, field.id)} + onKeyUp={this.saveOnEnter} + onKeyDown={this.saveOnEnter} + onKeyPress={this.saveOnEnter} + onInput={ev => this.updateMeta(ev.target.value, field.id)} data-uppy-super-focusable /> )} @@ -90,56 +90,60 @@ class FileCard extends Component { return (
-
-
+
+
{this.props.i18nArray('editing', { - file: {file.meta ? file.meta.name : file.name} + file: {file.meta ? file.meta.name : file.name}, })}
-
-
+
+
- {showEditButton && + {showEditButton + && ( } + + )}
-
+
{this.renderMetaFields()}
-
+
diff --git a/packages/@uppy/dashboard/src/components/FileItem/Buttons/index.js b/packages/@uppy/dashboard/src/components/FileItem/Buttons/index.js index 0dfb341ca..32b76b75f 100644 --- a/packages/@uppy/dashboard/src/components/FileItem/Buttons/index.js +++ b/packages/@uppy/dashboard/src/components/FileItem/Buttons/index.js @@ -7,25 +7,25 @@ function EditButton ({ metaFields, canEditFile, i18n, - onClick + onClick, }) { if ( - (!uploadInProgressOrComplete && metaFields && metaFields.length > 0) || - (!uploadInProgressOrComplete && canEditFile(file)) + (!uploadInProgressOrComplete && metaFields && metaFields.length > 0) + || (!uploadInProgressOrComplete && canEditFile(file)) ) { return ( @@ -37,13 +37,13 @@ function EditButton ({ function RemoveButton ({ i18n, onClick }) { return ( @@ -60,7 +60,7 @@ function ProgressCircleContainer ({ children }) { width="70" height="70" viewBox="0 0 36 36" - class="uppy-c-icon uppy-Dashboard-Item-progressIcon--circle" + className="uppy-c-icon uppy-Dashboard-Item-progressIcon--circle" > {children} @@ -73,11 +73,17 @@ function ProgressCircle ({ progress }) { return ( - + ) @@ -92,11 +98,11 @@ module.exports = function FileProgress (props) { // Green checkmark when complete if (props.isUploaded) { return ( -
-
+
+
- +
@@ -107,7 +113,7 @@ module.exports = function FileProgress (props) { if (props.error && !props.hideRetryButton) { return ( -
-
+
+
diff --git a/packages/@uppy/dashboard/src/components/FileItem/index.js b/packages/@uppy/dashboard/src/components/FileItem/index.js index 3170566d4..617ca07fc 100644 --- a/packages/@uppy/dashboard/src/components/FileItem/index.js +++ b/packages/@uppy/dashboard/src/components/FileItem/index.js @@ -49,16 +49,16 @@ module.exports = class FileItem extends Component { 'is-complete': isUploaded, 'is-error': !!error, 'is-resumable': this.props.resumableUploads, - 'is-noIndividualCancellation': !this.props.individualCancellation + 'is-noIndividualCancellation': !this.props.individualCancellation, }) return (
-
+
-
+
{ toggleFileCard: props.toggleFileCard, removeFile: props.removeFile, handleRequestThumbnail: props.handleRequestThumbnail, - handleCancelThumbnail: props.handleCancelThumbnail + handleCancelThumbnail: props.handleCancelThumbnail, } const rows = chunks(Object.keys(props.files), props.itemsPerRow) diff --git a/packages/@uppy/dashboard/src/components/FilePreview.js b/packages/@uppy/dashboard/src/components/FilePreview.js index 2cc030fcc..62ca3dcc7 100644 --- a/packages/@uppy/dashboard/src/components/FilePreview.js +++ b/packages/@uppy/dashboard/src/components/FilePreview.js @@ -7,7 +7,7 @@ module.exports = function FilePreview (props) { if (file.preview) { return ( {file.name} @@ -17,10 +17,10 @@ module.exports = function FilePreview (props) { const { color, icon } = getFileTypeIcon(file.type) return ( -
- {icon} -
+ {icon} +
) diff --git a/packages/@uppy/dashboard/src/components/PickerPanelContent.js b/packages/@uppy/dashboard/src/components/PickerPanelContent.js index b76685183..d169e9d94 100644 --- a/packages/@uppy/dashboard/src/components/PickerPanelContent.js +++ b/packages/@uppy/dashboard/src/components/PickerPanelContent.js @@ -5,7 +5,7 @@ const ignoreEvent = require('../utils/ignoreEvent.js') function PickerPanelContent (props) { return (
-
-
+
+
{props.i18n('importFrom', { name: props.activePickerPanel.name })}
-
+
{props.getPlugin(props.activePickerPanel.id).render(props.state)}
diff --git a/packages/@uppy/dashboard/src/components/PickerPanelTopBar.js b/packages/@uppy/dashboard/src/components/PickerPanelTopBar.js index 29d994fd4..7148eedd8 100644 --- a/packages/@uppy/dashboard/src/components/PickerPanelTopBar.js +++ b/packages/@uppy/dashboard/src/components/PickerPanelTopBar.js @@ -7,7 +7,7 @@ const uploadStates = { STATE_UPLOADING: 'uploading', STATE_POSTPROCESSING: 'postprocessing', STATE_COMPLETE: 'complete', - STATE_PAUSED: 'paused' + STATE_PAUSED: 'paused', } function getUploadingState (isAllErrored, isAllComplete, isAllPaused, files = {}) { @@ -76,12 +76,12 @@ function PanelTopBar (props) { } return ( -
+
{!props.isAllComplete && !props.hideCancelButton ? ( @@ -89,22 +89,22 @@ function PanelTopBar (props) {
)} -
+
{allowNewUpload ? ( ) : (
diff --git a/packages/@uppy/dashboard/src/components/Slide.js b/packages/@uppy/dashboard/src/components/Slide.js index 9e0dca14a..ca31d3fb8 100644 --- a/packages/@uppy/dashboard/src/components/Slide.js +++ b/packages/@uppy/dashboard/src/components/Slide.js @@ -19,7 +19,7 @@ class Slide extends Component { this.state = { cachedChildren: null, - className: '' + className: '', } } @@ -30,7 +30,7 @@ class Slide extends Component { if (cachedChildren === child) return const patch = { - cachedChildren: child + cachedChildren: child, } // Enter transition @@ -46,7 +46,7 @@ class Slide extends Component { this.base.getBoundingClientRect() this.setState({ - className: `${transitionName}-enter ${transitionName}-enter-active` + className: `${transitionName}-enter ${transitionName}-enter-active`, }) this.enterTimeout = setTimeout(() => { @@ -65,13 +65,13 @@ class Slide extends Component { this.enterTimeout = undefined this.animationFrame = requestAnimationFrame(() => { this.setState({ - className: `${transitionName}-leave ${transitionName}-leave-active` + className: `${transitionName}-leave ${transitionName}-leave-active`, }) this.leaveTimeout = setTimeout(() => { this.setState({ cachedChildren: null, - className: '' + className: '', }) }, duration) }) @@ -88,7 +88,7 @@ class Slide extends Component { } return cloneElement(cachedChildren, { - className: classNames(className, cachedChildren.attributes.className) + className: classNames(className, cachedChildren.attributes.className), }) } } diff --git a/packages/@uppy/dashboard/src/components/VirtualList.js b/packages/@uppy/dashboard/src/components/VirtualList.js index cf26cb86d..14fd8baac 100644 --- a/packages/@uppy/dashboard/src/components/VirtualList.js +++ b/packages/@uppy/dashboard/src/components/VirtualList.js @@ -35,7 +35,7 @@ const STYLE_INNER = { // // overflow: 'hidden', width: '100%', - minHeight: '100%' + minHeight: '100%', } const STYLE_CONTENT = { @@ -48,7 +48,7 @@ const STYLE_CONTENT = { // // height: '100%', width: '100%', - overflow: 'visible' + overflow: 'visible', } class VirtualList extends Component { @@ -61,14 +61,14 @@ class VirtualList extends Component { this.state = { offset: 0, - height: 0 + height: 0, } } resize () { if (this.state.height !== this.base.offsetHeight) { this.setState({ - height: this.base.offsetHeight + height: this.base.offsetHeight, }) } } @@ -79,7 +79,7 @@ class VirtualList extends Component { handleScroll = () => { this.setState({ - offset: this.base.scrollTop + offset: this.base.scrollTop, }) if (this.props.sync) { this.forceUpdate() @@ -94,8 +94,8 @@ class VirtualList extends Component { componentDidUpdate () { // Maintain focus when rows are added and removed. - if (this.focusElement && this.focusElement.parentNode && - document.activeElement !== this.focusElement) { + if (this.focusElement && this.focusElement.parentNode + && document.activeElement !== this.focusElement) { this.focusElement.focus() } this.focusElement = null diff --git a/packages/@uppy/dashboard/src/index.js b/packages/@uppy/dashboard/src/index.js index 68f998c97..d2021eff2 100644 --- a/packages/@uppy/dashboard/src/index.js +++ b/packages/@uppy/dashboard/src/index.js @@ -88,15 +88,15 @@ module.exports = class Dashboard extends Plugin { cancelUpload: 'Cancel upload', xFilesSelected: { 0: '%{smart_count} file selected', - 1: '%{smart_count} files selected' + 1: '%{smart_count} files selected', }, uploadingXFiles: { 0: 'Uploading %{smart_count} file', - 1: 'Uploading %{smart_count} files' + 1: 'Uploading %{smart_count} files', }, processingXFiles: { 0: 'Processing %{smart_count} file', - 1: 'Processing %{smart_count} files' + 1: 'Processing %{smart_count} files', }, // The default `poweredBy2` string only combines the `poweredBy` string (%{backwardsCompat}) with the size. // Locales can override `poweredBy2` to specify a different word order. This is for backwards compat with @@ -104,8 +104,8 @@ module.exports = class Dashboard extends Plugin { // substitution. // TODO: In 2.0 `poweredBy2` should be removed in and `poweredBy` updated to use substitution. poweredBy2: '%{backwardsCompat} %{uppy}', - poweredBy: 'Powered by' - } + poweredBy: 'Powered by', + }, } // set default options @@ -147,7 +147,7 @@ module.exports = class Dashboard extends Plugin { browserBackButtonClose: false, theme: 'light', autoOpenFileEditor: false, - disabled: false + disabled: false, } // merge default options with the ones set by user @@ -181,7 +181,7 @@ module.exports = class Dashboard extends Plugin { const newTargets = pluginState.targets.filter(target => target.id !== plugin.id) this.setPluginState({ - targets: newTargets + targets: newTargets, }) } @@ -190,9 +190,9 @@ module.exports = class Dashboard extends Plugin { const callerPluginName = plugin.title || callerPluginId const callerPluginType = plugin.type - if (callerPluginType !== 'acquirer' && - callerPluginType !== 'progressindicator' && - callerPluginType !== 'editor') { + if (callerPluginType !== 'acquirer' + && callerPluginType !== 'progressindicator' + && callerPluginType !== 'editor') { const msg = 'Dashboard: can only be targeted by plugins of types: acquirer, progressindicator, editor' this.uppy.log(msg, 'error') return @@ -201,7 +201,7 @@ module.exports = class Dashboard extends Plugin { const target = { id: callerPluginId, name: callerPluginName, - type: callerPluginType + type: callerPluginType, } const state = this.getPluginState() @@ -209,7 +209,7 @@ module.exports = class Dashboard extends Plugin { newTargets.push(target) this.setPluginState({ - targets: newTargets + targets: newTargets, }) return this.el @@ -221,14 +221,14 @@ module.exports = class Dashboard extends Plugin { showAddFilesPanel: false, activeOverlayType: null, fileCardFor: null, - showFileEditor: false + showFileEditor: false, } const current = this.getPluginState() - if (current.activePickerPanel === update.activePickerPanel && - current.showAddFilesPanel === update.showAddFilesPanel && - current.showFileEditor === update.showFileEditor && - current.activeOverlayType === update.activeOverlayType) { + if (current.activePickerPanel === update.activePickerPanel + && current.showAddFilesPanel === update.showAddFilesPanel + && current.showFileEditor === update.showFileEditor + && current.activeOverlayType === update.activeOverlayType) { // avoid doing a state update if nothing changed return } @@ -244,8 +244,8 @@ module.exports = class Dashboard extends Plugin { })[0] this.setPluginState({ - activePickerPanel: activePickerPanel, - activeOverlayType: 'PickerPanel' + activePickerPanel, + activeOverlayType: 'PickerPanel', }) } @@ -265,7 +265,7 @@ module.exports = class Dashboard extends Plugin { this.setPluginState({ showFileEditor: true, fileCardFor: file.id || null, - activeOverlayType: 'FileEditor' + activeOverlayType: 'FileEditor', }) editors.forEach((editor) => { @@ -287,7 +287,7 @@ module.exports = class Dashboard extends Plugin { if (this.opts.animateOpenClose && this.getPluginState().isClosing) { const handler = () => { this.setPluginState({ - isHidden: false + isHidden: false, }) this.el.removeEventListener('animationend', handler, false) resolve() @@ -295,7 +295,7 @@ module.exports = class Dashboard extends Plugin { this.el.addEventListener('animationend', handler, false) } else { this.setPluginState({ - isHidden: false + isHidden: false, }) resolve() } @@ -314,7 +314,7 @@ module.exports = class Dashboard extends Plugin { closeModal = (opts = {}) => { const { - manualClose = true // Whether the modal is being closed by the user (`true`) or by other means (e.g. browser back button) + manualClose = true, // Whether the modal is being closed by the user (`true`) or by other means (e.g. browser back button) } = opts const { isHidden, isClosing } = this.getPluginState() @@ -331,12 +331,12 @@ module.exports = class Dashboard extends Plugin { if (this.opts.animateOpenClose) { this.setPluginState({ - isClosing: true + isClosing: true, }) const handler = () => { this.setPluginState({ isHidden: true, - isClosing: false + isClosing: false, }) this.superFocus.cancel() @@ -348,7 +348,7 @@ module.exports = class Dashboard extends Plugin { this.el.addEventListener('animationend', handler, false) } else { this.setPluginState({ - isHidden: true + isHidden: true, }) this.superFocus.cancel() @@ -391,8 +391,8 @@ module.exports = class Dashboard extends Plugin { this.uppy.setState({ capabilities: { ...capabilities, - darkMode: isDarkModeOn - } + darkMode: isDarkModeOn, + }, }) } @@ -412,14 +412,14 @@ module.exports = class Dashboard extends Plugin { this.setPluginState({ fileCardFor: show ? fileID : null, - activeOverlayType: show ? 'FileCard' : null + activeOverlayType: show ? 'FileCard' : null, }) } toggleAddFilesPanel = (show) => { this.setPluginState({ showAddFilesPanel: show, - activeOverlayType: show ? 'AddFiles' : null + activeOverlayType: show ? 'AddFiles' : null, }) } @@ -432,8 +432,8 @@ module.exports = class Dashboard extends Plugin { meta: { // path of the file relative to the ancestor directory the user selected. // e.g. 'docs/Old Prague/airbnb.pdf' - relativePath: file.relativePath || null - } + relativePath: file.relativePath || null, + }, })) try { @@ -461,7 +461,7 @@ module.exports = class Dashboard extends Plugin { this.setPluginState({ containerWidth: width, containerHeight: height, - areInsidesReadyToBeVisible: true + areInsidesReadyToBeVisible: true, }) }) this.resizeObserver.observe(this.el.querySelector('.uppy-Dashboard-inner')) @@ -472,14 +472,14 @@ module.exports = class Dashboard extends Plugin { const isModalAndClosed = !this.opts.inline && pluginState.isHidden if ( // if ResizeObserver hasn't yet fired, - !pluginState.areInsidesReadyToBeVisible && + !pluginState.areInsidesReadyToBeVisible // and it's not due to the modal being closed - !isModalAndClosed + && !isModalAndClosed ) { this.uppy.log("[Dashboard] resize event didn't fire on time: defaulted to mobile layout", 'debug') this.setPluginState({ - areInsidesReadyToBeVisible: true + areInsidesReadyToBeVisible: true, }) } }, 1000) @@ -533,7 +533,7 @@ module.exports = class Dashboard extends Plugin { // Push to history so that the page is not lost on browser back button press history.pushState({ ...history.state, - [this.modalName]: true + [this.modalName]: true, }, '') } @@ -776,17 +776,17 @@ module.exports = class Dashboard extends Plugin { if ( // If update is connected to showing the Informer - let the screen reader calmly read it. - isInformerHidden && - ( + isInformerHidden + && ( // If we are in a modal - always superfocus without concern for other elements on the page (user is unlikely to want to interact with the rest of the page) - isModal || + isModal // If we are already inside of Uppy, or - isFocusInUppy || + || isFocusInUppy // If we are not focused on anything BUT we have already, at least once, focused on uppy // 1. We focus when isFocusNowhere, because when the element we were focused on disappears (e.g. an overlay), - focus gets lost. If user is typing something somewhere else on the page, - focus won't be 'nowhere'. // 2. We only focus when focus is nowhere AND this.ifFocusedOnUppyRecently, to avoid focus jumps if we do something else on the page. // [Practical check] Without '&& this.ifFocusedOnUppyRecently', in Safari, in inline mode, when file is uploading, - navigate via tab to the checkbox, try to press space multiple times. Focus will jump to Uppy. - (isFocusNowhere && this.ifFocusedOnUppyRecently) + || (isFocusNowhere && this.ifFocusedOnUppyRecently) ) ) { this.superFocus(this.el, this.getPluginState().activeOverlayType) @@ -822,7 +822,7 @@ module.exports = class Dashboard extends Plugin { return { ...target, icon: plugin.icon || this.opts.defaultPickerIcon, - render: plugin.render + render: plugin.render, } } @@ -880,8 +880,8 @@ module.exports = class Dashboard extends Plugin { }) const inProgressFiles = Object.keys(files).filter((file) => { - return !files[file].progress.uploadComplete && - files[file].progress.uploadStarted + return !files[file].progress.uploadComplete + && files[file].progress.uploadStarted }) const inProgressNotPausedFiles = inProgressFiles.filter((file) => { @@ -894,15 +894,15 @@ module.exports = class Dashboard extends Plugin { const isUploadStarted = uploadStartedFiles.length > 0 - const isAllComplete = state.totalProgress === 100 && - completeFiles.length === Object.keys(files).length && - processingFiles.length === 0 + const isAllComplete = state.totalProgress === 100 + && completeFiles.length === Object.keys(files).length + && processingFiles.length === 0 - const isAllErrored = isUploadStarted && - erroredFiles.length === uploadStartedFiles.length + const isAllErrored = isUploadStarted + && erroredFiles.length === uploadStartedFiles.length - const isAllPaused = inProgressFiles.length !== 0 && - pausedFiles.length === inProgressFiles.length + const isAllPaused = inProgressFiles.length !== 0 + && pausedFiles.length === inProgressFiles.length const acquirers = this._getAcquirers(pluginState.targets) const progressindicators = this._getProgressIndicators(pluginState.targets) @@ -948,8 +948,8 @@ module.exports = class Dashboard extends Plugin { animateOpenClose: this.opts.animateOpenClose, isClosing: pluginState.isClosing, getPlugin: this.uppy.getPlugin, - progressindicators: progressindicators, - editors: editors, + progressindicators, + editors, autoProceed: this.uppy.opts.autoProceed, id: this.id, closeModal: this.requestCloseModal, @@ -1004,7 +1004,7 @@ module.exports = class Dashboard extends Plugin { isDraggingOver: pluginState.isDraggingOver, handleDragOver: this.handleDragOver, handleDragLeave: this.handleDragLeave, - handleDrop: this.handleDrop + handleDrop: this.handleDrop, }) } @@ -1038,7 +1038,7 @@ module.exports = class Dashboard extends Plugin { targets: [], // We'll make them visible once .containerWidth is determined areInsidesReadyToBeVisible: false, - isDraggingOver: false + isDraggingOver: false, }) const { inline, closeAfterFinish } = this.opts @@ -1075,14 +1075,14 @@ module.exports = class Dashboard extends Plugin { showProgressDetails: this.opts.showProgressDetails, hideAfterFinish: this.opts.hideProgressAfterFinish, locale: this.opts.locale, - doneButtonHandler: this.opts.doneButtonHandler + doneButtonHandler: this.opts.doneButtonHandler, }) } if (!this.opts.disableInformer) { this.uppy.use(Informer, { id: `${this.id}:Informer`, - target: this + target: this, }) } @@ -1093,7 +1093,7 @@ module.exports = class Dashboard extends Plugin { thumbnailType: this.opts.thumbnailType, waitForThumbnailsBeforeUpload: this.opts.waitForThumbnailsBeforeUpload, // If we don't block on thumbnails, we can lazily generate them - lazy: !this.opts.waitForThumbnailsBeforeUpload + lazy: !this.opts.waitForThumbnailsBeforeUpload, }) } diff --git a/packages/@uppy/dashboard/src/index.test.js b/packages/@uppy/dashboard/src/index.test.js index d134a1251..0815aa3bf 100644 --- a/packages/@uppy/dashboard/src/index.test.js +++ b/packages/@uppy/dashboard/src/index.test.js @@ -21,7 +21,7 @@ describe('Dashboard', () => { expect(() => { core.use(DashboardPlugin, { inline: true, - target: 'body' + target: 'body', }) }).not.toThrow() @@ -33,7 +33,7 @@ describe('Dashboard', () => { expect(() => { core.use(DashboardPlugin, { inline: true, - target: 'body' + target: 'body', }) core.use(GoogleDrivePlugin, { target: DashboardPlugin, companionUrl: 'https://fake.uppy.io/' }) }).not.toThrow() @@ -49,7 +49,7 @@ describe('Dashboard', () => { core.use(DashboardPlugin, { inline: true, target: 'body', - plugins: ['GoogleDrive'] + plugins: ['GoogleDrive'], }) }).not.toThrow() @@ -60,11 +60,11 @@ describe('Dashboard', () => { const core = new Core() core.use(DashboardPlugin, { inline: true, - target: 'body' + target: 'body', }) core.getPlugin('Dashboard').setOptions({ - width: 300 + width: 300, }) expect( @@ -76,15 +76,15 @@ describe('Dashboard', () => { const core = new Core() core.use(DashboardPlugin, { inline: true, - target: 'body' + target: 'body', }) core.setOptions({ locale: { strings: { - myDevice: 'Май дивайс' - } - } + myDevice: 'Май дивайс', + }, + }, }) expect( diff --git a/packages/@uppy/dashboard/src/utils/copyToClipboard.js b/packages/@uppy/dashboard/src/utils/copyToClipboard.js index 84bf8568a..4668abbd7 100644 --- a/packages/@uppy/dashboard/src/utils/copyToClipboard.js +++ b/packages/@uppy/dashboard/src/utils/copyToClipboard.js @@ -23,7 +23,7 @@ module.exports = function copyToClipboard (textToCopy, fallbackString) { border: 'none', outline: 'none', boxShadow: 'none', - background: 'transparent' + background: 'transparent', }) textArea.value = textToCopy diff --git a/packages/@uppy/dashboard/src/utils/getFileTypeIcon.js b/packages/@uppy/dashboard/src/utils/getFileTypeIcon.js index ab3a985d5..18634ad74 100644 --- a/packages/@uppy/dashboard/src/utils/getFileTypeIcon.js +++ b/packages/@uppy/dashboard/src/utils/getFileTypeIcon.js @@ -3,9 +3,9 @@ const { h } = require('preact') function iconImage () { return ( @@ -14,24 +14,24 @@ function iconImage () { function iconAudio () { return ( -
+
{this.i18nArray('dropHereOr', { - browse: {this.i18n('browse')} + browse: {this.i18n('browse')}, })}
) @@ -174,7 +174,7 @@ module.exports = class DragDrop extends Plugin { renderNote () { return ( - {this.opts.note} + {this.opts.note} ) } @@ -188,13 +188,13 @@ module.exports = class DragDrop extends Plugin { const dragDropStyle = { width: this.opts.width, - height: this.opts.height + height: this.opts.height, } return ( } + + )}
) } diff --git a/packages/@uppy/form/src/index.js b/packages/@uppy/form/src/index.js index 43de64470..645b7dfee 100644 --- a/packages/@uppy/form/src/index.js +++ b/packages/@uppy/form/src/index.js @@ -25,7 +25,7 @@ module.exports = class Form extends Plugin { addResultToForm: true, multipleResults: false, submitOnSuccess: false, - triggerUploadOnSubmit: false + triggerUploadOnSubmit: false, } // merge default options with the ones set by user diff --git a/packages/@uppy/golden-retriever/src/IndexedDBStore.js b/packages/@uppy/golden-retriever/src/IndexedDBStore.js index 22f49aedf..9394c35b4 100644 --- a/packages/@uppy/golden-retriever/src/IndexedDBStore.js +++ b/packages/@uppy/golden-retriever/src/IndexedDBStore.js @@ -1,6 +1,7 @@ const prettierBytes = require('@transloadit/prettier-bytes') -const indexedDB = typeof window !== 'undefined' && - (window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.OIndexedDB || window.msIndexedDB) + +const indexedDB = typeof window !== 'undefined' + && (window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.OIndexedDB || window.msIndexedDB) const isSupported = !!indexedDB @@ -67,13 +68,14 @@ function waitForRequest (request) { let cleanedUp = false class IndexedDBStore { constructor (opts) { - this.opts = Object.assign({ + this.opts = { dbName: DB_NAME, storeName: 'default', expires: DEFAULT_EXPIRY, // 24 hours maxFileSize: 10 * 1024 * 1024, // 10 MB - maxTotalSize: 300 * 1024 * 1024 // 300 MB - }, opts) + maxTotalSize: 300 * 1024 * 1024, // 300 MB + ...opts, + } this.name = this.opts.storeName @@ -124,7 +126,7 @@ class IndexedDBStore { return waitForRequest(request) }).then((result) => ({ id: result.data.fileID, - data: result.data.data + data: result.data.data, })) } @@ -176,7 +178,7 @@ class IndexedDBStore { fileID: file.id, store: this.name, expires: Date.now() + this.opts.expires, - data: file.data + data: file.data, }) return waitForRequest(request) }) @@ -212,7 +214,8 @@ class IndexedDBStore { console.log( '[IndexedDBStore] Deleting record', entry.fileID, 'of size', prettierBytes(entry.data.size), - '- expired on', new Date(entry.expires)) + '- expired on', new Date(entry.expires) + ) cursor.delete() // Ignoring return value … it's not terrible if this goes wrong. cursor.continue() } else { diff --git a/packages/@uppy/golden-retriever/src/MetaDataStore.js b/packages/@uppy/golden-retriever/src/MetaDataStore.js index bc973b3ff..3fb9050e8 100644 --- a/packages/@uppy/golden-retriever/src/MetaDataStore.js +++ b/packages/@uppy/golden-retriever/src/MetaDataStore.js @@ -26,9 +26,10 @@ function maybeParse (str) { let cleanedUp = false module.exports = class MetaDataStore { constructor (opts) { - this.opts = Object.assign({ - expires: 24 * 60 * 60 * 1000 // 24 hours - }, opts) + this.opts = { + expires: 24 * 60 * 60 * 1000, // 24 hours + ...opts, + } this.name = `uppyState:${opts.storeName}` if (!cleanedUp) { @@ -60,7 +61,7 @@ module.exports = class MetaDataStore { const expires = Date.now() + this.opts.expires const state = JSON.stringify({ metadata, - expires + expires, }) localStorage.setItem(this.name, state) } diff --git a/packages/@uppy/golden-retriever/src/ServiceWorker.js b/packages/@uppy/golden-retriever/src/ServiceWorker.js index 975f0de01..0add3404f 100644 --- a/packages/@uppy/golden-retriever/src/ServiceWorker.js +++ b/packages/@uppy/golden-retriever/src/ServiceWorker.js @@ -41,8 +41,8 @@ function removeFile (store, fileID) { function getFiles (store) { sendMessageToAllClients({ type: 'uppy/ALL_FILES', - store: store, - files: getCache(store) + store, + files: getCache(store), }) } diff --git a/packages/@uppy/golden-retriever/src/index.js b/packages/@uppy/golden-retriever/src/index.js index cc9f15dcd..6b4f4f757 100644 --- a/packages/@uppy/golden-retriever/src/index.js +++ b/packages/@uppy/golden-retriever/src/index.js @@ -21,23 +21,24 @@ module.exports = class GoldenRetriever extends Plugin { const defaultOptions = { expires: 24 * 60 * 60 * 1000, // 24 hours - serviceWorker: false + serviceWorker: false, } - this.opts = Object.assign({}, defaultOptions, opts) + this.opts = { ...defaultOptions, ...opts } this.MetaDataStore = new MetaDataStore({ expires: this.opts.expires, - storeName: uppy.getID() + storeName: uppy.getID(), }) this.ServiceWorkerStore = null if (this.opts.serviceWorker) { this.ServiceWorkerStore = new ServiceWorkerStore({ storeName: uppy.getID() }) } - this.IndexedDBStore = new IndexedDBStore(Object.assign( - { expires: this.opts.expires }, - this.opts.indexedDB || {}, - { storeName: uppy.getID() })) + this.IndexedDBStore = new IndexedDBStore({ + expires: this.opts.expires, + ...this.opts.indexedDB || {}, + storeName: uppy.getID(), + }) this.saveFilesStateToLocalStorage = this.saveFilesStateToLocalStorage.bind(this) this.loadFilesStateFromLocalStorage = this.loadFilesStateFromLocalStorage.bind(this) @@ -53,7 +54,7 @@ module.exports = class GoldenRetriever extends Plugin { this.uppy.log('[GoldenRetriever] Recovered some state from Local Storage') this.uppy.setState({ currentUploads: savedState.currentUploads || {}, - files: savedState.files || {} + files: savedState.files || {}, }) this.savedPluginData = savedState.pluginData @@ -114,9 +115,9 @@ module.exports = class GoldenRetriever extends Plugin { const { currentUploads } = this.uppy.getState() this.MetaDataStore.save({ - currentUploads: currentUploads, + currentUploads, files: filesToSave, - pluginData: pluginData + pluginData, }) } @@ -155,7 +156,7 @@ module.exports = class GoldenRetriever extends Plugin { onBlobsLoaded (blobs) { const obsoleteBlobs = [] - const updatedFiles = Object.assign({}, this.uppy.getState().files) + const updatedFiles = { ...this.uppy.getState().files } Object.keys(blobs).forEach((fileID) => { const originalFile = this.uppy.getFile(fileID) if (!originalFile) { @@ -167,14 +168,14 @@ module.exports = class GoldenRetriever extends Plugin { const updatedFileData = { data: cachedData, - isRestored: true + isRestored: true, } - const updatedFile = Object.assign({}, originalFile, updatedFileData) + const updatedFile = { ...originalFile, ...updatedFileData } updatedFiles[fileID] = updatedFile }) this.uppy.setState({ - files: updatedFiles + files: updatedFiles, }) this.uppy.emit('restored', this.savedPluginData) diff --git a/packages/@uppy/google-drive/src/index.js b/packages/@uppy/google-drive/src/index.js index c3e392a6d..9c3784864 100644 --- a/packages/@uppy/google-drive/src/index.js +++ b/packages/@uppy/google-drive/src/index.js @@ -14,8 +14,8 @@ module.exports = class GoogleDrive extends Plugin { this.title = this.opts.title || 'Google Drive' this.icon = () => ( @@ -27,7 +27,7 @@ module.exports = class GoogleDrive extends Plugin { companionKeysParams: this.opts.companionKeysParams, companionCookiesRule: this.opts.companionCookiesRule, provider: 'drive', - pluginId: this.id + pluginId: this.id, }) this.onFirstRender = this.onFirstRender.bind(this) @@ -36,7 +36,7 @@ module.exports = class GoogleDrive extends Plugin { install () { this.view = new DriveProviderViews(this, { - provider: this.provider + provider: this.provider, }) const target = this.opts.target @@ -53,7 +53,7 @@ module.exports = class GoogleDrive extends Plugin { onFirstRender () { return Promise.all([ this.provider.fetchPreAuthToken(), - this.view.getFolder('root', '/') + this.view.getFolder('root', '/'), ]) } diff --git a/packages/@uppy/image-editor/src/Editor.js b/packages/@uppy/image-editor/src/Editor.js index d3bf3391b..f80530c8c 100644 --- a/packages/@uppy/image-editor/src/Editor.js +++ b/packages/@uppy/image-editor/src/Editor.js @@ -26,7 +26,7 @@ module.exports = class Editor extends Component { return ( @@ -18,8 +18,8 @@ const Breadcrumb = (props) => { module.exports = (props) => { return ( -
-
{props.breadcrumbsIcon}
+
+
{props.breadcrumbsIcon}
{ props.directories.map((directory, i) => ( { files, uppyFiles, filterItems, - filterInput + filterInput, } = props let filteredFolders = folders @@ -25,9 +25,9 @@ const Browser = (props) => { const selected = currentSelection.length return ( -
-
-
+
+
+
{props.headerComponent}
@@ -35,7 +35,7 @@ const Browser = (props) => { +
this.props.filterQuery(e)} + onKeyUp={this.preventEnterPress} + onKeyDown={this.preventEnterPress} + onKeyPress={this.preventEnterPress} + onInput={(e) => this.props.filterQuery(e)} value={this.props.filterInput} /> - diff --git a/packages/@uppy/provider-views/src/Item/components/GridLi.js b/packages/@uppy/provider-views/src/Item/components/GridLi.js index 0d48b3563..741da4fe8 100644 --- a/packages/@uppy/provider-views/src/Item/components/GridLi.js +++ b/packages/@uppy/provider-views/src/Item/components/GridLi.js @@ -3,12 +3,12 @@ const { h } = require('preact') // it could be a
  • module.exports = (props) => { return ( -
  • -
    +
  • +
    + , ]) } diff --git a/packages/@uppy/provider-views/src/SearchProviderView/Header.js b/packages/@uppy/provider-views/src/SearchProviderView/Header.js index dc27bc9f3..65417a58a 100644 --- a/packages/@uppy/provider-views/src/SearchProviderView/Header.js +++ b/packages/@uppy/provider-views/src/SearchProviderView/Header.js @@ -2,7 +2,7 @@ const { h } = require('preact') module.exports = (props) => { return ( - ) diff --git a/packages/@uppy/provider-views/src/SearchProviderView/InputView.js b/packages/@uppy/provider-views/src/SearchProviderView/InputView.js index 57f486b41..1d9adceec 100644 --- a/packages/@uppy/provider-views/src/SearchProviderView/InputView.js +++ b/packages/@uppy/provider-views/src/SearchProviderView/InputView.js @@ -15,20 +15,20 @@ module.exports = (props) => { } return ( -
    +
    { input = input_ }} data-uppy-super-focusable /> diff --git a/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.js b/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.js index 4f2100d90..94a4aa292 100644 --- a/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.js +++ b/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.js @@ -29,7 +29,7 @@ module.exports = class ProviderView { viewType: 'grid', showTitles: false, showFilter: false, - showBreadcrumbs: false + showBreadcrumbs: false, } // merge default options with the ones set by user @@ -58,7 +58,7 @@ module.exports = class ProviderView { folders: [], directories: [], filterInput: '', - isSearchVisible: false + isSearchVisible: false, }) } @@ -113,16 +113,16 @@ module.exports = class ProviderView { type: file.mimeType, isRemote: true, body: { - fileId: file.id + fileId: file.id, }, remote: { companionUrl: this.plugin.opts.companionUrl, url: `${this.provider.fileUrl(file.requestPath)}`, body: { - fileId: file.id + fileId: file.id, }, - providerOptions: Object.assign({}, this.provider.opts, { provider: null }) - } + providerOptions: { ...this.provider.opts, provider: null }, + }, } const fileType = getFileType(tagFile) @@ -144,7 +144,7 @@ module.exports = class ProviderView { return generateFileID({ data: file, name: file.name || file.id, - type: file.mimeType + type: file.mimeType, }) } @@ -152,7 +152,7 @@ module.exports = class ProviderView { const uppy = this.plugin.uppy uppy.log(error.toString()) const message = uppy.i18n('companionError') - uppy.info({ message: message, details: error.toString() }, 'error', 5000) + uppy.info({ message, details: error.toString() }, 'error', 5000) } handleScroll (e) { @@ -219,7 +219,8 @@ module.exports = class ProviderView { } const targetViewOptions = { ...this.opts, ...viewOptions } - const browserProps = Object.assign({}, this.plugin.getPluginState(), { + const browserProps = { + ...this.plugin.getPluginState(), isChecked: this._sharedHandler.isChecked, toggleCheckbox: this._sharedHandler.toggleCheckbox, handleScroll: this.handleScroll, @@ -227,7 +228,7 @@ module.exports = class ProviderView { cancel: this.cancelPicking, headerComponent: Header({ triggerSearchInput: this.triggerSearchInput, - i18n: this.plugin.uppy.i18n + i18n: this.plugin.uppy.i18n, }), title: this.plugin.title, viewType: targetViewOptions.viewType, @@ -237,8 +238,8 @@ module.exports = class ProviderView { pluginIcon: this.plugin.icon, i18n: this.plugin.uppy.i18n, uppyFiles: this.plugin.uppy.getFiles(), - validateRestrictions: this.plugin.uppy.validateRestrictions - }) + validateRestrictions: this.plugin.uppy.validateRestrictions, + } return ( diff --git a/packages/@uppy/provider-views/src/SharedHandler.js b/packages/@uppy/provider-views/src/SharedHandler.js index cac971c1a..b300249ce 100644 --- a/packages/@uppy/provider-views/src/SharedHandler.js +++ b/packages/@uppy/provider-views/src/SharedHandler.js @@ -66,11 +66,11 @@ module.exports = class SharedHandler { const { currentSelection } = this.plugin.getPluginState() if (this.isChecked(file)) { this.plugin.setPluginState({ - currentSelection: currentSelection.filter((item) => item.id !== file.id) + currentSelection: currentSelection.filter((item) => item.id !== file.id), }) } else { this.plugin.setPluginState({ - currentSelection: currentSelection.concat([file]) + currentSelection: currentSelection.concat([file]), }) } } diff --git a/packages/@uppy/provider-views/src/index.js b/packages/@uppy/provider-views/src/index.js index 08bf0ac9d..a602fd88e 100644 --- a/packages/@uppy/provider-views/src/index.js +++ b/packages/@uppy/provider-views/src/index.js @@ -3,5 +3,5 @@ const SearchProviderViews = require('./SearchProviderView') module.exports = { ProviderViews, - SearchProviderViews + SearchProviderViews, } diff --git a/packages/@uppy/react-native/file-picker/index.js b/packages/@uppy/react-native/file-picker/index.js index afc81c527..39fc8d76d 100644 --- a/packages/@uppy/react-native/file-picker/index.js +++ b/packages/@uppy/react-native/file-picker/index.js @@ -20,11 +20,11 @@ export default class UppyReactNativeFilePicker extends React.Component { { id: 'LocalImages', title: 'Pick Local Images/Videos' }, { id: 'LocalDocuments', title: 'Pick Documents' }, { id: 'LocalCamera', title: 'Take a Picture' }, - { id: 'Url', title: 'Url' } + { id: 'Url', title: 'Url' }, // { id: 'GoogleDrive', title: 'Google Drive' }, // { id: 'Instagram', title: 'Instagram' } ], - openProvider: null + openProvider: null, } this.takePicture = this.takePicture.bind(this) @@ -42,7 +42,7 @@ export default class UppyReactNativeFilePicker extends React.Component { source: 'React Native', name: `media_${Date.now()}.jpg`, type: file.type, - data: file + data: file, }) this.props.onRequestClose() }).catch((err) => { @@ -56,7 +56,7 @@ export default class UppyReactNativeFilePicker extends React.Component { source: 'React Native', name: `media_${Date.now()}.jpg`, type: file.type, - data: file + data: file, }) this.props.onRequestClose() }).catch((err) => { @@ -69,7 +69,7 @@ export default class UppyReactNativeFilePicker extends React.Component { this.uppy.addFile({ source: 'React Native', name: file.name, - data: file + data: file, }) this.props.onRequestClose() }).catch((err) => { @@ -80,7 +80,7 @@ export default class UppyReactNativeFilePicker extends React.Component { openProvider (id) { console.log('Open provider:', id) this.setState({ - openProvider: id + openProvider: id, }) } @@ -143,7 +143,7 @@ export default class UppyReactNativeFilePicker extends React.Component { uppy={this.uppy} onDone={() => { this.setState({ - openProvider: null + openProvider: null, }) this.props.onRequestClose() }} @@ -161,7 +161,7 @@ const styles = StyleSheet.create({ providerList: { flex: 1, marginTop: 22, - justifyContent: 'center' + justifyContent: 'center', }, providerButton: { alignItems: 'center', @@ -170,10 +170,10 @@ const styles = StyleSheet.create({ marginLeft: 50, marginRight: 50, padding: 10, - borderRadius: 5 + borderRadius: 5, }, providerButtonText: { - color: '#fff' + color: '#fff', }, cancelButton: { alignItems: 'center', @@ -183,9 +183,9 @@ const styles = StyleSheet.create({ marginLeft: 50, marginRight: 50, padding: 10, - borderRadius: 5 + borderRadius: 5, }, cancelButtonText: { - color: '#0077cc' - } + color: '#0077cc', + }, }) diff --git a/packages/@uppy/react-native/file-picker/instagram.js b/packages/@uppy/react-native/file-picker/instagram.js index 2372dc80a..ceb8f5530 100644 --- a/packages/@uppy/react-native/file-picker/instagram.js +++ b/packages/@uppy/react-native/file-picker/instagram.js @@ -10,7 +10,7 @@ import Instagram from '@uppy/instagram' function getQueryParamValueFromUrl (name, url) { name = name.replace(/[[]/, '\\[').replace(/[\]]/, '\\]') - var regexS = '[\\?&]' + name + '=([^&#]*)' + var regexS = `[\\?&]${name}=([^&#]*)` var regex = new RegExp(regexS) var results = regex.exec(url) return results == null ? null : results[1] @@ -33,25 +33,25 @@ export default class UppyRNInstagram extends React.Component { { caption: Date.now(), url: 'http://lorempixel.com/200/200/' }, { caption: Date.now(), url: 'http://lorempixel.com/200/200/' }, { caption: Date.now(), url: 'http://lorempixel.com/200/200/' }, - { caption: Date.now(), url: 'http://lorempixel.com/200/200/' } - ] - } + { caption: Date.now(), url: 'http://lorempixel.com/200/200/' }, + ], + }, } } componentDidMount () { const uppy = this.props.uppy - const options = Object.assign( - { id: 'uppyRN:Instagram' }, - this.props, - { storage: AsyncStorage } - ) + const options = { + id: 'uppyRN:Instagram', + ...this.props, + storage: AsyncStorage, + } delete options.uppy uppy.use(Instagram, options) this.plugin = uppy.getPlugin(options.id) this.setState({ - authUrl: this.plugin.provider.authUrl() + authUrl: this.plugin.provider.authUrl(), }) } @@ -104,11 +104,11 @@ const styles = StyleSheet.create({ container: { justifyContent: 'center', flex: 1, - paddingTop: 30 + paddingTop: 30, }, item: { justifyContent: 'center', alignItems: 'center', - height: 100 - } + height: 100, + }, }) diff --git a/packages/@uppy/react-native/file-picker/provider-grid.js b/packages/@uppy/react-native/file-picker/provider-grid.js index 0793e5801..ade2a0c01 100644 --- a/packages/@uppy/react-native/file-picker/provider-grid.js +++ b/packages/@uppy/react-native/file-picker/provider-grid.js @@ -15,7 +15,7 @@ export default class Example extends React.Component { { name: 'ALIZARIN', code: '#e74c3c' }, { name: 'CLOUDS', code: '#ecf0f1' }, { name: 'CONCRETE', code: '#95a5a6' }, { name: 'ORANGE', code: '#f39c12' }, { name: 'PUMPKIN', code: '#d35400' }, { name: 'POMEGRANATE', code: '#c0392b' }, - { name: 'SILVER', code: '#bdc3c7' }, { name: 'ASBESTOS', code: '#7f8c8d' } + { name: 'SILVER', code: '#bdc3c7' }, { name: 'ASBESTOS', code: '#7f8c8d' }, ] return ( @@ -40,22 +40,22 @@ export default class Example extends React.Component { const styles = StyleSheet.create({ gridView: { marginTop: 20, - flex: 1 + flex: 1, }, itemContainer: { justifyContent: 'flex-end', borderRadius: 5, padding: 10, - height: 150 + height: 150, }, itemName: { fontSize: 16, color: '#fff', - fontWeight: '600' + fontWeight: '600', }, itemCode: { fontWeight: '600', fontSize: 12, - color: '#fff' - } + color: '#fff', + }, }) diff --git a/packages/@uppy/react-native/file-picker/selectDocument.js b/packages/@uppy/react-native/file-picker/selectDocument.js index 169efa680..4eb78cb18 100644 --- a/packages/@uppy/react-native/file-picker/selectDocument.js +++ b/packages/@uppy/react-native/file-picker/selectDocument.js @@ -2,7 +2,7 @@ import * as DocumentPicker from 'expo-document-picker' function selectDocumentWithExpo (options) { return DocumentPicker.getDocumentAsync({ - copyToCacheDirectory: false + copyToCacheDirectory: false, }).then((result) => { if (!result.cancelled && result.type !== 'cancel') { return result diff --git a/packages/@uppy/react-native/file-picker/url.js b/packages/@uppy/react-native/file-picker/url.js index a836a9785..8a3c78d67 100644 --- a/packages/@uppy/react-native/file-picker/url.js +++ b/packages/@uppy/react-native/file-picker/url.js @@ -14,7 +14,7 @@ export default class UppyRNUrl extends React.Component { super() this.state = { - url: null + url: null, } this.onPressImport = this.onPressImport.bind(this) @@ -22,11 +22,11 @@ export default class UppyRNUrl extends React.Component { componentDidMount () { const uppy = this.props.uppy - const options = Object.assign( - { id: 'uppyRN:Url' }, - this.props, - { } - ) + const options = { + id: 'uppyRN:Url', + ...this.props, + + } delete options.uppy uppy.use(Url, options) @@ -53,7 +53,7 @@ export default class UppyRNUrl extends React.Component { style={styles.input} autoFocus onChangeText={(text) => this.setState({ - url: text + url: text, })} placeholder="Enter URL to import a file" /> @@ -78,7 +78,7 @@ const styles = StyleSheet.create({ container: { flex: 1, alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, input: { width: '90%', @@ -87,7 +87,7 @@ const styles = StyleSheet.create({ borderWidth: 1, padding: 5, borderRadius: 4, - marginBottom: 15 + marginBottom: 15, }, buttonImport: { alignItems: 'center', @@ -95,18 +95,18 @@ const styles = StyleSheet.create({ paddingHorizontal: 25, paddingVertical: 8, borderRadius: 5, - marginBottom: 10 + marginBottom: 10, }, buttonCancel: { alignItems: 'center', paddingHorizontal: 15, paddingVertical: 8, - borderRadius: 5 + borderRadius: 5, }, buttonImportText: { - color: '#fff' + color: '#fff', }, buttonCancelText: { - color: '#0077cc' - } + color: '#0077cc', + }, }) diff --git a/packages/@uppy/react/src/Dashboard.js b/packages/@uppy/react/src/Dashboard.js index bad915ec7..851291f84 100644 --- a/packages/@uppy/react/src/Dashboard.js +++ b/packages/@uppy/react/src/Dashboard.js @@ -27,11 +27,11 @@ class Dashboard extends React.Component { installPlugin () { const uppy = this.props.uppy - const options = Object.assign( - { id: 'react:Dashboard' }, - this.props, - { target: this.container } - ) + const options = { + id: 'react:Dashboard', + ...this.props, + target: this.container, + } delete options.uppy uppy.use(DashboardPlugin, options) @@ -48,7 +48,7 @@ class Dashboard extends React.Component { return h('div', { ref: (container) => { this.container = container - } + }, }) } } @@ -56,7 +56,7 @@ class Dashboard extends React.Component { Dashboard.propTypes = basePropTypes Dashboard.defaultProps = { - inline: true + inline: true, } module.exports = Dashboard diff --git a/packages/@uppy/react/src/DashboardModal.js b/packages/@uppy/react/src/DashboardModal.js index 8ab5eee2f..cc461f30b 100644 --- a/packages/@uppy/react/src/DashboardModal.js +++ b/packages/@uppy/react/src/DashboardModal.js @@ -33,13 +33,11 @@ class DashboardModal extends React.Component { installPlugin () { const uppy = this.props.uppy - const options = Object.assign( - { id: 'react:DashboardModal' }, - this.props, - { - onRequestCloseModal: this.props.onRequestClose - } - ) + const options = { + id: 'react:DashboardModal', + ...this.props, + onRequestCloseModal: this.props.onRequestClose, + } if (!options.target) { options.target = this.container @@ -64,19 +62,19 @@ class DashboardModal extends React.Component { return h('div', { ref: (container) => { this.container = container - } + }, }) } } -DashboardModal.propTypes = Object.assign({ - // Only check this prop type in the browser. +DashboardModal.propTypes = { // Only check this prop type in the browser. target: typeof window !== 'undefined' ? PropTypes.instanceOf(window.HTMLElement) : PropTypes.any, open: PropTypes.bool, onRequestClose: PropTypes.func, closeModalOnClickOutside: PropTypes.bool, - disablePageScrollWhenModalOpen: PropTypes.bool -}, basePropTypes) + disablePageScrollWhenModalOpen: PropTypes.bool, + ...basePropTypes, +} DashboardModal.defaultProps = { } diff --git a/packages/@uppy/react/src/DashboardModal.test.js b/packages/@uppy/react/src/DashboardModal.test.js index bf0522653..eca0a7544 100644 --- a/packages/@uppy/react/src/DashboardModal.test.js +++ b/packages/@uppy/react/src/DashboardModal.test.js @@ -14,7 +14,7 @@ beforeAll(() => { beforeEach(() => { Object.assign(require('@uppy/dashboard').prototype, { openModal: jest.fn(), - closeModal: jest.fn() + closeModal: jest.fn(), }) }) diff --git a/packages/@uppy/react/src/DragDrop.js b/packages/@uppy/react/src/DragDrop.js index a0ba1fb86..61a71e536 100644 --- a/packages/@uppy/react/src/DragDrop.js +++ b/packages/@uppy/react/src/DragDrop.js @@ -27,11 +27,11 @@ class DragDrop extends React.Component { installPlugin () { const uppy = this.props.uppy - const options = Object.assign( - { id: 'react:DragDrop' }, - this.props, - { target: this.container } - ) + const options = { + id: 'react:DragDrop', + ...this.props, + target: this.container, + } delete options.uppy uppy.use(DragDropPlugin, options) @@ -49,14 +49,14 @@ class DragDrop extends React.Component { return h('div', { ref: (container) => { this.container = container - } + }, }) } } DragDrop.propTypes = { uppy: propTypes.uppy, - locale: propTypes.locale + locale: propTypes.locale, } DragDrop.defaultProps = { } diff --git a/packages/@uppy/react/src/FileInput.js b/packages/@uppy/react/src/FileInput.js index 3585a969a..b674753d7 100644 --- a/packages/@uppy/react/src/FileInput.js +++ b/packages/@uppy/react/src/FileInput.js @@ -28,11 +28,11 @@ class FileInput extends React.Component { installPlugin () { const uppy = this.props.uppy - const options = Object.assign( - { id: 'react:FileInput' }, - this.props, - { target: this.container } - ) + const options = { + id: 'react:FileInput', + ...this.props, + target: this.container, + } delete options.uppy uppy.use(FileInputPlugin, options) @@ -50,7 +50,7 @@ class FileInput extends React.Component { return h('div', { ref: (container) => { this.container = container - } + }, }) } } @@ -59,7 +59,7 @@ FileInput.propTypes = { uppy: propTypes.uppy, locale: propTypes.locale, pretty: PropTypes.bool, - inputName: PropTypes.string + inputName: PropTypes.string, } FileInput.defaultProps = { } diff --git a/packages/@uppy/react/src/ProgressBar.js b/packages/@uppy/react/src/ProgressBar.js index 89e7660a1..ff67a0744 100644 --- a/packages/@uppy/react/src/ProgressBar.js +++ b/packages/@uppy/react/src/ProgressBar.js @@ -27,11 +27,11 @@ class ProgressBar extends React.Component { installPlugin () { const uppy = this.props.uppy - const options = Object.assign( - { id: 'react:ProgressBar' }, - this.props, - { target: this.container } - ) + const options = { + id: 'react:ProgressBar', + ...this.props, + target: this.container, + } delete options.uppy uppy.use(ProgressBarPlugin, options) @@ -49,7 +49,7 @@ class ProgressBar extends React.Component { return h('div', { ref: (container) => { this.container = container - } + }, }) } } @@ -57,7 +57,7 @@ class ProgressBar extends React.Component { ProgressBar.propTypes = { uppy: uppyPropType, fixed: PropTypes.bool, - hideAfterFinish: PropTypes.bool + hideAfterFinish: PropTypes.bool, } ProgressBar.defaultProps = { } diff --git a/packages/@uppy/react/src/StatusBar.js b/packages/@uppy/react/src/StatusBar.js index edea5bb56..47a4886be 100644 --- a/packages/@uppy/react/src/StatusBar.js +++ b/packages/@uppy/react/src/StatusBar.js @@ -28,11 +28,11 @@ class StatusBar extends React.Component { installPlugin () { const uppy = this.props.uppy - const options = Object.assign( - { id: 'react:StatusBar' }, - this.props, - { target: this.container } - ) + const options = { + id: 'react:StatusBar', + ...this.props, + target: this.container, + } delete options.uppy uppy.use(StatusBarPlugin, options) @@ -50,7 +50,7 @@ class StatusBar extends React.Component { return h('div', { ref: (container) => { this.container = container - } + }, }) } } @@ -58,7 +58,7 @@ class StatusBar extends React.Component { StatusBar.propTypes = { uppy: uppyPropType, hideAfterFinish: PropTypes.bool, - showProgressDetails: PropTypes.bool + showProgressDetails: PropTypes.bool, } StatusBar.defaultProps = { } diff --git a/packages/@uppy/react/src/Wrapper.js b/packages/@uppy/react/src/Wrapper.js index c6961c220..0cf578e66 100644 --- a/packages/@uppy/react/src/Wrapper.js +++ b/packages/@uppy/react/src/Wrapper.js @@ -51,7 +51,7 @@ class UppyWrapper extends React.Component { UppyWrapper.propTypes = { uppy: uppyPropType, - plugin: PropTypes.string.isRequired + plugin: PropTypes.string.isRequired, } module.exports = UppyWrapper diff --git a/packages/@uppy/react/src/propTypes.js b/packages/@uppy/react/src/propTypes.js index 5c3cd3662..d67facafe 100644 --- a/packages/@uppy/react/src/propTypes.js +++ b/packages/@uppy/react/src/propTypes.js @@ -10,21 +10,21 @@ const plugins = PropTypes.arrayOf(PropTypes.string) // Language strings for this component. const locale = PropTypes.shape({ strings: PropTypes.object, - pluralize: PropTypes.func + pluralize: PropTypes.func, }) // List of meta fields for the editor in the Dashboard. const metaField = PropTypes.shape({ id: PropTypes.string.isRequired, name: PropTypes.string.isRequired, - placeholder: PropTypes.string + placeholder: PropTypes.string, }) const metaFields = PropTypes.arrayOf(metaField) // A size in pixels (number) or with some other unit (string). const cssSize = PropTypes.oneOfType([ PropTypes.string, - PropTypes.number + PropTypes.number, ]) // Common props for dashboardy components (Dashboard and DashboardModal). @@ -45,11 +45,11 @@ const dashboard = { disableThumbnailGenerator: PropTypes.bool, // pass-through to ThumbnailGenerator thumbnailWidth: PropTypes.number, - locale + locale, } module.exports = { uppy, locale, - dashboard + dashboard, } diff --git a/packages/@uppy/react/src/useUppy.js b/packages/@uppy/react/src/useUppy.js index f39d70326..24eb445a8 100644 --- a/packages/@uppy/react/src/useUppy.js +++ b/packages/@uppy/react/src/useUppy.js @@ -11,7 +11,7 @@ module.exports = function useUppy (factory) { uppy.current = factory() if (!(uppy.current instanceof UppyCore)) { - throw new TypeError('useUppy: factory function must return an Uppy instance, got ' + typeof uppy.current) + throw new TypeError(`useUppy: factory function must return an Uppy instance, got ${typeof uppy.current}`) } } diff --git a/packages/@uppy/react/src/useUppy.test.js b/packages/@uppy/react/src/useUppy.test.js index 9ecbd76b6..2792fc036 100644 --- a/packages/@uppy/react/src/useUppy.test.js +++ b/packages/@uppy/react/src/useUppy.test.js @@ -48,7 +48,7 @@ describe('useUppy()', () => { function GarbageUppy () { const uppy = useUppy(() => ({ - garbage: 'lala' + garbage: 'lala', })) return
    diff --git a/packages/@uppy/redux-dev-tools/src/index.js b/packages/@uppy/redux-dev-tools/src/index.js index 7bcee8161..64ca0bb42 100644 --- a/packages/@uppy/redux-dev-tools/src/index.js +++ b/packages/@uppy/redux-dev-tools/src/index.js @@ -19,7 +19,7 @@ module.exports = class ReduxDevTools extends Plugin { const defaultOptions = {} // merge default options with the ones set by user - this.opts = Object.assign({}, defaultOptions, opts) + this.opts = { ...defaultOptions, ...opts } this.handleStateChange = this.handleStateChange.bind(this) this.initDevTools = this.initDevTools.bind(this) @@ -40,13 +40,13 @@ module.exports = class ReduxDevTools extends Plugin { return case 'IMPORT_STATE': { const computedStates = message.payload.nextLiftedState.computedStates - this.uppy.store.state = Object.assign({}, this.uppy.getState(), computedStates[computedStates.length - 1].state) + this.uppy.store.state = { ...this.uppy.getState(), ...computedStates[computedStates.length - 1].state } this.uppy.updateAll(this.uppy.getState()) return } case 'JUMP_TO_STATE': case 'JUMP_TO_ACTION': - this.uppy.store.state = Object.assign({}, this.uppy.getState(), JSON.parse(message.state)) + this.uppy.store.state = { ...this.uppy.getState(), ...JSON.parse(message.state) } this.uppy.updateAll(this.uppy.getState()) } } diff --git a/packages/@uppy/robodog/src/AttachFileInputs.js b/packages/@uppy/robodog/src/AttachFileInputs.js index dd0983e84..22a6fca76 100644 --- a/packages/@uppy/robodog/src/AttachFileInputs.js +++ b/packages/@uppy/robodog/src/AttachFileInputs.js @@ -28,7 +28,7 @@ class AttachFileInputs extends Plugin { source: this.id, name: file.name, type: file.type, - data: file + data: file, }) } catch (err) { if (!err.isRestriction) { diff --git a/packages/@uppy/robodog/src/TransloaditResultsPlugin.js b/packages/@uppy/robodog/src/TransloaditResultsPlugin.js index fa87e5e31..aff39f759 100644 --- a/packages/@uppy/robodog/src/TransloaditResultsPlugin.js +++ b/packages/@uppy/robodog/src/TransloaditResultsPlugin.js @@ -31,14 +31,14 @@ class TransloaditResultsPlugin extends Plugin { assemblyResults.push({ ...result, assemblyId: assembly.assembly_id, - stepName + stepName, }) }) }) }) this.uppy.addResultData(uploadID, { - results: assemblyResults + results: assemblyResults, }) } } diff --git a/packages/@uppy/robodog/src/addDashboardPlugin.js b/packages/@uppy/robodog/src/addDashboardPlugin.js index 3da321c94..7f5337680 100644 --- a/packages/@uppy/robodog/src/addDashboardPlugin.js +++ b/packages/@uppy/robodog/src/addDashboardPlugin.js @@ -18,7 +18,7 @@ const dashboardOptionNames = [ 'disableThumbnailGenerator', 'showSelectedFiles', 'proudlyDisplayPoweredByUppy', - 'theme' + 'theme', ] const modalDashboardOptionNames = [ @@ -28,7 +28,7 @@ const modalDashboardOptionNames = [ 'disablePageScrollWhenModalOpen', 'animateOpenClose', 'onRequestCloseModal', - 'browserBackButtonClose' + 'browserBackButtonClose', ] function addDashboardPlugin (uppy, opts, overrideOpts) { @@ -50,7 +50,7 @@ function addDashboardPlugin (uppy, opts, overrideOpts) { uppy.use(Dashboard, { ...dashboardOpts, - ...overrideOpts + ...overrideOpts, }) } diff --git a/packages/@uppy/robodog/src/addProviders.js b/packages/@uppy/robodog/src/addProviders.js index 1a24f79c7..3975d0f1a 100644 --- a/packages/@uppy/robodog/src/addProviders.js +++ b/packages/@uppy/robodog/src/addProviders.js @@ -7,11 +7,11 @@ const remoteProviders = { instagram: require('@uppy/instagram'), facebook: require('@uppy/facebook'), onedrive: require('@uppy/onedrive'), - url: require('@uppy/url') + url: require('@uppy/url'), } const localProviders = { - webcam: require('@uppy/webcam') + webcam: require('@uppy/webcam'), } const remoteProviderOptionNames = [ @@ -19,12 +19,12 @@ const remoteProviderOptionNames = [ 'companionAllowedHosts', 'companionHeaders', 'serverHeaders', - 'target' + 'target', ] // No shared options. const localProviderOptionNames = [ - 'target' + 'target', ] function addRemoteProvider (uppy, name, opts) { @@ -32,7 +32,7 @@ function addRemoteProvider (uppy, name, opts) { const providerOptions = { // Default to the :tl: Companion servers. companionUrl: Transloadit.COMPANION, - companionAllowedHosts: Transloadit.COMPANION_PATTERN + companionAllowedHosts: Transloadit.COMPANION_PATTERN, } remoteProviderOptionNames.forEach((name) => { @@ -70,7 +70,7 @@ function addProviders (uppy, names, opts = {}) { } else { const validNames = [ ...Object.keys(remoteProviders), - ...Object.keys(localProviders) + ...Object.keys(localProviders), ] const expectedNameString = validNames .sort() diff --git a/packages/@uppy/robodog/src/addTransloaditPlugin.js b/packages/@uppy/robodog/src/addTransloaditPlugin.js index 99b0a831a..8c0d6453d 100644 --- a/packages/@uppy/robodog/src/addTransloaditPlugin.js +++ b/packages/@uppy/robodog/src/addTransloaditPlugin.js @@ -13,7 +13,7 @@ const transloaditOptionNames = [ 'fields', 'limit', 'locale', - 'getAssemblyOptions' + 'getAssemblyOptions', ] function addTransloaditPlugin (uppy, opts) { diff --git a/packages/@uppy/robodog/src/createUppy.js b/packages/@uppy/robodog/src/createUppy.js index ba9577db4..c7718a1e7 100644 --- a/packages/@uppy/robodog/src/createUppy.js +++ b/packages/@uppy/robodog/src/createUppy.js @@ -24,7 +24,7 @@ const eventNames = { onFileProgress: 'upload-progress', onFileError: 'upload-error', onUploaded: 'transloadit:upload', - onComplete: 'complete' // mostly akin to promise resolution + onComplete: 'complete', // mostly akin to promise resolution } const uppyOptionNames = [ @@ -33,7 +33,7 @@ const uppyOptionNames = [ 'meta', 'onBeforeFileAdded', 'onBeforeUpload', - 'debug' + 'debug', ] function createUppy (opts, overrides = {}) { const uppyOptions = {} diff --git a/packages/@uppy/robodog/src/dashboard.js b/packages/@uppy/robodog/src/dashboard.js index 1cda315f0..c4dc17711 100644 --- a/packages/@uppy/robodog/src/dashboard.js +++ b/packages/@uppy/robodog/src/dashboard.js @@ -13,14 +13,14 @@ function dashboard (target, opts = {}) { id: pluginId, inline, target, - closeAfterFinish: false + closeAfterFinish: false, }) if (Array.isArray(opts.providers)) { addProviders(uppy, opts.providers, { ...opts, // Install providers into the Dashboard. - target: uppy.getPlugin(pluginId) + target: uppy.getPlugin(pluginId), }) } diff --git a/packages/@uppy/robodog/src/form.js b/packages/@uppy/robodog/src/form.js index 36821a0c6..68cf15ef6 100644 --- a/packages/@uppy/robodog/src/form.js +++ b/packages/@uppy/robodog/src/form.js @@ -10,14 +10,14 @@ const addTransloaditPlugin = require('./addTransloaditPlugin') const addProviders = require('./addProviders') const defaultLocaleStrings = { - chooseFiles: 'Choose files' + chooseFiles: 'Choose files', } function mergeDefaultLocale (defaults, userProvided = {}) { const strings = userProvided.strings || {} return { ...userProvided, - strings: { ...defaults, ...strings } + strings: { ...defaults, ...strings }, } } @@ -26,7 +26,7 @@ function form (target, opts) { opts = { ...opts, - locale: mergeDefaultLocale(defaultLocaleStrings, opts.locale) + locale: mergeDefaultLocale(defaultLocaleStrings, opts.locale), } const uppy = new Uppy(opts) @@ -35,7 +35,7 @@ function form (target, opts) { uppy.use(TransloaditFormResult, { target, transloaditPluginId: 'Transloadit', - name: 'transloadit' + name: 'transloadit', }) let submitOnSuccess = true @@ -47,7 +47,7 @@ function form (target, opts) { target, triggerUploadOnSubmit: true, submitOnSuccess, - addResultToForm: false // using custom implementation instead + addResultToForm: false, // using custom implementation instead } if (has(opts, 'triggerUploadOnSubmit')) { formOptions.triggerUploadOnSubmit = opts.triggerUploadOnSubmit @@ -62,7 +62,7 @@ function form (target, opts) { const dashboardId = 'form:Dashboard' const dashboardOpts = { id: dashboardId, - target: dashboardTarget + target: dashboardTarget, } if (opts.modal) { const trigger = 'input[type="file"]' @@ -82,7 +82,7 @@ function form (target, opts) { if (Array.isArray(opts.providers)) { addProviders(uppy, opts.providers, { ...opts, - target: uppy.getPlugin(dashboardId) + target: uppy.getPlugin(dashboardId), }) } } else { @@ -98,7 +98,7 @@ function form (target, opts) { hideAfterFinish: true, hideRetryButton: true, hidePauseResumeButtons: true, - hideCancelButtons: true + hideCancelButtons: true, }) } diff --git a/packages/@uppy/robodog/src/index.js b/packages/@uppy/robodog/src/index.js index 806dd4096..eae67f015 100644 --- a/packages/@uppy/robodog/src/index.js +++ b/packages/@uppy/robodog/src/index.js @@ -8,5 +8,5 @@ module.exports = { form, pick, upload, - VERSION: require('../package.json').version + VERSION: require('../package.json').version, } diff --git a/packages/@uppy/robodog/src/pick.js b/packages/@uppy/robodog/src/pick.js index 8ae82deb4..d2d5078e1 100644 --- a/packages/@uppy/robodog/src/pick.js +++ b/packages/@uppy/robodog/src/pick.js @@ -10,20 +10,20 @@ function pick (opts = {}) { const pluginId = 'pick' const uppy = createUppy(opts, { - allowMultipleUploads: false + allowMultipleUploads: false, }) addTransloaditPlugin(uppy, opts) addDashboardPlugin(uppy, opts, { id: pluginId, target, - closeAfterFinish: true + closeAfterFinish: true, }) if (Array.isArray(opts.providers)) { addProviders(uppy, opts.providers, { ...opts, // Install providers into the Dashboard. - target: uppy.getPlugin(pluginId) + target: uppy.getPlugin(pluginId), }) } diff --git a/packages/@uppy/robodog/src/upload.js b/packages/@uppy/robodog/src/upload.js index a6e72e575..665e6948a 100644 --- a/packages/@uppy/robodog/src/upload.js +++ b/packages/@uppy/robodog/src/upload.js @@ -8,7 +8,7 @@ function upload (files, opts = {}) { } const uppy = createUppy(opts, { - allowMultipleUploads: false + allowMultipleUploads: false, }) addTransloaditPlugin(uppy, opts) @@ -18,7 +18,7 @@ function upload (files, opts = {}) { data: file, type: file.type, name: file.name, - meta: file.meta || {} + meta: file.meta || {}, }) }) diff --git a/packages/@uppy/screen-capture/src/CaptureScreen.js b/packages/@uppy/screen-capture/src/CaptureScreen.js index 5d37da5ac..c0921d582 100644 --- a/packages/@uppy/screen-capture/src/CaptureScreen.js +++ b/packages/@uppy/screen-capture/src/CaptureScreen.js @@ -13,7 +13,7 @@ class RecorderScreen extends Component { const { recording, stream: videoStream, recordedVideo } = this.props const videoProps = { - playsinline: true + playsinline: true, } // show stream @@ -36,14 +36,14 @@ class RecorderScreen extends Component { } return ( -
    -
    +
    +
    -
    -
    +
    diff --git a/packages/@uppy/screen-capture/src/RecordButton.js b/packages/@uppy/screen-capture/src/RecordButton.js index 58c319798..d21a49372 100644 --- a/packages/@uppy/screen-capture/src/RecordButton.js +++ b/packages/@uppy/screen-capture/src/RecordButton.js @@ -7,14 +7,14 @@ module.exports = function RecordButton ({ recording, onStartRecording, onStopRec if (recording) { return ( @@ -23,14 +23,14 @@ module.exports = function RecordButton ({ recording, onStartRecording, onStopRec return ( diff --git a/packages/@uppy/screen-capture/src/ScreenRecIcon.js b/packages/@uppy/screen-capture/src/ScreenRecIcon.js index 818367d3b..bd36daaa3 100644 --- a/packages/@uppy/screen-capture/src/ScreenRecIcon.js +++ b/packages/@uppy/screen-capture/src/ScreenRecIcon.js @@ -3,9 +3,9 @@ const { h } = require('preact') module.exports = () => { return ( diff --git a/packages/@uppy/screen-capture/src/StopWatch.js b/packages/@uppy/screen-capture/src/StopWatch.js index f043d514c..36e9963c7 100644 --- a/packages/@uppy/screen-capture/src/StopWatch.js +++ b/packages/@uppy/screen-capture/src/StopWatch.js @@ -8,7 +8,7 @@ class Stopwatch extends Component { this.wrapperStyle = { width: '100%', height: '100%', - display: 'flex' + display: 'flex', } this.overlayStyle = { @@ -16,7 +16,7 @@ class Stopwatch extends Component { width: '100%', height: '100%', background: 'black', - opacity: 0.7 + opacity: 0.7, } this.infoContainerStyle = { @@ -25,14 +25,14 @@ class Stopwatch extends Component { marginTop: 'auto', marginBottom: 'auto', zIndex: 1, - color: 'white' + color: 'white', } this.infotextStyle = { marginLeft: 'auto', marginRight: 'auto', marginBottom: '1rem', - fontSize: '1.5rem' + fontSize: '1.5rem', } this.timeStyle = { @@ -41,7 +41,7 @@ class Stopwatch extends Component { marginLeft: 'auto', marginRight: 'auto', fontSize: '3rem', - fontFamily: 'Courier New' + fontFamily: 'Courier New', } } @@ -96,9 +96,8 @@ class Stopwatch extends Component {
    ) - } else { - return null } + return null } } diff --git a/packages/@uppy/screen-capture/src/StreamStatus.js b/packages/@uppy/screen-capture/src/StreamStatus.js index f41c7f871..e1f3542c6 100644 --- a/packages/@uppy/screen-capture/src/StreamStatus.js +++ b/packages/@uppy/screen-capture/src/StreamStatus.js @@ -3,11 +3,22 @@ const { h } = require('preact') module.exports = ({ streamActive, i18n }) => { if (streamActive) { return ( -
    - ) - } else { - return ( -
    +
    + +
    ) } + return ( +
    + +
    + ) } diff --git a/packages/@uppy/screen-capture/src/SubmitButton.js b/packages/@uppy/screen-capture/src/SubmitButton.js index ff078fada..e0523eac2 100644 --- a/packages/@uppy/screen-capture/src/SubmitButton.js +++ b/packages/@uppy/screen-capture/src/SubmitButton.js @@ -7,20 +7,19 @@ module.exports = function SubmitButton ({ recording, recordedVideo, onSubmit, i1 if (recordedVideo && !recording) { return ( ) - } else { - return null } + return null } diff --git a/packages/@uppy/screen-capture/src/index.js b/packages/@uppy/screen-capture/src/index.js index 1e31f0fa9..5bb4df1d3 100644 --- a/packages/@uppy/screen-capture/src/index.js +++ b/packages/@uppy/screen-capture/src/index.js @@ -44,8 +44,8 @@ module.exports = class ScreenCapture extends Plugin { streamActive: 'Stream active', streamPassive: 'Stream passive', micDisabled: 'Microphone access denied by user', - recording: 'Recording' - } + recording: 'Recording', + }, } // set default options @@ -58,17 +58,17 @@ module.exports = class ScreenCapture extends Plugin { height: 720, frameRate: { ideal: 3, - max: 5 + max: 5, }, cursor: 'motion', - displaySurface: 'monitor' - } + displaySurface: 'monitor', + }, }, // https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamConstraints/audio userMediaConstraints: { - audio: true + audio: true, }, - preferredVideoMimeType: 'video/webm' + preferredVideoMimeType: 'video/webm', } // merge default options with the ones set by user @@ -106,7 +106,7 @@ module.exports = class ScreenCapture extends Plugin { this.setPluginState({ streamActive: false, - audioStreamActive: false + audioStreamActive: false, }) const target = this.opts.target @@ -164,14 +164,14 @@ module.exports = class ScreenCapture extends Plugin { }) this.setPluginState({ - streamActive: true + streamActive: true, }) return videoStream }) .catch((err) => { this.setPluginState({ - screenRecError: err + screenRecError: err, }) this.userDenied = true @@ -197,7 +197,7 @@ module.exports = class ScreenCapture extends Plugin { this.audioStream = audioStream this.setPluginState({ - audioStreamActive: true + audioStreamActive: true, }) return audioStream @@ -251,7 +251,7 @@ module.exports = class ScreenCapture extends Plugin { // set plugin state to recording this.setPluginState({ - recording: true + recording: true, }) }) .catch((err) => { @@ -279,7 +279,7 @@ module.exports = class ScreenCapture extends Plugin { this.audioStream = null this.setPluginState({ - streamActive: false, audioStreamActive: false + streamActive: false, audioStreamActive: false, }) } @@ -295,7 +295,7 @@ module.exports = class ScreenCapture extends Plugin { return stopped.then(() => { // recording stopped this.setPluginState({ - recording: false + recording: false, }) // get video file after recorder stopped return this.getVideo() @@ -306,7 +306,7 @@ module.exports = class ScreenCapture extends Plugin { // create object url for capture result preview this.setPluginState({ // eslint-disable-next-line compat/compat - recordedVideo: URL.createObjectURL(file.data) + recordedVideo: URL.createObjectURL(file.data), }) }).then(() => { this.recordingChunks = null @@ -368,7 +368,7 @@ module.exports = class ScreenCapture extends Plugin { // remove preview video this.setPluginState({ - recordedVideo: null + recordedVideo: null, }) this.captureActive = false @@ -386,9 +386,9 @@ module.exports = class ScreenCapture extends Plugin { const blob = new Blob(this.recordingChunks, { type: mimeType }) const file = { source: this.id, - name: name, + name, data: new Blob([blob], { type: mimeType }), - type: mimeType + type: mimeType, } return Promise.resolve(file) diff --git a/packages/@uppy/status-bar/src/StatusBar.js b/packages/@uppy/status-bar/src/StatusBar.js index 4bd9e53e9..e0d58777c 100644 --- a/packages/@uppy/status-bar/src/StatusBar.js +++ b/packages/@uppy/status-bar/src/StatusBar.js @@ -31,7 +31,7 @@ function calculateProcessingProgress (files) { return { mode, message, - value + value, } } @@ -62,7 +62,7 @@ module.exports = (props) => { hideUploadButton, hidePauseResumeButton, hideCancelButton, - hideRetryButton + hideRetryButton, } = props const uploadState = props.uploadState @@ -94,25 +94,25 @@ module.exports = (props) => { } const width = typeof progressValue === 'number' ? progressValue : 100 - const isHidden = (uploadState === statusBarStates.STATE_WAITING && props.hideUploadButton) || - (uploadState === statusBarStates.STATE_WAITING && !props.newFiles > 0) || - (uploadState === statusBarStates.STATE_COMPLETE && props.hideAfterFinish) + const isHidden = (uploadState === statusBarStates.STATE_WAITING && props.hideUploadButton) + || (uploadState === statusBarStates.STATE_WAITING && !props.newFiles > 0) + || (uploadState === statusBarStates.STATE_COMPLETE && props.hideAfterFinish) - const showUploadBtn = !error && newFiles && - !isUploadInProgress && !isAllPaused && - allowNewUpload && !hideUploadButton - const showCancelBtn = !hideCancelButton && - uploadState !== statusBarStates.STATE_WAITING && - uploadState !== statusBarStates.STATE_COMPLETE - const showPauseResumeBtn = resumableUploads && !hidePauseResumeButton && - uploadState === statusBarStates.STATE_UPLOADING + const showUploadBtn = !error && newFiles + && !isUploadInProgress && !isAllPaused + && allowNewUpload && !hideUploadButton + const showCancelBtn = !hideCancelButton + && uploadState !== statusBarStates.STATE_WAITING + && uploadState !== statusBarStates.STATE_COMPLETE + const showPauseResumeBtn = resumableUploads && !hidePauseResumeButton + && uploadState === statusBarStates.STATE_UPLOADING const showRetryBtn = error && !hideRetryButton const showDoneBtn = props.doneButtonHandler && uploadState === statusBarStates.STATE_COMPLETE const progressClassNames = `uppy-StatusBar-progress - ${progressMode ? 'is-' + progressMode : ''}` + ${progressMode ? `is-${progressMode}` : ''}` const statusBarClassNames = classNames( { 'uppy-Root': props.isTargetDOMEl }, @@ -121,17 +121,17 @@ module.exports = (props) => { ) return ( -
    +
    {progressBarContent} -
    +
    {showUploadBtn ? : null} {showRetryBtn ? : null} {showPauseResumeBtn ? : null} @@ -154,9 +154,9 @@ const UploadBtn = (props) => { return ( @@ -354,10 +354,10 @@ const ProgressBarUploading = (props) => { const showUploadNewlyAddedFiles = props.newFiles && props.isUploadStarted return ( -
    +
    {!props.isAllPaused ? : null} -
    -
    +
    +
    {props.supportsUploadProgress ? `${title}: ${props.totalProgress}%` : title}
    {!props.isAllPaused && !showUploadNewlyAddedFiles && props.showProgressDetails @@ -371,10 +371,10 @@ const ProgressBarUploading = (props) => { const ProgressBarComplete = ({ totalProgress, i18n }) => { return ( -
    -
    -
    -
    +
    +
    + {i18n('complete')} @@ -391,22 +391,22 @@ const ProgressBarError = ({ error, retryAll, hideRetryButton, i18n }) => { } return ( -