diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 3504253..2928308 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -8,6 +8,11 @@ module.exports = { parser: "@typescript-eslint/parser", ecmaVersion: 2020, }, + settings: { + react: { + version: "detect", + }, + }, extends: [ "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended", diff --git a/ava.config.js b/ava.config.js index 383fe47..0ad8ddb 100644 --- a/ava.config.js +++ b/ava.config.js @@ -1,6 +1,6 @@ export default { - extensions: ["ts"], - files: ["./test/**/*.test.ts"], + extensions: ["ts", "tsx"], + files: ["./test/**/*.test.ts", "./test/**/*.test.tsx"], require: ["ts-eager/register"], verbose: true, }; diff --git a/package-lock.json b/package-lock.json index 4cf4f33..6d42d40 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,25 +11,29 @@ "dependencies": { "@prismicio/client": "^6.0.0-alpha.2", "@prismicio/helpers": "^2.0.0-alpha.0", - "react": "^17.0.2" + "react": "^17.0.2", + "react-test-renderer": "^17.0.2" }, "devDependencies": { - "@prismicio/types": "^0.0.9", - "@types/react": "^17.0.11", - "@typescript-eslint/eslint-plugin": "^4.26.1", - "@typescript-eslint/parser": "^4.26.1", + "@prismicio/types": "^0.1.0", + "@types/react": "^17.0.13", + "@types/react-test-renderer": "^17.0.1", + "@types/sinon": "^10.0.2", + "@typescript-eslint/eslint-plugin": "^4.28.1", + "@typescript-eslint/parser": "^4.28.1", "ava": "^3.15.0", - "eslint": "^7.28.0", + "eslint": "^7.29.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^3.4.0", "eslint-plugin-react": "^7.24.0", "eslint-plugin-react-hooks": "^4.2.0", "nyc": "^15.1.0", - "prettier": "^2.3.1", - "siroc": "^0.11.0", + "prettier": "^2.3.2", + "sinon": "^11.1.1", + "siroc": "^0.11.1", "standard-version": "^9.3.0", "ts-eager": "^2.0.2", - "typescript": "^4.3.2" + "typescript": "^4.3.5" }, "engines": { "node": ">=12.7.0" @@ -77,10 +81,6 @@ }, "engines": { "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" } }, "node_modules/@babel/core/node_modules/@babel/code-frame": { @@ -131,9 +131,6 @@ }, "engines": { "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-compilation-targets/node_modules/semver": { @@ -600,10 +597,19 @@ "node": ">=12.7.0" } }, + "node_modules/@prismicio/helpers/node_modules/@prismicio/types": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/@prismicio/types/-/types-0.0.12.tgz", + "integrity": "sha512-qDnPUf20AxZPXiAJATsm+gZoz7m2dYnKL+u317P7C2anX/w6olcwAkhn4Ru3/wtwQ/sNJkyk8Y+wWZWa7h/Ovw==", + "engines": { + "node": ">=12.7.0" + } + }, "node_modules/@prismicio/types": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/@prismicio/types/-/types-0.0.9.tgz", - "integrity": "sha512-uK3KLvwb+GwaqUEi8oEU4SP+XdPpIJmaBGE5LQQWeCH608VQDyhP+MKN+OyyNlOE9dbCFzwGDO4X3u2FDREKbg==", + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@prismicio/types/-/types-0.1.0.tgz", + "integrity": "sha512-NptG7Wiipo5cCPalaWgTa5/sp3ZhimDvWwCaOZniUYzyvTADedvxlvk5oM/tNl5I6VD84ZgSGIDmE1c9bh/MMg==", + "dev": true, "engines": { "node": ">=12.7.0" } @@ -618,9 +624,6 @@ }, "engines": { "node": ">=8.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0" } }, "node_modules/@rollup/plugin-commonjs": { @@ -639,9 +642,6 @@ }, "engines": { "node": ">= 8.0.0" - }, - "peerDependencies": { - "rollup": "^2.38.3" } }, "node_modules/@rollup/plugin-json": { @@ -651,9 +651,6 @@ "dev": true, "dependencies": { "@rollup/pluginutils": "^3.0.8" - }, - "peerDependencies": { - "rollup": "^1.20.0 || ^2.0.0" } }, "node_modules/@rollup/plugin-node-resolve": { @@ -671,9 +668,6 @@ }, "engines": { "node": ">= 10.0.0" - }, - "peerDependencies": { - "rollup": "^2.42.0" } }, "node_modules/@rollup/plugin-replace": { @@ -684,9 +678,6 @@ "dependencies": { "@rollup/pluginutils": "^3.1.0", "magic-string": "^0.25.7" - }, - "peerDependencies": { - "rollup": "^1.20.0 || ^2.0.0" } }, "node_modules/@rollup/pluginutils": { @@ -701,9 +692,6 @@ }, "engines": { "node": ">= 8.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0" } }, "node_modules/@rollup/pluginutils/node_modules/estree-walker": { @@ -721,6 +709,41 @@ "node": ">=6" } }, + "node_modules/@sinonjs/commons": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz", + "integrity": "sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.7.0" + } + }, + "node_modules/@sinonjs/samsam": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.0.2.tgz", + "integrity": "sha512-jxPRPp9n93ci7b8hMfJOFDPRLFYadN6FSpeROFTR4UNF4i5b+EK6m4QXPO46BDhFgRy1JuS87zAnFOzCUwMJcQ==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.6.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" + } + }, + "node_modules/@sinonjs/text-encoding": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", + "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "dev": true + }, "node_modules/@szmarczak/http-timer": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", @@ -768,9 +791,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "15.12.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-15.12.2.tgz", - "integrity": "sha512-zjQ69G564OCIWIOHSXyQEEDpdpGl+G348RAKY0XXy9Z5kU9Vzv1GMNnkar/ZJ8dzXB3COzD9Mo9NtRZ4xfgUww==", + "version": "15.14.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-15.14.0.tgz", + "integrity": "sha512-um/+/ip3QZmwLfIkWZSNtQIJNVAqrJ92OkLMeuZrjZMTAJniI7fh8N8OICyDhAJ2mzgk/fmYFo72jRr5HyZ1EQ==", "dev": true }, "node_modules/@types/normalize-package-data": { @@ -786,9 +809,9 @@ "dev": true }, "node_modules/@types/react": { - "version": "17.0.11", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.11.tgz", - "integrity": "sha512-yFRQbD+whVonItSk7ZzP/L+gPTJVBkL/7shLEF+i9GC/1cV3JmUxEQz6+9ylhUpWSDuqo1N9qEvqS6vTj4USUA==", + "version": "17.0.13", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.13.tgz", + "integrity": "sha512-D/G3PiuqTfE3IMNjLn/DCp6umjVCSvtZTPdtAFy5+Ved6CsdRvivfKeCzw79W4AatShtU4nGqgvOv5Gro534vQ==", "dev": true, "dependencies": { "@types/prop-types": "*", @@ -796,6 +819,15 @@ "csstype": "^3.0.2" } }, + "node_modules/@types/react-test-renderer": { + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/@types/react-test-renderer/-/react-test-renderer-17.0.1.tgz", + "integrity": "sha512-3Fi2O6Zzq/f3QR9dRnlnHso9bMl7weKCviFmfF6B4LS1Uat6Hkm15k0ZAQuDz+UBq6B3+g+NM6IT2nr5QgPzCw==", + "dev": true, + "dependencies": { + "@types/react": "*" + } + }, "node_modules/@types/resolve": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", @@ -811,127 +843,95 @@ "integrity": "sha512-EaCxbanVeyxDRTQBkdLb3Bvl/HK7PBK6UJjsSixB0iHKoWxE5uu2Q/DgtpOhPIojN0Zl1whvOd7PoHs2P0s5eA==", "dev": true }, + "node_modules/@types/sinon": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.2.tgz", + "integrity": "sha512-BHn8Bpkapj8Wdfxvh2jWIUoaYB/9/XhsL0oOvBfRagJtKlSl9NWPcFOz2lRukI9szwGxFtYZCTejJSqsGDbdmw==", + "dev": true, + "dependencies": { + "@sinonjs/fake-timers": "^7.1.0" + } + }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "4.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.27.0.tgz", - "integrity": "sha512-DsLqxeUfLVNp3AO7PC3JyaddmEHTtI9qTSAs+RB6ja27QvIM0TA8Cizn1qcS6vOu+WDLFJzkwkgweiyFhssDdQ==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.28.1.tgz", + "integrity": "sha512-9yfcNpDaNGQ6/LQOX/KhUFTR1sCKH+PBr234k6hI9XJ0VP5UqGxap0AnNwBnWFk1MNyWBylJH9ZkzBXC+5akZQ==", "dev": true, "dependencies": { - "@typescript-eslint/experimental-utils": "4.27.0", - "@typescript-eslint/scope-manager": "4.27.0", + "@typescript-eslint/experimental-utils": "4.28.1", + "@typescript-eslint/scope-manager": "4.28.1", "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", - "lodash": "^4.17.21", "regexpp": "^3.1.0", "semver": "^7.3.5", "tsutils": "^3.21.0" }, "engines": { "node": "^10.12.0 || >=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^4.0.0", - "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } } }, "node_modules/@typescript-eslint/experimental-utils": { - "version": "4.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.27.0.tgz", - "integrity": "sha512-n5NlbnmzT2MXlyT+Y0Jf0gsmAQzCnQSWXKy4RGSXVStjDvS5we9IWbh7qRVKdGcxT0WYlgcCYUK/HRg7xFhvjQ==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.28.1.tgz", + "integrity": "sha512-n8/ggadrZ+uyrfrSEchx3jgODdmcx7MzVM2sI3cTpI/YlfSm0+9HEUaWw3aQn2urL2KYlWYMDgn45iLfjDYB+Q==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.27.0", - "@typescript-eslint/types": "4.27.0", - "@typescript-eslint/typescript-estree": "4.27.0", + "@typescript-eslint/scope-manager": "4.28.1", + "@typescript-eslint/types": "4.28.1", + "@typescript-eslint/typescript-estree": "4.28.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, "engines": { "node": "^10.12.0 || >=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" } }, "node_modules/@typescript-eslint/parser": { - "version": "4.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.27.0.tgz", - "integrity": "sha512-XpbxL+M+gClmJcJ5kHnUpBGmlGdgNvy6cehgR6ufyxkEJMGP25tZKCaKyC0W/JVpuhU3VU1RBn7SYUPKSMqQvQ==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.28.1.tgz", + "integrity": "sha512-UjrMsgnhQIIK82hXGaD+MCN8IfORS1CbMdu7VlZbYa8LCZtbZjJA26De4IPQB7XYZbL8gJ99KWNj0l6WD0guJg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "4.27.0", - "@typescript-eslint/types": "4.27.0", - "@typescript-eslint/typescript-estree": "4.27.0", + "@typescript-eslint/scope-manager": "4.28.1", + "@typescript-eslint/types": "4.28.1", + "@typescript-eslint/typescript-estree": "4.28.1", "debug": "^4.3.1" }, "engines": { "node": "^10.12.0 || >=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "4.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.27.0.tgz", - "integrity": "sha512-DY73jK6SEH6UDdzc6maF19AHQJBFVRf6fgAXHPXCGEmpqD4vYgPEzqpFz1lf/daSbOcMpPPj9tyXXDPW2XReAw==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.28.1.tgz", + "integrity": "sha512-o95bvGKfss6705x7jFGDyS7trAORTy57lwJ+VsYwil/lOUxKQ9tA7Suuq+ciMhJc/1qPwB3XE2DKh9wubW8YYA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "4.27.0", - "@typescript-eslint/visitor-keys": "4.27.0" + "@typescript-eslint/types": "4.28.1", + "@typescript-eslint/visitor-keys": "4.28.1" }, "engines": { "node": "^8.10.0 || ^10.13.0 || >=11.10.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" } }, "node_modules/@typescript-eslint/types": { - "version": "4.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.27.0.tgz", - "integrity": "sha512-I4ps3SCPFCKclRcvnsVA/7sWzh7naaM/b4pBO2hVxnM3wrU51Lveybdw5WoIktU/V4KfXrTt94V9b065b/0+wA==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.28.1.tgz", + "integrity": "sha512-4z+knEihcyX7blAGi7O3Fm3O6YRCP+r56NJFMNGsmtdw+NCdpG5SgNz427LS9nQkRVTswZLhz484hakQwB8RRg==", "dev": true, "engines": { "node": "^8.10.0 || ^10.13.0 || >=11.10.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "4.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.27.0.tgz", - "integrity": "sha512-KH03GUsUj41sRLLEy2JHstnezgpS5VNhrJouRdmh6yNdQ+yl8w5LrSwBkExM+jWwCJa7Ct2c8yl8NdtNRyQO6g==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.28.1.tgz", + "integrity": "sha512-GhKxmC4sHXxHGJv8e8egAZeTZ6HI4mLU6S7FUzvFOtsk7ZIDN1ksA9r9DyOgNqowA9yAtZXV0Uiap61bIO81FQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "4.27.0", - "@typescript-eslint/visitor-keys": "4.27.0", + "@typescript-eslint/types": "4.28.1", + "@typescript-eslint/visitor-keys": "4.28.1", "debug": "^4.3.1", "globby": "^11.0.3", "is-glob": "^4.0.1", @@ -940,32 +940,19 @@ }, "engines": { "node": "^10.12.0 || >=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "4.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.27.0.tgz", - "integrity": "sha512-es0GRYNZp0ieckZ938cEANfEhsfHrzuLrePukLKtY3/KPXcq1Xd555Mno9/GOgXhKzn0QfkDLVgqWO3dGY80bg==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.28.1.tgz", + "integrity": "sha512-K4HMrdFqr9PFquPu178SaSb92CaWe2yErXyPumc8cYWxFmhgJsNY9eSePmO05j0JhBvf2Cdhptd6E6Yv9HVHcg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "4.27.0", + "@typescript-eslint/types": "4.28.1", "eslint-visitor-keys": "^2.0.0" }, "engines": { "node": "^8.10.0 || ^10.13.0 || >=11.10.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" } }, "node_modules/acorn": { @@ -984,10 +971,7 @@ "version": "5.3.1", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", - "dev": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } + "dev": true }, "node_modules/acorn-walk": { "version": "8.1.0", @@ -1027,10 +1011,6 @@ "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" } }, "node_modules/ansi-align": { @@ -1117,9 +1097,6 @@ "dev": true, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/anymatch": { @@ -1191,9 +1168,6 @@ }, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/array-union": { @@ -1218,9 +1192,6 @@ }, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/arrgv": { @@ -1330,21 +1301,7 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] + "dev": true }, "node_modules/binary-extensions": { "version": "2.2.0", @@ -1389,9 +1346,6 @@ }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/boxen/node_modules/camelcase": { @@ -1401,9 +1355,6 @@ "dev": true, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/brace-expansion": { @@ -1445,10 +1396,6 @@ }, "engines": { "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" } }, "node_modules/buffer": { @@ -1456,20 +1403,6 @@ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" @@ -1488,9 +1421,6 @@ "dev": true, "engines": { "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/cac": { @@ -1530,9 +1460,6 @@ }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/cacheable-request/node_modules/lowercase-keys": { @@ -1567,9 +1494,6 @@ "dependencies": { "function-bind": "^1.1.1", "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/callsites": { @@ -1602,20 +1526,13 @@ }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/caniuse-lite": { "version": "1.0.30001237", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001237.tgz", "integrity": "sha512-pDHgRndit6p1NR2GhzMbQ6CkRrp4VKuSsqbcLeOQppYPKOYkKT/6ZvZDvKJUqcmtyWIAHuZq3SVS2vc1egCZzw==", - "dev": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - } + "dev": true }, "node_modules/chalk": { "version": "4.1.1", @@ -1628,9 +1545,6 @@ }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/chalk/node_modules/ansi-styles": { @@ -1643,9 +1557,6 @@ }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/chalk/node_modules/color-convert": { @@ -1730,9 +1641,6 @@ "dev": true, "engines": { "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/cli-cursor": { @@ -1754,9 +1662,6 @@ "dev": true, "engines": { "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/cli-truncate": { @@ -1770,9 +1675,6 @@ }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/cliui": { @@ -2410,11 +2312,6 @@ }, "engines": { "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } } }, "node_modules/debug/node_modules/ms": { @@ -2552,9 +2449,6 @@ }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/detect-indent": { @@ -2575,6 +2469,15 @@ "node": ">=8" } }, + "node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -2689,9 +2592,6 @@ "dev": true, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" } }, "node_modules/emoji-regex": { @@ -2764,9 +2664,6 @@ }, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/es-to-primitive": { @@ -2781,9 +2678,6 @@ }, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/es6-error": { @@ -2793,11 +2687,10 @@ "dev": true }, "node_modules/esbuild": { - "version": "0.12.9", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.9.tgz", - "integrity": "sha512-MWRhAbMOJ9RJygCrt778rz/qNYgA4ZVj6aXnNPxFjs7PmIpb0fuB9Gmg5uWrr6n++XKwwm/RmSz6RR5JL2Ocsw==", + "version": "0.12.13", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.13.tgz", + "integrity": "sha512-fnKinmXcW1DMYnf1Ol3ZO0yU7dBDCuPcE4XDwceIy2zqTvB4G0NfonqgdvPMJi/IXRoVi/w9r9O5xxg/SqiAxA==", "dev": true, - "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" } @@ -2827,15 +2720,12 @@ "dev": true, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/eslint": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.28.0.tgz", - "integrity": "sha512-UMfH0VSjP0G4p3EWirscJEQ/cHqnT/iuH6oNZOB94nBjWbMnhGEPxsZm1eyIW0C/9jLI0Fow4W5DXLjEI7mn1g==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.29.0.tgz", + "integrity": "sha512-82G/JToB9qIy/ArBzIWG9xvvwL3R86AlCjtGw+A29OMZDqhTybz/MByORSukGxeI+YPCR4coYyITKk8BFH9nDA==", "dev": true, "dependencies": { "@babel/code-frame": "7.12.11", @@ -2883,9 +2773,6 @@ }, "engines": { "node": "^10.12.0 || >=12.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-config-prettier": { @@ -2895,9 +2782,6 @@ "dev": true, "bin": { "eslint-config-prettier": "bin/cli.js" - }, - "peerDependencies": { - "eslint": ">=7.0.0" } }, "node_modules/eslint-plugin-prettier": { @@ -2910,15 +2794,6 @@ }, "engines": { "node": ">=6.0.0" - }, - "peerDependencies": { - "eslint": ">=5.0.0", - "prettier": ">=1.13.0" - }, - "peerDependenciesMeta": { - "eslint-config-prettier": { - "optional": true - } } }, "node_modules/eslint-plugin-react": { @@ -2942,9 +2817,6 @@ }, "engines": { "node": ">=4" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7" } }, "node_modules/eslint-plugin-react-hooks": { @@ -2954,9 +2826,6 @@ "dev": true, "engines": { "node": ">=10" - }, - "peerDependencies": { - "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" } }, "node_modules/eslint-plugin-react/node_modules/doctrine": { @@ -2979,9 +2848,6 @@ "dependencies": { "is-core-module": "^2.2.0", "path-parse": "^1.0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/eslint-scope": { @@ -3007,12 +2873,6 @@ }, "engines": { "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" } }, "node_modules/eslint-visitor-keys": { @@ -3034,9 +2894,6 @@ }, "engines": { "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" } }, "node_modules/eslint/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { @@ -3180,9 +3037,6 @@ }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, "node_modules/fast-deep-equal": { @@ -3245,9 +3099,6 @@ }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/figures/node_modules/escape-string-regexp": { @@ -3295,9 +3146,6 @@ }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" } }, "node_modules/find-up": { @@ -3349,21 +3197,7 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] + "dev": true }, "node_modules/fs-access": { "version": "1.0.1", @@ -3402,7 +3236,6 @@ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, - "hasInstallScript": true, "optional": true, "os": [ "darwin" @@ -3450,9 +3283,6 @@ "function-bind": "^1.1.1", "has": "^1.0.3", "has-symbols": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/get-package-type": { @@ -3746,19 +3576,13 @@ "dev": true, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/git-hooks-list": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/git-hooks-list/-/git-hooks-list-1.0.3.tgz", "integrity": "sha512-Y7wLWcrLUXwk2noSka166byGCvhMtDRpgHdzCno1UQv/n/Hegp++a2xBWJL1lJarnKD3SWaljD+0z1ztqxuKyQ==", - "dev": true, - "funding": { - "url": "https://github.com/fisker/git-hooks-list?sponsor=1" - } + "dev": true }, "node_modules/git-raw-commits": { "version": "2.0.10", @@ -3850,9 +3674,6 @@ }, "engines": { "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" } }, "node_modules/glob-parent": { @@ -3877,9 +3698,6 @@ }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/global-dirs/node_modules/ini": { @@ -3901,9 +3719,6 @@ }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/globby": { @@ -3921,9 +3736,6 @@ }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/globby/node_modules/ignore": { @@ -4030,10 +3842,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "dev": true }, "node_modules/has-flag": { "version": "4.0.0", @@ -4051,9 +3860,6 @@ "dev": true, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-yarn": { @@ -4076,9 +3882,6 @@ }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/hasha/node_modules/type-fest": { @@ -4130,21 +3933,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] + "dev": true }, "node_modules/ignore": { "version": "4.0.6", @@ -4175,9 +3964,6 @@ }, "engines": { "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/import-lazy": { @@ -4287,10 +4073,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz", "integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "dev": true }, "node_modules/is-binary-path": { "version": "2.1.0", @@ -4314,9 +4097,6 @@ }, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-callable": { @@ -4326,9 +4106,6 @@ "dev": true, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-ci": { @@ -4350,9 +4127,6 @@ "dev": true, "dependencies": { "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-date-object": { @@ -4362,9 +4136,6 @@ "dev": true, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-error": { @@ -4389,9 +4160,6 @@ "dev": true, "engines": { "node": ">=0.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-fullwidth-code-point": { @@ -4426,9 +4194,6 @@ }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-interactive": { @@ -4453,9 +4218,6 @@ "dev": true, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-npm": { @@ -4465,9 +4227,6 @@ "dev": true, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-number": { @@ -4486,9 +4245,6 @@ "dev": true, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-obj": { @@ -4562,9 +4318,6 @@ }, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-stream": { @@ -4583,9 +4336,6 @@ "dev": true, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-symbol": { @@ -4598,9 +4348,6 @@ }, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-text-path": { @@ -4628,9 +4375,6 @@ "dev": true, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-utf8": { @@ -4911,10 +4655,8 @@ "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, "dependencies": { + "graceful-fs": "^4.1.6", "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" } }, "node_modules/jsonparse": { @@ -4955,6 +4697,12 @@ "node": ">=4.0" } }, + "node_modules/just-extend": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", + "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", + "dev": true + }, "node_modules/keyv": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", @@ -5068,6 +4816,12 @@ "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", "dev": true }, + "node_modules/lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, "node_modules/lodash.ismatch": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", @@ -5097,9 +4851,6 @@ }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/loose-envify": { @@ -5166,9 +4917,6 @@ }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/make-dir/node_modules/semver": { @@ -5199,9 +4947,6 @@ "dev": true, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/matcher": { @@ -5239,9 +4984,6 @@ }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/mem?sponsor=1" } }, "node_modules/meow": { @@ -5264,9 +5006,6 @@ }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/meow/node_modules/hosted-git-info": { @@ -5308,9 +5047,6 @@ }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/meow/node_modules/read-pkg-up/node_modules/type-fest": { @@ -5329,9 +5065,6 @@ "dev": true, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/merge-stream": { @@ -5456,14 +5189,6 @@ }, "bin": { "mkdist": "dist/cli.js" - }, - "peerDependencies": { - "typescript": ">=3.7" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } } }, "node_modules/modify-values": { @@ -5502,6 +5227,19 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, + "node_modules/nise": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.0.tgz", + "integrity": "sha512-W5WlHu+wvo3PaKLsJJkgPup2LrsXCcm7AWwyNZkUnn5rwPkuPBi3Iwk5SQtN0mv+K65k7nKKjwNQ30wg3wLAQQ==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.7.0", + "@sinonjs/fake-timers": "^7.0.4", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "path-to-regexp": "^1.7.0" + } + }, "node_modules/node-preload": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", @@ -5631,9 +5369,6 @@ }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/nyc/node_modules/cliui": { @@ -5753,10 +5488,7 @@ "version": "1.10.3", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.3.tgz", "integrity": "sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "dev": true }, "node_modules/object-keys": { "version": "1.1.1", @@ -5780,9 +5512,6 @@ }, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/object.entries": { @@ -5812,9 +5541,6 @@ }, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/object.values": { @@ -5829,9 +5555,6 @@ }, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/once": { @@ -5853,9 +5576,6 @@ }, "engines": { "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/onetime/node_modules/mimic-fn": { @@ -5902,9 +5622,6 @@ }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-cancelable": { @@ -5935,9 +5652,6 @@ }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-finally": { @@ -5959,9 +5673,6 @@ }, "engines": { "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-locate": { @@ -5986,9 +5697,6 @@ }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-timeout": { @@ -6124,6 +5832,21 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "dependencies": { + "isarray": "0.0.1" + } + }, + "node_modules/path-to-regexp/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -6140,9 +5863,6 @@ "dev": true, "engines": { "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" } }, "node_modules/pify": { @@ -6256,9 +5976,6 @@ }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/prelude-ls": { @@ -6280,9 +5997,9 @@ } }, "node_modules/prettier": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.1.tgz", - "integrity": "sha512-p+vNbgpLjif/+D+DwAZAbndtRrR0md0MwfmOVN9N+2RgyACMT+7tfaRnT+WDPkqnuVwleyuBIG2XBxKDme3hPA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.2.tgz", + "integrity": "sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==", "dev": true, "bin": { "prettier": "bin-prettier.js" @@ -6313,9 +6030,6 @@ }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/process-nextick-args": { @@ -6401,21 +6115,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] + "dev": true }, "node_modules/quick-lru": { "version": "4.0.1", @@ -6465,8 +6165,38 @@ "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, + "node_modules/react-shallow-renderer": { + "version": "16.14.1", + "resolved": "https://registry.npmjs.org/react-shallow-renderer/-/react-shallow-renderer-16.14.1.tgz", + "integrity": "sha512-rkIMcQi01/+kxiTE9D3fdS959U1g7gs+/rborw++42m1O9FAQiNI/UNRZExVUoAOprn4umcXf+pFRou8i4zuBg==", + "dependencies": { + "object-assign": "^4.1.1", + "react-is": "^16.12.0 || ^17.0.0" + }, + "peerDependencies": { + "react": "^16.0.0 || ^17.0.0" + } + }, + "node_modules/react-test-renderer": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-17.0.2.tgz", + "integrity": "sha512-yaQ9cB89c17PUb0x6UfWRs7kQCorVdHlutU1boVPEsB8IDZH6n9tHxMacc3y0JoXOJUsZb/t/Mb8FUWMKaM7iQ==", + "dependencies": { + "object-assign": "^4.1.1", + "react-is": "^17.0.2", + "react-shallow-renderer": "^16.13.1", + "scheduler": "^0.20.2" + }, + "peerDependencies": { + "react": "17.0.2" + } + }, + "node_modules/react-test-renderer/node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" }, "node_modules/read-pkg": { "version": "5.2.0", @@ -6635,9 +6365,6 @@ }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/read-pkg/node_modules/type-fest": { @@ -6711,9 +6438,6 @@ }, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/regexpp": { @@ -6723,9 +6447,6 @@ "dev": true, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" } }, "node_modules/registry-auth-token": { @@ -6808,9 +6529,6 @@ "dependencies": { "is-core-module": "^2.2.0", "path-parse": "^1.0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/resolve-cwd": { @@ -6885,15 +6603,12 @@ }, "bin": { "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" } }, "node_modules/rollup": { - "version": "2.52.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.52.0.tgz", - "integrity": "sha512-lSkBDGsVoXjqaBf7dsHwxBJz+p+hJEP72P+LOitA0yVs+Nzxj76FidkZE2thrmhjwGqLYiJo39opi7mAfaQ/Vg==", + "version": "2.52.6", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.52.6.tgz", + "integrity": "sha512-H+Xudmwf8KO+xji8njQNoIQRp8l+iQge/NdUR20JngTxVYdEEnlpkMvQ71YGLl3+xZcPecmdj4q2lrClKaPdRA==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -6916,15 +6631,8 @@ "engines": { "node": ">=v12.22.1" }, - "funding": { - "url": "https://github.com/sponsors/Swatinem" - }, "optionalDependencies": { "@babel/code-frame": "^7.12.13" - }, - "peerDependencies": { - "rollup": "^2.48.0", - "typescript": "^4.2.4" } }, "node_modules/rollup-plugin-dts/node_modules/@babel/code-frame": { @@ -6941,9 +6649,9 @@ } }, "node_modules/rollup-plugin-esbuild": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/rollup-plugin-esbuild/-/rollup-plugin-esbuild-4.2.3.tgz", - "integrity": "sha512-GWyDUPv79Iw4uQdizD7ch7yA+wiB9W4Ye01RmO/kuF3yjybluJT5rbmLAnyv3kWmOF8suOjf+TvvBCXEj6qSAw==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-esbuild/-/rollup-plugin-esbuild-4.5.0.tgz", + "integrity": "sha512-ieUd3AoYWsN6Tfp0LBNnC+QpdhKjDEaH4NK3ghuEXOH56/7TAtD+hMbD9vSWZgsGSbaqCkrn4j6PaUj1vOSt1g==", "dev": true, "dependencies": { "@rollup/pluginutils": "^4.1.0", @@ -6952,10 +6660,6 @@ }, "engines": { "node": ">=12" - }, - "peerDependencies": { - "esbuild": ">=0.10.1", - "rollup": "^1.20.0 || ^2.0.0" } }, "node_modules/rollup-plugin-esbuild/node_modules/@rollup/pluginutils": { @@ -6969,9 +6673,6 @@ }, "engines": { "node": ">= 8.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0" } }, "node_modules/run-parallel": { @@ -6979,20 +6680,6 @@ "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], "dependencies": { "queue-microtask": "^1.2.2" } @@ -7003,6 +6690,15 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, + "node_modules/scheduler": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", + "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, "node_modules/semver": { "version": "7.3.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", @@ -7049,9 +6745,6 @@ }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/serialize-error/node_modules/type-fest": { @@ -7061,9 +6754,6 @@ "dev": true, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/set-blocking": { @@ -7119,9 +6809,6 @@ "call-bind": "^1.0.0", "get-intrinsic": "^1.0.2", "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/signal-exit": { @@ -7130,10 +6817,28 @@ "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", "dev": true }, + "node_modules/sinon": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-11.1.1.tgz", + "integrity": "sha512-ZSSmlkSyhUWbkF01Z9tEbxZLF/5tRC9eojCdFh33gtQaP7ITQVaMWQHGuFM7Cuf/KEfihuh1tTl3/ABju3AQMg==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.8.3", + "@sinonjs/fake-timers": "^7.1.0", + "@sinonjs/samsam": "^6.0.2", + "diff": "^5.0.0", + "nise": "^5.1.0", + "supports-color": "^7.2.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/sinon" + } + }, "node_modules/siroc": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/siroc/-/siroc-0.11.0.tgz", - "integrity": "sha512-xzwpNtpVSxpEuv/CfHSVZrZQd4NAyqgWJU/7IN6nqfBlGhzKRvFkNw270NJJH1mYMtz5+PgjCC4ujPx6Nh2n6g==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/siroc/-/siroc-0.11.1.tgz", + "integrity": "sha512-xC4WLMf5yssdEGDdi2mMAPhNXDpDVa2QETHWYFtwP/WI4BZE4yFbIwzNZZmWe6TS0orj002TOVKktEdxPAxwDA==", "dev": true, "dependencies": { "@rollup/plugin-alias": "^3.1.2", @@ -7145,17 +6850,18 @@ "chalk": "^4.1.1", "consola": "^2.15.3", "defu": "^5.0.0", - "esbuild": "^0.12.5", - "execa": "^5.0.1", + "detect-indent": "^6.1.0", + "esbuild": "^0.12.9", + "execa": "^5.1.1", "fs-extra": "^10.0.0", "glob": "^7.1.7", "jiti": "^1.10.1", - "mkdist": "^0.3.1", - "rollup": "^2.50.5", + "mkdist": "^0.3.2", + "rollup": "^2.52.2", "rollup-plugin-dts": "^3.0.2", - "rollup-plugin-esbuild": "4.2.3", + "rollup-plugin-esbuild": "4.5.0", "sort-package-json": "^1.50.0", - "typescript": "^4.2.4", + "typescript": "^4.3.4", "upath": "^2.0.1", "v8-compile-cache": "^2.3.0" }, @@ -7197,9 +6903,6 @@ }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/slice-ansi/node_modules/color-convert": { @@ -7477,9 +7180,6 @@ }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/standard-version/node_modules/has-flag": { @@ -7501,9 +7201,6 @@ }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/standard-version/node_modules/p-limit": { @@ -7516,9 +7213,6 @@ }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/standard-version/node_modules/p-locate": { @@ -7531,9 +7225,6 @@ }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/standard-version/node_modules/supports-color": { @@ -7561,21 +7252,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] + "dev": true }, "node_modules/string-width": { "version": "4.2.2", @@ -7605,9 +7282,6 @@ "internal-slot": "^1.0.3", "regexp.prototype.flags": "^1.3.1", "side-channel": "^1.0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimend": { @@ -7618,9 +7292,6 @@ "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { @@ -7631,9 +7302,6 @@ "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/stringify-package": { @@ -7691,9 +7359,6 @@ "dev": true, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/supertap": { @@ -7751,10 +7416,6 @@ "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2", "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" } }, "node_modules/table/node_modules/ansi-styles": { @@ -7767,9 +7428,6 @@ }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/table/node_modules/color-convert": { @@ -7808,9 +7466,6 @@ }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, "node_modules/temp-dir": { @@ -7945,7 +7600,6 @@ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.11.23.tgz", "integrity": "sha512-iaiZZ9vUF5wJV8ob1tl+5aJTrwDczlvGP0JoMmnpC2B0ppiMCu8n8gmy5ZTGl5bcG081XBVn+U+jP+mPFm5T5Q==", "dev": true, - "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" } @@ -7966,9 +7620,6 @@ }, "engines": { "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" } }, "node_modules/type-check": { @@ -7983,6 +7634,15 @@ "node": ">= 0.8.0" } }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/type-fest": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", @@ -7990,9 +7650,6 @@ "dev": true, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/typedarray": { @@ -8011,9 +7668,9 @@ } }, "node_modules/typescript": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.3.tgz", - "integrity": "sha512-rUvLW0WtF7PF2b9yenwWUi9Da9euvDRhmH7BLyBG4DCFfOJ850LGNknmRpp8Z8kXNUPObdZQEfKOiHtXuQHHKA==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", + "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -8046,9 +7703,6 @@ "has-bigints": "^1.0.1", "has-symbols": "^1.0.2", "which-boxed-primitive": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/unique-string": { @@ -8105,9 +7759,6 @@ }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/yeoman/update-notifier?sponsor=1" } }, "node_modules/uri-js": { @@ -8141,7 +7792,6 @@ "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", "dev": true, "bin": { "uuid": "bin/uuid" @@ -8217,9 +7867,6 @@ "is-number-object": "^1.0.4", "is-string": "^1.0.5", "is-symbol": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/which-module": { @@ -8267,9 +7914,6 @@ }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/wrap-ansi/node_modules/ansi-styles": { @@ -8282,9 +7926,6 @@ }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/wrap-ansi/node_modules/color-convert": { @@ -8390,9 +8031,6 @@ "dev": true, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } } }, @@ -8832,12 +8470,20 @@ "integrity": "sha512-u17kHMSebQUk1pXXwVGaSs1RPkGz7bTv2SH4n8vYwodhSyLpd6SMyNCi8J4hqzxI8QvWY+wOwLYPtvT27kESDg==", "requires": { "@prismicio/types": "~0.0.7" + }, + "dependencies": { + "@prismicio/types": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/@prismicio/types/-/types-0.0.12.tgz", + "integrity": "sha512-qDnPUf20AxZPXiAJATsm+gZoz7m2dYnKL+u317P7C2anX/w6olcwAkhn4Ru3/wtwQ/sNJkyk8Y+wWZWa7h/Ovw==" + } } }, "@prismicio/types": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/@prismicio/types/-/types-0.0.9.tgz", - "integrity": "sha512-uK3KLvwb+GwaqUEi8oEU4SP+XdPpIJmaBGE5LQQWeCH608VQDyhP+MKN+OyyNlOE9dbCFzwGDO4X3u2FDREKbg==" + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@prismicio/types/-/types-0.1.0.tgz", + "integrity": "sha512-NptG7Wiipo5cCPalaWgTa5/sp3ZhimDvWwCaOZniUYzyvTADedvxlvk5oM/tNl5I6VD84ZgSGIDmE1c9bh/MMg==", + "dev": true }, "@rollup/plugin-alias": { "version": "3.1.2", @@ -8921,6 +8567,41 @@ "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", "dev": true }, + "@sinonjs/commons": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz", + "integrity": "sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, + "@sinonjs/samsam": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.0.2.tgz", + "integrity": "sha512-jxPRPp9n93ci7b8hMfJOFDPRLFYadN6FSpeROFTR4UNF4i5b+EK6m4QXPO46BDhFgRy1JuS87zAnFOzCUwMJcQ==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.6.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" + } + }, + "@sinonjs/text-encoding": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", + "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "dev": true + }, "@szmarczak/http-timer": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", @@ -8965,9 +8646,9 @@ "dev": true }, "@types/node": { - "version": "15.12.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-15.12.2.tgz", - "integrity": "sha512-zjQ69G564OCIWIOHSXyQEEDpdpGl+G348RAKY0XXy9Z5kU9Vzv1GMNnkar/ZJ8dzXB3COzD9Mo9NtRZ4xfgUww==", + "version": "15.14.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-15.14.0.tgz", + "integrity": "sha512-um/+/ip3QZmwLfIkWZSNtQIJNVAqrJ92OkLMeuZrjZMTAJniI7fh8N8OICyDhAJ2mzgk/fmYFo72jRr5HyZ1EQ==", "dev": true }, "@types/normalize-package-data": { @@ -8983,9 +8664,9 @@ "dev": true }, "@types/react": { - "version": "17.0.11", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.11.tgz", - "integrity": "sha512-yFRQbD+whVonItSk7ZzP/L+gPTJVBkL/7shLEF+i9GC/1cV3JmUxEQz6+9ylhUpWSDuqo1N9qEvqS6vTj4USUA==", + "version": "17.0.13", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.13.tgz", + "integrity": "sha512-D/G3PiuqTfE3IMNjLn/DCp6umjVCSvtZTPdtAFy5+Ved6CsdRvivfKeCzw79W4AatShtU4nGqgvOv5Gro534vQ==", "dev": true, "requires": { "@types/prop-types": "*", @@ -8993,6 +8674,15 @@ "csstype": "^3.0.2" } }, + "@types/react-test-renderer": { + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/@types/react-test-renderer/-/react-test-renderer-17.0.1.tgz", + "integrity": "sha512-3Fi2O6Zzq/f3QR9dRnlnHso9bMl7weKCviFmfF6B4LS1Uat6Hkm15k0ZAQuDz+UBq6B3+g+NM6IT2nr5QgPzCw==", + "dev": true, + "requires": { + "@types/react": "*" + } + }, "@types/resolve": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", @@ -9008,72 +8698,80 @@ "integrity": "sha512-EaCxbanVeyxDRTQBkdLb3Bvl/HK7PBK6UJjsSixB0iHKoWxE5uu2Q/DgtpOhPIojN0Zl1whvOd7PoHs2P0s5eA==", "dev": true }, + "@types/sinon": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.2.tgz", + "integrity": "sha512-BHn8Bpkapj8Wdfxvh2jWIUoaYB/9/XhsL0oOvBfRagJtKlSl9NWPcFOz2lRukI9szwGxFtYZCTejJSqsGDbdmw==", + "dev": true, + "requires": { + "@sinonjs/fake-timers": "^7.1.0" + } + }, "@typescript-eslint/eslint-plugin": { - "version": "4.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.27.0.tgz", - "integrity": "sha512-DsLqxeUfLVNp3AO7PC3JyaddmEHTtI9qTSAs+RB6ja27QvIM0TA8Cizn1qcS6vOu+WDLFJzkwkgweiyFhssDdQ==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.28.1.tgz", + "integrity": "sha512-9yfcNpDaNGQ6/LQOX/KhUFTR1sCKH+PBr234k6hI9XJ0VP5UqGxap0AnNwBnWFk1MNyWBylJH9ZkzBXC+5akZQ==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "4.27.0", - "@typescript-eslint/scope-manager": "4.27.0", + "@typescript-eslint/experimental-utils": "4.28.1", + "@typescript-eslint/scope-manager": "4.28.1", "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", - "lodash": "^4.17.21", "regexpp": "^3.1.0", "semver": "^7.3.5", "tsutils": "^3.21.0" } }, "@typescript-eslint/experimental-utils": { - "version": "4.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.27.0.tgz", - "integrity": "sha512-n5NlbnmzT2MXlyT+Y0Jf0gsmAQzCnQSWXKy4RGSXVStjDvS5we9IWbh7qRVKdGcxT0WYlgcCYUK/HRg7xFhvjQ==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.28.1.tgz", + "integrity": "sha512-n8/ggadrZ+uyrfrSEchx3jgODdmcx7MzVM2sI3cTpI/YlfSm0+9HEUaWw3aQn2urL2KYlWYMDgn45iLfjDYB+Q==", "dev": true, "requires": { "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.27.0", - "@typescript-eslint/types": "4.27.0", - "@typescript-eslint/typescript-estree": "4.27.0", + "@typescript-eslint/scope-manager": "4.28.1", + "@typescript-eslint/types": "4.28.1", + "@typescript-eslint/typescript-estree": "4.28.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/parser": { - "version": "4.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.27.0.tgz", - "integrity": "sha512-XpbxL+M+gClmJcJ5kHnUpBGmlGdgNvy6cehgR6ufyxkEJMGP25tZKCaKyC0W/JVpuhU3VU1RBn7SYUPKSMqQvQ==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.28.1.tgz", + "integrity": "sha512-UjrMsgnhQIIK82hXGaD+MCN8IfORS1CbMdu7VlZbYa8LCZtbZjJA26De4IPQB7XYZbL8gJ99KWNj0l6WD0guJg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "4.27.0", - "@typescript-eslint/types": "4.27.0", - "@typescript-eslint/typescript-estree": "4.27.0", + "@typescript-eslint/scope-manager": "4.28.1", + "@typescript-eslint/types": "4.28.1", + "@typescript-eslint/typescript-estree": "4.28.1", "debug": "^4.3.1" } }, "@typescript-eslint/scope-manager": { - "version": "4.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.27.0.tgz", - "integrity": "sha512-DY73jK6SEH6UDdzc6maF19AHQJBFVRf6fgAXHPXCGEmpqD4vYgPEzqpFz1lf/daSbOcMpPPj9tyXXDPW2XReAw==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.28.1.tgz", + "integrity": "sha512-o95bvGKfss6705x7jFGDyS7trAORTy57lwJ+VsYwil/lOUxKQ9tA7Suuq+ciMhJc/1qPwB3XE2DKh9wubW8YYA==", "dev": true, "requires": { - "@typescript-eslint/types": "4.27.0", - "@typescript-eslint/visitor-keys": "4.27.0" + "@typescript-eslint/types": "4.28.1", + "@typescript-eslint/visitor-keys": "4.28.1" } }, "@typescript-eslint/types": { - "version": "4.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.27.0.tgz", - "integrity": "sha512-I4ps3SCPFCKclRcvnsVA/7sWzh7naaM/b4pBO2hVxnM3wrU51Lveybdw5WoIktU/V4KfXrTt94V9b065b/0+wA==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.28.1.tgz", + "integrity": "sha512-4z+knEihcyX7blAGi7O3Fm3O6YRCP+r56NJFMNGsmtdw+NCdpG5SgNz427LS9nQkRVTswZLhz484hakQwB8RRg==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "4.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.27.0.tgz", - "integrity": "sha512-KH03GUsUj41sRLLEy2JHstnezgpS5VNhrJouRdmh6yNdQ+yl8w5LrSwBkExM+jWwCJa7Ct2c8yl8NdtNRyQO6g==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.28.1.tgz", + "integrity": "sha512-GhKxmC4sHXxHGJv8e8egAZeTZ6HI4mLU6S7FUzvFOtsk7ZIDN1ksA9r9DyOgNqowA9yAtZXV0Uiap61bIO81FQ==", "dev": true, "requires": { - "@typescript-eslint/types": "4.27.0", - "@typescript-eslint/visitor-keys": "4.27.0", + "@typescript-eslint/types": "4.28.1", + "@typescript-eslint/visitor-keys": "4.28.1", "debug": "^4.3.1", "globby": "^11.0.3", "is-glob": "^4.0.1", @@ -9082,12 +8780,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "4.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.27.0.tgz", - "integrity": "sha512-es0GRYNZp0ieckZ938cEANfEhsfHrzuLrePukLKtY3/KPXcq1Xd555Mno9/GOgXhKzn0QfkDLVgqWO3dGY80bg==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.28.1.tgz", + "integrity": "sha512-K4HMrdFqr9PFquPu178SaSb92CaWe2yErXyPumc8cYWxFmhgJsNY9eSePmO05j0JhBvf2Cdhptd6E6Yv9HVHcg==", "dev": true, "requires": { - "@typescript-eslint/types": "4.27.0", + "@typescript-eslint/types": "4.28.1", "eslint-visitor-keys": "^2.0.0" } }, @@ -9101,8 +8799,7 @@ "version": "5.3.1", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", - "dev": true, - "requires": {} + "dev": true }, "acorn-walk": { "version": "8.1.0", @@ -10325,6 +10022,12 @@ "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "dev": true }, + "diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "dev": true + }, "dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -10497,9 +10200,9 @@ "dev": true }, "esbuild": { - "version": "0.12.9", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.9.tgz", - "integrity": "sha512-MWRhAbMOJ9RJygCrt778rz/qNYgA4ZVj6aXnNPxFjs7PmIpb0fuB9Gmg5uWrr6n++XKwwm/RmSz6RR5JL2Ocsw==", + "version": "0.12.13", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.13.tgz", + "integrity": "sha512-fnKinmXcW1DMYnf1Ol3ZO0yU7dBDCuPcE4XDwceIy2zqTvB4G0NfonqgdvPMJi/IXRoVi/w9r9O5xxg/SqiAxA==", "dev": true }, "escalade": { @@ -10521,9 +10224,9 @@ "dev": true }, "eslint": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.28.0.tgz", - "integrity": "sha512-UMfH0VSjP0G4p3EWirscJEQ/cHqnT/iuH6oNZOB94nBjWbMnhGEPxsZm1eyIW0C/9jLI0Fow4W5DXLjEI7mn1g==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.29.0.tgz", + "integrity": "sha512-82G/JToB9qIy/ArBzIWG9xvvwL3R86AlCjtGw+A29OMZDqhTybz/MByORSukGxeI+YPCR4coYyITKk8BFH9nDA==", "dev": true, "requires": { "@babel/code-frame": "7.12.11", @@ -10590,8 +10293,7 @@ "version": "8.3.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==", - "dev": true, - "requires": {} + "dev": true }, "eslint-plugin-prettier": { "version": "3.4.0", @@ -10647,8 +10349,7 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.2.0.tgz", "integrity": "sha512-623WEiZJqxR7VdxFCKLI6d6LLpwJkGPYKODnkH3D7WpOG5KM8yWueBd8TLsNAetEJNF5iJmolaAKO3F8yzyVBQ==", - "dev": true, - "requires": {} + "dev": true }, "eslint-scope": { "version": "5.1.1", @@ -12080,6 +11781,12 @@ "object.assign": "^4.1.2" } }, + "just-extend": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", + "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", + "dev": true + }, "keyv": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", @@ -12174,6 +11881,12 @@ "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", "dev": true }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, "lodash.ismatch": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", @@ -12497,6 +12210,19 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, + "nise": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.0.tgz", + "integrity": "sha512-W5WlHu+wvo3PaKLsJJkgPup2LrsXCcm7AWwyNZkUnn5rwPkuPBi3Iwk5SQtN0mv+K65k7nKKjwNQ30wg3wLAQQ==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0", + "@sinonjs/fake-timers": "^7.0.4", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "path-to-regexp": "^1.7.0" + } + }, "node-preload": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", @@ -12968,6 +12694,23 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "requires": { + "isarray": "0.0.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + } + } + }, "path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -13078,9 +12821,9 @@ "dev": true }, "prettier": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.1.tgz", - "integrity": "sha512-p+vNbgpLjif/+D+DwAZAbndtRrR0md0MwfmOVN9N+2RgyACMT+7tfaRnT+WDPkqnuVwleyuBIG2XBxKDme3hPA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.2.tgz", + "integrity": "sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==", "dev": true }, "prettier-linter-helpers": { @@ -13208,8 +12951,34 @@ "react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, + "react-shallow-renderer": { + "version": "16.14.1", + "resolved": "https://registry.npmjs.org/react-shallow-renderer/-/react-shallow-renderer-16.14.1.tgz", + "integrity": "sha512-rkIMcQi01/+kxiTE9D3fdS959U1g7gs+/rborw++42m1O9FAQiNI/UNRZExVUoAOprn4umcXf+pFRou8i4zuBg==", + "requires": { + "object-assign": "^4.1.1", + "react-is": "^16.12.0 || ^17.0.0" + } + }, + "react-test-renderer": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-17.0.2.tgz", + "integrity": "sha512-yaQ9cB89c17PUb0x6UfWRs7kQCorVdHlutU1boVPEsB8IDZH6n9tHxMacc3y0JoXOJUsZb/t/Mb8FUWMKaM7iQ==", + "requires": { + "object-assign": "^4.1.1", + "react-is": "^17.0.2", + "react-shallow-renderer": "^16.13.1", + "scheduler": "^0.20.2" + }, + "dependencies": { + "react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" + } + } }, "read-pkg": { "version": "5.2.0", @@ -13525,9 +13294,9 @@ } }, "rollup": { - "version": "2.52.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.52.0.tgz", - "integrity": "sha512-lSkBDGsVoXjqaBf7dsHwxBJz+p+hJEP72P+LOitA0yVs+Nzxj76FidkZE2thrmhjwGqLYiJo39opi7mAfaQ/Vg==", + "version": "2.52.6", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.52.6.tgz", + "integrity": "sha512-H+Xudmwf8KO+xji8njQNoIQRp8l+iQge/NdUR20JngTxVYdEEnlpkMvQ71YGLl3+xZcPecmdj4q2lrClKaPdRA==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -13556,9 +13325,9 @@ } }, "rollup-plugin-esbuild": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/rollup-plugin-esbuild/-/rollup-plugin-esbuild-4.2.3.tgz", - "integrity": "sha512-GWyDUPv79Iw4uQdizD7ch7yA+wiB9W4Ye01RmO/kuF3yjybluJT5rbmLAnyv3kWmOF8suOjf+TvvBCXEj6qSAw==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-esbuild/-/rollup-plugin-esbuild-4.5.0.tgz", + "integrity": "sha512-ieUd3AoYWsN6Tfp0LBNnC+QpdhKjDEaH4NK3ghuEXOH56/7TAtD+hMbD9vSWZgsGSbaqCkrn4j6PaUj1vOSt1g==", "dev": true, "requires": { "@rollup/pluginutils": "^4.1.0", @@ -13593,6 +13362,15 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, + "scheduler": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", + "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, "semver": { "version": "7.3.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", @@ -13685,10 +13463,24 @@ "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", "dev": true }, + "sinon": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-11.1.1.tgz", + "integrity": "sha512-ZSSmlkSyhUWbkF01Z9tEbxZLF/5tRC9eojCdFh33gtQaP7ITQVaMWQHGuFM7Cuf/KEfihuh1tTl3/ABju3AQMg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.8.3", + "@sinonjs/fake-timers": "^7.1.0", + "@sinonjs/samsam": "^6.0.2", + "diff": "^5.0.0", + "nise": "^5.1.0", + "supports-color": "^7.2.0" + } + }, "siroc": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/siroc/-/siroc-0.11.0.tgz", - "integrity": "sha512-xzwpNtpVSxpEuv/CfHSVZrZQd4NAyqgWJU/7IN6nqfBlGhzKRvFkNw270NJJH1mYMtz5+PgjCC4ujPx6Nh2n6g==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/siroc/-/siroc-0.11.1.tgz", + "integrity": "sha512-xC4WLMf5yssdEGDdi2mMAPhNXDpDVa2QETHWYFtwP/WI4BZE4yFbIwzNZZmWe6TS0orj002TOVKktEdxPAxwDA==", "dev": true, "requires": { "@rollup/plugin-alias": "^3.1.2", @@ -13700,17 +13492,18 @@ "chalk": "^4.1.1", "consola": "^2.15.3", "defu": "^5.0.0", - "esbuild": "^0.12.5", - "execa": "^5.0.1", + "detect-indent": "^6.1.0", + "esbuild": "^0.12.9", + "execa": "^5.1.1", "fs-extra": "^10.0.0", "glob": "^7.1.7", "jiti": "^1.10.1", - "mkdist": "^0.3.1", - "rollup": "^2.50.5", + "mkdist": "^0.3.2", + "rollup": "^2.52.2", "rollup-plugin-dts": "^3.0.2", - "rollup-plugin-esbuild": "4.2.3", + "rollup-plugin-esbuild": "4.5.0", "sort-package-json": "^1.50.0", - "typescript": "^4.2.4", + "typescript": "^4.3.4", "upath": "^2.0.1", "v8-compile-cache": "^2.3.0" } @@ -14344,6 +14137,12 @@ "prelude-ls": "^1.2.1" } }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, "type-fest": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", @@ -14366,9 +14165,9 @@ } }, "typescript": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.3.tgz", - "integrity": "sha512-rUvLW0WtF7PF2b9yenwWUi9Da9euvDRhmH7BLyBG4DCFfOJ850LGNknmRpp8Z8kXNUPObdZQEfKOiHtXuQHHKA==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", + "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", "dev": true }, "uglify-js": { diff --git a/package.json b/package.json index a2c5a44..ae76823 100644 --- a/package.json +++ b/package.json @@ -47,25 +47,29 @@ "dependencies": { "@prismicio/client": "^6.0.0-alpha.2", "@prismicio/helpers": "^2.0.0-alpha.0", - "react": "^17.0.2" + "react": "^17.0.2", + "react-test-renderer": "^17.0.2" }, "devDependencies": { - "@prismicio/types": "^0.0.9", - "@types/react": "^17.0.11", - "@typescript-eslint/eslint-plugin": "^4.26.1", - "@typescript-eslint/parser": "^4.26.1", + "@prismicio/types": "^0.1.0", + "@types/react": "^17.0.13", + "@types/react-test-renderer": "^17.0.1", + "@types/sinon": "^10.0.2", + "@typescript-eslint/eslint-plugin": "^4.28.1", + "@typescript-eslint/parser": "^4.28.1", "ava": "^3.15.0", - "eslint": "^7.28.0", + "eslint": "^7.29.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^3.4.0", "eslint-plugin-react": "^7.24.0", "eslint-plugin-react-hooks": "^4.2.0", "nyc": "^15.1.0", - "prettier": "^2.3.1", - "siroc": "^0.11.0", + "prettier": "^2.3.2", + "sinon": "^11.1.1", + "siroc": "^0.11.1", "standard-version": "^9.3.0", "ts-eager": "^2.0.2", - "typescript": "^4.3.2" + "typescript": "^4.3.5" }, "engines": { "node": ">=12.7.0" diff --git a/src/SliceZone.tsx b/src/SliceZone.tsx new file mode 100644 index 0000000..a5a1b9a --- /dev/null +++ b/src/SliceZone.tsx @@ -0,0 +1,128 @@ +import * as React from "react"; +import * as prismicT from "@prismicio/types"; + +import { __PRODUCTION__ } from "./dev"; + +/** + * The minimum required properties to represent a Prismic Slice for the `` component. + * + * If using Prismic's REST API, use the `Slice` export from `@prismicio/types` for a full interface. + * + * @typeParam SliceType - Type name of the Slice. + */ +export type SliceLike = Pick< + prismicT.Slice, + "slice_type" +>; + +/** + * A looser version of the `SliceZone` type from `@prismicio/types` using `SliceLike`. + * + * If using Prismic's REST API, use the `SliceZone` export from `@prismicio/types` for the full type. + * + * @typeParam TSlice - The type(s) of a Slice in the Slice Zone. + */ +export type SliceZoneLike = readonly TSlice[]; + +/** + * React props for a component rendering content from a Prismic Slice using the `` component. + * + * @typeParam TSlice - The Slice passed as a prop. + * @typeParam TContext - Arbitrary data passed to `` and made available to all Slice components. + */ +export type SliceComponentProps< + TSlice extends SliceLike = SliceLike, + TContext = unknown, +> = { + /** Slice data for this component. */ + slice: TSlice; + + /** The index of the Slice in the Slice Zone. */ + index: number; + + /** The Slice Zone to which the Slice belongs. */ + slices: SliceZoneLike; + + /** Arbitrary data passed to `` and made available to all Slice components. */ + context?: TContext; +}; + +/** + * React props for the `` component. + * + * @typeParam TSlice - The type(s) of a Slice in the Slice Zone. + * @typeParam TContext - Arbitrary data made available to all Slice components. + */ +export type SliceZoneProps = { + /** List of Slice data from the Slice Zone. */ + slices: SliceZoneLike; + + /** A record mapping Slice types to React components. */ + components: Partial< + Record> + >; + + /** The React component rendered if a component mapping from the `components` prop cannot be found. */ + defaultComponent?: React.ComponentType; + + /** Arbitrary data made available to all Slice components. */ + context?: TContext; +}; + +/** + * The default React component rendered when a component mapping cannot be found in ``. + */ +export const MissingSliceComponent = __PRODUCTION__ + ? () => null + : ({ slice }: SliceComponentProps): JSX.Element | null => { + React.useEffect(() => { + console.warn( + `[SliceZone] Could not find a component Slice type "${slice.slice_type}"`, + slice, + ); + }, [slice]); + + return ( +
+ Could not find a component for Slice type “{slice.slice_type} + ” +
+ ); + }; + +/** + * Renders content from a Prismic Slice Zone using React components for each type of Slice. + * + * @typeParam TSlice - The type(s) of a Slice in the Slice Zone. + * @typeParam TContext - Arbitrary data made available to all Slice components. + */ +export const SliceZone = ({ + slices, + components, + defaultComponent = MissingSliceComponent, + context, +}: SliceZoneProps): JSX.Element => { + const renderedSlices = React.useMemo(() => { + return slices.map((slice, index) => { + const Comp: React.ComponentType = + components[slice.slice_type as keyof typeof components] || + defaultComponent; + const key = JSON.stringify(slice); + + return ( + + ); + }); + }, [components, context, defaultComponent, slices]); + + return <>{renderedSlices}; +}; diff --git a/src/dev.ts b/src/dev.ts new file mode 100644 index 0000000..3fc87b9 --- /dev/null +++ b/src/dev.ts @@ -0,0 +1,9 @@ +// We need to polyfill process if it doesn't exist, such as in the browser. +process ||= process || { env: {} }; + +/** + * `true` if in the production environment, `false` otherwise. + * + * This boolean can be used to perform actions only in development environments, such as logging. + */ +export const __PRODUCTION__ = process.env.NODE_ENV === "production"; diff --git a/src/index.ts b/src/index.ts index 83d5ac1..3684a94 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,6 +6,14 @@ export { usePrismicClient } from "./usePrismicClient"; export { PrismicLink } from "./PrismicLink"; export type { PrismicLinkProps, LinkProps } from "./PrismicLink"; +export { SliceZone, MissingSliceComponent } from "./SliceZone"; +export type { + SliceZoneProps, + SliceLike, + SliceZoneLike, + SliceComponentProps, +} from "./SliceZone"; + export { PrismicToolbar } from "./PrismicToolbar"; export type { PrismicToolbarProps } from "./PrismicToolbar"; diff --git a/src/lib/invariant.ts b/src/lib/invariant.ts index 3683720..f77bb01 100644 --- a/src/lib/invariant.ts +++ b/src/lib/invariant.ts @@ -22,7 +22,8 @@ * SOFTWARE. */ -const isProduction: boolean = process.env.NODE_ENV === "production"; +import { __PRODUCTION__ } from "../dev"; + const prefix = "Invariant failed"; // Throw an error if the condition fails @@ -38,7 +39,7 @@ export function invariant( // Condition not passed // In production we strip the message but still throw - if (isProduction) { + if (__PRODUCTION__) { throw new Error(prefix); } diff --git a/test/SliceZone.test.tsx b/test/SliceZone.test.tsx new file mode 100644 index 0000000..a9896f0 --- /dev/null +++ b/test/SliceZone.test.tsx @@ -0,0 +1,164 @@ +/* eslint-disable react/display-name */ + +import test from "ava"; +import * as React from "react"; +import * as sinon from "sinon"; + +import { renderJSON } from "./__testutils__/renderJSON"; + +import { SliceZone, MissingSliceComponent, SliceComponentProps } from "../src"; + +type StringifySliceComponentProps = { + /** A unique identifier for the component to differentiate this component from other instances. */ + id: string; +} & SliceComponentProps; + +const StringifySliceComponent = ({ + id, + slice, + index, + slices, + context, +}: StringifySliceComponentProps): JSX.Element => ( +
+
+
+
+
+
+); + +test("renders null if an empty Slice Zone is provided", (t) => { + const actual = renderJSON(); + + t.is(actual, null); +}); + +test("renders components for each Slice with correct component mapping", (t) => { + const slices = [{ slice_type: "foo" }, { slice_type: "bar" }] as const; + + const actual = renderJSON( + , + bar: (props) => , + }} + />, + ); + const expected = renderJSON( + <> + + + , + ); + + t.deepEqual(actual, expected); +}); + +test("passes context to each component if provided", (t) => { + const slices = [{ slice_type: "foo" }, { slice_type: "bar" }] as const; + const context = { foo: "bar" }; + + const actual = renderJSON( + , + bar: (props) => , + }} + context={context} + />, + ); + const expected = renderJSON( + <> + + + , + ); + + t.deepEqual(actual, expected); +}); + +test("renders default component if component mapping is missing", (t) => { + const consoleWarnStub = sinon.stub(console, "warn"); + + const slices = [{ slice_type: "foo" }, { slice_type: "bar" }] as const; + + const actual = renderJSON( + , + // We are leaving `bar` out of the test on purpose. + // bar: (props) => , + }} + />, + ); + const expected = renderJSON( + <> + + + , + ); + + t.deepEqual(actual, expected); + t.true( + consoleWarnStub.calledWith(sinon.match(/could not find a component/i)), + ); + + consoleWarnStub.restore(); +}); + +test.serial("default component renders null in production", (t) => { + process.env.NODE_ENV = "production"; + + const actual = renderJSON( + , + ); + + t.is(actual, null); + + process.env.NODE_ENV = "development"; +}); + +test.serial("default component does not warn in production", (t) => { + process.env.NODE_ENV = "production"; + + const consoleWarnStub = sinon.stub(console, "warn"); + + renderJSON(); + + t.false(consoleWarnStub.called); + + consoleWarnStub.restore(); + + process.env.NODE_ENV = "development"; +}); diff --git a/test/__testutils__/renderJSON.ts b/test/__testutils__/renderJSON.ts new file mode 100644 index 0000000..e51f495 --- /dev/null +++ b/test/__testutils__/renderJSON.ts @@ -0,0 +1,21 @@ +import * as renderer from "react-test-renderer"; + +/** + * Renders a JSON representation of a React.Element. This is a helper to reduce boilerplate in each test. + * + * @param element The React.Element to render. + * + * @returns The JSON representation of `element`. + */ +export const renderJSON = ( + element: React.ReactElement, +): renderer.ReactTestRendererJSON | renderer.ReactTestRendererJSON[] | null => { + let root: renderer.ReactTestRenderer; + + renderer.act(() => { + root = renderer.create(element); + }); + + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + return root!.toJSON(); +}; diff --git a/test/index.test.ts b/test/index.test.ts deleted file mode 100644 index e6effcc..0000000 --- a/test/index.test.ts +++ /dev/null @@ -1,8 +0,0 @@ -import test from "ava"; - -import * as types from "../src"; - -// TODO: Dummy test, meant to be removed when real tests come in -test("exports something", (t) => { - t.truthy(types); -});