diff --git a/.env b/.env index 70010fd7..da0243c2 100644 --- a/.env +++ b/.env @@ -40,3 +40,8 @@ NEXT_PUBLIC_LOCIZE_PROJECT_ID=658fc999-dfa8-4307-b9d7-b4870ad5b968 # Used to send analytics usage # Tip: The value being used below is valid, so that you can run the demo locally without having to create your own Amplitude account, but you cannot access the data NEXT_PUBLIC_AMPLITUDE_API_KEY=5ea02d86a6840c165fcc01377131fa13 + +# Tells webpack how to bundle the code for sentry.server.config.js. +# See https://github.com/getsentry/sentry-docs/issues/3721#issuecomment-858987529 +# Will be injected automatically by "@sentry/nextjs" into ".env.local" +SENTRY_SERVER_INIT_PATH=.next/server/sentry/initServerSDK.js diff --git a/.env.local.example b/.env.local.example index f3128e5c..97910702 100644 --- a/.env.local.example +++ b/.env.local.example @@ -47,6 +47,12 @@ LOCIZE_API_KEY= # Example (fake value): https://14fa1cae05079675b18cd05403ae5c48@sentry.io/1234567 SENTRY_DSN= +# Sentry authentication token, can be found under "Settings => Account => API => Auth Tokens" at https://sentry.io/settings/account/api/auth-tokens/ +# Used to send soure maps to Sentry +# See https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#environment-variables +# Requires project:releases and org:read - See https://github.com/getsentry/sentry-webpack-plugin#options +SENTRY_AUTH_TOKEN= + # Github "personal access token", can be generated at "Settings > Developer settings > Personal access tokens" at https://github.com/settings/tokens # Used by "Workflow Dispatch" GitHub Actions # Needs the following scopes: diff --git a/.storybook/webpack.config.js b/.storybook/webpack.config.js index 3e7ef366..ec7757d0 100644 --- a/.storybook/webpack.config.js +++ b/.storybook/webpack.config.js @@ -30,9 +30,5 @@ module.exports = async ({ console: true, }; - // XXX See https://github.com/vercel/next.js/blob/canary/examples/with-sentry-simple/next.config.js - // Because StoryBook only compiles for client and has no server runtime, we must replace backend-related libs like @sentry/node to their browser counterpart - config.resolve.alias['@sentry/node'] = '@sentry/browser'; - return config; }; diff --git a/next.config.js b/next.config.js index 421f712a..1d65128d 100644 --- a/next.config.js +++ b/next.config.js @@ -3,6 +3,7 @@ const nextSourceMaps = require('@zeit/next-source-maps'); const createNextPluginPreval = require('next-plugin-preval/config'); const packageJson = require('./package'); const i18nConfig = require('./src/modules/core/i18n/i18nConfig'); +const { withSentryConfig } = require('@sentry/nextjs'); const withNextPluginPreval = createNextPluginPreval(); const withSourceMaps = nextSourceMaps(); @@ -17,6 +18,22 @@ const publicBasePaths = ['robots', 'static', 'favicon.ico']; // All items (folde const noRedirectBasePaths = [...supportedLocales, ...publicBasePaths, ...noRedirectBlacklistedPaths]; // Will disable url rewrite for those items (should contain all supported languages and all public base paths) const date = new Date(); const GIT_COMMIT_SHA_SHORT = typeof process.env.GIT_COMMIT_SHA === 'string' && process.env.GIT_COMMIT_SHA.substring(0, 8); +const sentryWebpackPluginOptions = { + // Additional config options for the Sentry Webpack plugin. Keep in mind that + // the following options are set automatically, and overriding them is not + // recommended: + // release, url, org, project, authToken, configFile, stripPrefix, + // urlPrefix, include, ignore + // For all available options, see: + // https://github.com/getsentry/sentry-webpack-plugin#options. + + // XXX The error "Error: Cannot find module '/.next/server/sentry/initServerSDK.js'" in the console is a false-positive error + // See https://github.com/getsentry/sentry-docs/issues/3721 + + debug: process.env.NODE_ENV === 'development', // You'll need to configure "debug" in sentry.x.config.js files as well + dryRun: process.env.NODE_ENV === 'development', // Don't upload source maps during dev (doesn't work anyway) + silent: true, // Suppresses all logs, because "[Sentry Webpack Plugin]" logs are too noisy +}; console.debug(`Building Next with NODE_ENV="${process.env.NODE_ENV}" NEXT_PUBLIC_APP_STAGE="${process.env.NEXT_PUBLIC_APP_STAGE}" for NEXT_PUBLIC_CUSTOMER_REF="${process.env.NEXT_PUBLIC_CUSTOMER_REF}" using GIT_COMMIT_SHA=${process.env.GIT_COMMIT_SHA} and GIT_COMMIT_REF=${process.env.GIT_COMMIT_REF}`); @@ -33,14 +50,22 @@ console.debug(`Release version resolved from tags: "${APP_RELEASE_TAG}" (matchin * The below config applies to the whole application. * next.config.js gets used by the Next.js server and build phases, and it's not included in the browser build. * + * The Sentry doc states: + * "Make sure adding "withSentryConfig" is the last code to run before exporting, to ensure that your source maps include changes from all other Webpack plugins." + * XXX DO NOT follow that guideline blindly! "withNextPluginPreval" must be the last code to run when exporting. + * See https://github.com/getsentry/sentry-docs/issues/3723 + * See https://github.com/ricokahler/next-plugin-preval/issues/42 + * * XXX Not all configuration options are listed below, we only kept those of most interest. * You'll need to dive into Next.js own documentation to find out about what's not included. * Basically, we focused on options that seemed important for a SSG/SSR app running on serverless mode (Vercel). * Also, we included some options by are not using them, this is mostly to help make you aware of those options, in case you'd need them. * * @see https://nextjs.org/docs/api-reference/next.config.js/introduction + * @see https://docs.sentry.io/platforms/javascript/guides/nextjs/ + * @see https://github.com/getsentry/sentry-webpack-plugin#options */ -module.exports = withNextPluginPreval(withBundleAnalyzer(withSourceMaps({ +module.exports = withNextPluginPreval(withSentryConfig(withBundleAnalyzer(withSourceMaps({ // basepath: '', // If you want Next.js to cover only a subsection of the domain. See https://nextjs.org/docs/api-reference/next.config.js/basepath // target: 'serverless', // Automatically enabled on Vercel, you may need to manually opt-in if you're not using Vercel. See https://nextjs.org/docs/api-reference/next.config.js/build-target#serverless-target // trailingSlash: false, // By default Next.js will redirect urls with trailing slashes to their counterpart without a trailing slash. See https://nextjs.org/docs/api-reference/next.config.js/trailing-slash @@ -59,7 +84,7 @@ module.exports = withNextPluginPreval(withBundleAnalyzer(withSourceMaps({ reactStrictMode: true, /** - * Environment variables added to JS bundle + * Environment variables added to JS bundle. * * XXX All env variables defined in ".env*" files that aren't public (those that don't start with "NEXT_PUBLIC_") MUST manually be made available at build time below. * They're necessary on Vercel for runtime execution (SSR, SSG with revalidate, everything that happens server-side will need those). @@ -71,11 +96,13 @@ module.exports = withNextPluginPreval(withBundleAnalyzer(withSourceMaps({ * @see https://nextjs.org/docs/api-reference/next.config.js/environment-variables */ env: { + // Most sensitive env variables GITHUB_DISPATCH_TOKEN: process.env.GITHUB_DISPATCH_TOKEN, AIRTABLE_API_KEY: process.env.AIRTABLE_API_KEY, AIRTABLE_BASE_ID: process.env.AIRTABLE_BASE_ID, LOCIZE_API_KEY: process.env.LOCIZE_API_KEY, SENTRY_DSN: process.env.SENTRY_DSN, + NEXT_PUBLIC_SENTRY_DSN: process.env.SENTRY_DSN, // Sentry DSN must be provided to the browser for error reporting to work there // Vercel env variables - See https://vercel.com/docs/environment-variables#system-environment-variables VERCEL: process.env.VERCEL, @@ -340,6 +367,7 @@ module.exports = withNextPluginPreval(withBundleAnalyzer(withSourceMaps({ // Those variables are considered public because they are available at build time and at run time (they'll be replaced during initial build, by their value) plugin.definitions['process.env.NEXT_PUBLIC_APP_BUILD_ID'] = JSON.stringify(buildId); plugin.definitions['process.env.NEXT_PUBLIC_APP_VERSION_RELEASE'] = JSON.stringify(APP_VERSION_RELEASE); + plugin.definitions['process.env.SENTRY_RELEASE'] = JSON.stringify(APP_VERSION_RELEASE); // Necessary to forward it automatically to source maps } }); @@ -347,25 +375,6 @@ module.exports = withNextPluginPreval(withBundleAnalyzer(withSourceMaps({ console.debug(`[webpack] Building release "${APP_VERSION_RELEASE}" using NODE_ENV="${process.env.NODE_ENV}" ${process.env.IS_SERVER_INITIAL_BUILD ? 'with IS_SERVER_INITIAL_BUILD="1"' : ''}`); } - // XXX See https://github.com/vercel/next.js/blob/canary/examples/with-sentry-simple/next.config.js - // In `pages/_app.js`, Sentry is imported from @sentry/node. While - // @sentry/browser will run in a Node.js environment, @sentry/node will use - // Node.js-only APIs to catch even more unhandled exceptions. - // - // This works well when Next.js is SSRing your page on a server with - // Node.js, but it is not what we want when your client-side bundle is being - // executed by a browser. - // - // Luckily, Next.js will call this webpack function twice, once for the - // server and once for the client. Read more: - // https://nextjs.org/docs#customizing-webpack-config - // - // So ask Webpack to replace @sentry/node imports with @sentry/browser when - // building the browser's bundle - if (!isServer) { - config.resolve.alias['@sentry/node'] = '@sentry/browser'; - } - return config; }, @@ -399,4 +408,4 @@ module.exports = withNextPluginPreval(withBundleAnalyzer(withSourceMaps({ // }, poweredByHeader: false, // See https://nextjs.org/docs/api-reference/next.config.js/disabling-x-powered-by -}))); +})), sentryWebpackPluginOptions)); diff --git a/package.json b/package.json index 3581f2c2..6baf3d75 100644 --- a/package.json +++ b/package.json @@ -116,8 +116,7 @@ "@fortawesome/free-regular-svg-icons": "5.15.3", "@fortawesome/free-solid-svg-icons": "5.15.3", "@fortawesome/react-fontawesome": "0.1.14", - "@sentry/browser": "6.7.2", - "@sentry/node": "6.7.2", + "@sentry/nextjs": "6.7.2", "@types/lodash.isequal": "4.5.5", "@unly/simple-logger": "1.0.0", "@unly/universal-language-detector": "2.0.3", diff --git a/process.env.d.ts b/process.env.d.ts index 6871621a..5b2086cc 100644 --- a/process.env.d.ts +++ b/process.env.d.ts @@ -31,6 +31,8 @@ declare global { NEXT_PUBLIC_LOCIZE_PROJECT_ID: string; NEXT_PUBLIC_NRN_PRESET: string; SENTRY_DSN: string; + NEXT_PUBLIC_SENTRY_DSN: string; // Public version of SENTRY_DSN made available to the browser (value is identical to SENTRY_DSN) + SENTRY_RELEASE: string; // Git env variables GIT_COMMIT_SHA_SHORT: string; diff --git a/sentry.client.config.js b/sentry.client.config.js new file mode 100644 index 00000000..d0c4393f --- /dev/null +++ b/sentry.client.config.js @@ -0,0 +1,5 @@ +// This file configures the initialization of Sentry on the browser. +// The config you add here will be used whenever a page is visited. +// https://docs.sentry.io/platforms/javascript/guides/nextjs/ + +import './src/modules/core/sentry/init'; diff --git a/sentry.properties b/sentry.properties new file mode 100644 index 00000000..3d1cd13d --- /dev/null +++ b/sentry.properties @@ -0,0 +1,4 @@ +defaults.url=https://sentry.io/ +defaults.org=unly +defaults.project=next-right-now +cli.executable=../../../.npm/_npx/a8388072043b4cbc/node_modules/@sentry/cli/bin/sentry-cli diff --git a/sentry.server.config.js b/sentry.server.config.js new file mode 100644 index 00000000..d1763c02 --- /dev/null +++ b/sentry.server.config.js @@ -0,0 +1,5 @@ +// This file configures the initialization of Sentry on the server. +// The config you add here will be used whenever the server handles a request. +// https://docs.sentry.io/platforms/javascript/guides/nextjs/ + +import './src/modules/core/sentry/init'; diff --git a/src/app/components/BrowserPageBootstrap.tsx b/src/app/components/BrowserPageBootstrap.tsx index ad3f416c..1b7b7981 100644 --- a/src/app/components/BrowserPageBootstrap.tsx +++ b/src/app/components/BrowserPageBootstrap.tsx @@ -35,7 +35,7 @@ import { AmplitudeProvider, } from '@amplitude/react-amplitude'; import { useTheme } from '@emotion/react'; -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nextjs'; import { AmplitudeClient } from 'amplitude-js'; import React from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/src/app/components/MultiversalAppBootstrap.tsx b/src/app/components/MultiversalAppBootstrap.tsx index 254c4cd7..e01e7937 100644 --- a/src/app/components/MultiversalAppBootstrap.tsx +++ b/src/app/components/MultiversalAppBootstrap.tsx @@ -28,7 +28,7 @@ import { NotFound404PageName } from '@/pages/404'; import ErrorPage from '@/pages/_error'; import { NO_AUTO_PREVIEW_MODE_KEY } from '@/pages/api/preview'; import { ThemeProvider } from '@emotion/react'; -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nextjs'; import { isBrowser } from '@unly/utils'; import { i18n } from 'i18next'; import isEmpty from 'lodash.isempty'; @@ -301,11 +301,13 @@ const MultiversalAppBootstrap: React.FunctionComponent = (props): JSX.Ele }); } } else { - // XXX Opinionated: Record an exception in Sentry for 404, if you don't want this then uncomment the below code - const err = new Error(`Page not found (404) for "${router?.asPath}"`); + if (!process.env.IS_SERVER_INITIAL_BUILD) { // Avoids capturing false-positive 404 pages when building the 404 page + // XXX Opinionated: Record an exception in Sentry for 404, if you don't want this then uncomment the below code + const err = new Error(`Page not found (404) for "${router?.asPath}"`); - logger.warn(err); - Sentry.captureException(err); + logger.warn(err); + Sentry.captureException(err); + } } const i18nextInstance: i18n = i18nextLocize(lang, i18nTranslations); // Apply i18next configuration with Locize backend diff --git a/src/app/components/ServerPageBootstrap.tsx b/src/app/components/ServerPageBootstrap.tsx index a5a1d4d7..370478ef 100644 --- a/src/app/components/ServerPageBootstrap.tsx +++ b/src/app/components/ServerPageBootstrap.tsx @@ -3,7 +3,7 @@ import { OnlyServerPageProps } from '@/layouts/core/types/OnlyServerPageProps'; import { createLogger } from '@/modules/core/logging/logger'; import { configureSentryUserMetadata } from '@/modules/core/sentry/universal'; import { userSessionContext } from '@/modules/core/userSession/userSessionContext'; -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nextjs'; import React from 'react'; import { MultiversalAppBootstrapPageProps } from '../types/MultiversalAppBootstrapPageProps'; import { MultiversalAppBootstrapProps } from '../types/MultiversalAppBootstrapProps'; diff --git a/src/common/components/dataDisplay/Markdown.tsx b/src/common/components/dataDisplay/Markdown.tsx index bfaa9c96..c0a7d16a 100644 --- a/src/common/components/dataDisplay/Markdown.tsx +++ b/src/common/components/dataDisplay/Markdown.tsx @@ -3,7 +3,7 @@ import { Markdown as MarkdownType } from '@/modules/core/data/types/Markdown'; import I18nBtnChangeLocale from '@/modules/core/i18n/components/I18nBtnChangeLocale'; import I18nLink from '@/modules/core/i18n/components/I18nLink'; import { createLogger } from '@/modules/core/logging/logger'; -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nextjs'; import classnames from 'classnames'; import deepmerge from 'deepmerge'; import MarkdownToJSXLib, { MarkdownToJSX } from 'markdown-to-jsx'; diff --git a/src/common/utils/mobile.ts b/src/common/utils/mobile.ts index c9c538a3..735038ce 100644 --- a/src/common/utils/mobile.ts +++ b/src/common/utils/mobile.ts @@ -1,5 +1,5 @@ import { createLogger } from '@/modules/core/logging/logger'; -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nextjs'; import { isBrowser } from '@unly/utils'; const fileLabel = 'common/utils/mobile'; diff --git a/src/layouts/core/components/CoreLayout.tsx b/src/layouts/core/components/CoreLayout.tsx index 27b62375..03fb2d68 100644 --- a/src/layouts/core/components/CoreLayout.tsx +++ b/src/layouts/core/components/CoreLayout.tsx @@ -12,7 +12,7 @@ import { css, SerializedStyles, } from '@emotion/react'; -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nextjs'; import classnames from 'classnames'; import { NextRouter, diff --git a/src/layouts/demo/components/DemoLayout.tsx b/src/layouts/demo/components/DemoLayout.tsx index 2df67d0c..01ac79e7 100644 --- a/src/layouts/demo/components/DemoLayout.tsx +++ b/src/layouts/demo/components/DemoLayout.tsx @@ -8,7 +8,7 @@ import { Amplitude, LogOnMount, } from '@amplitude/react-amplitude'; -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nextjs'; import classnames from 'classnames'; import { NextRouter, diff --git a/src/layouts/quickPreview/components/QuickPreviewLayout.tsx b/src/layouts/quickPreview/components/QuickPreviewLayout.tsx index 6246dbfd..abfc8d5f 100644 --- a/src/layouts/quickPreview/components/QuickPreviewLayout.tsx +++ b/src/layouts/quickPreview/components/QuickPreviewLayout.tsx @@ -7,7 +7,7 @@ import { LogOnMount, } from '@amplitude/react-amplitude'; import { css } from '@emotion/react'; -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nextjs'; import React from 'react'; import { Container } from 'reactstrap'; import QuickPreviewBanner from './QuickPreviewBanner'; diff --git a/src/modules/core/airtable/applyRecordFallback.ts b/src/modules/core/airtable/applyRecordFallback.ts index f078f6f8..d58cca5b 100644 --- a/src/modules/core/airtable/applyRecordFallback.ts +++ b/src/modules/core/airtable/applyRecordFallback.ts @@ -1,4 +1,4 @@ -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nextjs'; import map from 'lodash.map'; import { AirtableRecord } from '../data/types/AirtableRecord'; import { GenericObject } from '../data/types/GenericObject'; diff --git a/src/modules/core/airtable/fetchAirtableTable.ts b/src/modules/core/airtable/fetchAirtableTable.ts index b91e4366..3b879e89 100644 --- a/src/modules/core/airtable/fetchAirtableTable.ts +++ b/src/modules/core/airtable/fetchAirtableTable.ts @@ -1,5 +1,5 @@ import { createLogger } from '@/modules/core/logging/logger'; -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nextjs'; import deepmerge from 'deepmerge'; import map from 'lodash.map'; import size from 'lodash.size'; diff --git a/src/modules/core/airtable/sanitizeRawAirtableDS.ts b/src/modules/core/airtable/sanitizeRawAirtableDS.ts index 90622f06..e590bd34 100644 --- a/src/modules/core/airtable/sanitizeRawAirtableDS.ts +++ b/src/modules/core/airtable/sanitizeRawAirtableDS.ts @@ -1,4 +1,4 @@ -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nextjs'; import cloneDeep from 'lodash.clonedeep'; import filter from 'lodash.filter'; import find from 'lodash.find'; diff --git a/src/modules/core/amplitude/amplitudeBrowserClient.ts b/src/modules/core/amplitude/amplitudeBrowserClient.ts index e592d373..d2dd3fa2 100644 --- a/src/modules/core/amplitude/amplitudeBrowserClient.ts +++ b/src/modules/core/amplitude/amplitudeBrowserClient.ts @@ -11,7 +11,7 @@ import { getClientNetworkConnectionType, getClientNetworkInformationSpeed, } from '@/modules/core/networkInformation/networkInformation'; -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nextjs'; import { isBrowser } from '@unly/utils'; import { AmplitudeClient, diff --git a/src/modules/core/amplitude/amplitudeServerClient.ts b/src/modules/core/amplitude/amplitudeServerClient.ts index a3154738..34125f15 100644 --- a/src/modules/core/amplitude/amplitudeServerClient.ts +++ b/src/modules/core/amplitude/amplitudeServerClient.ts @@ -5,7 +5,7 @@ import { init } from '@amplitude/node'; import { Event } from '@amplitude/types'; import { LogLevel } from '@amplitude/types/dist/src/logger'; import { Response } from '@amplitude/types/dist/src/response'; -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nextjs'; import { Context } from '@sentry/types'; import startsWith from 'lodash.startswith'; import { v1 as uuid } from 'uuid'; // XXX Use v1 for uniqueness - See https://www.sohamkamani.com/blog/2016/10/05/uuid1-vs-uuid4/ diff --git a/src/modules/core/cookiesManager/UniversalCookiesManager.ts b/src/modules/core/cookiesManager/UniversalCookiesManager.ts index 4836bfa6..e73cc4d6 100644 --- a/src/modules/core/cookiesManager/UniversalCookiesManager.ts +++ b/src/modules/core/cookiesManager/UniversalCookiesManager.ts @@ -1,4 +1,4 @@ -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nextjs'; import { COOKIE_LOOKUP_KEY_LANG } from '@unly/universal-language-detector/lib'; import { isBrowser } from '@unly/utils'; import ServerCookies, { diff --git a/src/modules/core/css/css.ts b/src/modules/core/css/css.ts index eac606e5..b109c4c9 100644 --- a/src/modules/core/css/css.ts +++ b/src/modules/core/css/css.ts @@ -1,5 +1,5 @@ import { createLogger } from '@/modules/core/logging/logger'; -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nextjs'; import { getPropertyName } from 'css-to-react-native'; import isPlainObject from 'lodash.isplainobject'; import map from 'lodash.map'; diff --git a/src/modules/core/data/record.ts b/src/modules/core/data/record.ts index 216ae691..95e91622 100644 --- a/src/modules/core/data/record.ts +++ b/src/modules/core/data/record.ts @@ -1,5 +1,5 @@ import { createLogger } from '@/modules/core/logging/logger'; -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nextjs'; import cloneDeep from 'lodash.clonedeep'; import find from 'lodash.find'; import get from 'lodash.get'; diff --git a/src/modules/core/errorHandling/DefaultErrorLayout.tsx b/src/modules/core/errorHandling/DefaultErrorLayout.tsx index f349bb19..3b94b49f 100644 --- a/src/modules/core/errorHandling/DefaultErrorLayout.tsx +++ b/src/modules/core/errorHandling/DefaultErrorLayout.tsx @@ -1,5 +1,5 @@ import { css } from '@emotion/react'; -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nextjs'; import * as React from 'react'; import { Button } from 'reactstrap'; import { GenericObject } from '../data/types/GenericObject'; @@ -48,7 +48,7 @@ const DefaultErrorLayout: React.FunctionComponent = (props): JSX.Element `} /> + +
+ +

