From ad95da63b7ec78a389c211d208ddaecead3fae4e Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Sat, 26 Sep 2020 20:21:16 -0700 Subject: [PATCH 1/7] Use local geo database instead of npm package. --- .gitignore | 2 +- Dockerfile | 3 +++ lib/request.js | 10 +++------ package.json | 13 ++++++------ scripts/build-geo.js | 49 ++++++++++++++++++++++++++++++++++++++++++++ yarn.lock | 12 ++--------- 6 files changed, 65 insertions(+), 24 deletions(-) create mode 100644 scripts/build-geo.js diff --git a/.gitignore b/.gitignore index ca0f3c4f..68408a66 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,7 @@ /build /public/umami.js /lang-compiled -/lang-formatted +/geo # misc .DS_Store diff --git a/Dockerfile b/Dockerfile index 31ea0054..a70d7f87 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,6 +31,9 @@ COPY --from=build /build/prod_node_modules ./node_modules # Copy generated Prisma client COPY --from=build /build/node_modules/.prisma/ ./node_modules/.prisma/ +# Copy geo database +COPY --from=build /build/geo ./geo + COPY --from=build /build/yarn.lock /build/package.json ./ COPY --from=build /build/.next ./.next COPY --from=build /build/public ./public diff --git a/lib/request.js b/lib/request.js index 35658ce5..6975c170 100644 --- a/lib/request.js +++ b/lib/request.js @@ -1,8 +1,8 @@ +import path from 'path'; import requestIp from 'request-ip'; import { browserName, detectOS } from 'detect-browser'; import isLocalhost from 'is-localhost-ip'; import maxmind from 'maxmind'; -import geolite2 from 'geolite2-redist'; import { DESKTOP_OS, MOBILE_OS, @@ -60,15 +60,11 @@ export async function getCountry(req, ip) { } // Database lookup - const lookup = await geolite2.open('GeoLite2-Country', path => { - return maxmind.open(path); - }); + const lookup = await maxmind.open(path.resolve(__dirname, '../geo/GeoLite2-Country.mmdb')); const result = lookup.get(ip); - lookup.close(); - - return result.country.iso_code; + return result?.country?.iso_code; } export async function getClientInfo(req, { screen }) { diff --git a/package.json b/package.json index 107d7dab..d615260d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "umami", - "version": "0.56.0", + "version": "0.57.0", "description": "A simple, fast, website analytics alternative to Google Analytics. ", "author": "Mike Cao ", "license": "MIT", @@ -11,19 +11,20 @@ }, "scripts": { "dev": "next dev", - "build": "npm-run-all build-tracker build-lang build-db build-app", + "build": "npm-run-all build-tracker build-lang build-geo build-db build-app", "start": "next start", "build-app": "next build", "build-tracker": "rollup -c rollup.tracker.config.js", "build-db": "npm-run-all copy-db-schema build-db-client", "build-lang": "npm-run-all format-lang compile-lang", - "copy-db-schema": "node scripts/copy-db-schema.js", + "build-geo": "node scripts/build-geo.js", "build-db-schema": "dotenv prisma introspect", "build-db-client": "dotenv prisma generate", "build-mysql-schema": "dotenv prisma introspect -- --schema=./prisma/schema.mysql.prisma", "build-mysql-client": "dotenv prisma generate -- --schema=./prisma/schema.mysql.prisma", "build-postgresql-schema": "dotenv prisma introspect -- --schema=./prisma/schema.postgresql.prisma", "build-postgresql-client": "dotenv prisma generate -- --schema=./prisma/schema.postgresql.prisma", + "copy-db-schema": "node scripts/copy-db-schema.js", "generate-lang": "npm-run-all extract-lang merge-lang", "extract-lang": "formatjs extract {pages,components}/**/*.js --out-file build/messages.json", "merge-lang": "node scripts/merge-lang.js", @@ -60,9 +61,7 @@ "date-fns": "^2.16.1", "date-fns-tz": "^1.0.10", "detect-browser": "^5.1.1", - "dotenv": "^8.2.0", "formik": "^2.1.5", - "geolite2-redist": "^1.0.7", "immer": "^7.0.9", "is-localhost-ip": "^1.4.0", "isbot-fast": "^1.2.0", @@ -95,6 +94,7 @@ "@svgr/webpack": "^5.4.0", "cross-env": "^7.0.2", "del": "^5.1.0", + "dotenv": "^8.2.0", "dotenv-cli": "^4.0.0", "eslint": "^7.9.0", "eslint-config-prettier": "^6.11.0", @@ -116,6 +116,7 @@ "stylelint": "^13.7.1", "stylelint-config-css-modules": "^2.2.0", "stylelint-config-prettier": "^8.0.1", - "stylelint-config-recommended": "^3.0.0" + "stylelint-config-recommended": "^3.0.0", + "tar": "^6.0.5" } } diff --git a/scripts/build-geo.js b/scripts/build-geo.js new file mode 100644 index 00000000..dc17397e --- /dev/null +++ b/scripts/build-geo.js @@ -0,0 +1,49 @@ +require('dotenv').config(); +const fs = require('fs'); +const path = require('path'); +const https = require('https'); +const zlib = require('zlib'); +const tar = require('tar'); + +let url = + 'https://raw.githubusercontent.com/GitSquared/node-geolite2-redist/master/redist/GeoLite2-Country.tar.gz'; + +if (process.env.MAXMIND_LICENSE_KEY) { + url = + `https://download.maxmind.com/app/geoip_download` + + `?edition_id=GeoLite2-Country&license_key=${process.env.MAXMIND_LICENSE_KEY}&suffix=tar.gz`; +} + +const dest = path.resolve(__dirname, '../geo'); + +if (!fs.existsSync(dest)) { + fs.mkdirSync(dest); +} + +const download = url => + new Promise(resolve => { + https.get(url, res => { + resolve(res.pipe(zlib.createGunzip({})).pipe(tar.t())); + }); + }); + +download(url).then( + res => + new Promise((resolve, reject) => { + res.on('entry', entry => { + if (entry.path.endsWith('.mmdb')) { + const filename = path.join(dest, path.basename(entry.path)); + entry.pipe(fs.createWriteStream(filename)); + + console.log('Saved geo database:', filename); + } + }); + + res.on('error', e => { + reject(e); + }); + res.on('finish', () => { + resolve(); + }); + }), +); diff --git a/yarn.lock b/yarn.lock index 136b534d..d659c87b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4260,14 +4260,6 @@ gensync@^1.0.0-beta.1: resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg== -geolite2-redist@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/geolite2-redist/-/geolite2-redist-1.0.7.tgz#98ecd0260115a7c90bc0d49fa96e04f8ab56cddb" - integrity sha512-NrsPDYUU7OVTtZzj5McnBI7b2n8teS+zgX3IXSd3qxF9M2OaDA4SeF1loWzDyzkQzPFr8JHEYYIBTD0sQGQ7ug== - dependencies: - rimraf "^3.0.2" - tar "^6.0.2" - get-own-enumerable-property-symbols@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664" @@ -7637,7 +7629,7 @@ rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.3, rimraf@^2.7.1: dependencies: glob "^7.1.3" -rimraf@^3.0.0, rimraf@^3.0.2: +rimraf@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== @@ -8543,7 +8535,7 @@ tar@^4.4.2: safe-buffer "^5.1.2" yallist "^3.0.3" -tar@^6.0.2: +tar@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/tar/-/tar-6.0.5.tgz#bde815086e10b39f1dcd298e89d596e1535e200f" integrity sha512-0b4HOimQHj9nXNEAA7zWwMM91Zhhba3pspja6sQbgTpynOJf+bkjBnfybNYzbpLbnwXnbyB4LOREvlyXLkCHSg== From d1765f746b9667fd7aea7f3c29436af22ea2efe5 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Sat, 26 Sep 2020 20:46:20 -0700 Subject: [PATCH 2/7] Updated next config. --- lib/request.js | 7 ++++++- next.config.js | 3 +++ package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/request.js b/lib/request.js index 6975c170..15ab5722 100644 --- a/lib/request.js +++ b/lib/request.js @@ -3,6 +3,9 @@ import requestIp from 'request-ip'; import { browserName, detectOS } from 'detect-browser'; import isLocalhost from 'is-localhost-ip'; import maxmind from 'maxmind'; +import getConfig from 'next/config'; +const { serverRuntimeConfig } = getConfig(); + import { DESKTOP_OS, MOBILE_OS, @@ -60,7 +63,9 @@ export async function getCountry(req, ip) { } // Database lookup - const lookup = await maxmind.open(path.resolve(__dirname, '../geo/GeoLite2-Country.mmdb')); + const lookup = await maxmind.open( + path.resolve(serverRuntimeConfig.PROJECT_ROOT, '../geo/GeoLite2-Country.mmdb'), + ); const result = lookup.get(ip); diff --git a/next.config.js b/next.config.js index 0ddfc76a..c1e31d7b 100644 --- a/next.config.js +++ b/next.config.js @@ -5,6 +5,9 @@ module.exports = { env: { VERSION: pkg.version, }, + serverRuntimeConfig: { + PROJECT_ROOT: __dirname, + }, webpack(config) { config.module.rules.push({ test: /\.svg$/, diff --git a/package.json b/package.json index d615260d..a82cf4de 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "umami", - "version": "0.57.0", + "version": "0.58.0", "description": "A simple, fast, website analytics alternative to Google Analytics. ", "author": "Mike Cao ", "license": "MIT", From 60ea492a487bd57d00490920e7e32002280d2e24 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Sat, 26 Sep 2020 20:53:12 -0700 Subject: [PATCH 3/7] Try a different path. --- lib/request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/request.js b/lib/request.js index 15ab5722..06ba66bf 100644 --- a/lib/request.js +++ b/lib/request.js @@ -64,7 +64,7 @@ export async function getCountry(req, ip) { // Database lookup const lookup = await maxmind.open( - path.resolve(serverRuntimeConfig.PROJECT_ROOT, '../geo/GeoLite2-Country.mmdb'), + path.resolve(serverRuntimeConfig.PROJECT_ROOT, 'geo/GeoLite2-Country.mmdb'), ); const result = lookup.get(ip); From c05be856f3c5cb4517806c5b0bb0fe0ec2ffd76a Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Sat, 26 Sep 2020 21:18:15 -0700 Subject: [PATCH 4/7] Move geo database to public folder. --- .gitignore | 2 +- scripts/build-geo.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 68408a66..5db4c8fb 100644 --- a/.gitignore +++ b/.gitignore @@ -16,8 +16,8 @@ # production /build /public/umami.js +/public/geo /lang-compiled -/geo # misc .DS_Store diff --git a/scripts/build-geo.js b/scripts/build-geo.js index dc17397e..cc66f941 100644 --- a/scripts/build-geo.js +++ b/scripts/build-geo.js @@ -14,7 +14,7 @@ if (process.env.MAXMIND_LICENSE_KEY) { `?edition_id=GeoLite2-Country&license_key=${process.env.MAXMIND_LICENSE_KEY}&suffix=tar.gz`; } -const dest = path.resolve(__dirname, '../geo'); +const dest = path.resolve(__dirname, '../public/geo'); if (!fs.existsSync(dest)) { fs.mkdirSync(dest); From 353a49f37aa45cb79270c4fa2c022a0b8eaff860 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Sat, 26 Sep 2020 21:20:41 -0700 Subject: [PATCH 5/7] Update path. --- lib/request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/request.js b/lib/request.js index 06ba66bf..052f7200 100644 --- a/lib/request.js +++ b/lib/request.js @@ -64,7 +64,7 @@ export async function getCountry(req, ip) { // Database lookup const lookup = await maxmind.open( - path.resolve(serverRuntimeConfig.PROJECT_ROOT, 'geo/GeoLite2-Country.mmdb'), + path.resolve(serverRuntimeConfig.PROJECT_ROOT, 'public/geo/GeoLite2-Country.mmdb'), ); const result = lookup.get(ip); From 0935765ac7d0cf04284951ffb1061859bd127098 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Sat, 26 Sep 2020 22:02:10 -0700 Subject: [PATCH 6/7] Try another path. --- components/layout/Header.module.css | 6 +++++- lib/request.js | 6 +----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/layout/Header.module.css b/components/layout/Header.module.css index 63d68ab9..b7fdc62c 100644 --- a/components/layout/Header.module.css +++ b/components/layout/Header.module.css @@ -5,6 +5,9 @@ .title { font-size: var(--font-size-large); + display: flex; + align-items: center; + line-height: 1.4; } .logo { @@ -26,11 +29,12 @@ .buttons { display: flex; justify-content: flex-end; + align-items: center; } @media only screen and (max-width: 992px) { .title { - text-align: center; + justify-content: center; } .nav { diff --git a/lib/request.js b/lib/request.js index 052f7200..b30a710d 100644 --- a/lib/request.js +++ b/lib/request.js @@ -3,8 +3,6 @@ import requestIp from 'request-ip'; import { browserName, detectOS } from 'detect-browser'; import isLocalhost from 'is-localhost-ip'; import maxmind from 'maxmind'; -import getConfig from 'next/config'; -const { serverRuntimeConfig } = getConfig(); import { DESKTOP_OS, @@ -63,9 +61,7 @@ export async function getCountry(req, ip) { } // Database lookup - const lookup = await maxmind.open( - path.resolve(serverRuntimeConfig.PROJECT_ROOT, 'public/geo/GeoLite2-Country.mmdb'), - ); + const lookup = await maxmind.open(path.resolve('./public/geo/GeoLite2-Country.mmdb')); const result = lookup.get(ip); From 890b2095277d733d27056656bd026e1558e783b0 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Sat, 26 Sep 2020 22:20:53 -0700 Subject: [PATCH 7/7] Updated packages. Fixed docker file. --- Dockerfile | 3 - package.json | 16 +++--- yarn.lock | 151 ++++++++++++++++++++++----------------------------- 3 files changed, 74 insertions(+), 96 deletions(-) diff --git a/Dockerfile b/Dockerfile index a70d7f87..31ea0054 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,9 +31,6 @@ COPY --from=build /build/prod_node_modules ./node_modules # Copy generated Prisma client COPY --from=build /build/node_modules/.prisma/ ./node_modules/.prisma/ -# Copy geo database -COPY --from=build /build/geo ./geo - COPY --from=build /build/yarn.lock /build/package.json ./ COPY --from=build /build/.next ./.next COPY --from=build /build/public ./public diff --git a/package.json b/package.json index a82cf4de..114d23ed 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "next": "^9.5.3", "react": "^16.13.1", "react-dom": "^16.13.1", - "react-intl": "^5.8.2", + "react-intl": "^5.8.3", "react-redux": "^7.2.1", "react-simple-maps": "^2.1.2", "react-spring": "^8.0.27", @@ -82,24 +82,24 @@ "request-ip": "^2.1.3", "thenby": "^1.3.4", "timezone-support": "^2.0.2", - "tinycolor2": "^1.4.1", + "tinycolor2": "^1.4.2", "uuid": "^8.3.0" }, "devDependencies": { - "@formatjs/cli": "^2.11.3", + "@formatjs/cli": "^2.12.0", "@prisma/cli": "2.7.1", "@rollup/plugin-buble": "^0.21.3", "@rollup/plugin-node-resolve": "^9.0.0", "@rollup/plugin-replace": "^2.3.3", "@svgr/webpack": "^5.4.0", "cross-env": "^7.0.2", - "del": "^5.1.0", + "del": "^6.0.0", "dotenv": "^8.2.0", "dotenv-cli": "^4.0.0", - "eslint": "^7.9.0", - "eslint-config-prettier": "^6.11.0", + "eslint": "^7.10.0", + "eslint-config-prettier": "^6.12.0", "eslint-plugin-prettier": "^3.1.3", - "eslint-plugin-react": "^7.20.6", + "eslint-plugin-react": "^7.21.2", "eslint-plugin-react-hooks": "^4.1.2", "extract-react-intl-messages": "^4.1.1", "husky": "^4.3.0", @@ -110,7 +110,7 @@ "postcss-preset-env": "^6.7.0", "prettier": "^2.1.2", "prettier-eslint": "^11.0.0", - "rollup": "^2.28.1", + "rollup": "^2.28.2", "rollup-plugin-hashbang": "^2.2.2", "rollup-plugin-terser": "^7.0.2", "stylelint": "^13.7.1", diff --git a/yarn.lock b/yarn.lock index d659c87b..caed31d8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1064,12 +1064,12 @@ minimatch "^3.0.4" strip-json-comments "^3.1.1" -"@formatjs/cli@^2.11.3": - version "2.11.3" - resolved "https://registry.yarnpkg.com/@formatjs/cli/-/cli-2.11.3.tgz#b06a740520aa0d5345adb2330d13447b4292840c" - integrity sha512-7aV3B/16GkHX5Stna9GoKU2o6/At0zxW7PYATRZujf6gbSsIUMHpUZWnMNk0qaJtXeU+3HLsSquRflCaQruoJw== +"@formatjs/cli@^2.12.0": + version "2.12.0" + resolved "https://registry.yarnpkg.com/@formatjs/cli/-/cli-2.12.0.tgz#f0bb253db073903634e57e587e0395cd0d0cd681" + integrity sha512-F0epNBWCXjKGgej8GL1q4RLGqR38bRCPmGLb3VautkbZ74achB0cVGj2w/AdlQiJJ1mU5rEU13pRroukUBZ+GA== dependencies: - "@formatjs/ts-transformer" "^2.10.1" + "@formatjs/ts-transformer" "^2.11.0" "@types/json-stable-stringify" "^1.0.32" "@types/lodash" "^4.14.150" "@types/loud-rejection" "^2.0.0" @@ -1089,10 +1089,10 @@ resolved "https://registry.yarnpkg.com/@formatjs/ecma402-abstract/-/ecma402-abstract-1.2.2.tgz#4810bdbd696d3805c535fd0620b7c8f45ab3164f" integrity sha512-mLCoAPGlXCVskb/ojBO6iurGqwo6sZvAl8pRC4N25bz4LPWExAM9LsOo057zN3Br1JxUM3RZHG4YGnVt+nSRYQ== -"@formatjs/intl-displaynames@^3.3.8": - version "3.3.8" - resolved "https://registry.yarnpkg.com/@formatjs/intl-displaynames/-/intl-displaynames-3.3.8.tgz#37a3698e135e00908c4314c1085a90d4b9381f61" - integrity sha512-HLoiQFCkwjq1ix7xmLC9DAp0sSXBmD2JuzfHiGKrWU8RIbNcHVzbIL4NgkuXkxvnkADXsK67OtfpuQs8kMZ0qw== +"@formatjs/intl-displaynames@^3.3.9": + version "3.3.9" + resolved "https://registry.yarnpkg.com/@formatjs/intl-displaynames/-/intl-displaynames-3.3.9.tgz#18eeb39aa05d4a8b064e520725f9178d0c3f8c50" + integrity sha512-6Ez9Ab9p9bsxCM4OlqsT+R0rmrj5lr6xjIXiCTs/pSDFeiNPQabWDHcBpiGlMRE3zifOwUOFSoi5AGGYMFgetw== dependencies: "@formatjs/ecma402-abstract" "^1.2.2" @@ -1117,20 +1117,28 @@ dependencies: "@formatjs/ecma402-abstract" "^1.2.2" -"@formatjs/intl@^1.3.2": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@formatjs/intl/-/intl-1.3.2.tgz#95240177ef9a66614ae28193d346c1d65036cefd" - integrity sha512-Z5z9BwUU9M/a46VUhKfKYnEAE+5/2NkISAstwxgtMJmh/tDHYkPF1A4F4bD+YVNusvLXeot1NDH9bQ072XaMsQ== +"@formatjs/intl@^1.3.3": + version "1.3.3" + resolved "https://registry.yarnpkg.com/@formatjs/intl/-/intl-1.3.3.tgz#d59997b7ef832e7c47e8ca50861ff7ff7461d56c" + integrity sha512-gFuCIZEH6o1O2ZF8YlhHJEApRrBarQ7iyqxFp4ujllr/tcjgSxfzF+LSBCPyJ1OQIU98ynOc0XKdrAR2wUd3ow== dependencies: "@formatjs/ecma402-abstract" "^1.2.2" - "@formatjs/intl-displaynames" "^3.3.8" + "@formatjs/intl-displaynames" "^3.3.9" "@formatjs/intl-listformat" "^4.2.7" "@formatjs/intl-relativetimeformat" "^7.2.7" fast-memoize "^2.5.2" intl-messageformat "^9.3.8" intl-messageformat-parser "^6.0.7" -"@formatjs/ts-transformer@^2.10.1", "@formatjs/ts-transformer@^2.6.0": +"@formatjs/ts-transformer@^2.11.0": + version "2.11.0" + resolved "https://registry.yarnpkg.com/@formatjs/ts-transformer/-/ts-transformer-2.11.0.tgz#90c4b5afae55fd8b8c7ab6aa08ca94a123eb94b9" + integrity sha512-d0++zpEeeCtE+RwbEB+TYw0WnC+jlNniIZu9NcILdgN6LEr9+TRxO+Gz4d7nj3g0D5X1LyNx6P4JI+byGxHqzw== + dependencies: + intl-messageformat-parser "^6.0.7" + typescript "^4.0" + +"@formatjs/ts-transformer@^2.6.0": version "2.10.1" resolved "https://registry.yarnpkg.com/@formatjs/ts-transformer/-/ts-transformer-2.10.1.tgz#883d77c37a6752e3491be3ffdd705beb85cfd6f8" integrity sha512-d5zpKWnk52bgA7Xf3KteiJ4r5RnDnIGUoUXD32yFiJVZRpPyUeEcuuyBS/1mxb7UDRpFB2gDqimYlqhjeURozA== @@ -1425,14 +1433,6 @@ dependencies: "@types/node" "*" -"@types/glob@^7.1.1": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183" - integrity sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w== - dependencies: - "@types/minimatch" "*" - "@types/node" "*" - "@types/hoist-non-react-statics@^3.3.1": version "3.3.1" resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f" @@ -1463,11 +1463,6 @@ dependencies: loud-rejection "*" -"@types/minimatch@*": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" - integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== - "@types/minimist@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" @@ -3280,18 +3275,18 @@ define-property@^2.0.2: is-descriptor "^1.0.2" isobject "^3.0.1" -del@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/del/-/del-5.1.0.tgz#d9487c94e367410e6eff2925ee58c0c84a75b3a7" - integrity sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA== +del@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/del/-/del-6.0.0.tgz#0b40d0332cea743f1614f818be4feb717714c952" + integrity sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ== dependencies: - globby "^10.0.1" - graceful-fs "^4.2.2" + globby "^11.0.1" + graceful-fs "^4.2.4" 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" + is-path-inside "^3.0.2" + p-map "^4.0.0" + rimraf "^3.0.2" slash "^3.0.0" delegates@^1.0.0: @@ -3633,10 +3628,10 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= -eslint-config-prettier@^6.11.0: - version "6.11.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz#f6d2238c1290d01c859a8b5c1f7d352a0b0da8b1" - integrity sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA== +eslint-config-prettier@^6.12.0: + version "6.12.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.12.0.tgz#9eb2bccff727db1c52104f0b49e87ea46605a0d2" + integrity sha512-9jWPlFlgNwRUYVoujvWTQ1aMO8o6648r+K7qU7K5Jmkbyqav1fuEZC0COYpGBxyiAJb65Ra9hrmFx19xRGwXWw== dependencies: get-stdin "^6.0.0" @@ -3652,10 +3647,10 @@ eslint-plugin-react-hooks@^4.1.2: resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.1.2.tgz#2eb53731d11c95826ef7a7272303eabb5c9a271e" integrity sha512-ykUeqkGyUGgwTtk78C0o8UG2fzwmgJ0qxBGPp2WqRKsTwcLuVf01kTDRAtOsd4u6whX2XOC8749n2vPydP82fg== -eslint-plugin-react@^7.20.6: - version "7.20.6" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.20.6.tgz#4d7845311a93c463493ccfa0a19c9c5d0fd69f60" - integrity sha512-kidMTE5HAEBSLu23CUDvj8dc3LdBU0ri1scwHBZjI41oDv4tjsWZKU7MQccFzH1QYPYhsnTF2ovh7JlcIcmxgg== +eslint-plugin-react@^7.21.2: + version "7.21.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.21.2.tgz#3bd5d2c4c36d5a0428d0d6dda301ac9a84d681b2" + integrity sha512-j3XKvrK3rpBzveKFbgAeGsWb9uz6iUOrR0jixRfjwdFeGSRsXvVTFtHDQYCjsd1/6Z/xvb8Vy3LiI5Reo7fDrg== dependencies: array-includes "^3.1.1" array.prototype.flatmap "^1.2.3" @@ -3677,7 +3672,7 @@ eslint-scope@^4.0.3: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-scope@^5.0.0, eslint-scope@^5.1.0: +eslint-scope@^5.0.0, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== @@ -3747,10 +3742,10 @@ eslint@^6.8.0: text-table "^0.2.0" v8-compile-cache "^2.0.3" -eslint@^7.9.0: - version "7.9.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.9.0.tgz#522aeccc5c3a19017cf0cb46ebfd660a79acf337" - integrity sha512-V6QyhX21+uXp4T+3nrNfI3hQNBDa/P8ga7LoQOenwrlEFXrEnUEE+ok1dMtaS3b6rmLXhT1TkTIsG75HMLbknA== +eslint@^7.10.0: + version "7.10.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.10.0.tgz#494edb3e4750fb791133ca379e786a8f648c72b9" + integrity sha512-BDVffmqWl7JJXqCjAK6lWtcQThZB/aP1HXSH1JKwGwv0LQEdvpR7qzNrUT487RM39B5goWuboFad5ovMBmD8yA== dependencies: "@babel/code-frame" "^7.0.0" "@eslint/eslintrc" "^0.1.3" @@ -3760,7 +3755,7 @@ eslint@^7.9.0: debug "^4.0.1" doctrine "^3.0.0" enquirer "^2.3.5" - eslint-scope "^5.1.0" + eslint-scope "^5.1.1" eslint-utils "^2.1.0" eslint-visitor-keys "^1.3.0" espree "^7.3.0" @@ -3981,7 +3976,7 @@ fast-diff@^1.1.2: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== -fast-glob@^3.0.3, fast-glob@^3.1.1, fast-glob@^3.2.4: +fast-glob@^3.1.1, fast-glob@^3.2.4: version "3.2.4" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.4.tgz#d20aefbf99579383e7f3cc66529158c9b98554d3" integrity sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ== @@ -4347,20 +4342,6 @@ globals@^12.1.0: dependencies: type-fest "^0.8.1" -globby@^10.0.1: - version "10.0.2" - resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" - integrity sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg== - dependencies: - "@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" - globby@^11.0.1: version "11.0.1" resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.1.tgz#9a2bf107a068f3ffeabc49ad702c79ede8cfd357" @@ -4385,7 +4366,7 @@ gonzales-pe@^4.3.0: dependencies: minimist "^1.2.5" -graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2: +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.4: version "4.2.4" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== @@ -4600,7 +4581,7 @@ ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.1, ignore@^5.1.4, ignore@^5.1.8: +ignore@^5.1.4, ignore@^5.1.8: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== @@ -4926,7 +4907,7 @@ is-path-cwd@^2.2.0: resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== -is-path-inside@^3.0.1: +is-path-inside@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.2.tgz#f5220fc82a3e233757291dddc9c5877f2a1f3017" integrity sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg== @@ -5619,7 +5600,7 @@ merge-stream@^2.0.0: resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -merge2@^1.2.3, merge2@^1.3.0: +merge2@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== @@ -7184,14 +7165,14 @@ react-fast-compare@^2.0.1: resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-2.0.4.tgz#e84b4d455b0fec113e0402c329352715196f81f9" integrity sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw== -react-intl@^5.8.2: - version "5.8.2" - resolved "https://registry.yarnpkg.com/react-intl/-/react-intl-5.8.2.tgz#6be0f31a6438bf12989f7c8f7f4b5610f36e862f" - integrity sha512-WiZqh4xTSmc+HlCzJ1b0imIPr7OFx0g7kl6RGAazb7WCtUNhsdX5jBmwk5CplwVPXiBCdytuKmyfX4XTrrvA9A== +react-intl@^5.8.3: + version "5.8.3" + resolved "https://registry.yarnpkg.com/react-intl/-/react-intl-5.8.3.tgz#2018aca11a49d2d1b0f602e0dda653a47bf59dfb" + integrity sha512-ueM7JhbBIi+6FpH6jCrJuKcYpjmFn9UAHA28ojY8LMAL1PowZ/53XGGMvfj32J0/2EIuHQ6vUbi/07kJqe1ksQ== dependencies: "@formatjs/ecma402-abstract" "^1.2.2" - "@formatjs/intl" "^1.3.2" - "@formatjs/intl-displaynames" "^3.3.8" + "@formatjs/intl" "^1.3.3" + "@formatjs/intl-displaynames" "^3.3.9" "@formatjs/intl-listformat" "^4.2.7" "@formatjs/intl-relativetimeformat" "^7.2.7" "@types/hoist-non-react-statics" "^3.3.1" @@ -7629,7 +7610,7 @@ rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.3, rimraf@^2.7.1: dependencies: glob "^7.1.3" -rimraf@^3.0.0: +rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== @@ -7661,10 +7642,10 @@ rollup-plugin-terser@^7.0.2: serialize-javascript "^4.0.0" terser "^5.0.0" -rollup@^2.28.1: - version "2.28.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.28.1.tgz#ceedca3cdb013c2fa8f22f958a29c203368159ea" - integrity sha512-DOtVoqOZt3+FjPJWLU8hDIvBjUylc9s6IZvy76XklxzcLvAQLtVAG/bbhsMhcWnYxC0TKKcf1QQ/tg29zeID0Q== +rollup@^2.28.2: + version "2.28.2" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.28.2.tgz#599ec4978144a82d8a8ec3d37670a8440cb04e4b" + integrity sha512-8txbsFBFLmm9Xdt4ByTOGa9Muonmc8MfNjnGAR8U8scJlF1ZW7AgNZa7aqBXaKtlvnYP/ab++fQIq9dB9NWUbg== optionalDependencies: fsevents "~2.1.2" @@ -8627,10 +8608,10 @@ tiny-warning@^1.0.2: resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754" integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== -tinycolor2@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.1.tgz#f4fad333447bc0b07d4dc8e9209d8f39a8ac77e8" - integrity sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g= +tinycolor2@^1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.2.tgz#3f6a4d1071ad07676d7fa472e1fac40a719d8803" + integrity sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA== tmp@^0.0.33: version "0.0.33"