From caa6e949a9dceb81ffb6f09ad8acb843e8d3822b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Fri, 4 Oct 2019 11:18:17 +0200 Subject: [PATCH 01/15] Update eslint dependencies. --- package-lock.json | 841 +++++++++++++++++++++++++++------------------- package.json | 18 +- 2 files changed, 496 insertions(+), 363 deletions(-) diff --git a/package-lock.json b/package-lock.json index a16e3fbdb2..91d9bbffa5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5638,6 +5638,12 @@ "@types/istanbul-lib-report": "*" } }, + "@types/json-schema": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.3.tgz", + "integrity": "sha512-Il2DtDVRGDcqjDtE+rF8iqg1CArehSK84HZJCT7AMITlyXRBpuPhqGLDQMowraqqu1coEaimg4ZOqggt6L6L+A==", + "dev": true + }, "@types/jsonwebtoken": { "version": "7.2.8", "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-7.2.8.tgz", @@ -5836,6 +5842,47 @@ "integrity": "sha512-SOhuU4wNBxhhTHxYaiG5NY4HBhDIDnJF60GU+2LqHAdKKer86//e4yg69aENCtQ04n0ovz+tq2YPME5t5yp4pw==", "dev": true }, + "@typescript-eslint/experimental-utils": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-1.13.0.tgz", + "integrity": "sha512-zmpS6SyqG4ZF64ffaJ6uah6tWWWgZ8m+c54XXgwFtUv0jNz8aJAVx8chMCvnk7yl6xwn8d+d96+tWp7fXzTuDg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/typescript-estree": "1.13.0", + "eslint-scope": "^4.0.0" + }, + "dependencies": { + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + } + } + }, + "@typescript-eslint/typescript-estree": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.13.0.tgz", + "integrity": "sha512-b5rCmd2e6DCC6tCTN9GSUAuxdYwCM/k/2wdjHGrIRGPSJotWMCe/dGpi66u42bhuh8q3QBzqM4TMA1GUUCJvdw==", + "dev": true, + "requires": { + "lodash.unescape": "4.0.1", + "semver": "5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + } + } + }, "@uppy-example/aws-companion": { "version": "file:examples/aws-companion", "requires": { @@ -7500,9 +7547,9 @@ } }, "acorn-jsx": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", - "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.2.tgz", + "integrity": "sha512-tiNTrP1MP0QrChmD2DdupCr6HWSFeKVw5d/dHTu4Y7rkAkRhU/Dt7dphAfIUyxtHpl/eBVip5uTNSpQJHylpAw==", "dev": true }, "acorn-node": { @@ -7572,6 +7619,24 @@ "humanize-ms": "^1.2.1" } }, + "aggregate-error": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz", + "integrity": "sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==", + "dev": true, + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "dependencies": { + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + } + } + }, "airbnb-prop-types": { "version": "2.13.2", "resolved": "https://registry.npmjs.org/airbnb-prop-types/-/airbnb-prop-types-2.13.2.tgz", @@ -10811,6 +10876,12 @@ "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==" }, + "clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true + }, "cli-boxes": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", @@ -12714,38 +12785,170 @@ "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=" }, "del": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", - "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/del/-/del-5.1.0.tgz", + "integrity": "sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA==", "dev": true, "requires": { - "globby": "^6.1.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "p-map": "^1.1.1", - "pify": "^3.0.0", - "rimraf": "^2.2.8" + "globby": "^10.0.1", + "graceful-fs": "^4.2.2", + "is-glob": "^4.0.1", + "is-path-cwd": "^2.2.0", + "is-path-inside": "^3.0.1", + "p-map": "^3.0.0", + "rimraf": "^3.0.0", + "slash": "^3.0.0" }, "dependencies": { + "@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 + }, + "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==", + "dev": true + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.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==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, + "fast-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.0.4.tgz", + "integrity": "sha512-wkIbV6qg37xTJwqSsdnIphL1e+LaGz4AIQqr00mIubMaEhv1/HEmJ0uuCGZRNRUkZZmOB5mJKO0ZUTVq+SxMQg==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.1", + "@nodelib/fs.walk": "^1.2.1", + "glob-parent": "^5.0.0", + "is-glob": "^4.0.1", + "merge2": "^1.2.3", + "micromatch": "^4.0.2" + } + }, + "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==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "glob-parent": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", + "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.1.tgz", + "integrity": "sha512-sSs4inE1FB2YQiymcmTv6NWENryABjUNPeWhOvmn4SjtKybglsyPZxFB3U1/+L1bYi0rNZDqCLlHyLYDl1Pq5A==", "dev": true, "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } + "@types/glob": "^7.1.1", + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.0.3", + "glob": "^7.1.3", + "ignore": "^5.1.1", + "merge2": "^1.2.3", + "slash": "^3.0.0" + } + }, + "graceful-fs": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.2.tgz", + "integrity": "sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q==", + "dev": true + }, + "ignore": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", + "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-path-inside": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz", + "integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==", + "dev": true + }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, + "p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, + "rimraf": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.0.tgz", + "integrity": "sha512-NDGVxTsjqfunkds7CqsOiEnxln4Bo7Nddl3XhS4pXg5OzwkLqJ971ZVAAnB+DDLnF76N+VnDEiBHaVV8I06SUg==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "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==", + "dev": true, + "requires": { + "is-number": "^7.0.0" } } } @@ -13698,9 +13901,9 @@ } }, "eslint": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.1.0.tgz", - "integrity": "sha512-QhrbdRD7ofuV09IuE2ySWBz0FyXCq0rriLTZXZqaWSI79CVtHVRdkFuFTViiqzZhkCgfOh9USpriuGN2gIpZDQ==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.5.1.tgz", + "integrity": "sha512-32h99BoLYStT1iq1v2P9uwpyznQ4M2jRiFB6acitKz52Gqn+vPaMDUTB1bYi1WN4Nquj2w+t+bimYUG83DC55A==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -13710,9 +13913,9 @@ "debug": "^4.0.1", "doctrine": "^3.0.0", "eslint-scope": "^5.0.0", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^6.0.0", + "eslint-utils": "^1.4.2", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.1.1", "esquery": "^1.0.1", "esutils": "^2.0.2", "file-entry-cache": "^5.0.1", @@ -13742,15 +13945,6 @@ "v8-compile-cache": "^2.0.3" }, "dependencies": { - "ansi-escapes": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.2.1.tgz", - "integrity": "sha512-Cg3ymMAdN10wOk/VYfLV7KCQyv7EDirJ64500sU7n9UlmioEtDuU5Gd+hj73hXSU/ex7tHJSssmyftDdkMLO8Q==", - "dev": true, - "requires": { - "type-fest": "^0.5.2" - } - }, "ansi-regex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", @@ -13763,21 +13957,6 @@ "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", "dev": true }, - "cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, - "requires": { - "restore-cursor": "^3.1.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==", - "dev": true - }, "eslint-scope": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", @@ -13788,6 +13967,12 @@ "estraverse": "^4.1.1" } }, + "eslint-visitor-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", + "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", + "dev": true + }, "external-editor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", @@ -13799,19 +13984,10 @@ "tmp": "^0.0.33" } }, - "figures": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.0.0.tgz", - "integrity": "sha512-HKri+WoWoUgr83pehn/SIgLOMZ9nAWC6dcGj26RY2R4F50u4+RTUz0RCrUlOV3nKRAICW1UGzyb+kcX2qK1S/g==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, "glob-parent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.0.0.tgz", - "integrity": "sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", + "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", "dev": true, "requires": { "is-glob": "^4.0.1" @@ -13828,59 +14004,24 @@ } }, "inquirer": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.1.tgz", - "integrity": "sha512-uxNHBeQhRXIoHWTSNYUFhQVrHYFThIt6IVo2fFmSe8aBwdR3/w6b58hJpiL/fMukFkvGzjg+hSxFtwvVmKZmXw==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", + "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", "dev": true, "requires": { - "ansi-escapes": "^4.2.1", + "ansi-escapes": "^3.2.0", "chalk": "^2.4.2", - "cli-cursor": "^3.1.0", + "cli-cursor": "^2.1.0", "cli-width": "^2.0.0", "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.15", - "mute-stream": "0.0.8", + "figures": "^2.0.0", + "lodash": "^4.17.12", + "mute-stream": "0.0.7", "run-async": "^2.2.0", "rxjs": "^6.4.0", - "string-width": "^4.1.0", + "string-width": "^2.1.0", "strip-ansi": "^5.1.0", "through": "^2.3.6" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - } - } - }, - "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==", - "dev": true - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", - "dev": true - }, - "onetime": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", - "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" } }, "resolve-from": { @@ -13889,20 +14030,10 @@ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, - "restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dev": true, - "requires": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - } - }, "rxjs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz", - "integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz", + "integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -13914,17 +14045,6 @@ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true }, - "string-width": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.1.0.tgz", - "integrity": "sha512-NrX+1dVVh+6Y9dnQ19pR0pP4FiEIlUvdTGn8pw6CKTNq5sgib2nIhmUNT5TAmhWmvKr3WcxBcP3E8nWezuipuQ==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^5.2.0" - } - }, "strip-ansi": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", @@ -13933,25 +14053,19 @@ "requires": { "ansi-regex": "^4.1.0" } - }, - "type-fest": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.5.2.tgz", - "integrity": "sha512-DWkS49EQKVX//Tbupb9TFa19c7+MK1XmzkrZUR8TAktmE/DizXoaoJV6TZ/tSIPXipqNiRI6CyAe7x69Jb6RSw==", - "dev": true } } }, "eslint-config-standard": { - "version": "13.0.1", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-13.0.1.tgz", - "integrity": "sha512-zLKp4QOgq6JFgRm1dDCVv1Iu0P5uZ4v5Wa4DTOkg2RFMxdCX/9Qf7lz9ezRj2dBRa955cWQF/O/LWEiYWAHbTw==", + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-14.1.0.tgz", + "integrity": "sha512-EF6XkrrGVbvv8hL/kYa/m6vnvmUT+K82pJJc4JJVMM6+Qgqh0pnwprSxdduDLB9p/7bIxD+YV5O0wfb8lmcPbA==", "dev": true }, "eslint-config-standard-jsx": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-7.0.0.tgz", - "integrity": "sha512-OiKOF3MFVmWOCVfsi8GHlVorOEiBsPzAnUhM3c6HML94O2krbdQ/eMABySHgHHOIBYRls9sR9I3lo6O0vXhVEg==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-8.1.0.tgz", + "integrity": "sha512-ULVC8qH8qCqbU792ZOO6DaiaZyHNS/5CZt3hKqHkEhVlhPEPN3nfBqqxJCyp59XrjIBZPu1chMYe9T2DXZ7TMw==", "dev": true }, "eslint-import-resolver-node": { @@ -13982,9 +14096,9 @@ } }, "eslint-module-utils": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.0.tgz", - "integrity": "sha512-14tltLm38Eu3zS+mt0KvILC3q8jyIAH518MlG+HO0p+yK885Lb1UHTY/UgR91eOyGdmxAPb+OLoW4znqIT6Ndw==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.1.tgz", + "integrity": "sha512-H6DOj+ejw7Tesdgbfs4jeS4YMFrT8uI8xwd1gtQqXssaR0EQ26L+2O/w6wkYFy2MymON0fTwHmXBvvfLNZVZEw==", "dev": true, "requires": { "debug": "^2.6.8", @@ -14062,19 +14176,27 @@ } }, "eslint-plugin-es": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-1.4.0.tgz", - "integrity": "sha512-XfFmgFdIUDgvaRAlaXUkxrRg5JSADoRC8IkKLc/cISeR3yHVMefFHQZpcyXXEUUPHfy5DwviBcrfqlyqEwlQVw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-2.0.0.tgz", + "integrity": "sha512-f6fceVtg27BR02EYnBhgWLFQfK6bN4Ll0nQFrBHOlCsAyxeZkn0NHns5O0YZOPrV1B3ramd6cgFwaoFLcSkwEQ==", "dev": true, "requires": { - "eslint-utils": "^1.3.0", - "regexpp": "^2.0.1" + "eslint-utils": "^1.4.2", + "regexpp": "^3.0.0" + }, + "dependencies": { + "regexpp": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.0.0.tgz", + "integrity": "sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g==", + "dev": true + } } }, "eslint-plugin-import": { - "version": "2.18.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.1.tgz", - "integrity": "sha512-YEESFKOcMIXJTosb5YaepqVhQHGMb8dxkgov560GqMDP/658U5vk6FeVSR7xXLeYkPc7xPYy+uAoiYE/bKMphA==", + "version": "2.18.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz", + "integrity": "sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==", "dev": true, "requires": { "array-includes": "^3.0.3", @@ -14124,10 +14246,13 @@ } }, "eslint-plugin-jest": { - "version": "22.11.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-22.11.1.tgz", - "integrity": "sha512-kPF1Nmr5xMLz6DT7qEttz0TTeyx1x6SozIkNO9y4F2yxuWjHMp/e70fo742pR3y0MewgXQQMIIXeSKLB66iO7Q==", - "dev": true + "version": "22.17.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-22.17.0.tgz", + "integrity": "sha512-WT4DP4RoGBhIQjv+5D0FM20fAdAUstfYAf/mkufLNTojsfgzc5/IYW22cIg/Q4QBavAZsROQlqppiWDpFZDS8Q==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "^1.13.0" + } }, "eslint-plugin-jsdoc": { "version": "15.5.3", @@ -14144,13 +14269,13 @@ } }, "eslint-plugin-node": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-9.1.0.tgz", - "integrity": "sha512-ZwQYGm6EoV2cfLpE1wxJWsfnKUIXfM/KM09/TlorkukgCAwmkgajEJnPCmyzoFPQQkmvo5DrW/nyKutNIw36Mw==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-10.0.0.tgz", + "integrity": "sha512-1CSyM/QCjs6PXaT18+zuAXsjXGIGo5Rw630rSKwokSs2jrYURQc4R5JZpoanNCqwNmepg+0eZ9L7YiRUJb8jiQ==", "dev": true, "requires": { - "eslint-plugin-es": "^1.4.0", - "eslint-utils": "^1.3.1", + "eslint-plugin-es": "^2.0.0", + "eslint-utils": "^1.4.2", "ignore": "^5.1.1", "minimatch": "^3.0.4", "resolve": "^1.10.1", @@ -14158,15 +14283,15 @@ }, "dependencies": { "ignore": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.2.tgz", - "integrity": "sha512-vdqWBp7MyzdmHkkRWV5nY+PfGRbYbahfuvsBCh277tq+w9zyNi7h5CYJCK0kmzti9kU+O/cB7sE8HvKv6aXAKQ==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", + "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", "dev": true }, "semver": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.2.0.tgz", - "integrity": "sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true } } @@ -14178,20 +14303,20 @@ "dev": true }, "eslint-plugin-react": { - "version": "7.14.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.14.2.tgz", - "integrity": "sha512-jZdnKe3ip7FQOdjxks9XPN0pjUKZYq48OggNMd16Sk+8VXx6JOvXmlElxROCgp7tiUsTsze3jd78s/9AFJP2mA==", + "version": "7.15.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.15.1.tgz", + "integrity": "sha512-YotSItgMPwLGlr3df44MGVyXnHkmKcpkHTzpte3QwJtocr3nFqCXCuoxFZeBtnT8RHdj038NlTvam3dcAFrMcA==", "dev": true, "requires": { "array-includes": "^3.0.3", "doctrine": "^2.1.0", "has": "^1.0.3", - "jsx-ast-utils": "^2.1.0", + "jsx-ast-utils": "^2.2.1", "object.entries": "^1.1.0", "object.fromentries": "^2.0.0", "object.values": "^1.1.0", "prop-types": "^15.7.2", - "resolve": "^1.10.1" + "resolve": "^1.12.0" }, "dependencies": { "doctrine": { @@ -14202,13 +14327,22 @@ "requires": { "esutils": "^2.0.2" } + }, + "resolve": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz", + "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } } } }, "eslint-plugin-standard": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.0.tgz", - "integrity": "sha512-OwxJkR6TQiYMmt1EsNRMe5qG3GsbjlcOhbGUBY4LtavF9DsLaTcoR+j2Tdjqi23oUwKNUqX7qcn5fPStafMdlA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.1.tgz", + "integrity": "sha512-v/KBnfyaOMPmZc/dmc6ozOdWqekGp7bBGq4jLAecEfPGmfKiWS4sA8sC0LqiV9w5qmXAtXVn4M3p1jSyhY85SQ==", "dev": true }, "eslint-scope": { @@ -14237,20 +14371,26 @@ "dev": true }, "espree": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.0.0.tgz", - "integrity": "sha512-lJvCS6YbCn3ImT3yKkPe0+tJ+mH6ljhGNjHQH9mRtiO6gjhVAOhVXW1yjnwqGwTkK3bGbye+hb00nFNmu0l/1Q==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.1.tgz", + "integrity": "sha512-EYbr8XZUhWbYCqQRW0duU5LxzL5bETN6AjKBGy1302qqzPaCH10QbRg3Wvco79Z8x9WbiE8HYB4e75xl6qUYvQ==", "dev": true, "requires": { - "acorn": "^6.0.7", - "acorn-jsx": "^5.0.0", - "eslint-visitor-keys": "^1.0.0" + "acorn": "^7.0.0", + "acorn-jsx": "^5.0.2", + "eslint-visitor-keys": "^1.1.0" }, "dependencies": { "acorn": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz", - "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", + "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", + "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", "dev": true } } @@ -15835,12 +15975,6 @@ "readable-stream": "^2.3.6" } }, - "fn-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fn-name/-/fn-name-2.0.1.tgz", - "integrity": "sha1-UhTXU3pNBqSjAcDMJi/rhBiAAuc=", - "dev": true - }, "follow-redirects": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.9.0.tgz", @@ -16498,17 +16632,6 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, - "g-status": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/g-status/-/g-status-2.0.2.tgz", - "integrity": "sha512-kQoE9qH+T1AHKgSSD0Hkv98bobE90ILQcXAF4wvGgsr7uFqNvwmh8j+Lq3l0RVt3E3HjSbv2B9biEGcEtpHLCA==", - "dev": true, - "requires": { - "arrify": "^1.0.1", - "matcher": "^1.0.0", - "simple-git": "^1.85.0" - } - }, "garnish": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/garnish/-/garnish-5.2.0.tgz", @@ -19039,20 +19162,11 @@ } }, "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", + "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", "dev": true }, - "is-path-in-cwd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", - "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", - "dev": true, - "requires": { - "is-path-inside": "^1.0.0" - } - }, "is-path-inside": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", @@ -21190,44 +21304,34 @@ "dev": true }, "lint-staged": { - "version": "8.2.1", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-8.2.1.tgz", - "integrity": "sha512-n0tDGR/rTCgQNwXnUf/eWIpPNddGWxC32ANTNYsj2k02iZb7Cz5ox2tytwBu+2r0zDXMEMKw7Y9OD/qsav561A==", + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-9.4.1.tgz", + "integrity": "sha512-zFRbo1bAJEVf1m33paTTjDVfy2v3lICCqHfmQSgNoI+lWpi7HPG5y/R2Y7Whdce+FKxlZYs/U1sDSx8+nmQdDA==", "dev": true, "requires": { - "chalk": "^2.3.1", - "commander": "^2.14.1", - "cosmiconfig": "^5.2.0", - "debug": "^3.1.0", + "chalk": "^2.4.2", + "commander": "^2.20.0", + "cosmiconfig": "^5.2.1", + "debug": "^4.1.1", "dedent": "^0.7.0", - "del": "^3.0.0", - "execa": "^1.0.0", - "g-status": "^2.0.2", - "is-glob": "^4.0.0", - "is-windows": "^1.0.2", - "listr": "^0.14.2", - "listr-update-renderer": "^0.5.0", - "lodash": "^4.17.11", - "log-symbols": "^2.2.0", - "micromatch": "^3.1.8", - "npm-which": "^3.0.1", - "p-map": "^1.1.1", - "path-is-inside": "^1.0.2", - "pify": "^3.0.0", - "please-upgrade-node": "^3.0.2", - "staged-git-files": "1.1.2", - "string-argv": "^0.0.2", - "stringify-object": "^3.2.2", - "yup": "^0.27.0" + "del": "^5.0.0", + "execa": "^2.0.3", + "listr": "^0.14.3", + "log-symbols": "^3.0.0", + "micromatch": "^4.0.2", + "normalize-path": "^3.0.0", + "please-upgrade-node": "^3.1.1", + "string-argv": "^0.3.0", + "stringify-object": "^3.3.0" }, "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "requires": { - "ms": "^2.1.1" + "fill-range": "^7.0.1" } }, "dedent": { @@ -21237,28 +21341,121 @@ "dev": true }, "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/execa/-/execa-2.0.5.tgz", + "integrity": "sha512-SwmwZZyJjflcqLSgllk4EQlMLst2p9muyzwNugKGFlpAz6rZ7M+s2nBR97GAq4Vzjwx2y9rcMcmqzojwN+xwNA==", "dev": true, "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "cross-spawn": "^6.0.5", + "get-stream": "^5.0.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^3.0.0", + "onetime": "^5.1.0", + "p-finally": "^2.0.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + } + }, + "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==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" } }, "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", + "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", "dev": true, "requires": { "pump": "^3.0.0" } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true + }, + "log-symbols": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "dev": true, + "requires": { + "chalk": "^2.4.2" + } + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "npm-run-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-3.1.0.tgz", + "integrity": "sha512-Dbl4A/VfiVGLgQv29URL9xshU8XDY1GeLy+fsaZ1AA8JDSfjvr5P5+pzRbWqRSBxk6/DW7MIh8lTM/PaGnP2kg==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "onetime": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", + "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "p-finally": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-2.0.1.tgz", + "integrity": "sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==", + "dev": true + }, + "path-key": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.0.tgz", + "integrity": "sha512-8cChqz0RP6SHJkMt48FW0A7+qUOn+OsnOsVtzI59tZ8m+5bCSk7hzwET0pulwOM2YMn9J1efb07KB9l9f30SGg==", + "dev": true + }, + "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==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } } } }, @@ -21286,9 +21483,9 @@ "dev": true }, "rxjs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz", - "integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz", + "integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -21945,6 +22142,12 @@ "integrity": "sha1-JMS/zWsvuji/0FlNsRedjptlZWE=", "dev": true }, + "lodash.unescape": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", + "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=", + "dev": true + }, "lodash.union": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", @@ -22298,15 +22501,6 @@ "resolved": "https://registry.npmjs.org/marked/-/marked-0.6.3.tgz", "integrity": "sha512-Fqa7eq+UaxfMriqzYLayfqAE40WN03jf+zHjT18/uXNuzjq3TY0XTbrAoPeqSJrAmPz11VuUA+kBPYOhHt9oOQ==" }, - "matcher": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/matcher/-/matcher-1.1.1.tgz", - "integrity": "sha512-+BmqxWIubKTRKNWx/ahnCkk3mG8m7OturVlqq6HiojGJTd5hVYbgZm6WzcYPCoB+KBT4Vd6R7WSRG2OADNaCjg==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.4" - } - }, "math-random": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz", @@ -24333,15 +24527,6 @@ "npm-bundled": "^1.0.1" } }, - "npm-path": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/npm-path/-/npm-path-2.0.4.tgz", - "integrity": "sha512-IFsj0R9C7ZdR5cP+ET342q77uSRdtWOlWpih5eC+lu29tIDbNEgDbzgVJ5UFvYHWhxDZ5TFkJafFioO0pPQjCw==", - "dev": true, - "requires": { - "which": "^1.2.10" - } - }, "npm-pick-manifest": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-2.2.3.tgz", @@ -24439,17 +24624,6 @@ "path-key": "^2.0.0" } }, - "npm-which": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/npm-which/-/npm-which-3.0.1.tgz", - "integrity": "sha1-kiXybsOihcIJyuZ8OxGmtKtxQKo=", - "dev": true, - "requires": { - "commander": "^2.9.0", - "npm-path": "^2.0.2", - "which": "^1.2.10" - } - }, "npmlog": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-2.0.4.tgz", @@ -25831,9 +26005,9 @@ "integrity": "sha1-bw+xftqqSPIUQrOpdcBjEw8cPr0=" }, "please-upgrade-node": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.1.1.tgz", - "integrity": "sha512-KY1uHnQ2NlQHqIJQpnh/i54rKkuxCEBx+voJIS/Mvb+L2iYd2NMotwduhKTMjfC1uKoX3VXOxLjIYG66dfJTVQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", + "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", "dev": true, "requires": { "semver-compare": "^1.0.0" @@ -26782,12 +26956,6 @@ "retry": "^0.10.0" } }, - "property-expr": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/property-expr/-/property-expr-1.5.1.tgz", - "integrity": "sha512-CGuc0VUTGthpJXL36ydB6jnbyOf/rAHFvmVrJlH+Rg0DqqLFQGAP6hIaxD/G0OAmBJPhXDHuEJigrp0e0wFV6g==", - "dev": true - }, "proto-list": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", @@ -28928,15 +29096,6 @@ "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=" }, - "simple-git": { - "version": "1.121.0", - "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-1.121.0.tgz", - "integrity": "sha512-LyYri/nuAX8+cx9nZw38mWO6oHNi//CmiPlkBL7aVjZIsdldve7eeDwXu9L4wP/74MpNHucXkXc/BOuIQShhPg==", - "dev": true, - "requires": { - "debug": "^4.0.1" - } - }, "simple-html-index": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/simple-html-index/-/simple-html-index-1.5.0.tgz", @@ -29870,12 +30029,6 @@ "type-fest": "^0.3.0" } }, - "staged-git-files": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/staged-git-files/-/staged-git-files-1.1.2.tgz", - "integrity": "sha512-0Eyrk6uXW6tg9PYkhi/V/J4zHp33aNyi2hOCmhFLqLTIhbgqWn5jlSzI+IU0VqrZq6+DbHcabQl/WP6P3BG0QA==", - "dev": true - }, "static-eval": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.0.2.tgz", @@ -30041,9 +30194,9 @@ "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" }, "string-argv": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.0.2.tgz", - "integrity": "sha1-2sMECGkMIfPDYwo/86BYd73L1zY=", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", + "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", "dev": true }, "string-at": { @@ -30215,6 +30368,12 @@ "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, "strip-indent": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", @@ -30462,12 +30621,6 @@ "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" }, - "synchronous-promise": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/synchronous-promise/-/synchronous-promise-2.0.9.tgz", - "integrity": "sha512-LO95GIW16x69LuND1nuuwM4pjgFGupg7pZ/4lU86AmchPKrhk0o2tpMU2unXRrqo81iAFe1YJ0nAGEVwsrZAgg==", - "dev": true - }, "syntax-error": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", @@ -30477,9 +30630,9 @@ } }, "table": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.5.tgz", - "integrity": "sha512-oGa2Hl7CQjfoaogtrOHEJroOcYILTx7BZWLGsJIlzoWmB2zmguhNfPJZsWPKYek/MgCxfco54gEi31d1uN2hFA==", + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", "dev": true, "requires": { "ajv": "^6.10.2", @@ -31079,12 +31232,6 @@ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" }, - "toposort": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/toposort/-/toposort-2.0.2.tgz", - "integrity": "sha1-riF2gXXRVZ1IvvNUILL0li8JwzA=", - "dev": true - }, "touch": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", @@ -33472,20 +33619,6 @@ "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=" }, - "yup": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/yup/-/yup-0.27.0.tgz", - "integrity": "sha512-v1yFnE4+u9za42gG/b/081E7uNW9mUj3qtkmelLbW5YPROZzSH/KUUyJu9Wt8vxFJcT9otL/eZopS0YK1L5yPQ==", - "dev": true, - "requires": { - "@babel/runtime": "^7.0.0", - "fn-name": "~2.0.1", - "lodash": "^4.17.11", - "property-expr": "^1.5.0", - "synchronous-promise": "^2.0.6", - "toposort": "^2.0.2" - } - }, "zip-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-2.0.1.tgz", diff --git a/package.json b/package.json index 1a6f6bd859..13ef86b926 100644 --- a/package.json +++ b/package.json @@ -120,17 +120,17 @@ "enzyme": "^3.9.0", "enzyme-adapter-react-16": "^1.11.2", "es6-promise": "4.2.5", - "eslint": "^6.1.0", - "eslint-config-standard": "^13.0.1", - "eslint-config-standard-jsx": "^7.0.0", + "eslint": "^6.5.1", + "eslint-config-standard": "^14.1.0", + "eslint-config-standard-jsx": "^8.1.0", "eslint-plugin-compat": "^3.3.0", - "eslint-plugin-import": "^2.18.1", - "eslint-plugin-jest": "^22.11.1", + "eslint-plugin-import": "^2.18.2", + "eslint-plugin-jest": "^22.17.0", "eslint-plugin-jsdoc": "^15.5.3", - "eslint-plugin-node": "^9.1.0", + "eslint-plugin-node": "^10.0.0", "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-react": "^7.14.2", - "eslint-plugin-standard": "^4.0.0", + "eslint-plugin-react": "^7.15.1", + "eslint-plugin-standard": "^4.0.1", "events.once": "^2.0.2", "exorcist": "^1.0.1", "express": "4.17.1", @@ -146,7 +146,7 @@ "json3": "^3.3.2", "last-commit-message": "^1.0.0", "lerna": "^3.14.1", - "lint-staged": "^8.1.7", + "lint-staged": "^9.4.1", "mime-types": "2.1.24", "minify-stream": "^1.2.0", "mkdirp": "0.5.1", From 8d1689cffe2d2209c03d15b8a4dbd45a8f201468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Fri, 4 Oct 2019 11:21:25 +0200 Subject: [PATCH 02/15] standard --fix --- bin/locale-packs.js | 16 ++--- examples/react-native-expo/App.js | 21 ++++-- examples/react-native-expo/FileList.js | 9 +-- .../react-native-expo/PauseResumeButton.js | 7 +- examples/react-native-expo/ProgressBar.js | 9 ++- .../react-native-expo/SelectFilesButton.js | 3 +- .../aws-s3-multipart/src/MultipartUploader.js | 4 +- .../@uppy/companion/src/server/Uploader.js | 2 +- .../src/server/provider/instagram/adapter.js | 4 +- .../@uppy/companion/src/standalone/index.js | 4 +- .../companion/test/__tests__/companion.js | 2 +- packages/@uppy/companion/test/mockserver.js | 3 +- packages/@uppy/core/src/index.js | 4 +- packages/@uppy/core/src/index.test.js | 2 +- .../dashboard/src/components/AddFiles.js | 46 +++++++----- .../dashboard/src/components/AddFilesPanel.js | 13 ++-- .../dashboard/src/components/Dashboard.js | 28 +++++--- .../src/components/FileCard/index.js | 33 ++++++--- .../src/components/FileItem/Buttons/index.js | 53 +++++++------- .../src/components/FileItem/FileInfo/index.js | 20 +++--- .../FileItem/FilePreviewAndLink/index.js | 14 ++-- .../FileProgress/PauseResumeCancelIcon.js | 17 ++--- .../components/FileItem/FileProgress/index.js | 3 +- .../dashboard/src/components/FileList.js | 3 +- .../src/components/PickerPanelContent.js | 13 ++-- .../src/components/PickerPanelTopBar.js | 4 +- .../dashboard/src/utils/createSuperFocus.js | 2 +- packages/@uppy/drag-drop/src/index.js | 6 +- packages/@uppy/facebook/src/index.js | 18 +++-- packages/@uppy/file-input/src/index.js | 15 ++-- packages/@uppy/informer/src/index.js | 11 +-- .../@uppy/provider-views/src/Breadcrumbs.js | 3 +- packages/@uppy/provider-views/src/Browser.js | 2 +- packages/@uppy/provider-views/src/Filter.js | 11 +-- packages/@uppy/provider-views/src/ItemList.js | 6 +- packages/@uppy/provider-views/src/index.js | 3 +- .../@uppy/react-native/file-picker/index.js | 21 +++--- .../react-native/file-picker/instagram.js | 3 +- .../@uppy/react-native/file-picker/url.js | 9 ++- packages/@uppy/status-bar/src/StatusBar.js | 70 +++++++++++-------- packages/@uppy/tus/src/index.js | 3 +- packages/@uppy/url/src/UrlUI.js | 6 +- packages/@uppy/url/src/index.js | 3 +- packages/@uppy/webcam/src/RecordButton.js | 12 ++-- packages/@uppy/webcam/src/SnapshotButton.js | 6 +- packages/@uppy/webcam/src/index.js | 6 +- test/endtoend/transloadit/test.js | 2 +- test/endtoend/utils.js | 2 +- website/inject.js | 10 +-- website/scripts/highlight.js | 2 +- 50 files changed, 337 insertions(+), 232 deletions(-) diff --git a/bin/locale-packs.js b/bin/locale-packs.js index ec6a765288..68529f90e3 100644 --- a/bin/locale-packs.js +++ b/bin/locale-packs.js @@ -18,7 +18,7 @@ if (mode === 'build') { } else if (mode === 'test') { test() } else { - throw new Error(`First argument must be either 'build' or 'test'`) + throw new Error('First argument must be either \'build\' or \'test\'') } function getSources (pluginName) { @@ -49,7 +49,7 @@ function buildPluginsList () { const packagesGlobPath = path.join(__dirname, '..', 'packages', '@uppy', '*', 'package.json') const files = glob.sync(packagesGlobPath) - console.log(`--> Checked plugins could be instantiated and have defaultLocale in them:\n`) + console.log('--> Checked plugins could be instantiated and have defaultLocale in them:\n') for (const file of files) { const dirName = path.dirname(file) const pluginName = path.basename(dirName) @@ -115,7 +115,7 @@ function buildPluginsList () { } } - console.log(``) + console.log('') return { plugins, sources } } @@ -221,19 +221,19 @@ function test () { } if (warnings.length) { - console.error(`--> Locale warnings: `) + console.error('--> Locale warnings: ') console.error(warnings.join('\n')) - console.error(``) + console.error('') } if (fatals.length) { - console.error(`--> Locale fatal warnings: `) + console.error('--> Locale fatal warnings: ') console.error(fatals.join('\n')) - console.error(``) + console.error('') process.exit(1) } if (!warnings.length && !fatals.length) { console.log(`--> All locale strings have matching keys ${chalk.green(': )')}`) - console.log(``) + console.log('') } } diff --git a/examples/react-native-expo/App.js b/examples/react-native-expo/App.js index 7247bfd95c..c4145b033a 100644 --- a/examples/react-native-expo/App.js +++ b/examples/react-native-expo/App.js @@ -119,12 +119,15 @@ export default class App extends React.Component { paddingLeft: 50, paddingRight: 50, flex: 1 - }}> + }} + > Uppy in React Native + }} + >Uppy in React Native + {this.state.info.message} - : null - } + color: '#b8006b' + }} + >{this.state.info.message} + + : null} @@ -147,13 +152,15 @@ export default class App extends React.Component { isPaused={this.state.isPaused} onPress={this.togglePauseResume} uploadStarted={this.state.uploadStarted} - uploadComplete={this.state.uploadComplete} /> + uploadComplete={this.state.uploadComplete} + /> + companionUrl="http://localhost:3020" + /> diff --git a/examples/react-native-expo/FileList.js b/examples/react-native-expo/FileList.js index b8c45237e5..af372f6a2b 100644 --- a/examples/react-native-expo/FileList.js +++ b/examples/react-native-expo/FileList.js @@ -34,7 +34,8 @@ function UppyDashboardFileIcon (props) { + }} + > - : - } + source={{ uri: item.data.uri }} + /> + : } {truncateString(item.name, 20)} {item.type} diff --git a/examples/react-native-expo/PauseResumeButton.js b/examples/react-native-expo/PauseResumeButton.js index f8c860465f..d8dc23a988 100644 --- a/examples/react-native-expo/PauseResumeButton.js +++ b/examples/react-native-expo/PauseResumeButton.js @@ -9,9 +9,12 @@ export default function PauseResumeButton (props) { return ( + style={styles.button} + > {props.isPaused ? 'Resume' : 'Pause'} + style={styles.text} + >{props.isPaused ? 'Resume' : 'Pause'} + ) } diff --git a/examples/react-native-expo/ProgressBar.js b/examples/react-native-expo/ProgressBar.js index ae7f3aa393..e1a1521d18 100644 --- a/examples/react-native-expo/ProgressBar.js +++ b/examples/react-native-expo/ProgressBar.js @@ -11,18 +11,21 @@ export default function ProgressBar (props) { + }} + > + }} + > + }} + /> {progress ? progress + '%' : null} diff --git a/examples/react-native-expo/SelectFilesButton.js b/examples/react-native-expo/SelectFilesButton.js index 2beec35577..af0db97cd6 100644 --- a/examples/react-native-expo/SelectFilesButton.js +++ b/examples/react-native-expo/SelectFilesButton.js @@ -5,7 +5,8 @@ export default function SelectFiles (props) { return ( + style={styles.button} + > Select files ) diff --git a/packages/@uppy/aws-s3-multipart/src/MultipartUploader.js b/packages/@uppy/aws-s3-multipart/src/MultipartUploader.js index a0824b6a1b..726cf345c8 100644 --- a/packages/@uppy/aws-s3-multipart/src/MultipartUploader.js +++ b/packages/@uppy/aws-s3-multipart/src/MultipartUploader.js @@ -58,7 +58,7 @@ class MultipartUploader { 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 }'.`) + throw new TypeError('AwsS3/Multipart: Got incorrect result from \'createMultipartUpload()\', expected an object \'{ uploadId, key }\'.') } return result }).then((result) => { @@ -145,7 +145,7 @@ class MultipartUploader { 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 }'.`) + throw new TypeError('AwsS3/Multipart: Got incorrect result from \'prepareUploadPart()\', expected an object \'{ url }\'.') } return result }).then(({ url }) => { diff --git a/packages/@uppy/companion/src/server/Uploader.js b/packages/@uppy/companion/src/server/Uploader.js index 467e33a4ed..67f730add3 100644 --- a/packages/@uppy/companion/src/server/Uploader.js +++ b/packages/@uppy/companion/src/server/Uploader.js @@ -173,7 +173,7 @@ class Uploader { */ onSocketReady (callback) { emitter().once(`connection:${this.token}`, () => callback()) - logger.debug(`waiting for connection`, 'uploader.socket.wait', this.shortToken) + logger.debug('waiting for connection', 'uploader.socket.wait', this.shortToken) } cleanUp () { diff --git a/packages/@uppy/companion/src/server/provider/instagram/adapter.js b/packages/@uppy/companion/src/server/provider/instagram/adapter.js index 9ecfa19046..c7a53fbd10 100644 --- a/packages/@uppy/companion/src/server/provider/instagram/adapter.js +++ b/packages/@uppy/companion/src/server/provider/instagram/adapter.js @@ -30,9 +30,9 @@ exports.getItemSubList = (item) => { } exports.getItemName = (item) => { - if (item && item['created_time']) { + if (item && item.created_time) { const ext = item.type === 'video' ? 'mp4' : 'jpeg' - const date = new Date(item['created_time'] * 1000) + const date = new Date(item.created_time * 1000) const name = date.toLocaleDateString([], { year: 'numeric', month: 'short', diff --git a/packages/@uppy/companion/src/standalone/index.js b/packages/@uppy/companion/src/standalone/index.js index b36a2a7f46..d9445db440 100644 --- a/packages/@uppy/companion/src/standalone/index.js +++ b/packages/@uppy/companion/src/standalone/index.js @@ -42,9 +42,9 @@ morgan.token('url', (req, res) => { return `${req.path}?${qs.stringify(query)}` } - if (req.query && req.query['access_token']) { + if (req.query && req.query.access_token) { return mask('access_token') - } else if (req.query && req.query['uppyAuthToken']) { + } else if (req.query && req.query.uppyAuthToken) { return mask('uppyAuthToken') } diff --git a/packages/@uppy/companion/test/__tests__/companion.js b/packages/@uppy/companion/test/__tests__/companion.js index 3a617b9c5d..166f588e14 100644 --- a/packages/@uppy/companion/test/__tests__/companion.js +++ b/packages/@uppy/companion/test/__tests__/companion.js @@ -87,7 +87,7 @@ describe('test authentication', () => { .get('/drive/callback') .expect(302) .expect((res) => { - expect(res.header['location']).toContain('http://localhost:3020/drive/send-token?uppyAuthToken=') + expect(res.header.location).toContain('http://localhost:3020/drive/send-token?uppyAuthToken=') }) }) diff --git a/packages/@uppy/companion/test/mockserver.js b/packages/@uppy/companion/test/mockserver.js index 005d2862d2..6bb7464798 100644 --- a/packages/@uppy/companion/test/mockserver.js +++ b/packages/@uppy/companion/test/mockserver.js @@ -12,8 +12,7 @@ authServer.all('*/callback', (req, res, next) => { next() }) authServer.all('/drive/send-token', (req, res, next) => { - req.session.grant = { - state: req.query.state || 'non-empty-value' } + req.session.grant = { state: req.query.state || 'non-empty-value' } next() }) diff --git a/packages/@uppy/core/src/index.js b/packages/@uppy/core/src/index.js index c15a2221ba..27dd74d366 100644 --- a/packages/@uppy/core/src/index.js +++ b/packages/@uppy/core/src/index.js @@ -117,7 +117,7 @@ class Uppy { if (this.opts.restrictions.allowedFileTypes && this.opts.restrictions.allowedFileTypes !== null && !Array.isArray(this.opts.restrictions.allowedFileTypes)) { - throw new TypeError(`'restrictions.allowedFileTypes' must be an array`) + throw new TypeError('\'restrictions.allowedFileTypes\' must be an array') } // i18n @@ -961,7 +961,7 @@ class Uppy { if (existsPluginAlready) { const msg = `Already found a plugin named '${existsPluginAlready.id}'. ` + `Tried to use: '${pluginId}'.\n` + - `Uppy plugins must have unique 'id' options. See https://uppy.io/docs/plugins/#id.` + 'Uppy plugins must have unique \'id\' options. See https://uppy.io/docs/plugins/#id.' throw new Error(msg) } diff --git a/packages/@uppy/core/src/index.test.js b/packages/@uppy/core/src/index.test.js index 55c3b405d7..c322f1fafe 100644 --- a/packages/@uppy/core/src/index.test.js +++ b/packages/@uppy/core/src/index.test.js @@ -1389,7 +1389,7 @@ describe('src/Core', () => { }) core.log('hi') } catch (err) { - expect(err).toMatchObject(new Error(`'restrictions.allowedFileTypes' must be an array`)) + expect(err).toMatchObject(new Error('\'restrictions.allowedFileTypes\' must be an array')) } }) diff --git a/packages/@uppy/dashboard/src/components/AddFiles.js b/packages/@uppy/dashboard/src/components/AddFiles.js index c0d5dff029..c36a430f47 100644 --- a/packages/@uppy/dashboard/src/components/AddFiles.js +++ b/packages/@uppy/dashboard/src/components/AddFiles.js @@ -38,7 +38,8 @@ class AddFiles extends Component { href="https://uppy.io" rel="noreferrer noopener" target="_blank" - class="uppy-Dashboard-poweredBy"> + class="uppy-Dashboard-poweredBy" + > {this.props.i18n('poweredBy') + ' '}
{this.props.acquirers.length === 0 ? this.props.i18nArray('dropPaste', { browse }) - : this.props.i18nArray('dropPasteImport', { browse }) - } + : this.props.i18nArray('dropPasteImport', { browse })}
) } @@ -84,12 +88,14 @@ class AddFiles extends Component { renderMyDeviceAcquirer () { return ( ) diff --git a/packages/@uppy/dashboard/src/components/AddFilesPanel.js b/packages/@uppy/dashboard/src/components/AddFilesPanel.js index 939cacec85..8b43fe0e2b 100644 --- a/packages/@uppy/dashboard/src/components/AddFilesPanel.js +++ b/packages/@uppy/dashboard/src/components/AddFilesPanel.js @@ -3,16 +3,21 @@ const AddFiles = require('./AddFiles') const AddFilesPanel = (props) => { return ( -
+ aria-hidden={props.showAddFilesPanel} + >
{props.i18n('addingMoreFiles')}
- + onclick={(ev) => props.toggleAddFilesPanel(false)} + >{props.i18n('back')} +
diff --git a/packages/@uppy/dashboard/src/components/Dashboard.js b/packages/@uppy/dashboard/src/components/Dashboard.js index 2e0bcfd3d8..b39682dc11 100644 --- a/packages/@uppy/dashboard/src/components/Dashboard.js +++ b/packages/@uppy/dashboard/src/components/Dashboard.js @@ -17,7 +17,8 @@ function TransitionWrapper (props) { + transitionLeaveTimeout={250} + > {props.children} ) @@ -42,7 +43,8 @@ module.exports = function Dashboard (props) { ) return ( -
-
+ }} + > {!props.inline ? ( - ) : null} @@ -76,24 +82,24 @@ module.exports = function Dashboard (props) { {props.i18n('dropHint')}
- { (!noFiles && props.showSelectedFiles) && } + {(!noFiles && props.showSelectedFiles) && } - { props.showSelectedFiles ? ( + {props.showSelectedFiles ? ( noFiles ? : ) : ( )} - { props.showAddFilesPanel ? : null } + {props.showAddFilesPanel ? : null} - { props.fileCardFor ? : null } + {props.fileCardFor ? : null} - { props.activePickerPanel ? : null } + {props.activePickerPanel ? : null}
diff --git a/packages/@uppy/dashboard/src/components/FileCard/index.js b/packages/@uppy/dashboard/src/components/FileCard/index.js index 42c159f316..13cf51c427 100644 --- a/packages/@uppy/dashboard/src/components/FileCard/index.js +++ b/packages/@uppy/dashboard/src/components/FileCard/index.js @@ -54,7 +54,8 @@ class FileCard extends Component { const id = `uppy-Dashboard-FileCard-input-${field.id}` return
- this.tempStoreMeta(ev, field.id)} - data-uppy-super-focusable /> + data-uppy-super-focusable + />
}) } @@ -72,20 +74,25 @@ class FileCard extends Component { const file = this.props.files[this.props.fileCardFor] return ( -
+ onPaste={ignoreEvent} + >
{this.props.i18nArray('editing', { file: {file.meta ? file.meta.name : file.name} })}
- +
@@ -98,12 +105,18 @@ class FileCard extends Component {
- - + + onclick={this.handleCancel} + >{this.props.i18n('cancel')} +
diff --git a/packages/@uppy/dashboard/src/components/FileItem/Buttons/index.js b/packages/@uppy/dashboard/src/components/FileItem/Buttons/index.js index 8fd506f2c0..6cf04ff7fe 100644 --- a/packages/@uppy/dashboard/src/components/FileItem/Buttons/index.js +++ b/packages/@uppy/dashboard/src/components/FileItem/Buttons/index.js @@ -7,28 +7,28 @@ const renderEditButton = (props) => ( !props.uploadInProgressOrComplete && props.metaFields && props.metaFields.length > 0 && - + ) const renderRemoveButton = (props) => ( props.showRemoveButton && - + ) const copyLinkToClipboard = (event, props) => @@ -44,14 +44,15 @@ const copyLinkToClipboard = (event, props) => const renderCopyLinkButton = (props) => ( props.showLinkToFileUploadResult && props.file.uploadURL && - + ) module.exports = function Buttons (props) { diff --git a/packages/@uppy/dashboard/src/components/FileItem/FileInfo/index.js b/packages/@uppy/dashboard/src/components/FileItem/FileInfo/index.js index c0b83c8a86..a04ea55632 100644 --- a/packages/@uppy/dashboard/src/components/FileItem/FileInfo/index.js +++ b/packages/@uppy/dashboard/src/components/FileItem/FileInfo/index.js @@ -10,13 +10,13 @@ const renderAcquirerIcon = (acquirer, props) => const renderFileSource = (props) => ( props.file.source && props.file.source !== props.id && -
- {props.acquirers.map(acquirer => { - if (acquirer.id === props.file.source) { - return renderAcquirerIcon(acquirer, props) - } - })} -
+
+ {props.acquirers.map(acquirer => { + if (acquirer.id === props.file.source) { + return renderAcquirerIcon(acquirer, props) + } + })} +
) const renderFileName = (props) => { @@ -42,9 +42,9 @@ const renderFileName = (props) => { const renderFileSize = (props) => ( props.file.data.size && -
- {prettyBytes(props.file.data.size)} -
+
+ {prettyBytes(props.file.data.size)} +
) module.exports = function FileInfo (props) { diff --git a/packages/@uppy/dashboard/src/components/FileItem/FilePreviewAndLink/index.js b/packages/@uppy/dashboard/src/components/FileItem/FilePreviewAndLink/index.js index f8dfc08780..46e048cacf 100644 --- a/packages/@uppy/dashboard/src/components/FileItem/FilePreviewAndLink/index.js +++ b/packages/@uppy/dashboard/src/components/FileItem/FilePreviewAndLink/index.js @@ -11,13 +11,13 @@ module.exports = function FilePreviewAndLink (props) { { props.showLinkToFileUploadResult && props.file.uploadURL && - + }
diff --git a/packages/@uppy/dashboard/src/components/FileItem/FileProgress/PauseResumeCancelIcon.js b/packages/@uppy/dashboard/src/components/FileItem/FileProgress/PauseResumeCancelIcon.js index 89bf0bae05..6cc3d65c5f 100644 --- a/packages/@uppy/dashboard/src/components/FileItem/FileProgress/PauseResumeCancelIcon.js +++ b/packages/@uppy/dashboard/src/components/FileItem/FileProgress/PauseResumeCancelIcon.js @@ -14,21 +14,22 @@ module.exports = function PauseResumeCancelIcon (props) { diff --git a/packages/@uppy/dashboard/src/components/FileItem/FileProgress/index.js b/packages/@uppy/dashboard/src/components/FileItem/FileProgress/index.js index 50cd78f692..effa18a678 100644 --- a/packages/@uppy/dashboard/src/components/FileItem/FileProgress/index.js +++ b/packages/@uppy/dashboard/src/components/FileItem/FileProgress/index.js @@ -74,8 +74,7 @@ module.exports = function FileProgress (props) { : - } + />}
) diff --git a/packages/@uppy/dashboard/src/components/FileList.js b/packages/@uppy/dashboard/src/components/FileList.js index ac16ed6f7e..90f9a2cb3e 100644 --- a/packages/@uppy/dashboard/src/components/FileList.js +++ b/packages/@uppy/dashboard/src/components/FileList.js @@ -39,7 +39,8 @@ module.exports = (props) => {
    not focusable for firefox - tabindex="-1"> + tabindex="-1" + > {Object.keys(props.files).map((fileID) => ( + onPaste={ignoreEvent} + >
    {props.i18n('importFrom', { name: props.activePickerPanel.name })}
    - + onclick={props.hideAllPanels} + >{props.i18n('done')} +
    {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 abea2bd3b9..ad123b46fc 100644 --- a/packages/@uppy/dashboard/src/components/PickerPanelTopBar.js +++ b/packages/@uppy/dashboard/src/components/PickerPanelTopBar.js @@ -78,7 +78,7 @@ function PanelTopBar (props) { return (
    - { // always on the left + {// always on the left !props.isAllComplete ?
    - { // always on the right + {// always on the right allowNewUpload ? - } + }
    ) } diff --git a/packages/@uppy/informer/src/index.js b/packages/@uppy/informer/src/index.js index 0d2f7abf20..114678d6bf 100644 --- a/packages/@uppy/informer/src/index.js +++ b/packages/@uppy/informer/src/index.js @@ -30,8 +30,10 @@ module.exports = class Informer extends Plugin { const { isHidden, message, details } = state.info return ( -
    +

    {message} {' '} @@ -39,8 +41,9 @@ module.exports = class Informer extends Plugin { aria-label={details} data-microtip-position="top-left" data-microtip-size="medium" - role="tooltip">? - } + role="tooltip" + >? + }

    ) diff --git a/packages/@uppy/provider-views/src/Breadcrumbs.js b/packages/@uppy/provider-views/src/Breadcrumbs.js index 70e1f8cfe8..af38bacec3 100644 --- a/packages/@uppy/provider-views/src/Breadcrumbs.js +++ b/packages/@uppy/provider-views/src/Breadcrumbs.js @@ -4,7 +4,8 @@ const Breadcrumb = (props) => [ , !props.isLast ? ' / ' : '' ] diff --git a/packages/@uppy/provider-views/src/Browser.js b/packages/@uppy/provider-views/src/Browser.js index 6bee81210c..f363a0e098 100644 --- a/packages/@uppy/provider-views/src/Browser.js +++ b/packages/@uppy/provider-views/src/Browser.js @@ -32,7 +32,7 @@ const Browser = (props) => {
    - { props.showFilter && } + {props.showFilter && } this.props.filterQuery(e)} - value={this.props.filterInput} /> + value={this.props.filterInput} + /> - { this.props.filterInput && + {this.props.filterInput && - } + } } } diff --git a/packages/@uppy/provider-views/src/ItemList.js b/packages/@uppy/provider-views/src/ItemList.js index 1f88b0fba2..1d773d0649 100644 --- a/packages/@uppy/provider-views/src/ItemList.js +++ b/packages/@uppy/provider-views/src/ItemList.js @@ -20,11 +20,13 @@ module.exports = (props) => { return (
    -
      not focusable for firefox - tabindex="-1"> + tabindex="-1" + > {props.folders.map(folder => Item({ ...getSharedProps(folder, props), diff --git a/packages/@uppy/provider-views/src/index.js b/packages/@uppy/provider-views/src/index.js index 63a644bde9..458cdbe7ac 100644 --- a/packages/@uppy/provider-views/src/index.js +++ b/packages/@uppy/provider-views/src/index.js @@ -586,7 +586,8 @@ module.exports = class ProviderView { pluginIcon={this.plugin.icon} handleAuth={this.handleAuth} i18n={this.plugin.uppy.i18n} - i18nArray={this.plugin.uppy.i18nArray} /> + i18nArray={this.plugin.uppy.i18nArray} + /> ) } diff --git a/packages/@uppy/react-native/file-picker/index.js b/packages/@uppy/react-native/file-picker/index.js index 27b811d4fd..c614f76691 100644 --- a/packages/@uppy/react-native/file-picker/index.js +++ b/packages/@uppy/react-native/file-picker/index.js @@ -4,7 +4,8 @@ import { Modal, Text, ScrollView, - TouchableOpacity } from 'react-native' + TouchableOpacity +} from 'react-native' import takePicture from './takePicture' import selectImage from './selectImage' import selectDocument from './selectDocument' @@ -104,20 +105,23 @@ export default class UppyReactNativeFilePicker extends React.Component { renderSourceList () { return ( + contentContainerStyle={styles.providerList} + > {this.state.providers.map((item, index) => { return ( this.chooseProvider(item.id)}> + onPress={ev => this.chooseProvider(item.id)} + > {item.title} ) })} this.props.onRequestClose()}> + onPress={ev => this.props.onRequestClose()} + > Cancel @@ -131,7 +135,8 @@ export default class UppyReactNativeFilePicker extends React.Component { transparent={false} visible={this.props.show} supportedOrientations={['portrait', 'portrait-upside-down', 'landscape', 'landscape-left', 'landscape-right']} - onRequestClose={this.props.onRequestClose}> + onRequestClose={this.props.onRequestClose} + > {this.state.openProvider ? - : this.renderSourceList() - } + {...this.props} + /> + : this.renderSourceList()} ) } diff --git a/packages/@uppy/react-native/file-picker/instagram.js b/packages/@uppy/react-native/file-picker/instagram.js index 1805b68ef6..0f3fe7bd35 100644 --- a/packages/@uppy/react-native/file-picker/instagram.js +++ b/packages/@uppy/react-native/file-picker/instagram.js @@ -4,7 +4,8 @@ import { View, FlatList, Image, - WebView } from 'react-native' + WebView +} from 'react-native' import Instagram from '@uppy/instagram' function getQueryParamValueFromUrl (name, url) { diff --git a/packages/@uppy/react-native/file-picker/url.js b/packages/@uppy/react-native/file-picker/url.js index d6dc3de8dc..a836a97850 100644 --- a/packages/@uppy/react-native/file-picker/url.js +++ b/packages/@uppy/react-native/file-picker/url.js @@ -5,7 +5,8 @@ import { TouchableOpacity, Text, TextInput, - View } from 'react-native' + View +} from 'react-native' import Url from '@uppy/url' export default class UppyRNUrl extends React.Component { @@ -58,12 +59,14 @@ export default class UppyRNUrl extends React.Component { /> + onPress={this.onPressImport} + > Import this.props.onDone()}> + onPress={ev => this.props.onDone()} + > Cancel diff --git a/packages/@uppy/status-bar/src/StatusBar.js b/packages/@uppy/status-bar/src/StatusBar.js index 55edf8141a..63b6cbcf67 100644 --- a/packages/@uppy/status-bar/src/StatusBar.js +++ b/packages/@uppy/status-bar/src/StatusBar.js @@ -52,7 +52,8 @@ function togglePauseResume (props) { module.exports = (props) => { props = props || {} - const { newFiles, + const { + newFiles, allowNewUpload, isUploadInProgress, isAllPaused, @@ -61,7 +62,8 @@ module.exports = (props) => { hideUploadButton, hidePauseResumeButton, hideCancelButton, - hideRetryButton } = props + hideRetryButton + } = props const uploadState = props.uploadState @@ -120,18 +122,20 @@ module.exports = (props) => { return (
      -
      + aria-valuenow={progressValue} + /> {progressBarContent}
      - { showUploadBtn ? : null } - { showRetryBtn ? : null } - { showPauseResumeBtn ? : null } - { showCancelBtn ? : null } + {showUploadBtn ? : null} + {showRetryBtn ? : null} + {showPauseResumeBtn ? : null} + {showCancelBtn ? : null}
      ) @@ -146,23 +150,26 @@ const UploadBtn = (props) => { { 'uppy-c-btn-primary': props.uploadState === statusBarStates.STATE_WAITING } ) - return } const RetryBtn = (props) => { return ( - } @@ -273,7 +281,7 @@ const ProgressDetails = (props) => { const UnknownProgressDetails = (props) => { return
      - { props.i18n('filesUploadedOfTotal', { complete: props.complete, smart_count: props.numUploads }) } + {props.i18n('filesUploadedOfTotal', { complete: props.complete, smart_count: props.numUploads })}
      } @@ -287,12 +295,14 @@ const UploadNewlyAddedFiles = (props) => { return
      - { props.i18n('xMoreFilesAdded', { smart_count: props.newFiles }) } + {props.i18n('xMoreFilesAdded', { smart_count: props.newFiles })}
      -
      @@ -310,16 +320,15 @@ const ProgressBarUploading = (props) => { return (
      - { !props.isAllPaused ? : null } + {!props.isAllPaused ? : null}
      {props.supportsUploadProgress ? `${title}: ${props.totalProgress}%` : title}
      - { !props.isAllPaused && !showUploadNewlyAddedFiles && props.showProgressDetails + {!props.isAllPaused && !showUploadNewlyAddedFiles && props.showProgressDetails ? (props.supportsUploadProgress ? : ) - : null - } - { showUploadNewlyAddedFiles ? : null } + : null} + {showUploadNewlyAddedFiles ? : null}
      ) @@ -354,11 +363,14 @@ const ProgressBarError = ({ error, retryAll, hideRetryButton, i18n }) => { {/* {!hideRetryButton && {i18n('pleasePressRetry')} } */} - ? + role="tooltip" + >? +
      ) } diff --git a/packages/@uppy/tus/src/index.js b/packages/@uppy/tus/src/index.js index d197a70608..c6122b1fdb 100644 --- a/packages/@uppy/tus/src/index.js +++ b/packages/@uppy/tus/src/index.js @@ -66,6 +66,7 @@ module.exports = class Tus extends Plugin { /** * Simultaneous upload limiting is shared across all uploads with this plugin. + * * @type {RateLimitedQueue} */ this.requests = new RateLimitedQueue(this.opts.limit) @@ -293,7 +294,7 @@ module.exports = class Tus extends Plugin { * @param {UppyFile} file for use with upload * @param {number} current file in a queue * @param {number} total number of files in a queue - * @return {Promise} + * @returns {Promise} */ uploadRemote (file, current, total) { this.resetUploaderReferences(file.id) diff --git a/packages/@uppy/url/src/UrlUI.js b/packages/@uppy/url/src/UrlUI.js index 61e6af53ce..b3d4fc55e2 100644 --- a/packages/@uppy/url/src/UrlUI.js +++ b/packages/@uppy/url/src/UrlUI.js @@ -30,11 +30,13 @@ class UrlUI extends Component { placeholder={this.props.i18n('enterUrlToImport')} onkeyup={this.handleKeyPress} ref={(input) => { this.input = input }} - data-uppy-super-focusable /> + data-uppy-super-focusable + />
    diff --git a/packages/@uppy/url/src/index.js b/packages/@uppy/url/src/index.js index e77c1a6f6a..db0f0c59e9 100644 --- a/packages/@uppy/url/src/index.js +++ b/packages/@uppy/url/src/index.js @@ -164,7 +164,8 @@ module.exports = class Url extends Plugin { render (state) { return + addFile={this.addFile} + /> } install () { diff --git a/packages/@uppy/webcam/src/RecordButton.js b/packages/@uppy/webcam/src/RecordButton.js index c5a4ec6e76..ebfe0fd470 100644 --- a/packages/@uppy/webcam/src/RecordButton.js +++ b/packages/@uppy/webcam/src/RecordButton.js @@ -3,12 +3,14 @@ const { h } = require('preact') module.exports = function RecordButton ({ recording, onStartRecording, onStopRecording, i18n }) { if (recording) { return ( - ) diff --git a/packages/@uppy/webcam/src/index.js b/packages/@uppy/webcam/src/index.js index 2878812d05..bea1dab4dc 100644 --- a/packages/@uppy/webcam/src/index.js +++ b/packages/@uppy/webcam/src/index.js @@ -347,7 +347,8 @@ module.exports = class Webcam extends Plugin { if (!webcamState.cameraReady) { return + i18n={this.i18n} + /> } return + src={this.stream} + /> } install () { diff --git a/test/endtoend/transloadit/test.js b/test/endtoend/transloadit/test.js index 2e4f764092..e648bf9081 100644 --- a/test/endtoend/transloadit/test.js +++ b/test/endtoend/transloadit/test.js @@ -40,7 +40,7 @@ describe('Transloadit file processing', () => { selectFakeFile, 'uppyTransloadit', path.basename(img), // name - `image/jpeg`, // type + 'image/jpeg', // type fs.readFileSync(img, 'base64') // b64 ) // browser.execute(selectFakeFile, 'uppyTransloadit') diff --git a/test/endtoend/utils.js b/test/endtoend/utils.js index ddb9883f07..e3050e61ce 100644 --- a/test/endtoend/utils.js +++ b/test/endtoend/utils.js @@ -159,7 +159,7 @@ class TusService { const proxy = httpProxy.createProxyServer() this.slowServer = http.createServer((req, res) => { proxy.web(req, res, { - target: `http://localhost:1080`, + target: 'http://localhost:1080', // 200 kbps max upload, checking the rate limit every 20ms buffer: req.pipe(brake({ period: 20, diff --git a/website/inject.js b/website/inject.js index 77d1bd0875..a3cec47377 100644 --- a/website/inject.js +++ b/website/inject.js @@ -156,8 +156,8 @@ async function injectGhStars () { async function injectMarkdown () { const sources = { - '.github/ISSUE_TEMPLATE/integration_help.md': `src/_template/integration_help.md`, - '.github/CONTRIBUTING.md': `src/_template/contributing.md` + '.github/ISSUE_TEMPLATE/integration_help.md': 'src/_template/integration_help.md', + '.github/CONTRIBUTING.md': 'src/_template/contributing.md' } for (const src in sources) { @@ -173,9 +173,9 @@ async function injectMarkdown () { let content = `\n\n` content += parts.join('---\n') fs.writeFileSync(dstpath, content, 'utf-8') - console.info(chalk.green(`✓ injected: `), chalk.grey(srcpath)) + console.info(chalk.green('✓ injected: '), chalk.grey(srcpath)) } - touch(path.join(webRoot, `/src/support.md`)) + touch(path.join(webRoot, '/src/support.md')) } function injectLocaleList () { @@ -215,7 +215,7 @@ function injectLocaleList () { const dstpath = path.join(webRoot, 'src', '_template', 'list_of_locale_packs.md') fs.writeFileSync(dstpath, resultingMdTable, 'utf-8') - console.info(chalk.green(`✓ injected: `), chalk.grey(dstpath)) + console.info(chalk.green('✓ injected: '), chalk.grey(dstpath)) } async function readConfig () { diff --git a/website/scripts/highlight.js b/website/scripts/highlight.js index 7375ebbe64..24b0162b4c 100644 --- a/website/scripts/highlight.js +++ b/website/scripts/highlight.js @@ -17,7 +17,7 @@ const unhighlightedCodeRx = /
    ([\s\S]*?)<\/code><\/pr
     
     function highlight (lang, code) {
       const startTag = `
    `
    -  const endTag = `
    ` + const endTag = '
    ' let parsedCode = '' if (Prism.languages[lang]) { parsedCode = Prism.highlight(code, Prism.languages[lang]) From f254189ae138a281d7985e53fb838f2f93ec99d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Fri, 4 Oct 2019 11:33:19 +0200 Subject: [PATCH 03/15] build: disable handler name lint rule --- .eslintrc.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.json b/.eslintrc.json index cec745d15a..575ef77bec 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -14,6 +14,7 @@ "rules": { "jsx-quotes": ["error", "prefer-double"], "compat/compat": ["error"], + "react/jsx-handler-names": ["warn"], // maybe we want to do this in the future? "jsdoc/check-alignment": ["warn"], "jsdoc/check-examples": ["warn"], From 38376e2af3ed5b272a0b1e18d93cd4f850345c11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Fri, 4 Oct 2019 11:33:40 +0200 Subject: [PATCH 04/15] status-bar: manually fix lint errors --- packages/@uppy/status-bar/src/StatusBar.js | 219 +++++++++++---------- 1 file changed, 119 insertions(+), 100 deletions(-) diff --git a/packages/@uppy/status-bar/src/StatusBar.js b/packages/@uppy/status-bar/src/StatusBar.js index 63b6cbcf67..2750f68645 100644 --- a/packages/@uppy/status-bar/src/StatusBar.js +++ b/packages/@uppy/status-bar/src/StatusBar.js @@ -150,17 +150,19 @@ const UploadBtn = (props) => { { 'uppy-c-btn-primary': props.uploadState === statusBarStates.STATE_WAITING } ) - return + return ( + + ) } const RetryBtn = (props) => { @@ -179,65 +181,75 @@ const RetryBtn = (props) => { } const CancelBtn = (props) => { - return + return ( + + ) } const PauseResumeButton = (props) => { const { isAllPaused, i18n } = props const title = isAllPaused ? i18n('resume') : i18n('pause') - return + return ( + + ) } const LoadingSpinner = () => { - return + return ( + + ) } const ProgressBarProcessing = (props) => { const value = Math.round(props.value * 100) - return
    - - {props.mode === 'determinate' ? `${value}% \u00B7 ` : ''} - {props.message} -
    + return ( +
    + + {props.mode === 'determinate' ? `${value}% \u00B7 ` : ''} + {props.message} +
    + ) } const renderDot = () => @@ -246,43 +258,47 @@ const renderDot = () => const ProgressDetails = (props) => { const ifShowFilesUploadedOfTotal = props.numUploads > 1 - return
    - { - ifShowFilesUploadedOfTotal && - props.i18n('filesUploadedOfTotal', { - complete: props.complete, - smart_count: props.numUploads - }) - } - - {/* When should we render this dot? - 1. .-additionalInfo is shown (happens only on desktops) - 2. AND 'filesUploadedOfTotal' was shown - */} - {ifShowFilesUploadedOfTotal && renderDot()} - - { - props.i18n('dataUploadedOfTotal', { - complete: prettyBytes(props.totalUploadedSize), - total: prettyBytes(props.totalSize) - }) - } - - {renderDot()} - + return ( +
    { - props.i18n('xTimeLeft', { - time: prettyETA(props.totalETA) + ifShowFilesUploadedOfTotal && + props.i18n('filesUploadedOfTotal', { + complete: props.complete, + smart_count: props.numUploads }) } - -
    + + {/* When should we render this dot? + 1. .-additionalInfo is shown (happens only on desktops) + 2. AND 'filesUploadedOfTotal' was shown + */} + {ifShowFilesUploadedOfTotal && renderDot()} + + { + props.i18n('dataUploadedOfTotal', { + complete: prettyBytes(props.totalUploadedSize), + total: prettyBytes(props.totalSize) + }) + } + + {renderDot()} + + { + props.i18n('xTimeLeft', { + time: prettyETA(props.totalETA) + }) + } + +
    + ) } const UnknownProgressDetails = (props) => { - return
    - {props.i18n('filesUploadedOfTotal', { complete: props.complete, smart_count: props.numUploads })} -
    + return ( +
    + {props.i18n('filesUploadedOfTotal', { complete: props.complete, smart_count: props.numUploads })} +
    + ) } const UploadNewlyAddedFiles = (props) => { @@ -293,19 +309,21 @@ const UploadNewlyAddedFiles = (props) => { 'uppy-StatusBar-actionBtn--uploadNewlyAdded' ) - return
    -
    - {props.i18n('xMoreFilesAdded', { smart_count: props.newFiles })} + return ( +
    +
    + {props.i18n('xMoreFilesAdded', { smart_count: props.newFiles })} +
    +
    - -
    + ) } const ThrottledProgressDetails = throttle(ProgressDetails, 500, { leading: true, trailing: true }) @@ -369,7 +387,8 @@ const ProgressBarError = ({ error, retryAll, hideRetryButton, i18n }) => { data-microtip-position="top-right" data-microtip-size="medium" role="tooltip" - >? + > + ?
    ) From a45781595bec504d16acf7b3afc22b7045c5b169 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Fri, 4 Oct 2019 11:33:50 +0200 Subject: [PATCH 05/15] webcam: manually fix lint errors --- packages/@uppy/webcam/src/CameraIcon.js | 8 ++++-- packages/@uppy/webcam/src/index.js | 37 +++++++++++++------------ 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/packages/@uppy/webcam/src/CameraIcon.js b/packages/@uppy/webcam/src/CameraIcon.js index 81a02b9f07..08f8b6965a 100644 --- a/packages/@uppy/webcam/src/CameraIcon.js +++ b/packages/@uppy/webcam/src/CameraIcon.js @@ -1,7 +1,9 @@ const { h } = require('preact') module.exports = (props) => { - return + return ( + + ) } diff --git a/packages/@uppy/webcam/src/index.js b/packages/@uppy/webcam/src/index.js index bea1dab4dc..b2a6a9941d 100644 --- a/packages/@uppy/webcam/src/index.js +++ b/packages/@uppy/webcam/src/index.js @@ -345,26 +345,27 @@ module.exports = class Webcam extends Plugin { const webcamState = this.getPluginState() if (!webcamState.cameraReady) { - return + return ( + + ) } - return + return ( + + ) } install () { From 3ca83a1e529a8af76364d001afb13c4070aa70ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Fri, 4 Oct 2019 11:33:59 +0200 Subject: [PATCH 06/15] url: manually fix lint errors --- packages/@uppy/url/src/UrlUI.js | 38 +++++++++++++++++---------------- packages/@uppy/url/src/index.js | 17 +++++++++------ 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/packages/@uppy/url/src/UrlUI.js b/packages/@uppy/url/src/UrlUI.js index b3d4fc55e2..b9321b86f8 100644 --- a/packages/@uppy/url/src/UrlUI.js +++ b/packages/@uppy/url/src/UrlUI.js @@ -22,24 +22,26 @@ class UrlUI extends Component { } render () { - return
    - { this.input = input }} - data-uppy-super-focusable - /> - -
    + return ( +
    + { this.input = input }} + data-uppy-super-focusable + /> + +
    + ) } } diff --git a/packages/@uppy/url/src/index.js b/packages/@uppy/url/src/index.js index db0f0c59e9..421d51daf1 100644 --- a/packages/@uppy/url/src/index.js +++ b/packages/@uppy/url/src/index.js @@ -5,6 +5,14 @@ const { RequestClient } = require('@uppy/companion-client') const UrlUI = require('./UrlUI.js') const forEachDroppedOrPastedUrl = require('./utils/forEachDroppedOrPastedUrl') +function UrlIcon () { + return ( + + ) +} + /** * Url * @@ -17,9 +25,7 @@ module.exports = class Url extends Plugin { this.id = this.opts.id || 'Url' this.title = this.opts.title || 'Link' this.type = 'acquirer' - this.icon = () => + this.icon = () => // Set default options and locale this.defaultLocale = { @@ -162,10 +168,7 @@ module.exports = class Url extends Plugin { } render (state) { - return + return } install () { From 54a2d7a6909ab45df54a1db078960270fd3f9561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Fri, 4 Oct 2019 11:35:45 +0200 Subject: [PATCH 07/15] react-native: manually fix lint errors --- .../@uppy/react-native/file-picker/index.js | 8 +++--- .../react-native/file-picker/instagram.js | 26 ++++++++++--------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/packages/@uppy/react-native/file-picker/index.js b/packages/@uppy/react-native/file-picker/index.js index c614f76691..afc81c5273 100644 --- a/packages/@uppy/react-native/file-picker/index.js +++ b/packages/@uppy/react-native/file-picker/index.js @@ -137,8 +137,8 @@ export default class UppyReactNativeFilePicker extends React.Component { supportedOrientations={['portrait', 'portrait-upside-down', 'landscape', 'landscape-left', 'landscape-right']} onRequestClose={this.props.onRequestClose} > - {this.state.openProvider - ? { @@ -149,7 +149,9 @@ export default class UppyReactNativeFilePicker extends React.Component { }} {...this.props} /> - : this.renderSourceList()} + ) : ( + this.renderSourceList() + )} ) } diff --git a/packages/@uppy/react-native/file-picker/instagram.js b/packages/@uppy/react-native/file-picker/instagram.js index 0f3fe7bd35..2372dc80a6 100644 --- a/packages/@uppy/react-native/file-picker/instagram.js +++ b/packages/@uppy/react-native/file-picker/instagram.js @@ -79,18 +79,20 @@ export default class UppyRNInstagram extends React.Component { renderInstagram () { console.log(this.state.authUrl) - return { - const url = ev.url - const token = getQueryParamValueFromUrl('uppyAuthToken', url) - console.log(token) - this.plugin.provider.setAuthToken(token) - console.log(this.plugin.provider.list('recent')) - // return this.renderGrid(this.state.instagram.items) - }} - /> + return ( + { + const url = ev.url + const token = getQueryParamValueFromUrl('uppyAuthToken', url) + console.log(token) + this.plugin.provider.setAuthToken(token) + console.log(this.plugin.provider.list('recent')) + // return this.renderGrid(this.state.instagram.items) + }} + /> + ) } render () { From 92d3fb160df32b778238e862134e5d9279648e2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Fri, 4 Oct 2019 11:42:54 +0200 Subject: [PATCH 08/15] dashboard: manually fix lint errors --- .../src/components/FileCard/index.js | 41 ++--- .../components/FileItem/FileProgress/index.js | 10 +- .../dashboard/src/components/FileList.js | 1 + .../src/components/PickerPanelTopBar.js | 50 +++--- .../@uppy/dashboard/src/components/icons.js | 152 +++++++++++------- 5 files changed, 147 insertions(+), 107 deletions(-) diff --git a/packages/@uppy/dashboard/src/components/FileCard/index.js b/packages/@uppy/dashboard/src/components/FileCard/index.js index 13cf51c427..6098d31be0 100644 --- a/packages/@uppy/dashboard/src/components/FileCard/index.js +++ b/packages/@uppy/dashboard/src/components/FileCard/index.js @@ -52,21 +52,23 @@ class FileCard extends Component { return metaFields.map((field) => { const id = `uppy-Dashboard-FileCard-input-${field.id}` - return
    - - this.tempStoreMeta(ev, field.id)} - data-uppy-super-focusable - /> -
    + return ( +
    + + this.tempStoreMeta(ev, field.id)} + data-uppy-super-focusable + /> +
    + ) }) } @@ -91,7 +93,8 @@ class FileCard extends Component { @@ -109,13 +112,15 @@ class FileCard extends Component { class="uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Dashboard-FileCard-actionsBtn" type="button" onclick={this.handleSave} - >{this.props.i18n('saveChanges')} + > + {this.props.i18n('saveChanges')} diff --git a/packages/@uppy/dashboard/src/components/FileItem/FileProgress/index.js b/packages/@uppy/dashboard/src/components/FileItem/FileProgress/index.js index effa18a678..589e45c387 100644 --- a/packages/@uppy/dashboard/src/components/FileItem/FileProgress/index.js +++ b/packages/@uppy/dashboard/src/components/FileItem/FileProgress/index.js @@ -69,12 +69,14 @@ module.exports = function FileProgress (props) { title={progressIndicatorTitle(props)} onclick={() => onPauseResumeCancelRetry(props)} > - {props.error - ? props.hideRetryButton ? null : iconRetry() - : } + /> + )} ) diff --git a/packages/@uppy/dashboard/src/components/FileList.js b/packages/@uppy/dashboard/src/components/FileList.js index 90f9a2cb3e..2ad70a6349 100644 --- a/packages/@uppy/dashboard/src/components/FileList.js +++ b/packages/@uppy/dashboard/src/components/FileList.js @@ -43,6 +43,7 @@ module.exports = (props) => { > {Object.keys(props.files).map((fileID) => ( diff --git a/packages/@uppy/dashboard/src/components/PickerPanelTopBar.js b/packages/@uppy/dashboard/src/components/PickerPanelTopBar.js index ad123b46fc..e5fd46206a 100644 --- a/packages/@uppy/dashboard/src/components/PickerPanelTopBar.js +++ b/packages/@uppy/dashboard/src/components/PickerPanelTopBar.js @@ -78,36 +78,36 @@ function PanelTopBar (props) { return (
    - {// always on the left - !props.isAllComplete - ? - :
    - } + {!props.isAllComplete ? ( + + ) : ( +
    + )}
    - {// always on the right - allowNewUpload - ? - :
    - } + {allowNewUpload ? ( + + ) : ( +
    + )}
    ) } diff --git a/packages/@uppy/dashboard/src/components/icons.js b/packages/@uppy/dashboard/src/components/icons.js index 453416ef2a..ab3223c1cc 100644 --- a/packages/@uppy/dashboard/src/components/icons.js +++ b/packages/@uppy/dashboard/src/components/icons.js @@ -3,111 +3,143 @@ const { h } = require('preact') // https://css-tricks.com/creating-svg-icon-system-react/ function defaultPickerIcon () { - return + return ( + + ) } function iconCopy () { - return + return ( + + ) } function iconResume () { - return + return ( + + ) } function iconPause () { - return + return ( + + ) } function localIcon () { - return + return ( + + ) } function iconRetry () { - return + return ( + + ) } function checkIcon () { - return + return ( + + ) } function iconAudio () { - return + return ( + + ) } function iconVideo () { - return + return ( + + ) } function iconPDF () { - return + return ( + + ) } function iconFile () { - return + return ( + + ) } function iconText () { - return + return ( + + ) } function iconCopyLink () { - return + return ( + + ) } function iconPencil () { - return + return ( + + ) } function iconCross () { - return + return ( + + ) } function iconPlus () { - return + return ( + + ) } module.exports = { From 59177818ae94450ed7189cd53a12fc004264c1fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Fri, 4 Oct 2019 11:43:32 +0200 Subject: [PATCH 09/15] informer: manually fix linting errors --- packages/@uppy/informer/src/index.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/@uppy/informer/src/index.js b/packages/@uppy/informer/src/index.js index 114678d6bf..646ca8088a 100644 --- a/packages/@uppy/informer/src/index.js +++ b/packages/@uppy/informer/src/index.js @@ -37,13 +37,16 @@ module.exports = class Informer extends Plugin {

    {message} {' '} - {details && ? - } + {details && ( + + ? + + )}

    ) From 26e169d4ed920596305d76a9c9121dccd4fef84e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Fri, 4 Oct 2019 11:45:13 +0200 Subject: [PATCH 10/15] progress-bar: manually fix lint errors --- packages/@uppy/progress-bar/src/index.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/@uppy/progress-bar/src/index.js b/packages/@uppy/progress-bar/src/index.js index 9fa29ce5f8..95030ee5c0 100644 --- a/packages/@uppy/progress-bar/src/index.js +++ b/packages/@uppy/progress-bar/src/index.js @@ -31,10 +31,16 @@ module.exports = class ProgressBar extends Plugin { render (state) { const progress = state.totalProgress || 0 const isHidden = progress === 100 && this.opts.hideAfterFinish - return
    -
    -
    {progress}
    -
    + return ( +
    +
    +
    {progress}
    +
    + ) } install () { From d636c2e2eeb642d44464667b22eee62f88ded2a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Fri, 4 Oct 2019 11:53:32 +0200 Subject: [PATCH 11/15] provider-views: manually fix lint errors --- packages/@uppy/provider-views/src/AuthView.js | 28 +++++---- .../@uppy/provider-views/src/Breadcrumbs.js | 21 ++++--- packages/@uppy/provider-views/src/Filter.js | 59 ++++++++++--------- .../@uppy/provider-views/src/FooterActions.js | 22 +++---- .../src/Item/components/GridLi.js | 34 ++++++----- .../src/Item/components/ItemIcon.js | 37 +++++++++--- .../src/Item/components/ListLi.js | 40 +++++++------ packages/@uppy/provider-views/src/Loader.js | 8 ++- packages/@uppy/provider-views/src/index.js | 3 +- 9 files changed, 145 insertions(+), 107 deletions(-) diff --git a/packages/@uppy/provider-views/src/AuthView.js b/packages/@uppy/provider-views/src/AuthView.js index a9ad058b8b..7179ae9d29 100644 --- a/packages/@uppy/provider-views/src/AuthView.js +++ b/packages/@uppy/provider-views/src/AuthView.js @@ -5,20 +5,22 @@ class AuthView extends Component { const pluginNameComponent = ( {this.props.pluginName}
    ) - return
    -
    {this.props.pluginIcon()}
    -
    - {this.props.i18nArray('authenticateWithTitle', { pluginName: pluginNameComponent })} + return ( +
    +
    {this.props.pluginIcon()}
    +
    + {this.props.i18nArray('authenticateWithTitle', { pluginName: pluginNameComponent })} +
    +
    - -
    + ) } } diff --git a/packages/@uppy/provider-views/src/Breadcrumbs.js b/packages/@uppy/provider-views/src/Breadcrumbs.js index af38bacec3..d3538a8517 100644 --- a/packages/@uppy/provider-views/src/Breadcrumbs.js +++ b/packages/@uppy/provider-views/src/Breadcrumbs.js @@ -1,27 +1,32 @@ const { h } = require('preact') +// TODO use Fragment when upgrading to preact X +/* eslint-disable react/jsx-key */ const Breadcrumb = (props) => [ , !props.isLast ? ' / ' : '' ] +/* eslint-enable react/jsx-key */ module.exports = (props) => { return (
    {props.breadcrumbsIcon}
    { - props.directories.map((directory, i) => { - return Breadcrumb({ - getFolder: () => props.getFolder(directory.id), - title: i === 0 ? props.title : directory.title, - isLast: i + 1 === props.directories.length - }) - }) + props.directories.map((directory, i) => ( + props.getFolder(directory.id)} + title={i === 0 ? props.title : directory.title} + isLast={i + 1 === props.directories.length} + /> + )) }
    ) diff --git a/packages/@uppy/provider-views/src/Filter.js b/packages/@uppy/provider-views/src/Filter.js index 8aa6bf2cd5..84c3102dd4 100644 --- a/packages/@uppy/provider-views/src/Filter.js +++ b/packages/@uppy/provider-views/src/Filter.js @@ -14,33 +14,36 @@ module.exports = class Filter extends Component { } render () { - return + return ( + + ) } } diff --git a/packages/@uppy/provider-views/src/FooterActions.js b/packages/@uppy/provider-views/src/FooterActions.js index fa00e654ab..d26a282f8c 100644 --- a/packages/@uppy/provider-views/src/FooterActions.js +++ b/packages/@uppy/provider-views/src/FooterActions.js @@ -1,14 +1,16 @@ const { h } = require('preact') module.exports = (props) => { - return + return ( + + ) } diff --git a/packages/@uppy/provider-views/src/Item/components/GridLi.js b/packages/@uppy/provider-views/src/Item/components/GridLi.js index 096b85e052..8bb98a0cae 100644 --- a/packages/@uppy/provider-views/src/Item/components/GridLi.js +++ b/packages/@uppy/provider-views/src/Item/components/GridLi.js @@ -2,21 +2,23 @@ const { h } = require('preact') // it could be a
  • module.exports = (props) => { - return
  • -
    - -
  • + role="option" + aria-label={props.isChecked ? props.i18n('unselectFileNamed', { name: props.title }) : props.i18n('selectFileNamed', { name: props.title })} + aria-selected={props.isChecked} + aria-disabled={props.isDisabled} + data-uppy-super-focusable + > + {props.itemIconEl} + {props.showTitles && props.title} + + + ) } diff --git a/packages/@uppy/provider-views/src/Item/components/ItemIcon.js b/packages/@uppy/provider-views/src/Item/components/ItemIcon.js index 4252220231..406723f60d 100644 --- a/packages/@uppy/provider-views/src/Item/components/ItemIcon.js +++ b/packages/@uppy/provider-views/src/Item/components/ItemIcon.js @@ -1,21 +1,40 @@ const { h } = require('preact') +function FileIcon () { + return ( + + ) +} + +function FolderIcon () { + return ( + + ) +} + +function VideoIcon () { + return ( + + ) +} + module.exports = (props) => { if (props.itemIconString === null) return switch (props.itemIconString) { case 'file': - return + return case 'folder': - return + return case 'video': - return + return default: return } diff --git a/packages/@uppy/provider-views/src/Item/components/ListLi.js b/packages/@uppy/provider-views/src/Item/components/ListLi.js index 4716772513..844615e258 100644 --- a/packages/@uppy/provider-views/src/Item/components/ListLi.js +++ b/packages/@uppy/provider-views/src/Item/components/ListLi.js @@ -23,29 +23,30 @@ const getAriaLabelOfCheckbox = (props) => { // + checkbox (selects file) // + file name (selects file) module.exports = (props) => { - return
  • - - } -
  • + )} + + ) } diff --git a/packages/@uppy/provider-views/src/Loader.js b/packages/@uppy/provider-views/src/Loader.js index 03b8fd6475..83d629ae2a 100644 --- a/packages/@uppy/provider-views/src/Loader.js +++ b/packages/@uppy/provider-views/src/Loader.js @@ -1,7 +1,9 @@ const { h } = require('preact') module.exports = (props) => { - return
    - {props.i18n('loading')} -
    + return ( +
    + {props.i18n('loading')} +
    + ) } diff --git a/packages/@uppy/provider-views/src/index.js b/packages/@uppy/provider-views/src/index.js index 458cdbe7ac..0b22685a4e 100644 --- a/packages/@uppy/provider-views/src/index.js +++ b/packages/@uppy/provider-views/src/index.js @@ -41,7 +41,8 @@ module.exports = class ProviderView { static VERSION = require('../package.json').version /** - * @param {object} instance of the plugin + * @param {object} plugin instance of the plugin + * @param {object} opts */ constructor (plugin, opts) { this.plugin = plugin From 82057c4657667b52e59c673564c40a226379dab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Fri, 4 Oct 2019 11:54:16 +0200 Subject: [PATCH 12/15] redux-dev-tools: manually fix lint errors --- packages/@uppy/redux-dev-tools/src/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/@uppy/redux-dev-tools/src/index.js b/packages/@uppy/redux-dev-tools/src/index.js index a44f00425d..fe6673f912 100644 --- a/packages/@uppy/redux-dev-tools/src/index.js +++ b/packages/@uppy/redux-dev-tools/src/index.js @@ -40,11 +40,12 @@ module.exports = class ReduxDevTools extends Plugin { case 'RESET': this.uppy.reset() return - case 'IMPORT_STATE': + 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.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)) From 2bc330245b53f303d228e3fef5fa14dbc8ddd745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Fri, 4 Oct 2019 11:55:59 +0200 Subject: [PATCH 13/15] build: disable buggy no-unused-vars rule --- .eslintrc.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.json b/.eslintrc.json index 575ef77bec..dfcd955ef8 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -15,6 +15,7 @@ "jsx-quotes": ["error", "prefer-double"], "compat/compat": ["error"], "react/jsx-handler-names": ["warn"], // maybe we want to do this in the future? + "no-unused-vars": ["off"], // Buggy: wrongly flags `i` in `for (const i in iterator)`—reenable ASAP "jsdoc/check-alignment": ["warn"], "jsdoc/check-examples": ["warn"], From 23c69560f386828cabb6d9eda4bf3b7c1e94a543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Fri, 4 Oct 2019 11:57:41 +0200 Subject: [PATCH 14/15] examples: manually fix lint errors --- examples/react-native-expo/App.js | 18 ++++++++------- examples/react-native-expo/FileList.js | 31 +++++++++++++++----------- 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/examples/react-native-expo/App.js b/examples/react-native-expo/App.js index c4145b033a..b6dc09fb2c 100644 --- a/examples/react-native-expo/App.js +++ b/examples/react-native-expo/App.js @@ -136,15 +136,17 @@ export default class App extends React.Component { - {this.state.info - ? {this.state.info.message} + {this.state.info ? ( + + {this.state.info.message} - : null} + ) : null} diff --git a/examples/react-native-expo/FileList.js b/examples/react-native-expo/FileList.js index af372f6a2b..131fa60380 100644 --- a/examples/react-native-expo/FileList.js +++ b/examples/react-native-expo/FileList.js @@ -16,12 +16,14 @@ import SvgUri from 'react-native-svg-uri' // } function FileIcon () { - return - - + return ( + + + + ) } function UppyDashboardFileIcon (props) { @@ -31,10 +33,11 @@ function UppyDashboardFileIcon (props) { } const color = getFileTypeIcon(props.type).color return ( - { return ( - {item.type === 'image' - ? - : } + ) : ( + + )} {truncateString(item.name, 20)} {item.type} From 0ccd99ff01bde46c33a63b45270825a313fc100d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Fri, 4 Oct 2019 15:05:50 +0200 Subject: [PATCH 15/15] ` quotes for code things, ' for text things --- bin/locale-packs.js | 2 +- packages/@uppy/aws-s3-multipart/src/MultipartUploader.js | 4 ++-- packages/@uppy/core/src/__snapshots__/index.test.js.snap | 2 +- packages/@uppy/core/src/index.js | 4 ++-- packages/@uppy/core/src/index.test.js | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/locale-packs.js b/bin/locale-packs.js index 68529f90e3..d6834c2ece 100644 --- a/bin/locale-packs.js +++ b/bin/locale-packs.js @@ -18,7 +18,7 @@ if (mode === 'build') { } else if (mode === 'test') { test() } else { - throw new Error('First argument must be either \'build\' or \'test\'') + throw new Error("First argument must be either 'build' or 'test'") } function getSources (pluginName) { diff --git a/packages/@uppy/aws-s3-multipart/src/MultipartUploader.js b/packages/@uppy/aws-s3-multipart/src/MultipartUploader.js index 726cf345c8..2c6e5bb499 100644 --- a/packages/@uppy/aws-s3-multipart/src/MultipartUploader.js +++ b/packages/@uppy/aws-s3-multipart/src/MultipartUploader.js @@ -58,7 +58,7 @@ class MultipartUploader { 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 }\'.') + throw new TypeError('AwsS3/Multipart: Got incorrect result from `createMultipartUpload()`, expected an object `{ uploadId, key }`.') } return result }).then((result) => { @@ -145,7 +145,7 @@ class MultipartUploader { 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 }\'.') + throw new TypeError('AwsS3/Multipart: Got incorrect result from `prepareUploadPart()`, expected an object `{ url }`.') } return result }).then(({ url }) => { diff --git a/packages/@uppy/core/src/__snapshots__/index.test.js.snap b/packages/@uppy/core/src/__snapshots__/index.test.js.snap index 337f4220d1..1762b1101e 100644 --- a/packages/@uppy/core/src/__snapshots__/index.test.js.snap +++ b/packages/@uppy/core/src/__snapshots__/index.test.js.snap @@ -8,7 +8,7 @@ exports[`src/Core plugins should not be able to add an invalid plugin 1`] = `"Ex exports[`src/Core plugins should prevent the same plugin from being added more than once 1`] = ` "Already found a plugin named 'TestSelector1'. Tried to use: 'TestSelector1'. -Uppy plugins must have unique 'id' options. See https://uppy.io/docs/plugins/#id." +Uppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id." `; exports[`src/Core uploading a file should only upload files that are not already assigned to another upload id 1`] = ` diff --git a/packages/@uppy/core/src/index.js b/packages/@uppy/core/src/index.js index 27dd74d366..03c961760d 100644 --- a/packages/@uppy/core/src/index.js +++ b/packages/@uppy/core/src/index.js @@ -117,7 +117,7 @@ class Uppy { if (this.opts.restrictions.allowedFileTypes && this.opts.restrictions.allowedFileTypes !== null && !Array.isArray(this.opts.restrictions.allowedFileTypes)) { - throw new TypeError('\'restrictions.allowedFileTypes\' must be an array') + throw new TypeError('`restrictions.allowedFileTypes` must be an array') } // i18n @@ -961,7 +961,7 @@ class Uppy { if (existsPluginAlready) { const msg = `Already found a plugin named '${existsPluginAlready.id}'. ` + `Tried to use: '${pluginId}'.\n` + - 'Uppy plugins must have unique \'id\' options. See https://uppy.io/docs/plugins/#id.' + 'Uppy plugins must have unique `id` options. See https://uppy.io/docs/plugins/#id.' throw new Error(msg) } diff --git a/packages/@uppy/core/src/index.test.js b/packages/@uppy/core/src/index.test.js index c322f1fafe..6134396f70 100644 --- a/packages/@uppy/core/src/index.test.js +++ b/packages/@uppy/core/src/index.test.js @@ -667,7 +667,7 @@ describe('src/Core', () => { } }) }).toThrow( - 'Cannot add the duplicate file \'foo.jpg\', it already exists' + "Cannot add the duplicate file 'foo.jpg', it already exists" ) expect(core.getFiles().length).toEqual(1) }) @@ -1389,7 +1389,7 @@ describe('src/Core', () => { }) core.log('hi') } catch (err) { - expect(err).toMatchObject(new Error('\'restrictions.allowedFileTypes\' must be an array')) + expect(err).toMatchObject(new Error('`restrictions.allowedFileTypes` must be an array')) } })