+ Display report dialog when an error happens +

+ + + Sentry default report dialog can be handy to get user feedback when something bad happens.
+ If people actually use it, that is. +
+ +
+ +
+ +
+ +

+ Play around with custom error messages +

+ + + Generate your own errors dynamically! + + +
+ +
); }; diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index d88e99ba..db67f9c8 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -6,7 +6,6 @@ import { SSGPageProps } from '@/layouts/core/types/SSGPageProps'; import { SSRPageProps } from '@/layouts/core/types/SSRPageProps'; import { sendWebVitals } from '@/modules/core/amplitude/amplitudeBrowserClient'; import '@/modules/core/fontAwesome/fontAwesome'; -import '@/modules/core/sentry/init'; import { NextWebVitalsMetrics } from '@/modules/core/webVitals/types/NextWebVitalsMetrics'; import { NextWebVitalsMetricsReport } from '@/modules/core/webVitals/types/NextWebVitalsMetricsReport'; import size from 'lodash.size'; diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx index 121e5631..d69f0c6a 100644 --- a/src/pages/_document.tsx +++ b/src/pages/_document.tsx @@ -1,7 +1,7 @@ import { Cookies } from '@/modules/core/cookiesManager/types/Cookies'; import { resolveSSRLocale } from '@/modules/core/i18n/i18n'; import { createLogger } from '@/modules/core/logging/logger'; -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nextjs'; import classnames from 'classnames'; import NextCookies from 'next-cookies'; import { DocumentInitialProps } from 'next/dist/next-server/lib/utils'; diff --git a/src/pages/_error.tsx b/src/pages/_error.tsx index 1028a281..e3909ab7 100644 --- a/src/pages/_error.tsx +++ b/src/pages/_error.tsx @@ -1,5 +1,5 @@ import { flushSafe } from '@/modules/core/sentry/universal'; -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nextjs'; import { NextPageContext } from 'next'; import NextError, { ErrorProps as NextErrorProps } from 'next/error'; import React, { Fragment } from 'react'; diff --git a/src/pages/api/autoRedirectToLocalisedPage.ts b/src/pages/api/autoRedirectToLocalisedPage.ts index f184e236..9f73a713 100644 --- a/src/pages/api/autoRedirectToLocalisedPage.ts +++ b/src/pages/api/autoRedirectToLocalisedPage.ts @@ -4,6 +4,7 @@ import { AMPLITUDE_EVENTS, } from '@/modules/core/amplitude/events'; import localeMiddleware from '@/modules/core/i18n/middlewares/localeMiddleware'; +import * as Sentry from '@sentry/nextjs'; import { NextApiRequest, NextApiResponse, @@ -27,5 +28,5 @@ const autoRedirectToLocalisedPage = async (req: NextApiRequest, res: NextApiResp return await localeMiddleware(req, res); }; -export default autoRedirectToLocalisedPage; +export default Sentry.withSentry(autoRedirectToLocalisedPage); diff --git a/src/pages/api/error.ts b/src/pages/api/error.ts index 1632b18d..5ce2032a 100644 --- a/src/pages/api/error.ts +++ b/src/pages/api/error.ts @@ -6,7 +6,7 @@ import { import { createLogger } from '@/modules/core/logging/logger'; import { configureReq } from '@/modules/core/sentry/server'; import { flushSafe } from '@/modules/core/sentry/universal'; -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nextjs'; import { NextApiRequest, NextApiResponse, @@ -49,4 +49,4 @@ export const error = async (req: NextApiRequest, res: NextApiResponse): Promise< } }; -export default error; +export default Sentry.withSentry(error); diff --git a/src/pages/api/preview.ts b/src/pages/api/preview.ts index c346a041..d6086567 100644 --- a/src/pages/api/preview.ts +++ b/src/pages/api/preview.ts @@ -7,7 +7,7 @@ import { filterExternalAbsoluteUrl } from '@/modules/core/js/url'; import { createLogger } from '@/modules/core/logging/logger'; import { configureReq } from '@/modules/core/sentry/server'; import { flushSafe } from '@/modules/core/sentry/universal'; -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nextjs'; import appendQueryParameter from 'append-query'; import { NextApiRequest, @@ -120,4 +120,4 @@ export const preview = async (req: EndpointRequest, res: NextApiResponse): Promi } }; -export default preview; +export default Sentry.withSentry(preview); diff --git a/src/pages/api/startVercelDeployment.ts b/src/pages/api/startVercelDeployment.ts index ad2a0d54..3e3e05fb 100644 --- a/src/pages/api/startVercelDeployment.ts +++ b/src/pages/api/startVercelDeployment.ts @@ -9,7 +9,7 @@ import { createLogger } from '@/modules/core/logging/logger'; import { ALERT_TYPES } from '@/modules/core/sentry/config'; import { configureReq } from '@/modules/core/sentry/server'; import { flushSafe } from '@/modules/core/sentry/universal'; -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nextjs'; import size from 'lodash.size'; import { NextApiRequest, @@ -195,4 +195,4 @@ const startVercelDeployment = async (req: EndpointRequest, res: NextApiResponse) } }; -export default startVercelDeployment; +export default Sentry.withSentry(startVercelDeployment); diff --git a/src/pages/api/status.ts b/src/pages/api/status.ts index 8661757a..690f9c0c 100644 --- a/src/pages/api/status.ts +++ b/src/pages/api/status.ts @@ -6,7 +6,7 @@ import { import { createLogger } from '@/modules/core/logging/logger'; import { configureReq } from '@/modules/core/sentry/server'; import { flushSafe } from '@/modules/core/sentry/universal'; -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nextjs'; import { NextApiRequest, NextApiResponse, @@ -72,4 +72,4 @@ export const status = async (req: NextApiRequest, res: NextApiResponse): Promise } }; -export default status; +export default Sentry.withSentry(status); diff --git a/src/pages/api/webhooks/deploymentCompleted.ts b/src/pages/api/webhooks/deploymentCompleted.ts index 0ad5a75e..f13ca422 100644 --- a/src/pages/api/webhooks/deploymentCompleted.ts +++ b/src/pages/api/webhooks/deploymentCompleted.ts @@ -8,7 +8,7 @@ import { createLogger } from '@/modules/core/logging/logger'; import { ALERT_TYPES } from '@/modules/core/sentry/config'; import { configureReq } from '@/modules/core/sentry/server'; import { flushSafe } from '@/modules/core/sentry/universal'; -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nextjs'; import { NextApiRequest, NextApiResponse, @@ -133,4 +133,4 @@ export const deploymentCompleted = async (req: EndpointRequest, res: NextApiResp } }; -export default deploymentCompleted; +export default Sentry.withSentry(deploymentCompleted); diff --git a/vercel.customer1.production.json b/vercel.customer1.production.json index d33c7658..312c70b0 100644 --- a/vercel.customer1.production.json +++ b/vercel.customer1.production.json @@ -14,6 +14,7 @@ "AIRTABLE_BASE_ID": "@nrn-airtable-base-id", "LOCIZE_API_KEY": "The Locize API Key shouldn't be used in production (see https://github.com/locize/i18next-locize-backend#backend-options) because it's related to development-only features, and it's sensitive.", "SENTRY_DSN": "@nrn-sentry-dsn", + "SENTRY_AUTH_TOKEN": "@nrn-sentry-auth-token", "GITHUB_DISPATCH_TOKEN": "@nrn-github-dispatch-token", "VERCEL_DEPLOYMENT_COMPLETED_WEBHOOK": "https://nrn-v2-mst-aptd-at-lcz-sty-c1.vercel.app/api/webhooks/deploymentCompleted" } diff --git a/vercel.customer1.staging.json b/vercel.customer1.staging.json index 0b93270d..f45c4061 100644 --- a/vercel.customer1.staging.json +++ b/vercel.customer1.staging.json @@ -14,6 +14,7 @@ "AIRTABLE_BASE_ID": "@nrn-airtable-base-id", "LOCIZE_API_KEY": "@nrn-locize-api-key-staging", "SENTRY_DSN": "@nrn-sentry-dsn", + "SENTRY_AUTH_TOKEN": "@nrn-sentry-auth-token", "GITHUB_DISPATCH_TOKEN": "@nrn-github-dispatch-token", "VERCEL_DEPLOYMENT_COMPLETED_WEBHOOK": "https://nrn-v2-mst-aptd-at-lcz-sty-c1-preview.vercel.app/api/webhooks/deploymentCompleted" } diff --git a/vercel.customer2.production.json b/vercel.customer2.production.json index e0271e26..69c0bec1 100644 --- a/vercel.customer2.production.json +++ b/vercel.customer2.production.json @@ -14,6 +14,7 @@ "AIRTABLE_BASE_ID": "@nrn-airtable-base-id", "LOCIZE_API_KEY": "The Locize API Key shouldn't be used in production (see https://github.com/locize/i18next-locize-backend#backend-options) because it's related to development-only features, and it's sensitive.", "SENTRY_DSN": "@nrn-sentry-dsn", + "SENTRY_AUTH_TOKEN": "@nrn-sentry-auth-token", "GITHUB_DISPATCH_TOKEN": "@nrn-github-dispatch-token", "VERCEL_DEPLOYMENT_COMPLETED_WEBHOOK": "https://nrn-v2-mst-aptd-at-lcz-sty-c2.vercel.app/api/webhooks/deploymentCompleted" } diff --git a/vercel.customer2.staging.json b/vercel.customer2.staging.json index ff255154..b476479e 100644 --- a/vercel.customer2.staging.json +++ b/vercel.customer2.staging.json @@ -14,6 +14,7 @@ "AIRTABLE_BASE_ID": "@nrn-airtable-base-id", "LOCIZE_API_KEY": "@nrn-locize-api-key-staging", "SENTRY_DSN": "@nrn-sentry-dsn", + "SENTRY_AUTH_TOKEN": "@nrn-sentry-auth-token", "GITHUB_DISPATCH_TOKEN": "@nrn-github-dispatch-token", "VERCEL_DEPLOYMENT_COMPLETED_WEBHOOK": "https://nrn-v2-mst-aptd-at-lcz-sty-c2-preview.vercel.app/api/webhooks/deploymentCompleted" } diff --git a/yarn.lock b/yarn.lock index c17d96d1..652600b6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2621,6 +2621,18 @@ "@sentry/utils" "6.7.2" tslib "^1.9.3" +"@sentry/cli@^1.64.1": + version "1.66.0" + resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-1.66.0.tgz#0526f1bc1c0570ce72ed817190af92f3b63a2e9a" + integrity sha512-2pZ+JHnvKqwyJWcGkKg/gCM/zURYronAnruBNllI+rH2g5IL0N90deMmjB1xcqXS66J222+MPTtWrGEK1Vl0/w== + dependencies: + https-proxy-agent "^5.0.0" + mkdirp "^0.5.5" + node-fetch "^2.6.0" + npmlog "^4.1.2" + progress "^2.0.3" + proxy-from-env "^1.1.0" + "@sentry/core@6.7.2": version "6.7.2" resolved "https://registry.yarnpkg.com/@sentry/core/-/core-6.7.2.tgz#1d294fac6e62744bce3b9dfbcd90b14e93620480" @@ -2641,6 +2653,16 @@ "@sentry/utils" "6.7.2" tslib "^1.9.3" +"@sentry/integrations@6.7.2": + version "6.7.2" + resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-6.7.2.tgz#1ddfb165b4aee42d0e9d9ef531c5ded8a73cbd61" + integrity sha512-IvOLqKVTxPxSJLbKVEe15BjvotnWBs86h5MJx3DLA/1HLP4xtUOvFsdmuMLJij5PtFG10HuUpRn8acEh5h9PTw== + dependencies: + "@sentry/types" "6.7.2" + "@sentry/utils" "6.7.2" + localforage "^1.8.1" + tslib "^1.9.3" + "@sentry/minimal@6.7.2": version "6.7.2" resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-6.7.2.tgz#9e6c0c587daea64a9042041694a4ad5d559d16cd" @@ -2650,6 +2672,20 @@ "@sentry/types" "6.7.2" tslib "^1.9.3" +"@sentry/nextjs@6.7.2": + version "6.7.2" + resolved "https://registry.yarnpkg.com/@sentry/nextjs/-/nextjs-6.7.2.tgz#bb689aa75222ae899abbc2307cd6e676ca61946c" + integrity sha512-O891EUf9wTSDU+n1GH/ibPblOZVbWfWe8HTnH/BvsPjLjzumJ1IFSpQhQtyiYpmewbEDuR1F2hmqD+CoiTAtTg== + dependencies: + "@sentry/core" "6.7.2" + "@sentry/integrations" "6.7.2" + "@sentry/node" "6.7.2" + "@sentry/react" "6.7.2" + "@sentry/tracing" "6.7.2" + "@sentry/utils" "6.7.2" + "@sentry/webpack-plugin" "1.15.1" + tslib "^1.9.3" + "@sentry/node@6.7.2": version "6.7.2" resolved "https://registry.yarnpkg.com/@sentry/node/-/node-6.7.2.tgz#ef2b865af2c37d83966db7fbd031179aa8c82cc0" @@ -2665,6 +2701,18 @@ lru_map "^0.3.3" tslib "^1.9.3" +"@sentry/react@6.7.2": + version "6.7.2" + resolved "https://registry.yarnpkg.com/@sentry/react/-/react-6.7.2.tgz#68edb082ea42cabcf86939f254457436b82b4a0a" + integrity sha512-gjXRuhgd3l2s18Y4dw9ZMWCiFKyeAU79fBiYdv8lqu9EFPFquU0qkZbgep8D37Xq2GWjQM0qEBmD758L6bUwvQ== + dependencies: + "@sentry/browser" "6.7.2" + "@sentry/minimal" "6.7.2" + "@sentry/types" "6.7.2" + "@sentry/utils" "6.7.2" + hoist-non-react-statics "^3.3.2" + tslib "^1.9.3" + "@sentry/tracing@6.7.2": version "6.7.2" resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-6.7.2.tgz#78a6934837143ae5e200b49bd256bc8a917477bc" @@ -2689,6 +2737,13 @@ "@sentry/types" "6.7.2" tslib "^1.9.3" +"@sentry/webpack-plugin@1.15.1": + version "1.15.1" + resolved "https://registry.yarnpkg.com/@sentry/webpack-plugin/-/webpack-plugin-1.15.1.tgz#deb014fce8c1b51811100f25ec9050dd03addd9b" + integrity sha512-/Z06MJDXyWcN2+CbeDTMDwVzySjgZWQajOke773TvpkgqdtkeT1eYBsA+pfsje+ZE1prEgrZdlH/L9HdM1odnQ== + dependencies: + "@sentry/cli" "^1.64.1" + "@sindresorhus/is@^0.14.0": version "0.14.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" @@ -4704,13 +4759,13 @@ debug "^4.1.1" "@typescript-eslint/parser@^4.20.0": - version "4.27.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.27.0.tgz#85447e573364bce4c46c7f64abaa4985aadf5a94" - integrity sha512-XpbxL+M+gClmJcJ5kHnUpBGmlGdgNvy6cehgR6ufyxkEJMGP25tZKCaKyC0W/JVpuhU3VU1RBn7SYUPKSMqQvQ== + version "4.28.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.28.0.tgz#2404c16751a28616ef3abab77c8e51d680a12caa" + integrity sha512-7x4D22oPY8fDaOCvkuXtYYTQ6mTMmkivwEzS+7iml9F9VkHGbbZ3x4fHRwxAb5KeuSkLqfnYjs46tGx2Nour4A== dependencies: - "@typescript-eslint/scope-manager" "4.27.0" - "@typescript-eslint/types" "4.27.0" - "@typescript-eslint/typescript-estree" "4.27.0" + "@typescript-eslint/scope-manager" "4.28.0" + "@typescript-eslint/types" "4.28.0" + "@typescript-eslint/typescript-estree" "4.28.0" debug "^4.3.1" "@typescript-eslint/scope-manager@4.23.0": @@ -4721,13 +4776,13 @@ "@typescript-eslint/types" "4.23.0" "@typescript-eslint/visitor-keys" "4.23.0" -"@typescript-eslint/scope-manager@4.27.0": - version "4.27.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.27.0.tgz#b0b1de2b35aaf7f532e89c8e81d0fa298cae327d" - integrity sha512-DY73jK6SEH6UDdzc6maF19AHQJBFVRf6fgAXHPXCGEmpqD4vYgPEzqpFz1lf/daSbOcMpPPj9tyXXDPW2XReAw== +"@typescript-eslint/scope-manager@4.28.0": + version "4.28.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.28.0.tgz#6a3009d2ab64a30fc8a1e257a1a320067f36a0ce" + integrity sha512-eCALCeScs5P/EYjwo6se9bdjtrh8ByWjtHzOkC4Tia6QQWtQr3PHovxh3TdYTuFcurkYI4rmFsRFpucADIkseg== dependencies: - "@typescript-eslint/types" "4.27.0" - "@typescript-eslint/visitor-keys" "4.27.0" + "@typescript-eslint/types" "4.28.0" + "@typescript-eslint/visitor-keys" "4.28.0" "@typescript-eslint/scope-manager@4.4.0": version "4.4.0" @@ -4747,10 +4802,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.23.0.tgz#da1654c8a5332f4d1645b2d9a1c64193cae3aa3b" integrity sha512-oqkNWyG2SLS7uTWLZf6Sr7Dm02gA5yxiz1RP87tvsmDsguVATdpVguHr4HoGOcFOpCvx9vtCSCyQUGfzq28YCw== -"@typescript-eslint/types@4.27.0": - version "4.27.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.27.0.tgz#712b408519ed699baff69086bc59cd2fc13df8d8" - integrity sha512-I4ps3SCPFCKclRcvnsVA/7sWzh7naaM/b4pBO2hVxnM3wrU51Lveybdw5WoIktU/V4KfXrTt94V9b065b/0+wA== +"@typescript-eslint/types@4.28.0": + version "4.28.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.28.0.tgz#a33504e1ce7ac51fc39035f5fe6f15079d4dafb0" + integrity sha512-p16xMNKKoiJCVZY5PW/AfILw2xe1LfruTcfAKBj3a+wgNYP5I9ZEKNDOItoRt53p4EiPV6iRSICy8EPanG9ZVA== "@typescript-eslint/types@4.4.0": version "4.4.0" @@ -4770,13 +4825,13 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/typescript-estree@4.27.0": - version "4.27.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.27.0.tgz#189a7b9f1d0717d5cccdcc17247692dedf7a09da" - integrity sha512-KH03GUsUj41sRLLEy2JHstnezgpS5VNhrJouRdmh6yNdQ+yl8w5LrSwBkExM+jWwCJa7Ct2c8yl8NdtNRyQO6g== +"@typescript-eslint/typescript-estree@4.28.0": + version "4.28.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.28.0.tgz#e66d4e5aa2ede66fec8af434898fe61af10c71cf" + integrity sha512-m19UQTRtxMzKAm8QxfKpvh6OwQSXaW1CdZPoCaQuLwAq7VZMNuhJmZR4g5281s2ECt658sldnJfdpSZZaxUGMQ== dependencies: - "@typescript-eslint/types" "4.27.0" - "@typescript-eslint/visitor-keys" "4.27.0" + "@typescript-eslint/types" "4.28.0" + "@typescript-eslint/visitor-keys" "4.28.0" debug "^4.3.1" globby "^11.0.3" is-glob "^4.0.1" @@ -4826,12 +4881,12 @@ "@typescript-eslint/types" "4.23.0" eslint-visitor-keys "^2.0.0" -"@typescript-eslint/visitor-keys@4.27.0": - version "4.27.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.27.0.tgz#f56138b993ec822793e7ebcfac6ffdce0a60cb81" - integrity sha512-es0GRYNZp0ieckZ938cEANfEhsfHrzuLrePukLKtY3/KPXcq1Xd555Mno9/GOgXhKzn0QfkDLVgqWO3dGY80bg== +"@typescript-eslint/visitor-keys@4.28.0": + version "4.28.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.28.0.tgz#255c67c966ec294104169a6939d96f91c8a89434" + integrity sha512-PjJyTWwrlrvM5jazxYF5ZPs/nl0kHDZMVbuIcbpawVXaDPelp3+S9zpOz5RmVUfS/fD5l5+ZXNKnWhNYjPzCvw== dependencies: - "@typescript-eslint/types" "4.27.0" + "@typescript-eslint/types" "4.28.0" eslint-visitor-keys "^2.0.0" "@typescript-eslint/visitor-keys@4.4.0": @@ -6451,9 +6506,9 @@ caniuse-lite@^1.0.30001202: integrity sha512-k/RYs6zc/fjbxTjaWZemeSmOjO0JJV+KguOBA3NwPup8uzxM1cMhR2BD9XmO86GuqaqTCO8CgkgH9Rz//vdDiA== caniuse-lite@^1.0.30001219, caniuse-lite@^1.0.30001228: - version "1.0.30001237" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001237.tgz#4b7783661515b8e7151fc6376cfd97f0e427b9e5" - integrity sha512-pDHgRndit6p1NR2GhzMbQ6CkRrp4VKuSsqbcLeOQppYPKOYkKT/6ZvZDvKJUqcmtyWIAHuZq3SVS2vc1egCZzw== + version "1.0.30001239" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001239.tgz#66e8669985bb2cb84ccb10f68c25ce6dd3e4d2b8" + integrity sha512-cyBkXJDMeI4wthy8xJ2FvDU6+0dtcZSJW3voUF8+e9f1bBeuvyZfc3PNbkOETyhbR+dGCPzn9E7MA3iwzusOhQ== capture-exit@^2.0.0: version "2.0.0" @@ -8136,9 +8191,9 @@ electron-to-chromium@^1.3.634: integrity sha512-RRriZOLs9CpW6KTLmgBqyUdnY0QNqqWs0HOtuQGGEMizOTNNn1P7sGRBxARnUeLejOsgwjDyRqT3E/CSst02ZQ== electron-to-chromium@^1.3.723: - version "1.3.752" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.752.tgz#0728587f1b9b970ec9ffad932496429aef750d09" - integrity sha512-2Tg+7jSl3oPxgsBsWKh5H83QazTkmWG/cnNwJplmyZc7KcN61+I10oUgaXSVk/NwfvN3BdkKDR4FYuRBQQ2v0A== + version "1.3.756" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.756.tgz#942cee59cd64d19f576d8d5804eef09cb423740c" + integrity sha512-WsmJym1TMeHVndjPjczTFbnRR/c4sbzg8fBFtuhlb2Sru3i/S1VGpzDSrv/It8ctMU2bj8G7g7/O3FzYMGw6eA== elegant-spinner@^1.0.1: version "1.0.1" @@ -9868,9 +9923,9 @@ globby@^10.0.1: slash "^3.0.0" globby@^11.0.3: - version "11.0.3" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.3.tgz#9b1f0cb523e171dd1ad8c7b2a9fb4b644b9593cb" - integrity sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg== + version "11.0.4" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.4.tgz#2cbaff77c2f2a62e71e9b2813a67b97a3a3001a5" + integrity sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg== dependencies: array-union "^2.1.0" dir-glob "^3.0.1" @@ -10224,7 +10279,7 @@ hoist-non-react-statics@^2.3.1: resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47" integrity sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw== -hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.1: +hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.1, hoist-non-react-statics@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== @@ -10458,6 +10513,11 @@ image-size@1.0.0: dependencies: queue "6.0.2" +immediate@~3.0.5: + version "3.0.6" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" + integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps= + immer@8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/immer/-/immer-8.0.1.tgz#9c73db683e2b3975c424fb0572af5889877ae656" @@ -12063,6 +12123,13 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +lie@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e" + integrity sha1-mkNrLMd0bKWd56QfpGmz77dr2H4= + dependencies: + immediate "~3.0.5" + lines-and-columns@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" @@ -12154,6 +12221,13 @@ loader-utils@^1.0.0, loader-utils@^1.0.2, loader-utils@^1.2.3, loader-utils@^1.4 emojis-list "^3.0.0" json5 "^1.0.1" +localforage@^1.8.1: + version "1.9.0" + resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.9.0.tgz#f3e4d32a8300b362b4634cc4e066d9d00d2f09d1" + integrity sha512-rR1oyNrKulpe+VM9cYmcFn6tsHuokyVHFaCM3+osEmxaHTbEk8oQu6eGDfS6DQLWi/N67XRmB8ECG37OES368g== + dependencies: + lie "3.1.1" + locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -12944,7 +13018,7 @@ mkdirp@^0.5.1, mkdirp@~0.5.1: dependencies: minimist "0.0.8" -mkdirp@^0.5.3: +mkdirp@^0.5.3, mkdirp@^0.5.5: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== @@ -13202,7 +13276,7 @@ node-ensure@^0.0.0: resolved "https://registry.yarnpkg.com/node-ensure/-/node-ensure-0.0.0.tgz#ecae764150de99861ec5c810fd5d096b183932a7" integrity sha1-7K52QVDemYYexcgQ/V0Jaxg5Mqc= -node-fetch@2.6.1, node-fetch@^2.6.1: +node-fetch@2.6.1, node-fetch@^2.6.0, node-fetch@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== @@ -14416,7 +14490,7 @@ process@0.11.10, process@^0.11.10: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= -progress@^2.0.0: +progress@^2.0.0, progress@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== @@ -14500,6 +14574,11 @@ proxy-addr@~2.0.5: forwarded "~0.1.2" ipaddr.js "1.9.1" +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476"