From be4771b5c08ace672aa5cea5a79cad96db9ae276 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Feb 2021 12:43:53 +0000 Subject: Bump husky from 4.3.8 to 5.0.9 Bumps [husky](https://github.com/typicode/husky) from 4.3.8 to 5.0.9. - [Release notes](https://github.com/typicode/husky/releases) - [Commits](https://github.com/typicode/husky/compare/v4.3.8...v5.0.9) Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 87 +++--------------------------------------------------------- 2 files changed, 5 insertions(+), 84 deletions(-) diff --git a/package.json b/package.json index f4b6b12..baa257e 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ "dotenv": "8.2.0", "eslint": "7.19.0", "eslint-plugin-react": "7.22.0", - "husky": "4.3.8", + "husky": "5.0.9", "jest": "26.6.3", "jest-environment-jsdom-fourteen": "1.0.1", "jest-resolve": "26.6.2", diff --git a/yarn.lock b/yarn.lock index cf04f93..cde8451 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3249,11 +3249,6 @@ common-tags@^1.8.0: resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.0.tgz#8e3153e542d4a39e9b10554434afaaf98956a937" integrity sha512-6P6g0uetGpW/sdyUy/iQQCbFF0kWVMSIVSyYz7Zgjcgh8mgw8PQzDNZeyZ5DQ2gM7LBoZPHmnjz8rUthkBG5tw== -compare-versions@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.6.0.tgz#1a5689913685e5a87637b8d3ffca75514ec41d62" - integrity sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA== - component-emitter@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" @@ -4433,21 +4428,6 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" -find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -find-versions@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-4.0.0.tgz#3c57e573bf97769b8cb8df16934b627915da4965" - integrity sha512-wgpWy002tA+wgmO27buH/9KzyEOQnKsG/R0yrcjPT9BOFm0zRBVQbZ95nRGXWMywS8YR5knRbpohio0bcJABxQ== - dependencies: - semver-regex "^3.1.2" - flat-cache@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" @@ -4950,21 +4930,10 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== -husky@4.3.8: - version "4.3.8" - resolved "https://registry.yarnpkg.com/husky/-/husky-4.3.8.tgz#31144060be963fd6850e5cc8f019a1dfe194296d" - integrity sha512-LCqqsB0PzJQ/AlCgfrfzRe3e3+NvmefAdKQhRYpxS4u6clblBoDdzzvHi8fmxKRzvMxPY/1WZWzomPZww0Anow== - dependencies: - chalk "^4.0.0" - ci-info "^2.0.0" - compare-versions "^3.6.0" - cosmiconfig "^7.0.0" - find-versions "^4.0.0" - opencollective-postinstall "^2.0.2" - pkg-dir "^5.0.0" - please-upgrade-node "^3.2.0" - slash "^3.0.0" - which-pm-runs "^1.0.0" +husky@5.0.9: + version "5.0.9" + resolved "https://registry.yarnpkg.com/husky/-/husky-5.0.9.tgz#6d38706643d66ed395bcd4ee952d02e3f15eb3a3" + integrity sha512-0SjcaY21a+IRdx7p7r/X33Vc09UR2m8SbP8yfkhUX2/jAmwcz+GR7i9jXkp2pP3GfX23JhMkVP6SWwXB18uXtg== iconv-lite@0.4.24: version "0.4.24" @@ -6203,13 +6172,6 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" @@ -6753,11 +6715,6 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -opencollective-postinstall@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259" - integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q== - opn@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/opn/-/opn-5.5.0.tgz#fc7164fab56d235904c51c3b27da6758ca3b9bfc" @@ -6841,13 +6798,6 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - p-map@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" @@ -7048,20 +6998,6 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" -pkg-dir@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-5.0.0.tgz#a02d6aebe6ba133a928f74aec20bafdfe6b8e760" - integrity sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA== - dependencies: - find-up "^5.0.0" - -please-upgrade-node@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942" - integrity sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg== - dependencies: - semver-compare "^1.0.0" - pn@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" @@ -7778,16 +7714,6 @@ selfsigned@^1.10.8: dependencies: node-forge "^0.10.0" -semver-compare@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" - integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= - -semver-regex@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-3.1.2.tgz#34b4c0d361eef262e07199dbef316d0f2ab11807" - integrity sha512-bXWyL6EAKOJa81XG1OZ/Yyuq+oT0b2YLlxx7c+mrdYPaPbnj6WgVULXhinMIeZGufuUBu/eVRqXEhiv4imfwxA== - "semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" @@ -9140,11 +9066,6 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which-pm-runs@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb" - integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs= - which@^1.2.9: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" -- cgit v1.2.3 From ce99800f0f355f01e975a94d04c8f0fa4401320f Mon Sep 17 00:00:00 2001 From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> Date: Wed, 10 Feb 2021 16:04:03 +0300 Subject: Migrate Husky To v5 Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- .config/eslint/annotations_formatter.js | 14 ++++++++++++++ .config/husky/.gitignore | 1 + .config/husky/pre-commit | 4 ++++ .github/workflows/test_and_lint.yml | 2 +- README.md | 3 ++- annotations_formatter.js | 14 -------------- package.json | 8 ++------ 7 files changed, 24 insertions(+), 22 deletions(-) create mode 100644 .config/eslint/annotations_formatter.js create mode 100644 .config/husky/.gitignore create mode 100644 .config/husky/pre-commit delete mode 100644 annotations_formatter.js diff --git a/.config/eslint/annotations_formatter.js b/.config/eslint/annotations_formatter.js new file mode 100644 index 0000000..b3a421d --- /dev/null +++ b/.config/eslint/annotations_formatter.js @@ -0,0 +1,14 @@ +module.exports = function (results) { + let output = ""; + + for (const file of results.filter(r => r.messages.length > 0)) { + for (const message of file.messages) { + const path = file.filePath.substr(process.cwd().length + 1); + const severity = message.fatal || message.severity === 2 ? "error" : "warning"; + const text = `[ESLint] ${message.ruleId}: ${message.message}`; + output += `::${severity} file=${path},line=${message.line},col=${message.column}::${text}\n`; + } + } + + return output; +}; diff --git a/.config/husky/.gitignore b/.config/husky/.gitignore new file mode 100644 index 0000000..c9cdc63 --- /dev/null +++ b/.config/husky/.gitignore @@ -0,0 +1 @@ +_ \ No newline at end of file diff --git a/.config/husky/pre-commit b/.config/husky/pre-commit new file mode 100644 index 0000000..101f7b9 --- /dev/null +++ b/.config/husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +yarn lint \ No newline at end of file diff --git a/.github/workflows/test_and_lint.yml b/.github/workflows/test_and_lint.yml index 4767b3e..83e5cc1 100644 --- a/.github/workflows/test_and_lint.yml +++ b/.github/workflows/test_and_lint.yml @@ -44,4 +44,4 @@ jobs: run: yarn install - name: Lint - run: yarn run eslint --ext .ts,.tsx --format ./annotations_formatter.js src/ + run: yarn run eslint --ext .ts,.tsx --format .config/eslint/annotations_formatter.js src/ diff --git a/README.md b/README.md index b19152f..0f42f95 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,8 @@ The project uses [yarn](https://yarnpkg.com/) for dependency and script manageme and [webpack](https://webpack.js.org/) for building and development. A full setup guide is available on [Notion](https://www.notion.so/pythondiscord/Forms-6312360495ff45f487da5b1924184a2d), -along with a troubleshooting guide. +along with a troubleshooting guide.
+Run `yarn install --dev` and `yarn run pre-commit` to setup your dev environment. ## React & Dependency Info ### Project Info diff --git a/annotations_formatter.js b/annotations_formatter.js deleted file mode 100644 index b3a421d..0000000 --- a/annotations_formatter.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = function (results) { - let output = ""; - - for (const file of results.filter(r => r.messages.length > 0)) { - for (const message of file.messages) { - const path = file.filePath.substr(process.cwd().length + 1); - const severity = message.fatal || message.severity === 2 ? "error" : "warning"; - const text = `[ESLint] ${message.ruleId}: ${message.message}`; - output += `::${severity} file=${path},line=${message.line},col=${message.column}::${text}\n`; - } - } - - return output; -}; diff --git a/package.json b/package.json index baa257e..cbf8293 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,8 @@ "start": "webpack serve --node-env=development", "build": "webpack", "test": "jest", - "lint": "eslint --cache src/" + "lint": "eslint --cache src/", + "pre-commit": "husky install .config/husky" }, "eslintConfig": { "extends": "react-app" @@ -76,10 +77,5 @@ "jest-svg-transformer": "1.0.0", "jest-watch-typeahead": "0.6.1", "webpack-dev-server": "3.11.2" - }, - "husky": { - "hooks": { - "pre-commit": "yarn lint" - } } } -- cgit v1.2.3 From 0309638909fe5b107366ff8e288ca25352221677 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> Date: Sat, 13 Feb 2021 00:26:45 +0300 Subject: Adds Basic Auth Functionality Moves all authorization functionality to a new file, and adds a helper to send discord OAuth code to the backend, and set JWT. Adds a library to read and set cookies. Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- package.json | 1 + src/api/auth.ts | 208 ++++++++++++++++++++++++++++++++++ src/pages/CallbackPage.tsx | 5 +- src/tests/pages/CallbackPage.test.tsx | 15 ++- yarn.lock | 18 +++ 5 files changed, 237 insertions(+), 10 deletions(-) create mode 100644 src/api/auth.ts diff --git a/package.json b/package.json index f4b6b12..8c5b69d 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "smoothscroll-polyfill": "0.4.4", "swc-loader": "0.1.12", "typescript": "4.1.4", + "universal-cookie": "4.0.4", "webpack": "5.21.2", "webpack-cli": "4.5.0", "webpack-manifest-plugin": "3.0.0", diff --git a/src/api/auth.ts b/src/api/auth.ts new file mode 100644 index 0000000..ae20236 --- /dev/null +++ b/src/api/auth.ts @@ -0,0 +1,208 @@ +import Cookies, { CookieSetOptions } from "universal-cookie"; +import { AxiosResponse } from "axios"; + +import APIClient from "./client"; + +const OAUTH2_CLIENT_ID = process.env.REACT_APP_OAUTH2_CLIENT_ID; +const PRODUCTION = process.env.NODE_ENV !== "development"; + +/** + * Authorization result as returned from the backend. + */ +interface AuthResult { + token: string, + expiry: string +} + +interface JWTResponse { + JWT: string, + Expiry: Date +} + +/** + * Name properties for authorization cookies. + */ +enum CookieNames { + Scopes = "DiscordOAuthScopes", + Token = "FormBackendToken" +} + +/** + * [Reference]{@link https://discord.com/developers/docs/topics/oauth2#shared-resources-oauth2-scopes} + * + * Commented out enums are locked behind whitelists. + */ +export enum OAuthScopes { + Bot = "bot", + Connections = "connections", + Email = "email", + Identify = "identify", + Guilds = "guilds", + GuildsJoin = "guilds.join", + GDMJoin = "gdm.join", + MessagesRead = "messages.read", + // RPC = "rpc", + // RPC_API = "rpc.api", + // RPCNotifRead = "rpc.notifications.read", + WebhookIncoming = "webhook.incoming", + // AppsBuildsUpload = "applications.builds.upload", + AppsBuildsRead = "applications.builds.read", + AppsStoreUpdate = "applications.store.update", + AppsEntitlements = "applications.entitlements", + // RelationshipsRead = "relationships.read", + // ActivitiesRead = "activities.read", + // ActivitiesWrite = "activities.write", + AppsCommands = "applications.commands", + AppsCommandsUpdate = "applications.commands.update" +} + +/** + * Helper method to ensure the minimum required scopes + * for the application to function exist in a list. + */ +function ensureMinimumScopes(scopes: unknown, expected: OAuthScopes | OAuthScopes[]): OAuthScopes[] { + let result: OAuthScopes[] = []; + if (scopes && Array.isArray(scopes)) { + result = scopes; + } + + if (Array.isArray(expected)) { + expected.forEach(scope => { if (!result.includes(scope)) result.push(scope); }); + } else { + if (!result.includes(expected)) result.push(expected); + } + + return result; +} + +/** + * Return true if the program has the requested scopes or higher. + */ +export function checkScopes(scopes?: OAuthScopes[], path = ""): boolean { + const cleanedScopes = ensureMinimumScopes(scopes, OAuthScopes.Identify); + + // Get Active Scopes And Ensure Type + const cookies = new Cookies().get(CookieNames.Scopes + path); + if (!cookies || !Array.isArray(cookies)) { + return false; + } + + // Check For Scope Existence + for (const scope of cleanedScopes) { + if (!cookies.includes(scope)) { + return false; + } + } + + return true; +} + +/*** + * Request authorization code from the discord api with the provided scopes. + * + * If disable function is passed, the component will be disabled while the login is ongoing. + * + * @returns {code, cleanedScopes} The discord authorization code and the scopes the code is granted for. + * @throws {Error} Indicates that an integrity check failed. + */ +export async function getDiscordCode(scopes: OAuthScopes[], disableFunction?: (newState: boolean) => void): Promise<{code: string, cleanedScopes: OAuthScopes[]}> { + const cleanedScopes = ensureMinimumScopes(scopes, OAuthScopes.Identify); + const disable = (newState: boolean) => { if (disableFunction) disableFunction(newState); }; + + disable(true); + + // Generate a new user state + const state = crypto.getRandomValues(new Uint32Array(1))[0]; + + const scopeString = encodeURIComponent(cleanedScopes.join(" ")); + const redirectURI = encodeURIComponent(document.location.protocol + "//" + document.location.host + "/callback"); + + // Open login window + const windowRef = window.open( + `https://discord.com/api/oauth2/authorize?client_id=${OAUTH2_CLIENT_ID}&state=${state}&response_type=code&scope=${scopeString}&redirect_uri=${redirectURI}&prompt=none`, + "Discord_OAuth2", + "height=700,width=500,location=no,menubar=no,resizable=no,status=no,titlebar=no,left=300,top=300" + ); + + // Clean up on login + const interval = setInterval(() => { + if (windowRef?.closed) { + clearInterval(interval); + disable(false); + } + }, 500); + + // Handle response + const code = await new Promise(resolve => { + window.onmessage = (message: MessageEvent) => { + if (message.data.source) { + // React DevTools has a habit of sending messages, ignore them. + return; + } + + if (message.isTrusted) { + windowRef?.close(); + + clearInterval(interval); + disable(false); + + // State integrity check + if (message.data.state !== state.toString()) { + // This indicates a lack of integrity + throw Error("Integrity check failed."); + } + + // Remove handler + window.onmessage = null; + resolve(message.data.code); + } + }; + }); + + return {code: code, cleanedScopes: cleanedScopes}; +} + +/** + * Sends a discord code from a given path to the backend, + * and returns the resultant JWT and expiry date. + */ +export async function requestBackendJWT(code: string): Promise { + const result = await APIClient.post("/auth/authorize", {token: code}) + .catch(reason => { throw reason; }) // TODO: Show some sort of authentication failure here + .then((response: AxiosResponse) => { + const _expiry = new Date(); + _expiry.setTime(Date.parse(response.data.expiry)); + + return {JWT: response.data.token, Expiry: _expiry}; + }); + + if (!result.JWT || !result.Expiry) { + throw Error("Could not fetch OAuth code."); + } + + return result; +} + +/** + * Handle a full authorization flow. Sets a token for the specified path with the JWT and scopes. + * + * @param scopes The scopes that should be authorized for the application. + * @param disableFunction An optional function that can disable a component while processing. + * @param path The site path to save the token under. + */ +export default function authorize(scopes?: OAuthScopes[], disableFunction?: (newState: boolean) => void, path = "/"): void { + if (!checkScopes(scopes, path)) { + const cookies = new Cookies; + cookies.remove(CookieNames.Token + path); + cookies.remove(CookieNames.Scopes + path); + + getDiscordCode(scopes || [], disableFunction).then(discord_response =>{ + requestBackendJWT(discord_response.code).then(backend_response => { + const options: CookieSetOptions = {sameSite: "strict", expires: backend_response.Expiry, secure: PRODUCTION, path: path}; + + cookies.set(CookieNames.Token + path, backend_response.JWT, options); + cookies.set(CookieNames.Scopes + path, discord_response.cleanedScopes, options); + }); + }); + } +} diff --git a/src/pages/CallbackPage.tsx b/src/pages/CallbackPage.tsx index fab2086..00feb76 100644 --- a/src/pages/CallbackPage.tsx +++ b/src/pages/CallbackPage.tsx @@ -7,11 +7,12 @@ export default function CallbackPage(): JSX.Element { const params = new URLSearchParams(location.search); const code = params.get("code"); + const state = params.get("state"); if (!hasSent) { setHasSent(true); - window.opener.postMessage(code); + window.opener.postMessage({code: code, state: state}); } - return

Code is {code}

; + return
; } diff --git a/src/tests/pages/CallbackPage.test.tsx b/src/tests/pages/CallbackPage.test.tsx index 9049ca3..70f2fed 100644 --- a/src/tests/pages/CallbackPage.test.tsx +++ b/src/tests/pages/CallbackPage.test.tsx @@ -3,21 +3,20 @@ import { render } from "@testing-library/react"; import CallbackPage from "../../pages/CallbackPage"; -test("callback page renders provided code", () => { +test("callback page sends provided code", () => { global.opener = { postMessage: jest.fn() }; - const mockLocation = new URL("https://forms.pythondiscord.com/authorize?code=abcdef"); + const mockLocation = new URL("https://forms.pythondiscord.com/authorize?code=abcde_code&state=abcde_state"); Object.defineProperty(global, "location", {value: mockLocation}); - const comp = ; + render(); - const { getByText } = render(comp); - - - const codeText = getByText(/Code is abcdef/); - expect(codeText).toBeInTheDocument(); expect(global.opener.postMessage).toBeCalledTimes(1); + expect(global.opener.postMessage).toBeCalledWith({ + code: "abcde_code", + state: "abcde_state" + }); }); diff --git a/yarn.lock b/yarn.lock index cf04f93..131a86c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1970,6 +1970,11 @@ dependencies: "@babel/types" "^7.3.0" +"@types/cookie@^0.3.3": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.3.3.tgz#85bc74ba782fb7aa3a514d11767832b0e3bc6803" + integrity sha512-LKVP3cgXBT9RYj+t+9FDKwS5tdI+rPBXaNSkma7hvqy35lc7mAokC2zsqWJH0LaqIt3B962nuYI77hsJoT1gow== + "@types/eslint-scope@^3.7.0": version "3.7.0" resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.0.tgz#4792816e31119ebd506902a482caec4951fabd86" @@ -3318,6 +3323,11 @@ cookie@0.4.0: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== +cookie@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1" + integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA== + copy-descriptor@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" @@ -8739,6 +8749,14 @@ unique-string@^2.0.0: dependencies: crypto-random-string "^2.0.0" +universal-cookie@4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/universal-cookie/-/universal-cookie-4.0.4.tgz#06e8b3625bf9af049569ef97109b4bb226ad798d" + integrity sha512-lbRVHoOMtItjWbM7TwDLdl8wug7izB0tq3/YVKhT/ahB4VDvWMyvnADfnJI8y6fSvsjh51Ix7lTGC6Tn4rMPhw== + dependencies: + "@types/cookie" "^0.3.3" + cookie "^0.4.0" + universalify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" -- cgit v1.2.3 From edcdc9b18dddb30f2726da282efcf77ab5ad3c1a Mon Sep 17 00:00:00 2001 From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> Date: Sat, 13 Feb 2021 00:27:03 +0300 Subject: Cleans Up OAuth Button Removes OAuth button from home page, and redesigns it. Uses new authorization functionality in auth. Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- src/components/OAuth2Button.tsx | 91 +++++++----------------------- src/pages/LandingPage.tsx | 11 +--- src/tests/components/OAuth2Button.test.tsx | 2 +- 3 files changed, 23 insertions(+), 81 deletions(-) diff --git a/src/components/OAuth2Button.tsx b/src/components/OAuth2Button.tsx index 4fa3f61..231e560 100644 --- a/src/components/OAuth2Button.tsx +++ b/src/components/OAuth2Button.tsx @@ -1,88 +1,39 @@ /** @jsx jsx */ import { css, jsx } from "@emotion/react"; +import { useState } from "react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faDiscord } from "@fortawesome/free-brands-svg-icons"; -import colors from "../colors"; -import { useState } from "react"; - -const OAUTH2_CLIENT_ID = process.env.REACT_APP_OAUTH2_CLIENT_ID; +import authenticate, { OAuthScopes } from "../api/auth"; -const buttonStyling = css` -display: flex; -background-color: ${colors.blurple}; -border: none; -color: white; -font-family: "Hind", "Helvetica", "Arial", sans-serif; -border-radius: 5px; -padding-top: 10px; -padding-bottom: 10px; -padding-right: 20px; -padding-left: 20px; -outline: none; -transition: filter 100ms; -font-size: 1.2em; -align-items: center; - -span { - vertical-align: middle; -} -&:hover:enabled { - filter: brightness(110%); - cursor: pointer; +interface OAuth2ButtonProps { + scopes?: OAuthScopes[], + path?: string } -&:disabled { - background-color: ${colors.greyple}; -} +const iconStyles = css` + position: relative; + top: 0.3rem; + padding-left: 0.65rem; + font-size: 1.2em; `; -function doLogin(disableFunction: (newState: boolean) => void) { - disableFunction(true); - - const redirectURI = encodeURIComponent(document.location.protocol + "//" + document.location.host + "/callback"); - - const windowRef = window.open( - `https://discord.com/api/oauth2/authorize?client_id=${OAUTH2_CLIENT_ID}&response_type=code&scope=identify&redirect_uri=${redirectURI}&prompt=none`, - "Discord_OAuth2", - "height=700,width=500,location=no,menubar=no,resizable=no,status=no,titlebar=no,left=300,top=300" - ); - - const interval = setInterval(() => { - if (windowRef?.closed) { - clearInterval(interval); - disableFunction(false); - } - }, 500); - - window.onmessage = (code: MessageEvent) => { - if (code.data.source) { - // React DevTools has a habit of sending messages, ignore them. - return; - } - - if (code.isTrusted) { - windowRef?.close(); - - console.log("Code received:", code.data); - - disableFunction(false); - clearInterval(interval); - - window.onmessage = null; - } - }; -} +const textStyles = css` + display: inline-block; + padding: 0.5rem 0.75rem 0.5rem 0.5rem; +`; -function OAuth2Button(): JSX.Element { +function OAuth2Button(props: OAuth2ButtonProps): JSX.Element { const [disabled, setDisabled] = useState(false); - return ; + return ( + + ); } export default OAuth2Button; diff --git a/src/pages/LandingPage.tsx b/src/pages/LandingPage.tsx index 06fef46..efb3f05 100644 --- a/src/pages/LandingPage.tsx +++ b/src/pages/LandingPage.tsx @@ -4,7 +4,6 @@ import { useEffect, useState } from "react"; import HeaderBar from "../components/HeaderBar"; import FormListing from "../components/FormListing"; -import OAuth2Button from "../components/OAuth2Button"; import Loading from "../components/Loading"; import ScrollToTop from "../components/ScrollToTop"; @@ -28,16 +27,8 @@ function LandingPage(): JSX.Element {
-
+

Available Forms

- - - - {forms.map(form => ( ))} diff --git a/src/tests/components/OAuth2Button.test.tsx b/src/tests/components/OAuth2Button.test.tsx index f05159f..a773686 100644 --- a/src/tests/components/OAuth2Button.test.tsx +++ b/src/tests/components/OAuth2Button.test.tsx @@ -4,7 +4,7 @@ import OAuth2Button from "../../components/OAuth2Button"; test("renders oauth2 sign in button text", () => { const { getByText } = render(); - const button = getByText(/Sign in with Discord/i); + const button = getByText(/Discord Login/i); expect(button).toBeInTheDocument(); }); -- cgit v1.2.3 From 2350aa12fae661e37895616e0e7fe3e7ebc62f53 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> Date: Sat, 13 Feb 2021 01:13:37 +0300 Subject: Makes Authorize Helper Async Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- src/api/auth.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/api/auth.ts b/src/api/auth.ts index ae20236..fa3ac85 100644 --- a/src/api/auth.ts +++ b/src/api/auth.ts @@ -190,19 +190,21 @@ export async function requestBackendJWT(code: string): Promise { * @param disableFunction An optional function that can disable a component while processing. * @param path The site path to save the token under. */ -export default function authorize(scopes?: OAuthScopes[], disableFunction?: (newState: boolean) => void, path = "/"): void { +export default async function authorize(scopes?: OAuthScopes[], disableFunction?: (newState: boolean) => void, path = "/"): Promise { if (!checkScopes(scopes, path)) { const cookies = new Cookies; cookies.remove(CookieNames.Token + path); cookies.remove(CookieNames.Scopes + path); - getDiscordCode(scopes || [], disableFunction).then(discord_response =>{ - requestBackendJWT(discord_response.code).then(backend_response => { + await getDiscordCode(scopes || [], disableFunction).then(async discord_response =>{ + await requestBackendJWT(discord_response.code).then(backend_response => { const options: CookieSetOptions = {sameSite: "strict", expires: backend_response.Expiry, secure: PRODUCTION, path: path}; cookies.set(CookieNames.Token + path, backend_response.JWT, options); cookies.set(CookieNames.Scopes + path, discord_response.cleanedScopes, options); }); }); + + return new Promise(resolve => resolve()); } } -- cgit v1.2.3 From 451c825c77cd68eafeb262eb1ea5cbfc21dce550 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> Date: Sat, 13 Feb 2021 01:21:36 +0300 Subject: Dynamically Show Discord OAuth Button Dynamically displays an auth button in place of the submit button if needed, and adds full authorization flow. Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- src/commonStyles.tsx | 32 ++++++++++++++++++++ src/components/OAuth2Button.tsx | 14 +++++++-- src/pages/FormPage.tsx | 65 ++++++++++++++++++++--------------------- 3 files changed, 74 insertions(+), 37 deletions(-) diff --git a/src/commonStyles.tsx b/src/commonStyles.tsx index 89a2746..eb3e319 100644 --- a/src/commonStyles.tsx +++ b/src/commonStyles.tsx @@ -1,4 +1,5 @@ import { css } from "@emotion/react"; +import colors from "./colors"; const selectable = css` -moz-user-select: text; @@ -50,6 +51,36 @@ const textInputs = css` border-radius: 8px; `; +const submitStyles = css` + text-align: right; + + button:disabled { + background-color: ${colors.greyple}; + cursor: default; + } + + button { + cursor: pointer; + + border: none; + border-radius: 8px; + + color: white; + font: inherit; + + background-color: ${colors.blurple}; + transition: background-color 300ms; + } + + button[type="submit"] { + padding: 0.55rem 4.25rem; + } + + button:enabled:hover { + background-color: ${colors.darkerBlurple}; + } +`; + export { selectable, @@ -57,4 +88,5 @@ export { hiddenInput, multiSelectInput, textInputs, + submitStyles }; diff --git a/src/components/OAuth2Button.tsx b/src/components/OAuth2Button.tsx index 231e560..90a25fa 100644 --- a/src/components/OAuth2Button.tsx +++ b/src/components/OAuth2Button.tsx @@ -5,12 +5,13 @@ import { useState } from "react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faDiscord } from "@fortawesome/free-brands-svg-icons"; -import authenticate, { OAuthScopes } from "../api/auth"; +import authenticate, {checkScopes, OAuthScopes} from "../api/auth"; interface OAuth2ButtonProps { scopes?: OAuthScopes[], - path?: string + path?: string, + rerender: () => void } const iconStyles = css` @@ -27,9 +28,16 @@ const textStyles = css` function OAuth2Button(props: OAuth2ButtonProps): JSX.Element { const [disabled, setDisabled] = useState(false); + async function login() { + await authenticate(props.scopes, setDisabled, props.path); + + if (checkScopes(props.scopes, props.path)) { + props.rerender(); + } + } return ( - diff --git a/src/pages/FormPage.tsx b/src/pages/FormPage.tsx index c49b9fd..4237e86 100644 --- a/src/pages/FormPage.tsx +++ b/src/pages/FormPage.tsx @@ -9,10 +9,12 @@ import HeaderBar from "../components/HeaderBar"; import RenderedQuestion from "../components/Question"; import Loading from "../components/Loading"; import ScrollToTop from "../components/ScrollToTop"; +import OAuth2Button from "../components/OAuth2Button"; import { Form, FormFeatures, getForm } from "../api/forms"; +import { OAuthScopes, checkScopes } from "../api/auth"; import colors from "../colors"; -import { unselectable } from "../commonStyles"; +import { submitStyles, unselectable } from "../commonStyles"; interface PathParams { @@ -20,10 +22,13 @@ interface PathParams { } interface NavigationProps { - form_state: boolean // Whether the form is open or not + form_state: boolean, // Whether the form is open or not + scopes: OAuthScopes[] } class Navigation extends React.Component { + PAGE_PATH = "/form" + containerStyles = css` margin: auto; width: 50%; @@ -38,7 +43,7 @@ class Navigation extends React.Component { width: 50%; } - @media (max-width: 850px) { + @media (max-width: 870px) { width: 100%; > div { @@ -62,13 +67,13 @@ class Navigation extends React.Component { height: 0; display: none; - @media (max-width: 850px) { + @media (max-width: 870px) { display: block; } `; returnStyles = css` - padding: 0.5rem 2rem; + padding: 0.55rem 2.2rem; border-radius: 8px; color: white; @@ -83,36 +88,21 @@ class Navigation extends React.Component { } `; - submitStyles = css` - text-align: right; - - button { - padding: 0.5rem 4rem; - cursor: pointer; - - border: none; - border-radius: 8px; - - color: white; - font: inherit; - - background-color: ${colors.blurple}; - transition: background-color 300ms; - } - - button:hover { - background-color: ${colors.darkerBlurple}; - } - `; + constructor(props: NavigationProps) { + super(props); + this.setState({"logged_in": false}); + } render(): JSX.Element { let submit = null; + if (this.props.form_state) { - submit = ( -
- -
- ); + if (this.props.scopes.includes(OAuthScopes.Identify) && !checkScopes(this.props.scopes, this.PAGE_PATH)) { + // Render OAuth button if login is required, and the scopes needed are not available + submit = this.setState({"logged_in": true})}/>; + } else { + submit = ; + } } return ( @@ -121,7 +111,7 @@ class Navigation extends React.Component { Return Home

- { submit } +
{ submit }
); } @@ -146,7 +136,7 @@ const closedHeaderStyles = css` font-size: 1.5rem; background-color: ${colors.error}; - + @media (max-width: 500px) { padding: 1rem 1.5rem; } @@ -186,6 +176,13 @@ function FormPage(): JSX.Element { } const open: boolean = form.features.includes(FormFeatures.Open); + const require_auth: boolean = form.features.includes(FormFeatures.RequiresLogin); + + const scopes = []; + if (require_auth) { + scopes.push(OAuthScopes.Identify); + if (form.features.includes(FormFeatures.CollectEmail)) { scopes.push(OAuthScopes.Email); } + } let closed_header = null; if (!open) { @@ -201,7 +198,7 @@ function FormPage(): JSX.Element { { closed_header } { questions } - +
-- cgit v1.2.3 From e8bd7798a0154725ba27295eceae7160156e9889 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> Date: Tue, 16 Feb 2021 23:28:48 +0300 Subject: Adds Error Handling To Auth Helpers Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- src/api/auth.ts | 75 +++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 57 insertions(+), 18 deletions(-) diff --git a/src/api/auth.ts b/src/api/auth.ts index fa3ac85..ad97e67 100644 --- a/src/api/auth.ts +++ b/src/api/auth.ts @@ -27,6 +27,19 @@ enum CookieNames { Token = "FormBackendToken" } +export interface APIErrors { + Message: APIErrorMessages, + Error: any, /* eslint-disable-line @typescript-eslint/no-explicit-any */ +} + +export enum APIErrorMessages { + BackendValidation = "Backend could not authorize with Discord. Please contact the forms team.", + BackendValidationDev = "Backend could not authorize with Discord, possibly due to being on a preview branch. Please contact the forms team.", + BackendUnresponsive = "Unable to reach the backend, please retry, or contact the forms team.", + BadResponse = "The server returned a bad response, please contact the forms team.", + Unknown = "An unknown error occurred, please contact the forms team." +} + /** * [Reference]{@link https://discord.com/developers/docs/topics/oauth2#shared-resources-oauth2-scopes} * @@ -100,16 +113,11 @@ export function checkScopes(scopes?: OAuthScopes[], path = ""): boolean { /*** * Request authorization code from the discord api with the provided scopes. * - * If disable function is passed, the component will be disabled while the login is ongoing. - * * @returns {code, cleanedScopes} The discord authorization code and the scopes the code is granted for. * @throws {Error} Indicates that an integrity check failed. */ -export async function getDiscordCode(scopes: OAuthScopes[], disableFunction?: (newState: boolean) => void): Promise<{code: string, cleanedScopes: OAuthScopes[]}> { +export async function getDiscordCode(scopes: OAuthScopes[]): Promise<{code: string, cleanedScopes: OAuthScopes[]}> { const cleanedScopes = ensureMinimumScopes(scopes, OAuthScopes.Identify); - const disable = (newState: boolean) => { if (disableFunction) disableFunction(newState); }; - - disable(true); // Generate a new user state const state = crypto.getRandomValues(new Uint32Array(1))[0]; @@ -128,7 +136,6 @@ export async function getDiscordCode(scopes: OAuthScopes[], disableFunction?: (n const interval = setInterval(() => { if (windowRef?.closed) { clearInterval(interval); - disable(false); } }, 500); @@ -144,7 +151,6 @@ export async function getDiscordCode(scopes: OAuthScopes[], disableFunction?: (n windowRef?.close(); clearInterval(interval); - disable(false); // State integrity check if (message.data.state !== state.toString()) { @@ -165,19 +171,47 @@ export async function getDiscordCode(scopes: OAuthScopes[], disableFunction?: (n /** * Sends a discord code from a given path to the backend, * and returns the resultant JWT and expiry date. + * + * @throws { APIErrors } On error, the APIErrors.Message is set, and an APIErrors object is thrown. */ export async function requestBackendJWT(code: string): Promise { - const result = await APIClient.post("/auth/authorize", {token: code}) - .catch(reason => { throw reason; }) // TODO: Show some sort of authentication failure here - .then((response: AxiosResponse) => { - const _expiry = new Date(); - _expiry.setTime(Date.parse(response.data.expiry)); + const reason: APIErrors = { Message: APIErrorMessages.Unknown, Error: null }; + let result; + + try { + result = await APIClient.post("/auth/authorize", {token: code}) + .catch(error => { + reason.Error = error; + + if (error.response) { + // API Responded with a non-2xx Response + if (error.response.status === 400) { + reason.Message = process.env.CONTEXT === "deploy-preview" ? APIErrorMessages.BackendValidationDev : APIErrorMessages.BackendValidation; + } + } else if (error.request) { + // API did not respond + reason.Message = APIErrorMessages.BackendUnresponsive; + } - return {JWT: response.data.token, Expiry: _expiry}; - }); + throw error; + + }).then((response: AxiosResponse) => { + const expiry = new Date(); + expiry.setTime(Date.parse(response.data.expiry)); + + return {JWT: response.data.token, Expiry: expiry}; + }); + } catch (e) { + if (reason.Error === null) { + reason.Error = e; + } + + throw reason; + } if (!result.JWT || !result.Expiry) { - throw Error("Could not fetch OAuth code."); + reason.Message = APIErrorMessages.BadResponse; + throw reason; } return result; @@ -189,20 +223,25 @@ export async function requestBackendJWT(code: string): Promise { * @param scopes The scopes that should be authorized for the application. * @param disableFunction An optional function that can disable a component while processing. * @param path The site path to save the token under. + * + * @throws { APIErrors } See documentation on { requestBackendJWT }. */ -export default async function authorize(scopes?: OAuthScopes[], disableFunction?: (newState: boolean) => void, path = "/"): Promise { +export default async function authorize(scopes: OAuthScopes[] = [], disableFunction?: (newState: boolean) => void, path = "/"): Promise { if (!checkScopes(scopes, path)) { const cookies = new Cookies; cookies.remove(CookieNames.Token + path); cookies.remove(CookieNames.Scopes + path); - await getDiscordCode(scopes || [], disableFunction).then(async discord_response =>{ + if (disableFunction) { disableFunction(true); } + await getDiscordCode(scopes).then(async discord_response =>{ await requestBackendJWT(discord_response.code).then(backend_response => { const options: CookieSetOptions = {sameSite: "strict", expires: backend_response.Expiry, secure: PRODUCTION, path: path}; cookies.set(CookieNames.Token + path, backend_response.JWT, options); cookies.set(CookieNames.Scopes + path, discord_response.cleanedScopes, options); }); + }).finally(() => { + if (disableFunction) { disableFunction(false); } }); return new Promise(resolve => resolve()); -- cgit v1.2.3 From 2229ba931b6eadafc0c999d306fce9e6e3dc7339 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> Date: Tue, 16 Feb 2021 23:29:24 +0300 Subject: Adds Error Handler For OAuth Button Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- src/components/OAuth2Button.tsx | 64 ++++++++++++++++++++++++++++++++++------- 1 file changed, 53 insertions(+), 11 deletions(-) diff --git a/src/components/OAuth2Button.tsx b/src/components/OAuth2Button.tsx index 90a25fa..61bcd99 100644 --- a/src/components/OAuth2Button.tsx +++ b/src/components/OAuth2Button.tsx @@ -1,11 +1,12 @@ /** @jsx jsx */ import { css, jsx } from "@emotion/react"; -import { useState } from "react"; +import React, { useState } from "react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faDiscord } from "@fortawesome/free-brands-svg-icons"; -import authenticate, {checkScopes, OAuthScopes} from "../api/auth"; +import authenticate, { APIErrors, checkScopes, OAuthScopes } from "../api/auth"; +import { selectable } from "../commonStyles"; interface OAuth2ButtonProps { @@ -26,22 +27,63 @@ const textStyles = css` padding: 0.5rem 0.75rem 0.5rem 0.5rem; `; -function OAuth2Button(props: OAuth2ButtonProps): JSX.Element { - const [disabled, setDisabled] = useState(false); - async function login() { - await authenticate(props.scopes, setDisabled, props.path); +const errorStyles = css` + position: absolute; + visibility: hidden; + width: 100%; + left: 0; + + text-align: center; + white-space: normal; + box-sizing: border-box; + padding: 0 5rem; + + color: red; + margin-top: 2.5rem; +`; + +async function login(props: OAuth2ButtonProps, errorDialog: React.RefObject, setDisabled: (newState: boolean) => void) { + await authenticate(props.scopes, setDisabled, props.path).catch((reason: APIErrors) => { + // Display Error Message + if (errorDialog.current) { + errorDialog.current.style.visibility = "visible"; + errorDialog.current.textContent = reason.Message; + errorDialog.current.scrollIntoView({behavior: "smooth"}); + } + + // Propagate to sentry + const error = reason.Error.toJSON(); + error["Custom Error Message"] = reason.Message; + + // Filter Discord code + if (error?.config?.data) { + const data = JSON.parse(error.config.data); + if (data["token"]) { + data["token"] = "[FILTERED]"; + } - if (checkScopes(props.scopes, props.path)) { - props.rerender(); + error.config.data = data; } + + throw error; + }); + + if (checkScopes(props.scopes, props.path)) { + props.rerender(); } +} + +function OAuth2Button(props: OAuth2ButtonProps): JSX.Element { + const [disabled, setDisabled] = useState(false); + const errorDialog: React.RefObject = React.useRef(null); - return ( - - ); +
+ ; } export default OAuth2Button; -- cgit v1.2.3 From 020b794ef1c1b3ba67711e19b0baee7687c92c96 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> Date: Tue, 16 Feb 2021 23:48:25 +0300 Subject: Cleans Up Error Display Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- src/components/OAuth2Button.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/OAuth2Button.tsx b/src/components/OAuth2Button.tsx index 61bcd99..b084571 100644 --- a/src/components/OAuth2Button.tsx +++ b/src/components/OAuth2Button.tsx @@ -36,7 +36,11 @@ const errorStyles = css` text-align: center; white-space: normal; box-sizing: border-box; - padding: 0 5rem; + + padding: 0 15rem; + @media (max-width: 750px) { + padding: 0 5rem; + } color: red; margin-top: 2.5rem; @@ -52,7 +56,7 @@ async function login(props: OAuth2ButtonProps, errorDialog: React.RefObject Date: Wed, 17 Feb 2021 00:03:01 +0300 Subject: Cleans Up OAuth Error Logging Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- src/components/OAuth2Button.tsx | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/components/OAuth2Button.tsx b/src/components/OAuth2Button.tsx index b084571..1ee456c 100644 --- a/src/components/OAuth2Button.tsx +++ b/src/components/OAuth2Button.tsx @@ -56,20 +56,8 @@ async function login(props: OAuth2ButtonProps, errorDialog: React.RefObject Date: Wed, 17 Feb 2021 09:30:47 +0300 Subject: Removes Path From Auth Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- src/api/auth.ts | 23 +++++++++++------------ src/components/OAuth2Button.tsx | 5 ++--- src/pages/FormPage.tsx | 6 ++---- 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/api/auth.ts b/src/api/auth.ts index ad97e67..cfaa563 100644 --- a/src/api/auth.ts +++ b/src/api/auth.ts @@ -91,11 +91,11 @@ function ensureMinimumScopes(scopes: unknown, expected: OAuthScopes | OAuthScope /** * Return true if the program has the requested scopes or higher. */ -export function checkScopes(scopes?: OAuthScopes[], path = ""): boolean { +export function checkScopes(scopes?: OAuthScopes[]): boolean { const cleanedScopes = ensureMinimumScopes(scopes, OAuthScopes.Identify); // Get Active Scopes And Ensure Type - const cookies = new Cookies().get(CookieNames.Scopes + path); + const cookies = new Cookies().get(CookieNames.Scopes); if (!cookies || !Array.isArray(cookies)) { return false; } @@ -169,7 +169,7 @@ export async function getDiscordCode(scopes: OAuthScopes[]): Promise<{code: stri } /** - * Sends a discord code from a given path to the backend, + * Sends a discord code to the backend, * and returns the resultant JWT and expiry date. * * @throws { APIErrors } On error, the APIErrors.Message is set, and an APIErrors object is thrown. @@ -218,27 +218,26 @@ export async function requestBackendJWT(code: string): Promise { } /** - * Handle a full authorization flow. Sets a token for the specified path with the JWT and scopes. + * Handle a full authorization flow. Sets a cookie with the JWT and scopes. * * @param scopes The scopes that should be authorized for the application. * @param disableFunction An optional function that can disable a component while processing. - * @param path The site path to save the token under. * * @throws { APIErrors } See documentation on { requestBackendJWT }. */ -export default async function authorize(scopes: OAuthScopes[] = [], disableFunction?: (newState: boolean) => void, path = "/"): Promise { - if (!checkScopes(scopes, path)) { +export default async function authorize(scopes: OAuthScopes[] = [], disableFunction?: (newState: boolean) => void): Promise { + if (!checkScopes(scopes)) { const cookies = new Cookies; - cookies.remove(CookieNames.Token + path); - cookies.remove(CookieNames.Scopes + path); + cookies.remove(CookieNames.Token); + cookies.remove(CookieNames.Scopes); if (disableFunction) { disableFunction(true); } await getDiscordCode(scopes).then(async discord_response =>{ await requestBackendJWT(discord_response.code).then(backend_response => { - const options: CookieSetOptions = {sameSite: "strict", expires: backend_response.Expiry, secure: PRODUCTION, path: path}; + const options: CookieSetOptions = {sameSite: "strict", expires: backend_response.Expiry, secure: PRODUCTION}; - cookies.set(CookieNames.Token + path, backend_response.JWT, options); - cookies.set(CookieNames.Scopes + path, discord_response.cleanedScopes, options); + cookies.set(CookieNames.Token, backend_response.JWT, options); + cookies.set(CookieNames.Scopes, discord_response.cleanedScopes, options); }); }).finally(() => { if (disableFunction) { disableFunction(false); } diff --git a/src/components/OAuth2Button.tsx b/src/components/OAuth2Button.tsx index 1ee456c..25c5871 100644 --- a/src/components/OAuth2Button.tsx +++ b/src/components/OAuth2Button.tsx @@ -11,7 +11,6 @@ import { selectable } from "../commonStyles"; interface OAuth2ButtonProps { scopes?: OAuthScopes[], - path?: string, rerender: () => void } @@ -47,7 +46,7 @@ const errorStyles = css` `; async function login(props: OAuth2ButtonProps, errorDialog: React.RefObject, setDisabled: (newState: boolean) => void) { - await authenticate(props.scopes, setDisabled, props.path).catch((reason: APIErrors) => { + await authenticate(props.scopes, setDisabled).catch((reason: APIErrors) => { // Display Error Message if (errorDialog.current) { errorDialog.current.style.visibility = "visible"; @@ -60,7 +59,7 @@ async function login(props: OAuth2ButtonProps, errorDialog: React.RefObject { - PAGE_PATH = "/form" - containerStyles = css` margin: auto; width: 50%; @@ -97,9 +95,9 @@ class Navigation extends React.Component { let submit = null; if (this.props.form_state) { - if (this.props.scopes.includes(OAuthScopes.Identify) && !checkScopes(this.props.scopes, this.PAGE_PATH)) { + if (this.props.scopes.includes(OAuthScopes.Identify) && !checkScopes(this.props.scopes)) { // Render OAuth button if login is required, and the scopes needed are not available - submit = this.setState({"logged_in": true})}/>; + submit = this.setState({"logged_in": true})}/>; } else { submit = ; } -- cgit v1.2.3 From 604620f5f98a76461741212f9a78ea2468bce814 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> Date: Sat, 20 Feb 2021 03:55:27 +0300 Subject: Adds Token Refresh Adds automatic token refresh, and removes manual setting of JWT. Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- src/api/auth.ts | 84 +++++++++++++++++++++++++++++++++++-------------------- src/api/client.ts | 3 +- 2 files changed, 55 insertions(+), 32 deletions(-) diff --git a/src/api/auth.ts b/src/api/auth.ts index cfaa563..1aba307 100644 --- a/src/api/auth.ts +++ b/src/api/auth.ts @@ -10,21 +10,16 @@ const PRODUCTION = process.env.NODE_ENV !== "development"; * Authorization result as returned from the backend. */ interface AuthResult { - token: string, + username: string, expiry: string } -interface JWTResponse { - JWT: string, - Expiry: Date -} - /** * Name properties for authorization cookies. */ enum CookieNames { Scopes = "DiscordOAuthScopes", - Token = "FormBackendToken" + Username = "DiscordUsername" } export interface APIErrors { @@ -169,12 +164,12 @@ export async function getDiscordCode(scopes: OAuthScopes[]): Promise<{code: stri } /** - * Sends a discord code to the backend, - * and returns the resultant JWT and expiry date. + * Sends a discord code to the backend, which sets an authentication JWT + * and returns the Discord username. * * @throws { APIErrors } On error, the APIErrors.Message is set, and an APIErrors object is thrown. */ -export async function requestBackendJWT(code: string): Promise { +export async function requestBackendJWT(code: string): Promise<{username: string, maxAge: number}> { const reason: APIErrors = { Message: APIErrorMessages.Unknown, Error: null }; let result; @@ -196,10 +191,8 @@ export async function requestBackendJWT(code: string): Promise { throw error; }).then((response: AxiosResponse) => { - const expiry = new Date(); - expiry.setTime(Date.parse(response.data.expiry)); - - return {JWT: response.data.token, Expiry: expiry}; + const expiry = Date.parse(response.data.expiry); + return {username: response.data.username, maxAge: (expiry - Date.now()) / 1000}; }); } catch (e) { if (reason.Error === null) { @@ -209,7 +202,7 @@ export async function requestBackendJWT(code: string): Promise { throw reason; } - if (!result.JWT || !result.Expiry) { + if (!result || !result.username || !result.maxAge) { reason.Message = APIErrorMessages.BadResponse; throw reason; } @@ -217,32 +210,61 @@ export async function requestBackendJWT(code: string): Promise { return result; } +/** + * Refresh the backend authentication JWT. Returns the success of the operation, and silently handles denied requests. + */ +export async function refreshBackendJWT(): Promise { + const cookies = new Cookies(); + + let pass = true; + APIClient.post("/auth/refresh").then((response: AxiosResponse) => { + cookies.set(CookieNames.Username, response.data.username, {sameSite: "strict", secure: PRODUCTION}); + + const expiry = Date.parse(response.data.expiry); + setTimeout(refreshBackendJWT, (expiry * 0.9)); + }).catch(() => { + pass = false; + cookies.remove(CookieNames.Scopes); + }); + + return new Promise(resolve => resolve(pass)); +} + /** * Handle a full authorization flow. Sets a cookie with the JWT and scopes. * * @param scopes The scopes that should be authorized for the application. * @param disableFunction An optional function that can disable a component while processing. + * @param refresh If true, the token refresh will be scehduled automatically * * @throws { APIErrors } See documentation on { requestBackendJWT }. */ -export default async function authorize(scopes: OAuthScopes[] = [], disableFunction?: (newState: boolean) => void): Promise { - if (!checkScopes(scopes)) { - const cookies = new Cookies; - cookies.remove(CookieNames.Token); - cookies.remove(CookieNames.Scopes); +export default async function authorize(scopes: OAuthScopes[] = [], disableFunction?: (newState: boolean) => void, refresh = true): Promise { + if (checkScopes(scopes)) { + return; + } - if (disableFunction) { disableFunction(true); } - await getDiscordCode(scopes).then(async discord_response =>{ - await requestBackendJWT(discord_response.code).then(backend_response => { - const options: CookieSetOptions = {sameSite: "strict", expires: backend_response.Expiry, secure: PRODUCTION}; + const cookies = new Cookies; + cookies.remove(CookieNames.Scopes); - cookies.set(CookieNames.Token, backend_response.JWT, options); - cookies.set(CookieNames.Scopes, discord_response.cleanedScopes, options); - }); - }).finally(() => { - if (disableFunction) { disableFunction(false); } + if (disableFunction) { disableFunction(true); } + await getDiscordCode(scopes).then(async discord_response =>{ + await requestBackendJWT(discord_response.code).then(backend_response => { + const options: CookieSetOptions = {sameSite: "strict", secure: PRODUCTION}; + cookies.set(CookieNames.Username, backend_response.username, options); + + options.maxAge = backend_response.maxAge; + cookies.set(CookieNames.Scopes, discord_response.cleanedScopes, options); + + if (refresh) { + // Schedule refresh after 90% of it's age + setTimeout(refreshBackendJWT, (backend_response.maxAge * 0.9) * 1000); + } }); + }).finally(() => { + if (disableFunction) { disableFunction(false); } + }); - return new Promise(resolve => resolve()); - } + + return new Promise(resolve => resolve()); } diff --git a/src/api/client.ts b/src/api/client.ts index b534938..a9499cc 100644 --- a/src/api/client.ts +++ b/src/api/client.ts @@ -2,5 +2,6 @@ import axios from "axios"; export default axios.create({ - baseURL: process.env.BACKEND_URL + baseURL: process.env.BACKEND_URL, + withCredentials: true }); -- cgit v1.2.3 From 54fd22c22ef1213ab5a8096d15f6f4cc79ac0998 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> Date: Sun, 21 Feb 2021 01:10:34 +0300 Subject: Saves Username & Scopes On `/` Path Explicitly sets the path attribute of username and scope cookies, to ensure they work correctly across page transitions, and to match the actual authorization cookie. Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- src/api/auth.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/auth.ts b/src/api/auth.ts index 1aba307..7bdf2bb 100644 --- a/src/api/auth.ts +++ b/src/api/auth.ts @@ -218,7 +218,7 @@ export async function refreshBackendJWT(): Promise { let pass = true; APIClient.post("/auth/refresh").then((response: AxiosResponse) => { - cookies.set(CookieNames.Username, response.data.username, {sameSite: "strict", secure: PRODUCTION}); + cookies.set(CookieNames.Username, response.data.username, {sameSite: "strict", secure: PRODUCTION, path: "/"}); const expiry = Date.parse(response.data.expiry); setTimeout(refreshBackendJWT, (expiry * 0.9)); @@ -250,7 +250,7 @@ export default async function authorize(scopes: OAuthScopes[] = [], disableFunct if (disableFunction) { disableFunction(true); } await getDiscordCode(scopes).then(async discord_response =>{ await requestBackendJWT(discord_response.code).then(backend_response => { - const options: CookieSetOptions = {sameSite: "strict", secure: PRODUCTION}; + const options: CookieSetOptions = {sameSite: "strict", secure: PRODUCTION, path: "/"}; cookies.set(CookieNames.Username, backend_response.username, options); options.maxAge = backend_response.maxAge; -- cgit v1.2.3 From 3dece70f5232fb25b74df027483d3dd18d8af8de Mon Sep 17 00:00:00 2001 From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> Date: Mon, 22 Feb 2021 10:02:26 +0300 Subject: Fixes Broken Links To Assets Sets asset links to absolute paths, so they work on pages. Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- public/branding/browserconfig.xml | 2 +- public/index.html | 8 ++++---- public/manifest.json | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/public/branding/browserconfig.xml b/public/branding/browserconfig.xml index 0dd2cec..6e813e5 100644 --- a/public/branding/browserconfig.xml +++ b/public/branding/browserconfig.xml @@ -2,7 +2,7 @@ - + #2d89ef diff --git a/public/index.html b/public/index.html index 4bf02d0..ca4f5ac 100644 --- a/public/index.html +++ b/public/index.html @@ -9,12 +9,12 @@ content="Python Discord Forms is the surveying system for the Python Discord server." /> - - + + - + - + Python Discord Forms diff --git a/public/manifest.json b/public/manifest.json index a36c2b7..af23422 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -3,17 +3,17 @@ "name": "Python Discord Forms", "icons": [ { - "src": "branding/logo192.png", + "src": "/branding/logo192.png", "type": "image/png", "sizes": "192x192" }, { - "src": "branding/logo256.png", + "src": "/branding/logo256.png", "type": "image/png", "sizes": "256x256" }, { - "src": "branding/logo512.png", + "src": "/branding/logo512.png", "type": "image/png", "sizes": "512x512" } -- cgit v1.2.3 From 1096e1c64c4e2447458230af88a1d72c6c9100fc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Feb 2021 08:42:29 +0000 Subject: Bump react-spinners from 0.10.4 to 0.10.6 Bumps [react-spinners](https://github.com/davidhu2000/react-spinners) from 0.10.4 to 0.10.6. - [Release notes](https://github.com/davidhu2000/react-spinners/releases) - [Changelog](https://github.com/davidhu2000/react-spinners/blob/master/CHANGELOG.md) - [Commits](https://github.com/davidhu2000/react-spinners/commits) Signed-off-by: dependabot[bot] --- package.json | 6 ++-- yarn.lock | 104 +++++++++++++++++++++++++++++------------------------------ 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/package.json b/package.json index 115d552..7be7431 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "@fortawesome/free-brands-svg-icons": "5.15.2", "@fortawesome/free-solid-svg-icons": "5.15.2", "@fortawesome/react-fontawesome": "0.1.14", - "@sentry/react": "6.1.0", + "@sentry/react": "6.2.0", "@svgr/webpack": "5.5.0", "@swc/core": "1.2.47", "axios": "0.21.1", @@ -21,7 +21,7 @@ "react-app-polyfill": "2.0.0", "react-dom": "17.0.1", "react-router-dom": "5.2.0", - "react-spinners": "0.10.4", + "react-spinners": "0.10.6", "react-transition-group": "4.4.1", "smoothscroll-polyfill": "0.4.4", "swc-loader": "0.1.12", @@ -56,7 +56,7 @@ "@swc/jest": "0.1.2", "@testing-library/jest-dom": "5.11.9", "@testing-library/react": "11.2.5", - "@testing-library/user-event": "12.6.3", + "@testing-library/user-event": "12.7.2", "@types/jest": "26.0.20", "@types/node": "14.14.31", "@types/react": "17.0.1", diff --git a/yarn.lock b/yarn.lock index 4b1b26a..e9d816e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1631,68 +1631,68 @@ estree-walker "^1.0.1" picomatch "^2.2.2" -"@sentry/browser@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-6.1.0.tgz#0e18a07b44bebed729bcf842af33203e388e2053" - integrity sha512-t3y2TLXDWgvfknyH8eKj/9mghJfSEqItFyp74zPu1Src6kOPjkd4Sa7o4+bdkNgA8dIIOrDAhRUbB2sq4sWMCA== +"@sentry/browser@6.2.0": + version "6.2.0" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-6.2.0.tgz#4113a92bc82f55e63f30cb16a94f717bd0b95817" + integrity sha512-4r3paHcHXLemj471BtNDhUs2kvJxk5XDRplz1dbC/LHXN5PWEXP4anhGILxOlxqi4y33r53PIZu3xXFjznaVZA== dependencies: - "@sentry/core" "6.1.0" - "@sentry/types" "6.1.0" - "@sentry/utils" "6.1.0" + "@sentry/core" "6.2.0" + "@sentry/types" "6.2.0" + "@sentry/utils" "6.2.0" tslib "^1.9.3" -"@sentry/core@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-6.1.0.tgz#7dd4584dcaf2188a78b94b766068342e6ee65229" - integrity sha512-57mXkp3NoyxRycXrL+Ec6bYS6UYJZp9tYX0lUp5Ry2M0FxDZ3Q4drkjr8MIQOhBaQXP2ukSX4QTVLGMPm60zMw== +"@sentry/core@6.2.0": + version "6.2.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-6.2.0.tgz#be1c33854fc94e1a4d867f7c2c311cf1cefb8ee9" + integrity sha512-oTr2b25l+0bv/+d6IgMamPuGleWV7OgJb0NFfd+WZhw6UDRgr7CdEJy2gW6tK8SerwXgPHdn4ervxsT3WIBiXw== dependencies: - "@sentry/hub" "6.1.0" - "@sentry/minimal" "6.1.0" - "@sentry/types" "6.1.0" - "@sentry/utils" "6.1.0" + "@sentry/hub" "6.2.0" + "@sentry/minimal" "6.2.0" + "@sentry/types" "6.2.0" + "@sentry/utils" "6.2.0" tslib "^1.9.3" -"@sentry/hub@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-6.1.0.tgz#fb22734c91c9d68564737996bf28b7e032e3d8ee" - integrity sha512-JnBSCgNg3VHiMojUl5tCHU8iWPVuE+qqENIzG9A722oJms1kKWBvWl+yQzhWBNdgk5qeAY3F5UzKWJZkbJ6xow== +"@sentry/hub@6.2.0": + version "6.2.0" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-6.2.0.tgz#e7502652bc9608cf8fb63e43cd49df9019a28f29" + integrity sha512-BDTEFK8vlJydWXp/KMX0stvv73V7od224iLi+w3k7BcPwMKXBuURBXPU8d5XIC4G8nwg8X6cnDvwL+zBBlBbkg== dependencies: - "@sentry/types" "6.1.0" - "@sentry/utils" "6.1.0" + "@sentry/types" "6.2.0" + "@sentry/utils" "6.2.0" tslib "^1.9.3" -"@sentry/minimal@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-6.1.0.tgz#b3abf76d93b95477a3c1029db810818bdc56845f" - integrity sha512-g6sfNKenL7wnsr/tibp8nFiMv/XRH0s0Pt4p151npmNI+SmjuUz3GGYEXk8ChCyaKldYKilkNOFdVXJxUf5gZw== +"@sentry/minimal@6.2.0": + version "6.2.0" + resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-6.2.0.tgz#718b70babb55912eeb38babaf7823d1bcdd77d1e" + integrity sha512-haxsx8/ZafhZUaGeeMtY7bJt9HbDlqeiaXrRMp1CxGtd0ZRQwHt60imEjl6IH1I73SEWxNfqScGsX2s3HzztMg== dependencies: - "@sentry/hub" "6.1.0" - "@sentry/types" "6.1.0" + "@sentry/hub" "6.2.0" + "@sentry/types" "6.2.0" tslib "^1.9.3" -"@sentry/react@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@sentry/react/-/react-6.1.0.tgz#f01a5f330ee339743420056872d0ae606a85381d" - integrity sha512-X1Jp1ueHsmHQXBcNWshA43MTdn0B3B06A36yv6mzAznmanpf+7+f7SHrnRFIwuBpTdPsHzolTmSE9VlkZPBgBg== +"@sentry/react@6.2.0": + version "6.2.0" + resolved "https://registry.yarnpkg.com/@sentry/react/-/react-6.2.0.tgz#bf46c38762554f246ca9dec527e6a5b3168fb0b0" + integrity sha512-Jf3s7om1iLpApkN26O7c3Ult3lS91ekZNC4WKtcPb6b+KOBQ36sB0d1KhL3hGZ55UKLmgZu3jn2hd7bJ9EY3yA== dependencies: - "@sentry/browser" "6.1.0" - "@sentry/minimal" "6.1.0" - "@sentry/types" "6.1.0" - "@sentry/utils" "6.1.0" + "@sentry/browser" "6.2.0" + "@sentry/minimal" "6.2.0" + "@sentry/types" "6.2.0" + "@sentry/utils" "6.2.0" hoist-non-react-statics "^3.3.2" tslib "^1.9.3" -"@sentry/types@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.1.0.tgz#5f9379229423ca1325acf6709e95687180f67132" - integrity sha512-kIaN52Fw5K+2mKRaHE2YluJ+F/qMGSUzZXIFDNdC6OUMXQ4TM8gZTrITXs8CLDm7cK8iCqFCtzKOjKK6KyOKAg== +"@sentry/types@6.2.0": + version "6.2.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.2.0.tgz#ca020ff42913c6b9f88a9d0c375b5ee3965a2590" + integrity sha512-vN4P/a+QqAuVfWFB9G3nQ7d6bgnM9jd/RLVi49owMuqvM24pv5mTQHUk2Hk4S3k7ConrHFl69E7xH6Dv5VpQnQ== -"@sentry/utils@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-6.1.0.tgz#52e3d7050983e685d3a48f9d2efa1e6eb4ae3e6d" - integrity sha512-6JAplzUOS6bEwfX0PDRZBbYRvn9EN22kZfcL0qGHtM9L0QQ5ybjbbVwOpbXgRkiZx++dQbzLFtelxnDhsbFG+Q== +"@sentry/utils@6.2.0": + version "6.2.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-6.2.0.tgz#39c81ad5ba92cec54d690e3fa8ea4e777d8e9c2b" + integrity sha512-YToUC7xYf2E/pIluI7upYTlj8fKXOtdwoOBkcQZifHgX/dP+qDaHibbBFe5PyZwdmU2UiLnWFsBr0gjo0QFo1g== dependencies: - "@sentry/types" "6.1.0" + "@sentry/types" "6.2.0" tslib "^1.9.3" "@sinonjs/commons@^1.7.0": @@ -1925,10 +1925,10 @@ "@babel/runtime" "^7.12.5" "@testing-library/dom" "^7.28.1" -"@testing-library/user-event@12.6.3": - version "12.6.3" - resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-12.6.3.tgz#4a77c56a48823cf8adebd0f57670e4a89c24d058" - integrity sha512-PCmbUKofE4SXA7l8jphZAbvv5H3c4ix34xPZ/GNe99fASX//msJRgiMbHIBP+GwRfgVG9c7zmkODSPu2X2vNRw== +"@testing-library/user-event@12.7.2": + version "12.7.2" + resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-12.7.2.tgz#78749eadc8324009b428bdb8d7edc64b63c3e86c" + integrity sha512-6uUYor7b0+JAcanK0rmCEZGo6t0n2F4WUKXL9toQg495a9YE2MHlJ8GWzfCgsUPyVHw8SNaMN8UrZoHABf+oOg== dependencies: "@babel/runtime" "^7.12.5" @@ -7332,10 +7332,10 @@ react-router@5.2.0: tiny-invariant "^1.0.2" tiny-warning "^1.0.0" -react-spinners@0.10.4: - version "0.10.4" - resolved "https://registry.yarnpkg.com/react-spinners/-/react-spinners-0.10.4.tgz#3789086f3c1289d904163517dfa240e13ffd460c" - integrity sha512-WRzHTHjx1nvMzsyTXg1J8VVDYadGGeas6pzzxGk0T+dVSZpMIN9NrKV/h76SybdsU8cUp55+u9L1V1C9/oafhw== +react-spinners@0.10.6: + version "0.10.6" + resolved "https://registry.yarnpkg.com/react-spinners/-/react-spinners-0.10.6.tgz#7e780144aaf54372231f6168ca075b4cd70e48ef" + integrity sha512-UPLcaMFhFnLWtS1zVDDT14ssW08gnZ44cjPN6GL27dEGboiCvRSthOilZXRDWESp449GB2iI6gjEbxzaMtA+dg== dependencies: "@emotion/core" "^10.0.35" -- cgit v1.2.3 From 8541e33f6b53b4846dd105bb3fd069109fb05c09 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Feb 2021 08:42:49 +0000 Subject: Bump @types/react-transition-group from 4.4.0 to 4.4.1 Bumps [@types/react-transition-group](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-transition-group) from 4.4.0 to 4.4.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-transition-group) Signed-off-by: dependabot[bot] --- package.json | 6 ++-- yarn.lock | 104 +++++++++++++++++++++++++++++------------------------------ 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/package.json b/package.json index 115d552..435e52f 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "@fortawesome/free-brands-svg-icons": "5.15.2", "@fortawesome/free-solid-svg-icons": "5.15.2", "@fortawesome/react-fontawesome": "0.1.14", - "@sentry/react": "6.1.0", + "@sentry/react": "6.2.0", "@svgr/webpack": "5.5.0", "@swc/core": "1.2.47", "axios": "0.21.1", @@ -56,13 +56,13 @@ "@swc/jest": "0.1.2", "@testing-library/jest-dom": "5.11.9", "@testing-library/react": "11.2.5", - "@testing-library/user-event": "12.6.3", + "@testing-library/user-event": "12.7.2", "@types/jest": "26.0.20", "@types/node": "14.14.31", "@types/react": "17.0.1", "@types/react-dom": "17.0.1", "@types/react-router-dom": "5.1.7", - "@types/react-transition-group": "4.4.0", + "@types/react-transition-group": "4.4.1", "@types/smoothscroll-polyfill": "0.3.1", "@typescript-eslint/eslint-plugin": "4.15.1", "@typescript-eslint/parser": "4.15.0", diff --git a/yarn.lock b/yarn.lock index 4b1b26a..825d254 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1631,68 +1631,68 @@ estree-walker "^1.0.1" picomatch "^2.2.2" -"@sentry/browser@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-6.1.0.tgz#0e18a07b44bebed729bcf842af33203e388e2053" - integrity sha512-t3y2TLXDWgvfknyH8eKj/9mghJfSEqItFyp74zPu1Src6kOPjkd4Sa7o4+bdkNgA8dIIOrDAhRUbB2sq4sWMCA== +"@sentry/browser@6.2.0": + version "6.2.0" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-6.2.0.tgz#4113a92bc82f55e63f30cb16a94f717bd0b95817" + integrity sha512-4r3paHcHXLemj471BtNDhUs2kvJxk5XDRplz1dbC/LHXN5PWEXP4anhGILxOlxqi4y33r53PIZu3xXFjznaVZA== dependencies: - "@sentry/core" "6.1.0" - "@sentry/types" "6.1.0" - "@sentry/utils" "6.1.0" + "@sentry/core" "6.2.0" + "@sentry/types" "6.2.0" + "@sentry/utils" "6.2.0" tslib "^1.9.3" -"@sentry/core@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-6.1.0.tgz#7dd4584dcaf2188a78b94b766068342e6ee65229" - integrity sha512-57mXkp3NoyxRycXrL+Ec6bYS6UYJZp9tYX0lUp5Ry2M0FxDZ3Q4drkjr8MIQOhBaQXP2ukSX4QTVLGMPm60zMw== +"@sentry/core@6.2.0": + version "6.2.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-6.2.0.tgz#be1c33854fc94e1a4d867f7c2c311cf1cefb8ee9" + integrity sha512-oTr2b25l+0bv/+d6IgMamPuGleWV7OgJb0NFfd+WZhw6UDRgr7CdEJy2gW6tK8SerwXgPHdn4ervxsT3WIBiXw== dependencies: - "@sentry/hub" "6.1.0" - "@sentry/minimal" "6.1.0" - "@sentry/types" "6.1.0" - "@sentry/utils" "6.1.0" + "@sentry/hub" "6.2.0" + "@sentry/minimal" "6.2.0" + "@sentry/types" "6.2.0" + "@sentry/utils" "6.2.0" tslib "^1.9.3" -"@sentry/hub@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-6.1.0.tgz#fb22734c91c9d68564737996bf28b7e032e3d8ee" - integrity sha512-JnBSCgNg3VHiMojUl5tCHU8iWPVuE+qqENIzG9A722oJms1kKWBvWl+yQzhWBNdgk5qeAY3F5UzKWJZkbJ6xow== +"@sentry/hub@6.2.0": + version "6.2.0" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-6.2.0.tgz#e7502652bc9608cf8fb63e43cd49df9019a28f29" + integrity sha512-BDTEFK8vlJydWXp/KMX0stvv73V7od224iLi+w3k7BcPwMKXBuURBXPU8d5XIC4G8nwg8X6cnDvwL+zBBlBbkg== dependencies: - "@sentry/types" "6.1.0" - "@sentry/utils" "6.1.0" + "@sentry/types" "6.2.0" + "@sentry/utils" "6.2.0" tslib "^1.9.3" -"@sentry/minimal@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-6.1.0.tgz#b3abf76d93b95477a3c1029db810818bdc56845f" - integrity sha512-g6sfNKenL7wnsr/tibp8nFiMv/XRH0s0Pt4p151npmNI+SmjuUz3GGYEXk8ChCyaKldYKilkNOFdVXJxUf5gZw== +"@sentry/minimal@6.2.0": + version "6.2.0" + resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-6.2.0.tgz#718b70babb55912eeb38babaf7823d1bcdd77d1e" + integrity sha512-haxsx8/ZafhZUaGeeMtY7bJt9HbDlqeiaXrRMp1CxGtd0ZRQwHt60imEjl6IH1I73SEWxNfqScGsX2s3HzztMg== dependencies: - "@sentry/hub" "6.1.0" - "@sentry/types" "6.1.0" + "@sentry/hub" "6.2.0" + "@sentry/types" "6.2.0" tslib "^1.9.3" -"@sentry/react@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@sentry/react/-/react-6.1.0.tgz#f01a5f330ee339743420056872d0ae606a85381d" - integrity sha512-X1Jp1ueHsmHQXBcNWshA43MTdn0B3B06A36yv6mzAznmanpf+7+f7SHrnRFIwuBpTdPsHzolTmSE9VlkZPBgBg== +"@sentry/react@6.2.0": + version "6.2.0" + resolved "https://registry.yarnpkg.com/@sentry/react/-/react-6.2.0.tgz#bf46c38762554f246ca9dec527e6a5b3168fb0b0" + integrity sha512-Jf3s7om1iLpApkN26O7c3Ult3lS91ekZNC4WKtcPb6b+KOBQ36sB0d1KhL3hGZ55UKLmgZu3jn2hd7bJ9EY3yA== dependencies: - "@sentry/browser" "6.1.0" - "@sentry/minimal" "6.1.0" - "@sentry/types" "6.1.0" - "@sentry/utils" "6.1.0" + "@sentry/browser" "6.2.0" + "@sentry/minimal" "6.2.0" + "@sentry/types" "6.2.0" + "@sentry/utils" "6.2.0" hoist-non-react-statics "^3.3.2" tslib "^1.9.3" -"@sentry/types@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.1.0.tgz#5f9379229423ca1325acf6709e95687180f67132" - integrity sha512-kIaN52Fw5K+2mKRaHE2YluJ+F/qMGSUzZXIFDNdC6OUMXQ4TM8gZTrITXs8CLDm7cK8iCqFCtzKOjKK6KyOKAg== +"@sentry/types@6.2.0": + version "6.2.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.2.0.tgz#ca020ff42913c6b9f88a9d0c375b5ee3965a2590" + integrity sha512-vN4P/a+QqAuVfWFB9G3nQ7d6bgnM9jd/RLVi49owMuqvM24pv5mTQHUk2Hk4S3k7ConrHFl69E7xH6Dv5VpQnQ== -"@sentry/utils@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-6.1.0.tgz#52e3d7050983e685d3a48f9d2efa1e6eb4ae3e6d" - integrity sha512-6JAplzUOS6bEwfX0PDRZBbYRvn9EN22kZfcL0qGHtM9L0QQ5ybjbbVwOpbXgRkiZx++dQbzLFtelxnDhsbFG+Q== +"@sentry/utils@6.2.0": + version "6.2.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-6.2.0.tgz#39c81ad5ba92cec54d690e3fa8ea4e777d8e9c2b" + integrity sha512-YToUC7xYf2E/pIluI7upYTlj8fKXOtdwoOBkcQZifHgX/dP+qDaHibbBFe5PyZwdmU2UiLnWFsBr0gjo0QFo1g== dependencies: - "@sentry/types" "6.1.0" + "@sentry/types" "6.2.0" tslib "^1.9.3" "@sinonjs/commons@^1.7.0": @@ -1925,10 +1925,10 @@ "@babel/runtime" "^7.12.5" "@testing-library/dom" "^7.28.1" -"@testing-library/user-event@12.6.3": - version "12.6.3" - resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-12.6.3.tgz#4a77c56a48823cf8adebd0f57670e4a89c24d058" - integrity sha512-PCmbUKofE4SXA7l8jphZAbvv5H3c4ix34xPZ/GNe99fASX//msJRgiMbHIBP+GwRfgVG9c7zmkODSPu2X2vNRw== +"@testing-library/user-event@12.7.2": + version "12.7.2" + resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-12.7.2.tgz#78749eadc8324009b428bdb8d7edc64b63c3e86c" + integrity sha512-6uUYor7b0+JAcanK0rmCEZGo6t0n2F4WUKXL9toQg495a9YE2MHlJ8GWzfCgsUPyVHw8SNaMN8UrZoHABf+oOg== dependencies: "@babel/runtime" "^7.12.5" @@ -2125,10 +2125,10 @@ "@types/history" "*" "@types/react" "*" -"@types/react-transition-group@4.4.0": - version "4.4.0" - resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-4.4.0.tgz#882839db465df1320e4753e6e9f70ca7e9b4d46d" - integrity sha512-/QfLHGpu+2fQOqQaXh8MG9q03bFENooTb/it4jr5kKaZlDQfWvjqWZg48AwzPVMBHlRuTRAY7hRHCEOXz5kV6w== +"@types/react-transition-group@4.4.1": + version "4.4.1" + resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-4.4.1.tgz#e1a3cb278df7f47f17b5082b1b3da17170bd44b1" + integrity sha512-vIo69qKKcYoJ8wKCJjwSgCTM+z3chw3g18dkrDfVX665tMH7tmbDxEAnPdey4gTlwZz5QuHGzd+hul0OVZDqqQ== dependencies: "@types/react" "*" -- cgit v1.2.3 From c236e16a0ec49f180a8dae525d5fb131aa29b6bd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Mar 2021 05:54:01 +0000 Subject: Bump @typescript-eslint/eslint-plugin from 4.15.1 to 4.16.1 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.15.1 to 4.16.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.16.1/packages/eslint-plugin) Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 68 ++++++++++++++++++++++++++++++------------------------------ 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/package.json b/package.json index 0ebf702..e64809c 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@types/react-router-dom": "5.1.7", "@types/react-transition-group": "4.4.1", "@types/smoothscroll-polyfill": "0.3.1", - "@typescript-eslint/eslint-plugin": "4.15.1", + "@typescript-eslint/eslint-plugin": "4.16.1", "@typescript-eslint/parser": "4.15.0", "dotenv": "8.2.0", "eslint": "7.20.0", diff --git a/yarn.lock b/yarn.lock index 070edfc..c43a482 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2188,13 +2188,13 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@4.15.1": - version "4.15.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.15.1.tgz#835f64aa0a403e5e9e64c10ceaf8d05c3f015180" - integrity sha512-yW2epMYZSpNJXZy22Biu+fLdTG8Mn6b22kR3TqblVk50HGNV8Zya15WAXuQCr8tKw4Qf1BL4QtI6kv6PCkLoJw== +"@typescript-eslint/eslint-plugin@4.16.1": + version "4.16.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.16.1.tgz#2caf6a79dd19c3853b8d39769a27fccb24e4e651" + integrity sha512-SK777klBdlkUZpZLC1mPvyOWk9yAFCWmug13eAjVQ4/Q1LATE/NbcQL1xDHkptQkZOLnPmLUA1Y54m8dqYwnoQ== dependencies: - "@typescript-eslint/experimental-utils" "4.15.1" - "@typescript-eslint/scope-manager" "4.15.1" + "@typescript-eslint/experimental-utils" "4.16.1" + "@typescript-eslint/scope-manager" "4.16.1" debug "^4.1.1" functional-red-black-tree "^1.0.1" lodash "^4.17.15" @@ -2202,15 +2202,15 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@4.15.1": - version "4.15.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.15.1.tgz#d744d1ac40570a84b447f7aa1b526368afd17eec" - integrity sha512-9LQRmOzBRI1iOdJorr4jEnQhadxK4c9R2aEAsm7WE/7dq8wkKD1suaV0S/JucTL8QlYUPU1y2yjqg+aGC0IQBQ== +"@typescript-eslint/experimental-utils@4.16.1": + version "4.16.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.16.1.tgz#da7a396dc7d0e01922acf102b76efff17320b328" + integrity sha512-0Hm3LSlMYFK17jO4iY3un1Ve9x1zLNn4EM50Lia+0EV99NdbK+cn0er7HC7IvBA23mBg3P+8dUkMXy4leL33UQ== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.15.1" - "@typescript-eslint/types" "4.15.1" - "@typescript-eslint/typescript-estree" "4.15.1" + "@typescript-eslint/scope-manager" "4.16.1" + "@typescript-eslint/types" "4.16.1" + "@typescript-eslint/typescript-estree" "4.16.1" eslint-scope "^5.0.0" eslint-utils "^2.0.0" @@ -2232,23 +2232,23 @@ "@typescript-eslint/types" "4.15.0" "@typescript-eslint/visitor-keys" "4.15.0" -"@typescript-eslint/scope-manager@4.15.1": - version "4.15.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.15.1.tgz#f6511eb38def2a8a6be600c530c243bbb56ac135" - integrity sha512-ibQrTFcAm7yG4C1iwpIYK7vDnFg+fKaZVfvyOm3sNsGAerKfwPVFtYft5EbjzByDJ4dj1WD8/34REJfw/9wdVA== +"@typescript-eslint/scope-manager@4.16.1": + version "4.16.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.16.1.tgz#244e2006bc60cfe46987e9987f4ff49c9e3f00d5" + integrity sha512-6IlZv9JaurqV0jkEg923cV49aAn8V6+1H1DRfhRcvZUrptQ+UtSKHb5kwTayzOYTJJ/RsYZdcvhOEKiBLyc0Cw== dependencies: - "@typescript-eslint/types" "4.15.1" - "@typescript-eslint/visitor-keys" "4.15.1" + "@typescript-eslint/types" "4.16.1" + "@typescript-eslint/visitor-keys" "4.16.1" "@typescript-eslint/types@4.15.0": version "4.15.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.15.0.tgz#3011ae1ac3299bb9a5ac56bdd297cccf679d3662" integrity sha512-su4RHkJhS+iFwyqyXHcS8EGPlUVoC+XREfy5daivjLur9JP8GhvTmDipuRpcujtGC4M+GYhUOJCPDE3rC5NJrg== -"@typescript-eslint/types@4.15.1": - version "4.15.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.15.1.tgz#da702f544ef1afae4bc98da699eaecd49cf31c8c" - integrity sha512-iGsaUyWFyLz0mHfXhX4zO6P7O3sExQpBJ2dgXB0G5g/8PRVfBBsmQIc3r83ranEQTALLR3Vko/fnCIVqmH+mPw== +"@typescript-eslint/types@4.16.1": + version "4.16.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.16.1.tgz#5ba2d3e38b1a67420d2487519e193163054d9c15" + integrity sha512-nnKqBwMgRlhzmJQF8tnFDZWfunXmJyuXj55xc8Kbfup4PbkzdoDXZvzN8//EiKR27J6vUSU8j4t37yUuYPiLqA== "@typescript-eslint/typescript-estree@4.15.0": version "4.15.0" @@ -2263,13 +2263,13 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/typescript-estree@4.15.1": - version "4.15.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.15.1.tgz#fa9a9ff88b4a04d901ddbe5b248bc0a00cd610be" - integrity sha512-z8MN3CicTEumrWAEB2e2CcoZa3KP9+SMYLIA2aM49XW3cWIaiVSOAGq30ffR5XHxRirqE90fgLw3e6WmNx5uNw== +"@typescript-eslint/typescript-estree@4.16.1": + version "4.16.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.16.1.tgz#c2fc46b05a48fbf8bbe8b66a63f0a9ba04b356f1" + integrity sha512-m8I/DKHa8YbeHt31T+UGd/l8Kwr0XCTCZL3H4HMvvLCT7HU9V7yYdinTOv1gf/zfqNeDcCgaFH2BMsS8x6NvJg== dependencies: - "@typescript-eslint/types" "4.15.1" - "@typescript-eslint/visitor-keys" "4.15.1" + "@typescript-eslint/types" "4.16.1" + "@typescript-eslint/visitor-keys" "4.16.1" debug "^4.1.1" globby "^11.0.1" is-glob "^4.0.1" @@ -2284,12 +2284,12 @@ "@typescript-eslint/types" "4.15.0" eslint-visitor-keys "^2.0.0" -"@typescript-eslint/visitor-keys@4.15.1": - version "4.15.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.15.1.tgz#c76abbf2a3be8a70ed760f0e5756bf62de5865dd" - integrity sha512-tYzaTP9plooRJY8eNlpAewTOqtWW/4ff/5wBjNVaJ0S0wC4Gpq/zDVRTJa5bq2v1pCNQ08xxMCndcvR+h7lMww== +"@typescript-eslint/visitor-keys@4.16.1": + version "4.16.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.16.1.tgz#d7571fb580749fae621520deeb134370bbfc7293" + integrity sha512-s/aIP1XcMkEqCNcPQtl60ogUYjSM8FU2mq1O7y5cFf3Xcob1z1iXWNB6cC43Op+NGRTFgGolri6s8z/efA9i1w== dependencies: - "@typescript-eslint/types" "4.15.1" + "@typescript-eslint/types" "4.16.1" eslint-visitor-keys "^2.0.0" "@webassemblyjs/ast@1.11.0": -- cgit v1.2.3 From d45fb2bfbca361f0a5ae5564d1d09c9159ee17e3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 6 Mar 2021 14:50:49 +0000 Subject: Bump @typescript-eslint/parser from 4.15.0 to 4.16.1 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.15.0 to 4.16.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.16.1/packages/parser) Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 50 ++++++++------------------------------------------ 2 files changed, 9 insertions(+), 43 deletions(-) diff --git a/package.json b/package.json index e64809c..5b80c2b 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "@types/react-transition-group": "4.4.1", "@types/smoothscroll-polyfill": "0.3.1", "@typescript-eslint/eslint-plugin": "4.16.1", - "@typescript-eslint/parser": "4.15.0", + "@typescript-eslint/parser": "4.16.1", "dotenv": "8.2.0", "eslint": "7.20.0", "eslint-plugin-react": "7.22.0", diff --git a/yarn.lock b/yarn.lock index c43a482..e04e074 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2214,23 +2214,15 @@ eslint-scope "^5.0.0" eslint-utils "^2.0.0" -"@typescript-eslint/parser@4.15.0": - version "4.15.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.15.0.tgz#8df94365b4b7161f9e8514fe28aef19954810b6b" - integrity sha512-L6Dtbq8Bc7g2aZwnIBETpmUa9XDKCMzKVwAArnGp5Mn7PRNFjf3mUzq8UeBjL3K8t311hvevnyqXAMSmxO8Gpg== - dependencies: - "@typescript-eslint/scope-manager" "4.15.0" - "@typescript-eslint/types" "4.15.0" - "@typescript-eslint/typescript-estree" "4.15.0" - debug "^4.1.1" - -"@typescript-eslint/scope-manager@4.15.0": - version "4.15.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.15.0.tgz#c42703558ea6daaaba51a9c3a86f2902dbab9432" - integrity sha512-CSNBZnCC2jEA/a+pR9Ljh8Y+5TY5qgbPz7ICEk9WCpSEgT6Pi7H2RIjxfrrbUXvotd6ta+i27sssKEH8Azm75g== +"@typescript-eslint/parser@4.16.1": + version "4.16.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.16.1.tgz#3bbd3234dd3c5b882b2bcd9899bc30e1e1586d2a" + integrity sha512-/c0LEZcDL5y8RyI1zLcmZMvJrsR6SM1uetskFkoh3dvqDKVXPsXI+wFB/CbVw7WkEyyTKobC1mUNp/5y6gRvXg== dependencies: - "@typescript-eslint/types" "4.15.0" - "@typescript-eslint/visitor-keys" "4.15.0" + "@typescript-eslint/scope-manager" "4.16.1" + "@typescript-eslint/types" "4.16.1" + "@typescript-eslint/typescript-estree" "4.16.1" + debug "^4.1.1" "@typescript-eslint/scope-manager@4.16.1": version "4.16.1" @@ -2240,29 +2232,11 @@ "@typescript-eslint/types" "4.16.1" "@typescript-eslint/visitor-keys" "4.16.1" -"@typescript-eslint/types@4.15.0": - version "4.15.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.15.0.tgz#3011ae1ac3299bb9a5ac56bdd297cccf679d3662" - integrity sha512-su4RHkJhS+iFwyqyXHcS8EGPlUVoC+XREfy5daivjLur9JP8GhvTmDipuRpcujtGC4M+GYhUOJCPDE3rC5NJrg== - "@typescript-eslint/types@4.16.1": version "4.16.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.16.1.tgz#5ba2d3e38b1a67420d2487519e193163054d9c15" integrity sha512-nnKqBwMgRlhzmJQF8tnFDZWfunXmJyuXj55xc8Kbfup4PbkzdoDXZvzN8//EiKR27J6vUSU8j4t37yUuYPiLqA== -"@typescript-eslint/typescript-estree@4.15.0": - version "4.15.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.15.0.tgz#402c86a7d2111c1f7a2513022f22a38a395b7f93" - integrity sha512-jG6xTmcNbi6xzZq0SdWh7wQ9cMb2pqXaUp6bUZOMsIlu5aOlxGxgE/t6L/gPybybQGvdguajXGkZKSndZJpksA== - dependencies: - "@typescript-eslint/types" "4.15.0" - "@typescript-eslint/visitor-keys" "4.15.0" - debug "^4.1.1" - globby "^11.0.1" - is-glob "^4.0.1" - semver "^7.3.2" - tsutils "^3.17.1" - "@typescript-eslint/typescript-estree@4.16.1": version "4.16.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.16.1.tgz#c2fc46b05a48fbf8bbe8b66a63f0a9ba04b356f1" @@ -2276,14 +2250,6 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@4.15.0": - version "4.15.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.15.0.tgz#2a07768df30c8a5673f1bce406338a07fdec38ca" - integrity sha512-RnDtJwOwFucWFAMjG3ghCG/ikImFJFEg20DI7mn4pHEx3vC48lIAoyjhffvfHmErRDboUPC7p9Z2il4CLb7qxA== - dependencies: - "@typescript-eslint/types" "4.15.0" - eslint-visitor-keys "^2.0.0" - "@typescript-eslint/visitor-keys@4.16.1": version "4.16.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.16.1.tgz#d7571fb580749fae621520deeb134370bbfc7293" -- cgit v1.2.3 From dea045c23ee5111ed97ba8fba302809fd03fcda0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 6 Mar 2021 14:50:56 +0000 Subject: Bump @types/react from 17.0.1 to 17.0.2 Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 17.0.1 to 17.0.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index e64809c..a663864 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "@testing-library/user-event": "12.7.2", "@types/jest": "26.0.20", "@types/node": "14.14.31", - "@types/react": "17.0.1", + "@types/react": "17.0.2", "@types/react-dom": "17.0.1", "@types/react-router-dom": "5.1.7", "@types/react-transition-group": "4.4.1", diff --git a/yarn.lock b/yarn.lock index c43a482..aea8c72 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2132,10 +2132,10 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@17.0.1": - version "17.0.1" - resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.1.tgz#eb1f1407dea8da3bc741879c1192aa703ab9975b" - integrity sha512-w8t9f53B2ei4jeOqf/gxtc2Sswnc3LBK5s0DyJcg5xd10tMHXts2N31cKjWfH9IC/JvEPa/YF1U4YeP1t4R6HQ== +"@types/react@*", "@types/react@17.0.2": + version "17.0.2" + resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.2.tgz#3de24c4efef902dd9795a49c75f760cbe4f7a5a8" + integrity sha512-Xt40xQsrkdvjn1EyWe1Bc0dJLcil/9x2vAuW7ya+PuQip4UYUaXyhzWmAbwRsdMgwOFHpfp7/FFZebDU6Y8VHA== dependencies: "@types/prop-types" "*" csstype "^3.0.2" -- cgit v1.2.3 From c01afa5c1c72e4a360b02fb2f334942fb43e3773 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 6 Mar 2021 15:50:54 +0000 Subject: Bump @testing-library/user-event from 12.7.2 to 12.8.1 Bumps [@testing-library/user-event](https://github.com/testing-library/user-event) from 12.7.2 to 12.8.1. - [Release notes](https://github.com/testing-library/user-event/releases) - [Changelog](https://github.com/testing-library/user-event/blob/master/CHANGELOG.md) - [Commits](https://github.com/testing-library/user-event/compare/v12.7.2...v12.8.1) Signed-off-by: dependabot[bot] --- package.json | 4 ++-- yarn.lock | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index e64809c..de10b7d 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "react-app-polyfill": "2.0.0", "react-dom": "17.0.1", "react-router-dom": "5.2.0", - "react-spinners": "0.10.4", + "react-spinners": "0.10.6", "react-transition-group": "4.4.1", "smoothscroll-polyfill": "0.4.4", "swc-loader": "0.1.12", @@ -56,7 +56,7 @@ "@swc/jest": "0.1.2", "@testing-library/jest-dom": "5.11.9", "@testing-library/react": "11.2.5", - "@testing-library/user-event": "12.7.2", + "@testing-library/user-event": "12.8.1", "@types/jest": "26.0.20", "@types/node": "14.14.31", "@types/react": "17.0.1", diff --git a/yarn.lock b/yarn.lock index c43a482..d9be42c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1925,10 +1925,10 @@ "@babel/runtime" "^7.12.5" "@testing-library/dom" "^7.28.1" -"@testing-library/user-event@12.7.2": - version "12.7.2" - resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-12.7.2.tgz#78749eadc8324009b428bdb8d7edc64b63c3e86c" - integrity sha512-6uUYor7b0+JAcanK0rmCEZGo6t0n2F4WUKXL9toQg495a9YE2MHlJ8GWzfCgsUPyVHw8SNaMN8UrZoHABf+oOg== +"@testing-library/user-event@12.8.1": + version "12.8.1" + resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-12.8.1.tgz#aa897d6e7f0cf2208385abc2da2ac3f5844bbd00" + integrity sha512-u521YhkCKip0DQNDpfj9V97PU7UlCTkW5jURUD4JipuVe/xDJ32dJSIHlT2pqAs/I91OFB8p6LtqaLZpOu8BWQ== dependencies: "@babel/runtime" "^7.12.5" @@ -7332,10 +7332,10 @@ react-router@5.2.0: tiny-invariant "^1.0.2" tiny-warning "^1.0.0" -react-spinners@0.10.4: - version "0.10.4" - resolved "https://registry.yarnpkg.com/react-spinners/-/react-spinners-0.10.4.tgz#3789086f3c1289d904163517dfa240e13ffd460c" - integrity sha512-WRzHTHjx1nvMzsyTXg1J8VVDYadGGeas6pzzxGk0T+dVSZpMIN9NrKV/h76SybdsU8cUp55+u9L1V1C9/oafhw== +react-spinners@0.10.6: + version "0.10.6" + resolved "https://registry.yarnpkg.com/react-spinners/-/react-spinners-0.10.6.tgz#7e780144aaf54372231f6168ca075b4cd70e48ef" + integrity sha512-UPLcaMFhFnLWtS1zVDDT14ssW08gnZ44cjPN6GL27dEGboiCvRSthOilZXRDWESp449GB2iI6gjEbxzaMtA+dg== dependencies: "@emotion/core" "^10.0.35" -- cgit v1.2.3 From 074cde8bb13d0d416ae0abb6f782b465adcf3740 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 6 Mar 2021 16:04:09 +0000 Subject: Bump @sentry/react from 6.2.0 to 6.2.1 Bumps [@sentry/react](https://github.com/getsentry/sentry-javascript) from 6.2.0 to 6.2.1. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/6.2.0...6.2.1) Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 88 ++++++++++++++++++++++++++++++------------------------------ 2 files changed, 45 insertions(+), 45 deletions(-) diff --git a/package.json b/package.json index 76d2434..e2e2044 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "@fortawesome/free-brands-svg-icons": "5.15.2", "@fortawesome/free-solid-svg-icons": "5.15.2", "@fortawesome/react-fontawesome": "0.1.14", - "@sentry/react": "6.2.0", + "@sentry/react": "6.2.1", "@svgr/webpack": "5.5.0", "@swc/core": "1.2.47", "axios": "0.21.1", diff --git a/yarn.lock b/yarn.lock index 0d73ef8..68875a9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1631,68 +1631,68 @@ estree-walker "^1.0.1" picomatch "^2.2.2" -"@sentry/browser@6.2.0": - version "6.2.0" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-6.2.0.tgz#4113a92bc82f55e63f30cb16a94f717bd0b95817" - integrity sha512-4r3paHcHXLemj471BtNDhUs2kvJxk5XDRplz1dbC/LHXN5PWEXP4anhGILxOlxqi4y33r53PIZu3xXFjznaVZA== +"@sentry/browser@6.2.1": + version "6.2.1" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-6.2.1.tgz#f9f277e6f8cad0c7efd1a01726095d63a47a1c16" + integrity sha512-OAikFZ9EimD3noxMp8tA6Cf6qJcQ2U8k5QSgTPwdx+09nZOGJzbRFteK7WWmrS93ZJdzN61lpSQbg5v+bmmfbQ== dependencies: - "@sentry/core" "6.2.0" - "@sentry/types" "6.2.0" - "@sentry/utils" "6.2.0" + "@sentry/core" "6.2.1" + "@sentry/types" "6.2.1" + "@sentry/utils" "6.2.1" tslib "^1.9.3" -"@sentry/core@6.2.0": - version "6.2.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-6.2.0.tgz#be1c33854fc94e1a4d867f7c2c311cf1cefb8ee9" - integrity sha512-oTr2b25l+0bv/+d6IgMamPuGleWV7OgJb0NFfd+WZhw6UDRgr7CdEJy2gW6tK8SerwXgPHdn4ervxsT3WIBiXw== +"@sentry/core@6.2.1": + version "6.2.1" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-6.2.1.tgz#8b177e9bf591e2e7ddcb04f0b1403de3f5aa8755" + integrity sha512-jPqQEtafxxDtLONhCbTHh/Uq8mZRhsfbwJTSVYfPVEe/ELfFZLQK7tP6rOh7zEWKbTkE0mE6XcaoH3ZRAhgrqg== dependencies: - "@sentry/hub" "6.2.0" - "@sentry/minimal" "6.2.0" - "@sentry/types" "6.2.0" - "@sentry/utils" "6.2.0" + "@sentry/hub" "6.2.1" + "@sentry/minimal" "6.2.1" + "@sentry/types" "6.2.1" + "@sentry/utils" "6.2.1" tslib "^1.9.3" -"@sentry/hub@6.2.0": - version "6.2.0" - resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-6.2.0.tgz#e7502652bc9608cf8fb63e43cd49df9019a28f29" - integrity sha512-BDTEFK8vlJydWXp/KMX0stvv73V7od224iLi+w3k7BcPwMKXBuURBXPU8d5XIC4G8nwg8X6cnDvwL+zBBlBbkg== +"@sentry/hub@6.2.1": + version "6.2.1" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-6.2.1.tgz#35bc6bf841a93f4354b3a17592c938b3dba20b73" + integrity sha512-pG7wCQeRpzeP6t0bT4T0X029R19dbDS3/qswF8BL6bg0AI3afjfjBAZm/fqn1Uwe/uBoMHVVdbxgJDZeQ5d4rQ== dependencies: - "@sentry/types" "6.2.0" - "@sentry/utils" "6.2.0" + "@sentry/types" "6.2.1" + "@sentry/utils" "6.2.1" tslib "^1.9.3" -"@sentry/minimal@6.2.0": - version "6.2.0" - resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-6.2.0.tgz#718b70babb55912eeb38babaf7823d1bcdd77d1e" - integrity sha512-haxsx8/ZafhZUaGeeMtY7bJt9HbDlqeiaXrRMp1CxGtd0ZRQwHt60imEjl6IH1I73SEWxNfqScGsX2s3HzztMg== +"@sentry/minimal@6.2.1": + version "6.2.1" + resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-6.2.1.tgz#8f01480e1b56bc7dd54adf925e5317f233e19384" + integrity sha512-wuSXB4Ayxv9rBEQ4pm7fnG4UU2ZPtPnnChoEfd4/mw1UthXSvmPFEn6O4pdo2G8fTkl8eqm6wT/Q7uIXMEmw+A== dependencies: - "@sentry/hub" "6.2.0" - "@sentry/types" "6.2.0" + "@sentry/hub" "6.2.1" + "@sentry/types" "6.2.1" tslib "^1.9.3" -"@sentry/react@6.2.0": - version "6.2.0" - resolved "https://registry.yarnpkg.com/@sentry/react/-/react-6.2.0.tgz#bf46c38762554f246ca9dec527e6a5b3168fb0b0" - integrity sha512-Jf3s7om1iLpApkN26O7c3Ult3lS91ekZNC4WKtcPb6b+KOBQ36sB0d1KhL3hGZ55UKLmgZu3jn2hd7bJ9EY3yA== +"@sentry/react@6.2.1": + version "6.2.1" + resolved "https://registry.yarnpkg.com/@sentry/react/-/react-6.2.1.tgz#26587f3f47e9699003b04ac558d8aa8a2b7416d7" + integrity sha512-emJnYVASM2hej2f8eSjqiDRMljwLsDJDSwa6kVc5HUOs9gnVrE4MR+vSywraACf5tKZbH1YI+NUXCmR++fIB0g== dependencies: - "@sentry/browser" "6.2.0" - "@sentry/minimal" "6.2.0" - "@sentry/types" "6.2.0" - "@sentry/utils" "6.2.0" + "@sentry/browser" "6.2.1" + "@sentry/minimal" "6.2.1" + "@sentry/types" "6.2.1" + "@sentry/utils" "6.2.1" hoist-non-react-statics "^3.3.2" tslib "^1.9.3" -"@sentry/types@6.2.0": - version "6.2.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.2.0.tgz#ca020ff42913c6b9f88a9d0c375b5ee3965a2590" - integrity sha512-vN4P/a+QqAuVfWFB9G3nQ7d6bgnM9jd/RLVi49owMuqvM24pv5mTQHUk2Hk4S3k7ConrHFl69E7xH6Dv5VpQnQ== +"@sentry/types@6.2.1": + version "6.2.1" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.2.1.tgz#28c946230b2023f72307b65606d32052ad9e5353" + integrity sha512-h0OV1QT+fv5ojfK5/+iEXClu33HirmvbjcQC2jf05IHj9yXIOWy6EB10S8nBjuLiiFqQiAQYj3FN9Ip4eN8NJA== -"@sentry/utils@6.2.0": - version "6.2.0" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-6.2.0.tgz#39c81ad5ba92cec54d690e3fa8ea4e777d8e9c2b" - integrity sha512-YToUC7xYf2E/pIluI7upYTlj8fKXOtdwoOBkcQZifHgX/dP+qDaHibbBFe5PyZwdmU2UiLnWFsBr0gjo0QFo1g== +"@sentry/utils@6.2.1": + version "6.2.1" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-6.2.1.tgz#bfcb12c20d44bf2aeb0073b1264703c11c179ebd" + integrity sha512-6kQgM/yBPdXu+3qbJnI6HBcWztN9QfiMkH++ZiKk4ERhg9d2LYWlze478uTU5Fyo/JQYcp+McpjtjpR9QIrr0g== dependencies: - "@sentry/types" "6.2.0" + "@sentry/types" "6.2.1" tslib "^1.9.3" "@sinonjs/commons@^1.7.0": -- cgit v1.2.3 From 6af442e36cbd00b0dee8f2f404aad84208198dbd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 6 Mar 2021 18:51:10 +0000 Subject: Bump eslint from 7.20.0 to 7.21.0 Bumps [eslint](https://github.com/eslint/eslint) from 7.20.0 to 7.21.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v7.20.0...v7.21.0) Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 29 ++++++++++++++--------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 76d2434..bcd3134 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "@typescript-eslint/eslint-plugin": "4.16.1", "@typescript-eslint/parser": "4.16.1", "dotenv": "8.2.0", - "eslint": "7.20.0", + "eslint": "7.21.0", "eslint-plugin-react": "7.22.0", "husky": "4.3.8", "jest": "26.6.3", diff --git a/yarn.lock b/yarn.lock index 0d73ef8..a0143e2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1209,10 +1209,10 @@ resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== -"@eslint/eslintrc@^0.3.0": - version "0.3.0" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.3.0.tgz#d736d6963d7003b6514e6324bec9c602ac340318" - integrity sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg== +"@eslint/eslintrc@^0.4.0": + version "0.4.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.0.tgz#99cc0a0584d72f1df38b900fb062ba995f395547" + integrity sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog== dependencies: ajv "^6.12.4" debug "^4.1.1" @@ -1221,7 +1221,6 @@ ignore "^4.0.6" import-fresh "^3.2.1" js-yaml "^3.13.1" - lodash "^4.17.20" minimatch "^3.0.4" strip-json-comments "^3.1.1" @@ -4047,13 +4046,13 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== -eslint@7.20.0: - version "7.20.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.20.0.tgz#db07c4ca4eda2e2316e7aa57ac7fc91ec550bdc7" - integrity sha512-qGi0CTcOGP2OtCQBgWZlQjcTuP0XkIpYFj25XtRTQSHC+umNnp7UMshr2G8SLsRFYDdAPFeHOsiteadmMH02Yw== +eslint@7.21.0: + version "7.21.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.21.0.tgz#4ecd5b8c5b44f5dedc9b8a110b01bbfeb15d1c83" + integrity sha512-W2aJbXpMNofUp0ztQaF40fveSsJBjlSCSWpy//gzfTvwC+USs/nceBrKmlJOiM8r1bLwP2EuYkCqArn/6QTIgg== dependencies: "@babel/code-frame" "7.12.11" - "@eslint/eslintrc" "^0.3.0" + "@eslint/eslintrc" "^0.4.0" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" @@ -4066,7 +4065,7 @@ eslint@7.20.0: espree "^7.3.1" esquery "^1.4.0" esutils "^2.0.2" - file-entry-cache "^6.0.0" + file-entry-cache "^6.0.1" functional-red-black-tree "^1.0.1" glob-parent "^5.0.0" globals "^12.1.0" @@ -4371,10 +4370,10 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" -file-entry-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.0.tgz#7921a89c391c6d93efec2169ac6bf300c527ea0a" - integrity sha512-fqoO76jZ3ZnYrXLDRxBR1YvOvc0k844kcOg40bgsPrE25LAb/PDqTY+ho64Xh2c8ZXgIKldchCFHczG2UVRcWA== +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== dependencies: flat-cache "^3.0.4" -- cgit v1.2.3 From 95509ee3b532a061f4b250e9744ff9d2ed440b21 Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Sat, 6 Mar 2021 18:57:15 +0000 Subject: Set pre-commit to be executable Husky pre-commit was not running when git commit was called because the script was not marked as executable. --- .config/husky/pre-commit | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 .config/husky/pre-commit diff --git a/.config/husky/pre-commit b/.config/husky/pre-commit old mode 100644 new mode 100755 -- cgit v1.2.3 From 360f490ae99beff8861a16fffaeb3a0cd3a75cb5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 6 Mar 2021 19:01:50 +0000 Subject: Bump typescript from 4.1.5 to 4.2.3 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.1.5 to 4.2.3. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/compare/v4.1.5...v4.2.3) Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index bcd3134..89fd916 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "react-transition-group": "4.4.1", "smoothscroll-polyfill": "0.4.4", "swc-loader": "0.1.12", - "typescript": "4.1.5", + "typescript": "4.2.3", "webpack": "5.23.0", "webpack-cli": "4.5.0", "webpack-manifest-plugin": "3.0.0", diff --git a/yarn.lock b/yarn.lock index a0143e2..73cb969 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8693,10 +8693,10 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typescript@4.1.5: - version "4.1.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.5.tgz#123a3b214aaff3be32926f0d8f1f6e704eb89a72" - integrity sha512-6OSu9PTIzmn9TCDiovULTnET6BgXtDYL4Gg4szY+cGsc3JP1dQL8qvE8kShTRx1NIw4Q9IBHlwODjkjWEtMUyA== +typescript@4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.3.tgz#39062d8019912d43726298f09493d598048c1ce3" + integrity sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw== unicode-canonical-property-names-ecmascript@^1.0.4: version "1.0.4" -- cgit v1.2.3 From e11d2e2d0af42306c5a5f99a487b1c84551511ec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 6 Mar 2021 19:34:39 +0000 Subject: Bump @swc/core from 1.2.47 to 1.2.50 Bumps [@swc/core](https://github.com/swc-project/swc) from 1.2.47 to 1.2.50. - [Release notes](https://github.com/swc-project/swc/releases) - [Commits](https://github.com/swc-project/swc/compare/v1.2.47...v1.2.50) Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 116 +++++++++++++++++++++++++++++------------------------------ 2 files changed, 59 insertions(+), 59 deletions(-) diff --git a/package.json b/package.json index ce397ac..ff4e4c4 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "@fortawesome/react-fontawesome": "0.1.14", "@sentry/react": "6.2.1", "@svgr/webpack": "5.5.0", - "@swc/core": "1.2.47", + "@swc/core": "1.2.50", "axios": "0.21.1", "copy-webpack-plugin": "7.0.0", "fs-extra": "9.1.0", diff --git a/yarn.lock b/yarn.lock index 178b076..150f268 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1819,67 +1819,67 @@ "@svgr/plugin-svgo" "^5.5.0" loader-utils "^2.0.0" -"@swc/core-android-arm64@^1.2.47": - version "1.2.47" - resolved "https://registry.yarnpkg.com/@swc/core-android-arm64/-/core-android-arm64-1.2.47.tgz#554106c849eaa28904f7f98e4cec0413d72642a1" - integrity sha512-N11TLGtK+pKPFCcimg07CnJCj8qKqPbyAx8a5z2CW2+qtAB1a8XpK9njl5ExA3mxrur9qa9ITb0OPNBjojb7nw== - -"@swc/core-darwin-arm64@^1.2.47": - version "1.2.47" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.2.47.tgz#b2e3e5297b295091798a3d224687faa877fd251c" - integrity sha512-HRdUR6wd2w3mky8j6tOpL4j2MMsAFWSe7KfgPOCwlIWPlprlK1ACB0r+BmqpwC+REYnWoUG+dtPmpX1UdqGShQ== - -"@swc/core-darwin-x64@^1.2.47": - version "1.2.47" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.2.47.tgz#0e8f39e99ada7dde6ecfba7417805743d3ba987c" - integrity sha512-Sp6D+Nyw6n4tDl4SxcGpK/FxoX/GDSMhvNunmoTL0KJjRCNe8SJO83jsv6YLJSCV+q6hl+x6XeiZ0JzKGzFjfQ== - -"@swc/core-linux-arm-gnueabihf@^1.2.47": - version "1.2.47" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.2.47.tgz#85dfe68f350ab7ac3f36bb344513db9ae3715858" - integrity sha512-U6ZfRloE1UFjhmyFptlAk5HACAzSTEeQLZmxqzhN6w1l7tsHDG4oLJuBPkZivL7cgwbiyO6RbaCu3mBG426+uA== - -"@swc/core-linux-arm64-gnu@^1.2.47": - version "1.2.47" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.2.47.tgz#82ee3a4feaa5e3feb4e806537fc1784bb01e973c" - integrity sha512-D1+/veC1EdkuIYmwLK/ka22L4HOX4rejmwhBATrfQX6XfewmLe1+y2LxBhkLd0CG1+N5L2/Eoq3ohLjdtoKnwg== - -"@swc/core-linux-x64-gnu@^1.2.47": - version "1.2.47" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.2.47.tgz#7a6cebd85f1abd0258343899fed71cfb32e0bf48" - integrity sha512-x9PJcnlVj4bARNB2t7oBn84T+80wItHm2YSWj4L47Us0/oNRB1IYe2icsaAUlgZMviIJTSgS5j8UQCLmg3kiGg== - -"@swc/core-linux-x64-musl@^1.2.47": - version "1.2.47" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.2.47.tgz#58ed13d4f1d583856d1fa3bf3dc3281fb90c614a" - integrity sha512-cTUTxQCejdkBHnzWBiAzy0oMy3gM3MTmwPmHX4hDmM6TO8+MG4D2qlDJEe2cM45R66GdUsl01hXJtcd46MIs6Q== - -"@swc/core-win32-ia32-msvc@^1.2.47": - version "1.2.47" - resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.2.47.tgz#8b8fdebb91bab24a1231583d11a6297f942771da" - integrity sha512-bysp0kLK8hzqDktDr3N8NHG9bmF+aGO7FSjixLRFeiXhKwVgGoMMMv0S0myHoPUIEo4K3TU7QnGqhpkvohmNaQ== - -"@swc/core-win32-x64-msvc@^1.2.47": - version "1.2.47" - resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.2.47.tgz#c144be04102e4e0575a0e7189b27718a660ee0c5" - integrity sha512-rG9S6LRKFrlE/HEZqQRBJ/X9tG9vy/6TdupXpUSNrDUidHJdULsGwqjeXlY4kXhNP/SqpqoFC8l8DwmlEbkQtQ== - -"@swc/core@1.2.47", "@swc/core@^1.1.48", "@swc/core@^1.2.30": - version "1.2.47" - resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.2.47.tgz#a2fda021d24d80214168faf2e1b985329a4c877a" - integrity sha512-y1Xfp/8K9jLg1QRBkV7XDpI9wz8yvVjBw60DhtAIzpRnmfv2uDK+y5p0OY+5zC7/OTmUB9DWtyM5YX6snkHqag== +"@swc/core-android-arm64@^1.2.50": + version "1.2.50" + resolved "https://registry.yarnpkg.com/@swc/core-android-arm64/-/core-android-arm64-1.2.50.tgz#763e5ad1a899e2ff0a914c8ac8134e573d8dc733" + integrity sha512-aPJGhHqRkNncZnG5fCRhdX9JHGQ7SJBykm7ER/F6nNuvuSTYbuv4wGLYzNVi2UmeSMQQH/9j1D5xcX8STGIgsw== + +"@swc/core-darwin-arm64@^1.2.50": + version "1.2.50" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.2.50.tgz#1ed630edef1b8864d3793e4133988b7281511239" + integrity sha512-ginmLsDGswvaENSDxhevBpq63iKAxKtVS0P53b9KvfOhRDtQpnXMIxc3iYeyII8D2QDR0HOQu/c1n2b6sUIuBQ== + +"@swc/core-darwin-x64@^1.2.50": + version "1.2.50" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.2.50.tgz#2e794feb5071cf4e7e20cedde872f4dfb77cd031" + integrity sha512-HJ2CFuzxIXwoo22jHr1ntuveqoHN0hbY7mUTXaRLWh9468TMeGmD20rm7l9FnOsBVH9m9psHGpOVNOUSEXg6tw== + +"@swc/core-linux-arm-gnueabihf@^1.2.50": + version "1.2.50" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.2.50.tgz#c7b9e2b35c7d9997004d6138c1c8115e14744cb7" + integrity sha512-y1rsaqmbO/rezCifX30ilqTKaeN4yp0pDpHri6hAMKqHOzNGZTrY7p3nmiCd425gFVpM72gcGNrDqbt9IqeOPA== + +"@swc/core-linux-arm64-gnu@^1.2.50": + version "1.2.50" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.2.50.tgz#1f41ac1fae0438641773098f254c9e1d72563d1f" + integrity sha512-eh1xpvPNoXiZBrkKLoM1JDXAH5U7zK+kebC7lXsPjPuPVGENfknAoT3oQvyohWnE7pf1nOPBiDX7wOT4T2e1Pw== + +"@swc/core-linux-x64-gnu@^1.2.50": + version "1.2.50" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.2.50.tgz#57ca45b5b5e67a12ff90b5f50a23559be65840e6" + integrity sha512-2I5OX66FQejeiJ4fuPS18AQieVk6H8Z2LfOgCuDMK2ZRQdc3gBe1rYVhZyCGdYXQ76mUlo6+phSy5qI63d172Q== + +"@swc/core-linux-x64-musl@^1.2.50": + version "1.2.50" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.2.50.tgz#c9225ec94618e75a5260264db7cd3122930e68f1" + integrity sha512-370yPM7+8tzEdiV3Y+RzkzukRfYeDiOS6oRCtpTqGmfh9RUhxyKQFM/gYRi77Qpgq6LnvY1eUQh+WrioCAztXg== + +"@swc/core-win32-ia32-msvc@^1.2.50": + version "1.2.50" + resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.2.50.tgz#8aca2e009d49f2cff44fe924115104565ce59d5c" + integrity sha512-sQOXq79ge8Bv07rh1bHZwiH5qXg8do28HdzhI8/VaFAh3K+8zTqOdF9DuOlf0Z/sE23znbbQcp3Hz30+5jhgWg== + +"@swc/core-win32-x64-msvc@^1.2.50": + version "1.2.50" + resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.2.50.tgz#383ac624bdf0d7865013c6482392319afe2e8462" + integrity sha512-NmxSnkj7PYkN+e060tf0LR7knrdCzUobSmQrMwWlaC5dACHREFlo00mocL8AwB3WOZKvNp4MQv1cH3EaGbIpKw== + +"@swc/core@1.2.50", "@swc/core@^1.1.48", "@swc/core@^1.2.30": + version "1.2.50" + resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.2.50.tgz#d70daed948c9bb0ba8084e804e7fb2b1fcf0e19c" + integrity sha512-v4geRnqPqNBOAhWIT0ntcbw09mOxNy5XaGp4Nulxefpdpr8QUxPa1/9fLRPAbYjojT8yiqDtcLdx+yk+stFhpA== dependencies: "@node-rs/helper" "^1.0.0" optionalDependencies: - "@swc/core-android-arm64" "^1.2.47" - "@swc/core-darwin-arm64" "^1.2.47" - "@swc/core-darwin-x64" "^1.2.47" - "@swc/core-linux-arm-gnueabihf" "^1.2.47" - "@swc/core-linux-arm64-gnu" "^1.2.47" - "@swc/core-linux-x64-gnu" "^1.2.47" - "@swc/core-linux-x64-musl" "^1.2.47" - "@swc/core-win32-ia32-msvc" "^1.2.47" - "@swc/core-win32-x64-msvc" "^1.2.47" + "@swc/core-android-arm64" "^1.2.50" + "@swc/core-darwin-arm64" "^1.2.50" + "@swc/core-darwin-x64" "^1.2.50" + "@swc/core-linux-arm-gnueabihf" "^1.2.50" + "@swc/core-linux-arm64-gnu" "^1.2.50" + "@swc/core-linux-x64-gnu" "^1.2.50" + "@swc/core-linux-x64-musl" "^1.2.50" + "@swc/core-win32-ia32-msvc" "^1.2.50" + "@swc/core-win32-x64-msvc" "^1.2.50" "@swc/jest@0.1.2": version "0.1.2" -- cgit v1.2.3 From 4b6badaa56abbee0ecffb8ca9c573236bb026801 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 6 Mar 2021 20:04:04 +0000 Subject: Bump copy-webpack-plugin from 7.0.0 to 8.0.0 Bumps [copy-webpack-plugin](https://github.com/webpack-contrib/copy-webpack-plugin) from 7.0.0 to 8.0.0. - [Release notes](https://github.com/webpack-contrib/copy-webpack-plugin/releases) - [Changelog](https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack-contrib/copy-webpack-plugin/compare/v7.0.0...v8.0.0) Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 38 +++++++++++++++----------------------- 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index ff4e4c4..6946b3c 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "@svgr/webpack": "5.5.0", "@swc/core": "1.2.50", "axios": "0.21.1", - "copy-webpack-plugin": "7.0.0", + "copy-webpack-plugin": "8.0.0", "fs-extra": "9.1.0", "html-webpack-plugin": "5.2.0", "identity-obj-proxy": "3.0.0", diff --git a/yarn.lock b/yarn.lock index 150f268..e15cdcd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3317,17 +3317,16 @@ copy-descriptor@^0.1.0: resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= -copy-webpack-plugin@7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-7.0.0.tgz#3506f867ca6e861ee2769d4deaf8fa0d2563ada9" - integrity sha512-SLjQNa5iE3BoCP76ESU9qYo9ZkEWtXoZxDurHoqPchAFRblJ9g96xTeC560UXBMre1Nx6ixIIUfiY3VcjpJw3g== +copy-webpack-plugin@8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-8.0.0.tgz#3db5efb80d492127507303d1842e35011e2f318f" + integrity sha512-sqGe2FsB67wV/De+sz5azQklADe4thN016od6m7iK9KbjrSc1SEgg5QZ0LN+jGx5aZR52CbuXbqOhoIbqzzXlA== dependencies: - fast-glob "^3.2.4" + fast-glob "^3.2.5" glob-parent "^5.1.1" - globby "^11.0.1" - loader-utils "^2.0.0" + globby "^11.0.2" normalize-path "^3.0.0" - p-limit "^3.0.2" + p-limit "^3.1.0" schema-utils "^3.0.0" serialize-javascript "^5.0.1" @@ -4317,10 +4316,10 @@ fast-deep-equal@^3.1.1: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -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== +fast-glob@^3.1.1, fast-glob@^3.2.5: + version "3.2.5" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.5.tgz#7939af2a656de79a4f1901903ee8adcaa7cb9661" + integrity sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg== dependencies: "@nodelib/fs.stat" "^2.0.2" "@nodelib/fs.walk" "^1.2.3" @@ -4640,10 +4639,10 @@ globals@^12.1.0: dependencies: type-fest "^0.8.1" -globby@^11.0.1: - version "11.0.1" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.1.tgz#9a2bf107a068f3ffeabc49ad702c79ede8cfd357" - integrity sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ== +globby@^11.0.1, globby@^11.0.2: + version "11.0.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.2.tgz#1af538b766a3b540ebfb58a32b2e2d5897321d83" + integrity sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og== dependencies: array-union "^2.1.0" dir-glob "^3.0.1" @@ -6769,13 +6768,6 @@ p-limit@^2.0.0, p-limit@^2.2.0: dependencies: p-try "^2.0.0" -p-limit@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.0.2.tgz#1664e010af3cadc681baafd3e2a437be7b0fb5fe" - integrity sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg== - dependencies: - p-try "^2.0.0" - p-limit@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" -- cgit v1.2.3 From 5d466905c111eb2acb77ea850d87c9f1e3e929c5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 6 Mar 2021 20:04:18 +0000 Subject: Bump webpack from 5.23.0 to 5.24.3 Bumps [webpack](https://github.com/webpack/webpack) from 5.23.0 to 5.24.3. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v5.23.0...v5.24.3) Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index ff4e4c4..f0355a1 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "smoothscroll-polyfill": "0.4.4", "swc-loader": "0.1.12", "typescript": "4.2.3", - "webpack": "5.23.0", + "webpack": "5.24.3", "webpack-cli": "4.5.0", "webpack-manifest-plugin": "3.0.0", "workbox-webpack-plugin": "6.1.0" diff --git a/yarn.lock b/yarn.lock index 150f268..f9c0177 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3953,10 +3953,10 @@ es-abstract@^1.18.0-next.1: string.prototype.trimend "^1.0.3" string.prototype.trimstart "^1.0.3" -es-module-lexer@^0.3.26: - version "0.3.26" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.3.26.tgz#7b507044e97d5b03b01d4392c74ffeb9c177a83b" - integrity sha512-Va0Q/xqtrss45hWzP8CZJwzGSZJjDM5/MJRE3IXXnUCcVLElR9BRaE9F62BopysASyc4nM3uwhSW7FFB9nlWAA== +es-module-lexer@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.4.1.tgz#dda8c6a14d8f340a24e34331e0fab0cb50438e0e" + integrity sha512-ooYciCUtfw6/d2w56UVeqHPcoCFAiJdz5XOkYpv/Txl1HMUozpXjz/2RIQgqwKdXNDPSF1W7mJCFse3G+HDyAA== es-to-primitive@^1.2.1: version "1.2.1" @@ -8982,10 +8982,10 @@ webpack-sources@^2.1.1, webpack-sources@^2.2.0: source-list-map "^2.0.1" source-map "^0.6.1" -webpack@5.23.0: - version "5.23.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.23.0.tgz#9ed57e9a54b267b3549899271ad780cddc6ee316" - integrity sha512-RC6dwDuRxiU75F8XC4H08NtzUrMfufw5LDnO8dTtaKU2+fszEdySCgZhNwSBBn516iNaJbQI7T7OPHIgCwcJmg== +webpack@5.24.3: + version "5.24.3" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.24.3.tgz#6ec0f5059f8d7c7961075fa553cfce7b7928acb3" + integrity sha512-x7lrWZ7wlWAdyKdML6YPvfVZkhD1ICuIZGODE5SzKJjqI9A4SpqGTjGJTc6CwaHqn19gGaoOR3ONJ46nYsn9rw== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.46" @@ -8996,7 +8996,7 @@ webpack@5.23.0: browserslist "^4.14.5" chrome-trace-event "^1.0.2" enhanced-resolve "^5.7.0" - es-module-lexer "^0.3.26" + es-module-lexer "^0.4.0" eslint-scope "^5.1.1" events "^3.2.0" glob-to-regexp "^0.4.1" -- cgit v1.2.3 From b915ce2ba225d1c1209f7499618a67524450739f Mon Sep 17 00:00:00 2001 From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> Date: Sat, 6 Mar 2021 23:17:54 +0300 Subject: Set Username Expiry To Permanent Extends username expiry to a very far date, to prevent it from expiring on session. Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- src/api/auth.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/auth.ts b/src/api/auth.ts index 7bdf2bb..f118108 100644 --- a/src/api/auth.ts +++ b/src/api/auth.ts @@ -218,7 +218,7 @@ export async function refreshBackendJWT(): Promise { let pass = true; APIClient.post("/auth/refresh").then((response: AxiosResponse) => { - cookies.set(CookieNames.Username, response.data.username, {sameSite: "strict", secure: PRODUCTION, path: "/"}); + cookies.set(CookieNames.Username, response.data.username, {sameSite: "strict", secure: PRODUCTION, path: "/", expires: new Date(3000, 1)}); const expiry = Date.parse(response.data.expiry); setTimeout(refreshBackendJWT, (expiry * 0.9)); @@ -250,7 +250,7 @@ export default async function authorize(scopes: OAuthScopes[] = [], disableFunct if (disableFunction) { disableFunction(true); } await getDiscordCode(scopes).then(async discord_response =>{ await requestBackendJWT(discord_response.code).then(backend_response => { - const options: CookieSetOptions = {sameSite: "strict", secure: PRODUCTION, path: "/"}; + const options: CookieSetOptions = {sameSite: "strict", secure: PRODUCTION, path: "/", expires: new Date(3000, 1)}; cookies.set(CookieNames.Username, backend_response.username, options); options.maxAge = backend_response.maxAge; -- cgit v1.2.3 From 9f04d5f5effd07534c9eb5b9f8886c8f970d0dc6 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> Date: Sun, 7 Mar 2021 00:46:47 +0300 Subject: Fixes Return Home Button Centering Fixes the centering of the return home button on closed forms, by removing the style wrapper. Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- src/components/OAuth2Button.tsx | 6 +++--- src/pages/FormPage.tsx | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/OAuth2Button.tsx b/src/components/OAuth2Button.tsx index 25c5871..885c080 100644 --- a/src/components/OAuth2Button.tsx +++ b/src/components/OAuth2Button.tsx @@ -31,16 +31,16 @@ const errorStyles = css` visibility: hidden; width: 100%; left: 0; - + text-align: center; white-space: normal; box-sizing: border-box; - + padding: 0 15rem; @media (max-width: 750px) { padding: 0 5rem; } - + color: red; margin-top: 2.5rem; `; diff --git a/src/pages/FormPage.tsx b/src/pages/FormPage.tsx index fa63282..8852ac5 100644 --- a/src/pages/FormPage.tsx +++ b/src/pages/FormPage.tsx @@ -96,12 +96,14 @@ class Navigation extends React.Component { let submit = null; if (this.props.form_state) { + let inner_submit; if (this.props.scopes.includes(OAuthScopes.Identify) && !checkScopes(this.props.scopes)) { // Render OAuth button if login is required, and the scopes needed are not available - submit = this.setState({"logged_in": true})}/>; + inner_submit = this.setState({"logged_in": true})}/>; } else { - submit = ; + inner_submit = ; } + submit =
{ inner_submit }
; } return ( @@ -110,7 +112,7 @@ class Navigation extends React.Component { Return Home

-
{ submit }
+ { submit }
); } -- cgit v1.2.3 From df350092c32af5500e3d949987bc16dd9aaa5225 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> Date: Sun, 7 Mar 2021 03:17:33 +0300 Subject: Fixes Radio Button Rounding Makes radio buttons spheres instead of ovals. Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- src/components/InputTypes/Radio.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/InputTypes/Radio.tsx b/src/components/InputTypes/Radio.tsx index a857964..d95dcdd 100644 --- a/src/components/InputTypes/Radio.tsx +++ b/src/components/InputTypes/Radio.tsx @@ -14,7 +14,7 @@ interface RadioProps { const styles = css` div { width: 0.7em; - height: 0.75em; + height: 0.7em; top: 0.18rem; border-radius: 50%; -- cgit v1.2.3 From 7d48129863b1fc1689ca955c65504369545c95f0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 7 Mar 2021 00:33:16 +0000 Subject: Bump workbox-webpack-plugin from 6.1.0 to 6.1.1 Bumps [workbox-webpack-plugin](https://github.com/googlechrome/workbox) from 6.1.0 to 6.1.1. - [Release notes](https://github.com/googlechrome/workbox/releases) - [Commits](https://github.com/googlechrome/workbox/compare/v6.1.0...v6.1.1) Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 262 +++++++++++++++++++++++++++++------------------------------ 2 files changed, 132 insertions(+), 132 deletions(-) diff --git a/package.json b/package.json index ece5a2d..2a0f0eb 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "webpack": "5.24.3", "webpack-cli": "4.5.0", "webpack-manifest-plugin": "3.0.0", - "workbox-webpack-plugin": "6.1.0" + "workbox-webpack-plugin": "6.1.1" }, "scripts": { "start": "webpack serve --node-env=development", diff --git a/yarn.lock b/yarn.lock index 57029c6..5fd8a53 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9081,24 +9081,24 @@ word-wrap@^1.2.3, word-wrap@~1.2.3: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== -workbox-background-sync@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/workbox-background-sync/-/workbox-background-sync-6.1.0.tgz#817de1ac1546fb6035759f151b0b4c5f0d3d9506" - integrity sha512-A7YWWmAqzLkWYqqxzxoX4mciVjdSHpfX+JMADXoJ9SoLb6l/QReNJE+CNPew+gGPH6JLKNjZeecDmUpXFhzFPA== +workbox-background-sync@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/workbox-background-sync/-/workbox-background-sync-6.1.1.tgz#db51214299b4be7a8aa274d8037f22d917241101" + integrity sha512-w1b3j7snz4pQ8xp0i5Nci40qlglqdk70pbORBtMfl9uikI1qGjYfKq6oYeResCXYxb5mUYS245HsUclb6RFVJA== dependencies: - workbox-core "^6.1.0" + workbox-core "^6.1.1" -workbox-broadcast-update@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/workbox-broadcast-update/-/workbox-broadcast-update-6.1.0.tgz#63c1dc2d519aa6a7b9ce1db2f8da3e1db45b3422" - integrity sha512-70G821I1Lb4Ex+rcjfKCbuFJ4WL4RSQsqvcByt/bLpPTTLoE6+VvLX3+1QtSK8P2+NmOsKkAqx9qiQkUdGbaYw== +workbox-broadcast-update@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/workbox-broadcast-update/-/workbox-broadcast-update-6.1.1.tgz#5815749c9ad22ba4ef5184064a62fbdae3b04bf0" + integrity sha512-8fBNOQt8ojWWtz3FbkDnKo8CpN6l8UjD2HpQr8tue7HJVfk0X1gfnzZLIDg7HCXhqF7ld3iQbGQqGPf1ihTY6A== dependencies: - workbox-core "^6.1.0" + workbox-core "^6.1.1" -workbox-build@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/workbox-build/-/workbox-build-6.1.0.tgz#e0ba4a0004da1079e934c7452c72c92ef7b52cba" - integrity sha512-xJPqTEf+Pg9KAoTrNeVWpMjqi4cJIRn14i02bZjjbHsLNN38qrqc8xwAW48TwoPCYLjp104ST164/3RDgrc7yw== +workbox-build@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/workbox-build/-/workbox-build-6.1.1.tgz#8333626fad45734d842293e6c2c1b725f4e15752" + integrity sha512-mAI3dS4VnXri6BFg02arK1403SqHy2sOlzC4NVAk6Rl2+Ddxs+PmJO4cMTyHw0KEhQFcwk6V8cJeGiXJXYzinA== dependencies: "@babel/core" "^7.11.1" "@babel/preset-env" "^7.11.0" @@ -9122,131 +9122,131 @@ workbox-build@^6.1.0: strip-comments "^2.0.1" tempy "^0.6.0" upath "^1.2.0" - workbox-background-sync "^6.1.0" - workbox-broadcast-update "^6.1.0" - workbox-cacheable-response "^6.1.0" - workbox-core "^6.1.0" - workbox-expiration "^6.1.0" - workbox-google-analytics "^6.1.0" - workbox-navigation-preload "^6.1.0" - workbox-precaching "^6.1.0" - workbox-range-requests "^6.1.0" - workbox-recipes "^6.1.0" - workbox-routing "^6.1.0" - workbox-strategies "^6.1.0" - workbox-streams "^6.1.0" - workbox-sw "^6.1.0" - workbox-window "^6.1.0" - -workbox-cacheable-response@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/workbox-cacheable-response/-/workbox-cacheable-response-6.1.0.tgz#a99fdfe1507848486579df7b204c30e4cd0a74f2" - integrity sha512-oDAi0vXHGaE5p9NOo4N180UTcEKm6t2JMgmlrq0PkEW2PZEu9YR/atSnCwzMW7xpDqpKWaQr/LGP4+eixS8gcA== - dependencies: - workbox-core "^6.1.0" - -workbox-core@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/workbox-core/-/workbox-core-6.1.0.tgz#2671b64f76550e83a4c2202676b67ce372e10881" - integrity sha512-s3KqTJfBreO4xCZpR2LB5p/EknAx8eg0QumKiIgxM4hRO0RtwS2pJvTieNEM23X3RqxRhqweriLD8To19KUvjg== - -workbox-expiration@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/workbox-expiration/-/workbox-expiration-6.1.0.tgz#cf6bb384e49d0c92b79233c46671d9c6d82478a2" - integrity sha512-jp2xGk+LC4AhCoOxO/bC06GQkq/oVp0ZIf1zXLQh6OD2fWZPkXNjLLSuDnjXoGGPibYrq7gEE/xjAdYGjNWl1A== - dependencies: - workbox-core "^6.1.0" - -workbox-google-analytics@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/workbox-google-analytics/-/workbox-google-analytics-6.1.0.tgz#cd34100536250abc54070bcc23603213eb8e47e4" - integrity sha512-BuUAJ747bMPC6IOKaQBXfotGybOfeHDRIC8ElF65ouB4O9kUJ3zh4EFxXmmJLgzTnji6265gXqNWcfuGiidk6A== - dependencies: - workbox-background-sync "^6.1.0" - workbox-core "^6.1.0" - workbox-routing "^6.1.0" - workbox-strategies "^6.1.0" - -workbox-navigation-preload@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/workbox-navigation-preload/-/workbox-navigation-preload-6.1.0.tgz#e36d19f0d49ab5277e6c4e13b92f40da8955d62f" - integrity sha512-N0c5Kmzu7lPKvirukbeZ3lN8KEAZU9xA4b1wmpV0VXUfRXVEk2ayXXqwHwMGFVi6FNCHiDLOcC8a2zW5kFLAeg== - dependencies: - workbox-core "^6.1.0" - -workbox-precaching@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/workbox-precaching/-/workbox-precaching-6.1.0.tgz#9ee3d28f27cd78daa62f5bd6a0d33f5682ac97a7" - integrity sha512-zjye8MVzieBVJ3sS0hFcbKLp7pTHMfJM17YqxCxB0KykXWnxLOpYnStQ9M+bjWJsKJOQvbkPqvq5u9+mtA923g== - dependencies: - workbox-core "^6.1.0" - workbox-routing "^6.1.0" - workbox-strategies "^6.1.0" - -workbox-range-requests@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/workbox-range-requests/-/workbox-range-requests-6.1.0.tgz#5fbe9edfbcdb97153ed5260575a54e53b0f85a2d" - integrity sha512-BO025BdAvc6vTBXJfkfibcikMFLmLRECt0FrVrTiiQafdO3jWH9qX9zTdrjYf6GkiIjvejvvmSYegwU1mL6N3Q== - dependencies: - workbox-core "^6.1.0" - -workbox-recipes@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/workbox-recipes/-/workbox-recipes-6.1.0.tgz#b925f2727ace05ce8762a1b6da6c0d749fd687ee" - integrity sha512-r8YLtMtQnvfkK1htnfrrX1CxKHglZJiVlqnct9rYIU17n2LCalHdI0zQrPqzYdLLHZxTX25UpBsdib0cAATy0A== - dependencies: - workbox-cacheable-response "^6.1.0" - workbox-core "^6.1.0" - workbox-expiration "^6.1.0" - workbox-precaching "^6.1.0" - workbox-routing "^6.1.0" - workbox-strategies "^6.1.0" - -workbox-routing@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/workbox-routing/-/workbox-routing-6.1.0.tgz#f885cb7801e2c9c5678f197656cf27a2b649c1d5" - integrity sha512-FXQ5cwb6Mk90fC0rfQLX0pN+r/N4eBafwkh/QanJUq0e6jMPdDFLrlsikZL/0LcXEx+yAkWLytoiS+d2HOEBOw== - dependencies: - workbox-core "^6.1.0" - -workbox-strategies@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/workbox-strategies/-/workbox-strategies-6.1.0.tgz#9ddcee44408d2fb403f22a7989803b5c58560590" - integrity sha512-HvUknzJdZWeV3x7Eq33a7TGAv9/r1TEiQK6kQ1QNzN+IKiqhIjnhKFHmMxb5hK1Gw9/aDSJTLNPDaLPfIJRQFQ== - dependencies: - workbox-core "^6.1.0" - -workbox-streams@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/workbox-streams/-/workbox-streams-6.1.0.tgz#2dbc78ddc863b47aa4fe399d9385d3ed8567e881" - integrity sha512-V80OIfoIXaDkjWIGFSae5sBJuaG2r4bXk6HKpntBYaVQ72LD1CgkXRmZKmLJQ9ltHCx9Vmq/7+q1OF5mTKb8Qw== - dependencies: - workbox-core "^6.1.0" - workbox-routing "^6.1.0" - -workbox-sw@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/workbox-sw/-/workbox-sw-6.1.0.tgz#dfaca1029264af71f13a90fdfb16cf8d64ed0537" - integrity sha512-e2jnIWSmNrpO9Psy4D6euDdRUW8FTXAdMxOj5O02gxa01fri1kfTSM9irDnTGKUiSGc+hlycsvzGdr8bnvzDiA== - -workbox-webpack-plugin@6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/workbox-webpack-plugin/-/workbox-webpack-plugin-6.1.0.tgz#7090533aed07d000181f5686b5cc5f8c5fe36e06" - integrity sha512-uRmImfQghNmNF/iyPJ+MS0o2Z9E6kExZRSZIDOhnf1v+Mw1ixxx3n9fuTvTuCDvrUksaXcVEkvhagr12kfkEYA== + workbox-background-sync "^6.1.1" + workbox-broadcast-update "^6.1.1" + workbox-cacheable-response "^6.1.1" + workbox-core "^6.1.1" + workbox-expiration "^6.1.1" + workbox-google-analytics "^6.1.1" + workbox-navigation-preload "^6.1.1" + workbox-precaching "^6.1.1" + workbox-range-requests "^6.1.1" + workbox-recipes "^6.1.1" + workbox-routing "^6.1.1" + workbox-strategies "^6.1.1" + workbox-streams "^6.1.1" + workbox-sw "^6.1.1" + workbox-window "^6.1.1" + +workbox-cacheable-response@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/workbox-cacheable-response/-/workbox-cacheable-response-6.1.1.tgz#1dc71393cbce83559ad05a8ccb6c6fafa4cccc70" + integrity sha512-jasNxelRrqCbzIAIMjHk7Ej9BOViBTQlvRJzv3Y0nYuWvxK0CDPQJSraGmTbu3LGiTBbrWEmxe1hVqvLyFKR9A== + dependencies: + workbox-core "^6.1.1" + +workbox-core@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/workbox-core/-/workbox-core-6.1.1.tgz#c8a9b424031b0cf7dacf9d7b8e023d126c9d0167" + integrity sha512-xsc/72AQxFtt2BHmwU8QtnVV+W5ln4nnYGuz9Q5sPWYGqW4cH0P+FpZDoGM59bmNEyNf+W9bEmidW//e5GsbwQ== + +workbox-expiration@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/workbox-expiration/-/workbox-expiration-6.1.1.tgz#4468c3cdfe76b5888f4ae7e3aad63797a7bc24b1" + integrity sha512-WbEv8NG1ZUiWI+jv3v7Jqed/PyCMoTpLcf3Nw7tKq0nGy6DFQtmSizO37uJ73oc8vttck97UBPQRiwyP1bZnAg== + dependencies: + workbox-core "^6.1.1" + +workbox-google-analytics@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/workbox-google-analytics/-/workbox-google-analytics-6.1.1.tgz#c31876954779d65e1334c2dc3232e46d6a5f925a" + integrity sha512-79PyeE4TyabGXqlDcRG2LKejs8yZ8OoU0/El0BwP8RGrZgp5GMDGuJkat4xggpRTVaOk8rb0aoSbVAYBWpa0pg== + dependencies: + workbox-background-sync "^6.1.1" + workbox-core "^6.1.1" + workbox-routing "^6.1.1" + workbox-strategies "^6.1.1" + +workbox-navigation-preload@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/workbox-navigation-preload/-/workbox-navigation-preload-6.1.1.tgz#3c7d39d5f102f4a76f24b48f97701b16ae56bd40" + integrity sha512-vX5qJDk1Z663nuSSSHkcBFQQJwEe4UHynd5uoX3oC0IlecPclAbyT3QetVh0wYdXv6G6XD/LBd3iNZmlSbTosw== + dependencies: + workbox-core "^6.1.1" + +workbox-precaching@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/workbox-precaching/-/workbox-precaching-6.1.1.tgz#f387ccdf60aab30228a4c7ed20a1cd8dee6aaaa4" + integrity sha512-x8OKwtjd5ewe/x3VlKcXri1P3Tm0uV+uChdMYg/QryrCR9K8x9xwhAw8PZPkwrY0bLLsJMUoX9/lBu8DmjVqTA== + dependencies: + workbox-core "^6.1.1" + workbox-routing "^6.1.1" + workbox-strategies "^6.1.1" + +workbox-range-requests@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/workbox-range-requests/-/workbox-range-requests-6.1.1.tgz#4e6d30e91cfc3855ff16cfa3df458e0487da2b4d" + integrity sha512-ikZ0ZwbFAVMzJ08rM/spn9zC2tohGllFVii9R1q0+xMKvoGDsyzoQnoKrXgyUvcjRPn6ByFncAJ5lUKKG4TGkA== + dependencies: + workbox-core "^6.1.1" + +workbox-recipes@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/workbox-recipes/-/workbox-recipes-6.1.1.tgz#0cd1bd3b2ba223db563428ec5d17e960081f70d4" + integrity sha512-GuzJXBQM+YaFxQwFvcRarAScUoRDoaWXKxxkLWHnCJf0H//MQ8zR9Ay1mv21N6iRoSH11S0u/4yxSeembG/fLA== + dependencies: + workbox-cacheable-response "^6.1.1" + workbox-core "^6.1.1" + workbox-expiration "^6.1.1" + workbox-precaching "^6.1.1" + workbox-routing "^6.1.1" + workbox-strategies "^6.1.1" + +workbox-routing@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/workbox-routing/-/workbox-routing-6.1.1.tgz#833ef6439905757241f9e4d56d8e282c20199c02" + integrity sha512-Az3Gt3cHNK+W0gTfSb4eKGfwEap9Slak16Krr5SiLhE1gXUY2C2O123HucVCedXgIoqTLOXMtNj71Cm6SwYDEg== + dependencies: + workbox-core "^6.1.1" + +workbox-strategies@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/workbox-strategies/-/workbox-strategies-6.1.1.tgz#6e0adda84bcda17d3d0c48baec2eab9b988b9ca6" + integrity sha512-7qYA9Eiq6hnP2dyenlD7ZtWI1ArBMT8yhTvHVlaOl9kYY7W+Iv3lAfRCjj/nucOKeVXATx4iVJEuFPn5J+8lzw== + dependencies: + workbox-core "^6.1.1" + +workbox-streams@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/workbox-streams/-/workbox-streams-6.1.1.tgz#0f204f070861eb1afccddeca4a5a8ba069596bd1" + integrity sha512-EMhY+Y2O7+XVy8MFRmiDwKezAXLzbgjQOJDbxWaGKtwNPbwOF6gGZjCvmnNAU1K+MAvvUNsAFR6AAUKMSfOyaw== + dependencies: + workbox-core "^6.1.1" + workbox-routing "^6.1.1" + +workbox-sw@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/workbox-sw/-/workbox-sw-6.1.1.tgz#203ce4611309df1bf9c142d1e3b3a214b1b62944" + integrity sha512-t6LLSx/rOS8d6w4+fsJOHDqGrjO89iBF0F8nBQgBleEPjvs9Be5j4B11y34Fw7s0CggeA3Kciutr4CqnQtPQUg== + +workbox-webpack-plugin@6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/workbox-webpack-plugin/-/workbox-webpack-plugin-6.1.1.tgz#4648c2593c4b82330c7d6972a2f5c53ceee29e0e" + integrity sha512-yb864G6XmSY/vdIlzBTGkISsCiL/NL6LM2UZoiX80MS/OrSxOysJULi0L26uU8q3w9TMg1ip927N/PabgJyLHw== dependencies: fast-json-stable-stringify "^2.1.0" pretty-bytes "^5.4.1" source-map-url "^0.4.0" upath "^1.2.0" webpack-sources "^1.4.3" - workbox-build "^6.1.0" + workbox-build "^6.1.1" -workbox-window@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/workbox-window/-/workbox-window-6.1.0.tgz#5856127f183bcccfd93655b0e3cba5f2432b9156" - integrity sha512-sjnE+nTSnrBvYx5KmpESvsTC82P3yy8h5l4Ae4Q8uLqdH29UQ3bMd8puGVVhX1JZFCmV40cvrbZ1fUj+3/TQ9g== +workbox-window@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/workbox-window/-/workbox-window-6.1.1.tgz#c1d60f6a56b49235e36edc73c593fa470ffffc72" + integrity sha512-ZT1enHgi6gYfm+HgRWq8nkqLFEtjOjkq3yGV/qhMmKvI39/sIdO4g2LcjqhnUjbhweedX+9KOOu3U4xasQpGcQ== dependencies: - workbox-core "^6.1.0" + workbox-core "^6.1.1" wrap-ansi@^5.1.0: version "5.1.0" -- cgit v1.2.3 From f2c8a1cee3623bae125ee6730730f8fbc106ff2d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 7 Mar 2021 00:44:48 +0000 Subject: Bump husky from 4.3.8 to 5.1.3 Bumps [husky](https://github.com/typicode/husky) from 4.3.8 to 5.1.3. - [Release notes](https://github.com/typicode/husky/releases) - [Commits](https://github.com/typicode/husky/compare/v4.3.8...v5.1.3) Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index ece5a2d..67b4b94 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "dotenv": "8.2.0", "eslint": "7.21.0", "eslint-plugin-react": "7.22.0", - "husky": "5.0.9", + "husky": "5.1.3", "jest": "26.6.3", "jest-environment-jsdom-fourteen": "1.0.1", "jest-resolve": "26.6.2", diff --git a/yarn.lock b/yarn.lock index 57029c6..a390631 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4928,10 +4928,10 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== -husky@5.0.9: - version "5.0.9" - resolved "https://registry.yarnpkg.com/husky/-/husky-5.0.9.tgz#6d38706643d66ed395bcd4ee952d02e3f15eb3a3" - integrity sha512-0SjcaY21a+IRdx7p7r/X33Vc09UR2m8SbP8yfkhUX2/jAmwcz+GR7i9jXkp2pP3GfX23JhMkVP6SWwXB18uXtg== +husky@5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/husky/-/husky-5.1.3.tgz#1a0645a4fe3ffc006c4d0d8bd0bcb4c98787cc9d" + integrity sha512-fbNJ+Gz5wx2LIBtMweJNY1D7Uc8p1XERi5KNRMccwfQA+rXlxWNSdUxswo0gT8XqxywTIw7Ywm/F4v/O35RdMg== iconv-lite@0.4.24: version "0.4.24" -- cgit v1.2.3 From bad36a3bef51fb12dbb57f0e60535fb243711987 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> Date: Sun, 7 Mar 2021 03:49:31 +0300 Subject: Removes Pre Commit Step Removes the husky install step, in favor of automatic install through the prepare script. Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- .config/husky/.gitignore | 2 +- README.md | 1 - package.json | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.config/husky/.gitignore b/.config/husky/.gitignore index c9cdc63..31354ec 100644 --- a/.config/husky/.gitignore +++ b/.config/husky/.gitignore @@ -1 +1 @@ -_ \ No newline at end of file +_ diff --git a/README.md b/README.md index 0f42f95..8094419 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,6 @@ and [webpack](https://webpack.js.org/) for building and development. A full setup guide is available on [Notion](https://www.notion.so/pythondiscord/Forms-6312360495ff45f487da5b1924184a2d), along with a troubleshooting guide.
-Run `yarn install --dev` and `yarn run pre-commit` to setup your dev environment. ## React & Dependency Info ### Project Info diff --git a/package.json b/package.json index 67b4b94..b3209ed 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "build": "webpack", "test": "jest", "lint": "eslint --cache src/", - "pre-commit": "husky install .config/husky" + "prepare": "husky install .config/husky" }, "eslintConfig": { "extends": "react-app" -- cgit v1.2.3 From b92baa668465c61170ca9cc8630c4f4b8bac7b71 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> Date: Sun, 7 Mar 2021 16:05:47 +0300 Subject: Makes Code Inputs TextAreas Changes the display of code to textareas until a proper solution is implemented. Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- src/components/InputTypes/index.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/components/InputTypes/index.tsx b/src/components/InputTypes/index.tsx index bc65248..c6a83f1 100644 --- a/src/components/InputTypes/index.tsx +++ b/src/components/InputTypes/index.tsx @@ -1,5 +1,4 @@ import Checkbox from "./Checkbox"; -import Code from "./Code"; import Radio from "./Radio"; import Range from "./Range"; import Select from "./Select"; @@ -38,6 +37,7 @@ export default function create_input({ question, public_state }: QuestionProp, h /* eslint-disable react/react-in-jsx-scope */ switch (question.type) { + case QuestionType.Code: // TODO: Implement case QuestionType.TextArea: result =