From ccf4f858a80cea25610f2b6adb3c70062ef6d2b9 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Tue, 12 Mar 2024 16:25:48 +0000 Subject: [PATCH 01/26] feat(nextjs): Allow omitting `client.(server|client).config.ts` and nudge towards using `instrumentation.ts` --- packages/nextjs/src/config/types.ts | 4 ++++ packages/nextjs/src/config/webpack.ts | 19 +++++++------------ .../nextjs/src/config/withSentryConfig.ts | 12 ++++++++++++ 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/packages/nextjs/src/config/types.ts b/packages/nextjs/src/config/types.ts index 75d4c87ac963..041d815d09d9 100644 --- a/packages/nextjs/src/config/types.ts +++ b/packages/nextjs/src/config/types.ts @@ -43,6 +43,10 @@ export type NextConfigObject = { fallback?: NextRewrite[]; } >; + // Next.js experimental options + experimental?: { + instrumentationHook?: boolean; + }; }; export type SentryBuildOptions = { diff --git a/packages/nextjs/src/config/webpack.ts b/packages/nextjs/src/config/webpack.ts index 0a8484c9afc8..e2e5c7fa7592 100644 --- a/packages/nextjs/src/config/webpack.ts +++ b/packages/nextjs/src/config/webpack.ts @@ -545,25 +545,20 @@ async function addSentryToEntryProperty( * @returns The name of the relevant file. If the server or client file is not found, this method throws an error. The * edge file is optional, if it is not found this function will return `undefined`. */ -export function getUserConfigFile(projectDir: string, platform: 'server' | 'client' | 'edge'): string | undefined { +export function getUserConfigFile(projectDir: string, platform: 'server' | 'client' | 'edge'): string | void { const possibilities = [`sentry.${platform}.config.ts`, `sentry.${platform}.config.js`]; for (const filename of possibilities) { if (fs.existsSync(path.resolve(projectDir, filename))) { + if (platform === 'server' || platform === 'edge') { + // eslint-disable-next-line no-console + console.warn( + `[@sentry/nextjs] It seems you have configured a \`${filename}\` file. It is recommended to put this file's content into a Next.js instrumentation hook instead! Read more: https://nextjs.org/docs/app/building-your-application/optimizing/instrumentation`, + ); + } return filename; } } - - // Edge config file is optional - if (platform === 'edge') { - // eslint-disable-next-line no-console - console.warn( - '[@sentry/nextjs] You are using Next.js features that run on the Edge Runtime. Please add a "sentry.edge.config.js" or a "sentry.edge.config.ts" file to your project root in which you initialize the Sentry SDK with "Sentry.init()".', - ); - return; - } else { - throw new Error(`Cannot find '${possibilities[0]}' or '${possibilities[1]}' in '${projectDir}'.`); - } } /** diff --git a/packages/nextjs/src/config/withSentryConfig.ts b/packages/nextjs/src/config/withSentryConfig.ts index f9f03b0af2fd..abdba6158a2f 100644 --- a/packages/nextjs/src/config/withSentryConfig.ts +++ b/packages/nextjs/src/config/withSentryConfig.ts @@ -69,6 +69,18 @@ function getFinalConfigObject( } } + // We need to enable `instrumentation.ts` for users because we tell them to put their `Sentry.init()` calls inside of it. + if (incomingUserNextConfigObject.experimental?.instrumentationHook === false) { + // eslint-disable-next-line no-console + console.warn( + '[@sentry/nextjs] You turned off the `instrumentationHook` option. Note that Sentry will not be initialized if you set it up inside `instrumentation.ts`.', + ); + } + incomingUserNextConfigObject.experimental = { + instrumentationHook: true, + ...incomingUserNextConfigObject.experimental, + }; + return { ...incomingUserNextConfigObject, webpack: constructWebpackConfigFunction(incomingUserNextConfigObject, userSentryOptions), From 68df8ea0ed996e70cbd9ff2bb7c466488a67a9c8 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Tue, 12 Mar 2024 16:43:08 +0000 Subject: [PATCH 02/26] . --- packages/nextjs/src/config/webpack.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/nextjs/src/config/webpack.ts b/packages/nextjs/src/config/webpack.ts index e2e5c7fa7592..4672b58f776c 100644 --- a/packages/nextjs/src/config/webpack.ts +++ b/packages/nextjs/src/config/webpack.ts @@ -724,9 +724,10 @@ function addValueInjectionLoader( : '', }; - newConfig.module.rules.push( - { - test: /sentry\.(server|edge)\.config\.(jsx?|tsx?)/, + if (buildContext.isServer) { + newConfig.module.rules.push({ + // TODO: Find a more bulletproof way of matching. + test: /(sentry\.(server|edge)\.config\.(jsx?|tsx?))|(instrumentation.(js|ts))/, use: [ { loader: path.resolve(__dirname, 'loaders/valueInjectionLoader.js'), @@ -735,8 +736,9 @@ function addValueInjectionLoader( }, }, ], - }, - { + }); + } else { + newConfig.module.rules.push({ test: /sentry\.client\.config\.(jsx?|tsx?)/, use: [ { @@ -746,8 +748,8 @@ function addValueInjectionLoader( }, }, ], - }, - ); + }); + } } function resolveNextPackageDirFromDirectory(basedir: string): string | undefined { From d5dacb9634f9e69f02b55c5e8e0e03928cadebfc Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 13 Mar 2024 09:26:24 +0000 Subject: [PATCH 03/26] comment --- packages/nextjs/src/config/webpack.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nextjs/src/config/webpack.ts b/packages/nextjs/src/config/webpack.ts index 4672b58f776c..4fb5234f7b30 100644 --- a/packages/nextjs/src/config/webpack.ts +++ b/packages/nextjs/src/config/webpack.ts @@ -726,7 +726,7 @@ function addValueInjectionLoader( if (buildContext.isServer) { newConfig.module.rules.push({ - // TODO: Find a more bulletproof way of matching. + // TODO: Find a more bulletproof way of matching. For now this is fine and doesn't hurt anyone. It merely sets some globals. test: /(sentry\.(server|edge)\.config\.(jsx?|tsx?))|(instrumentation.(js|ts))/, use: [ { From 1f0411083043aff7101391c419ac307ef209d73c Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 13 Mar 2024 11:23:24 +0000 Subject: [PATCH 04/26] fix unit tests --- packages/nextjs/test/config/loaders.test.ts | 2 +- packages/nextjs/test/config/webpack/webpack.test.ts | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/nextjs/test/config/loaders.test.ts b/packages/nextjs/test/config/loaders.test.ts index ed3589363539..c2aaf0c9a707 100644 --- a/packages/nextjs/test/config/loaders.test.ts +++ b/packages/nextjs/test/config/loaders.test.ts @@ -77,7 +77,7 @@ describe('webpack loaders', () => { }); expect(finalWebpackConfig.module.rules).toContainEqual({ - test: /sentry\.(server|edge)\.config\.(jsx?|tsx?)/, + test: expect.any(RegExp), use: [ { loader: expect.stringEndingWith('valueInjectionLoader.js'), diff --git a/packages/nextjs/test/config/webpack/webpack.test.ts b/packages/nextjs/test/config/webpack/webpack.test.ts index d0f8606e3b4c..90508011e8aa 100644 --- a/packages/nextjs/test/config/webpack/webpack.test.ts +++ b/packages/nextjs/test/config/webpack/webpack.test.ts @@ -41,11 +41,7 @@ describe('getUserConfigFile', () => { }); it('errors when files are missing', () => { - expect(() => getUserConfigFile(tempDir, 'server')).toThrowError( - `Cannot find 'sentry.server.config.ts' or 'sentry.server.config.js' in '${tempDir}'`, - ); - expect(() => getUserConfigFile(tempDir, 'client')).toThrowError( - `Cannot find 'sentry.client.config.ts' or 'sentry.client.config.js' in '${tempDir}'`, - ); + expect(() => getUserConfigFile(tempDir, 'server')).not.toThrow(); + expect(() => getUserConfigFile(tempDir, 'client')).not.toThrow(); }); }); From 2bd96d3752f7e9a984310069ed297d39fa2cc6be Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 13 Mar 2024 12:54:02 +0000 Subject: [PATCH 05/26] Update withSentryConfig --- packages/nextjs/src/config/withSentryConfig.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/nextjs/src/config/withSentryConfig.ts b/packages/nextjs/src/config/withSentryConfig.ts index abdba6158a2f..47dba4af93bb 100644 --- a/packages/nextjs/src/config/withSentryConfig.ts +++ b/packages/nextjs/src/config/withSentryConfig.ts @@ -18,13 +18,14 @@ let showedExportModeTunnelWarning = false; * @param sentryBuildOptions Additional options to configure instrumentation and * @returns The modified config to be exported */ -export function withSentryConfig( - nextConfig: NextConfig = {}, - sentryBuildOptions: SentryBuildOptions = {}, -): NextConfigFunction | NextConfigObject { - if (typeof nextConfig === 'function') { +export function withSentryConfig(nextConfig?: C, sentryBuildOptions: SentryBuildOptions = {}): C { + const castNextConfig = (nextConfig as NextConfig) || {}; + if (typeof castNextConfig === 'function') { return function (this: unknown, ...webpackConfigFunctionArgs: unknown[]): ReturnType { - const maybePromiseNextConfig: ReturnType = nextConfig.apply(this, webpackConfigFunctionArgs); + const maybePromiseNextConfig: ReturnType = castNextConfig.apply( + this, + webpackConfigFunctionArgs, + ); if (isThenable(maybePromiseNextConfig)) { return maybePromiseNextConfig.then(promiseResultNextConfig => { @@ -33,9 +34,9 @@ export function withSentryConfig( } return getFinalConfigObject(maybePromiseNextConfig, sentryBuildOptions); - }; + } as C; } else { - return getFinalConfigObject(nextConfig, sentryBuildOptions); + return getFinalConfigObject(castNextConfig, sentryBuildOptions) as C; } } From b4defba4777971cdbc814d70e4687be2f3c29b6a Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 13 Mar 2024 13:52:36 +0000 Subject: [PATCH 06/26] . --- MIGRATION.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/MIGRATION.md b/MIGRATION.md index 880c38f99275..3a5653bbcf16 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -624,6 +624,40 @@ setup for source maps in Sentry and will not require you to match stack frame pa To see the new options, check out the docs at https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/, or look at the TypeScript type definitions of `withSentryConfig`. +#### Updated the recommended way of calling `Sentry.init()` + +With version 8 of the SDK we will no longer support the use of `sentry.server.config.ts` and `sentry.edge.config.ts` files (note that `sentry.client.config.ts` is still supported and encouraged). +Instead, please initialize the Sentry Next.js SDK for the serverside in a [Next.js instrumentation hook](https://nextjs.org/docs/app/building-your-application/optimizing/instrumentation). + +The following is an example of how to initialize the serverside SDK in a Next.js instrumentation hook: +1. First, enable the Next.js instrumentation hook by setting the `experimental.instrumentationHook` to `true` in your `next.config.js`. +2. Next, create a `instrumentation.ts|js` file in the root directory of your project (or in the `src` folder if you have have one). +3. Now, export a `register` function from the `instrumentation.ts|js` file and call `Sentry.init()` inside of it: + + ```ts + import * as Sentry from '@sentry/nextjs'; + + export function register() { + if (process.env.NEXT_RUNTIME === 'nodejs') { + Sentry.init({ + dsn: 'YOUR_DSN', + // Your Node.js Sentry configuration... + }); + } + + if (process.env.NEXT_RUNTIME === 'edge') { + Sentry.init({ + dsn: 'YOUR_DSN', + // Your Edge Runtime Sentry configuration... + }); + } + } + ``` + + Note that you can initialize the SDK differently depending on which server runtime is being used. + +**Why are we making this change?** The very simple reason is that Next.js requires us to set up OpenTelemetry instrumentation inside the `register` function of the instrumentation hook. Looking a little bit further into the future, we also would like the Sentry SDK to be compatible with [Turbopack](https://turbo.build/pack), which is gonna be the bundler that Next.js will be using instead of Webpack. The SDK in its previous version depended heavily on Webpack in order to inject the `sentry.(server|edge).config.ts` files into the server-side code. Because this will not be possible in the future, we are doing ourselves a favor and doing things the way Next.js intends us to do them - hopefully reducing bugs and jank. + ### Astro SDK #### Removal of `trackHeaders` option for Astro middleware From 39eeef848d58cebf4691b7935d9f6d8ddc8964ea Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 14 Mar 2024 09:25:07 +0000 Subject: [PATCH 07/26] remove unneeded stuff --- .../src/config/loaders/wrappingLoader.ts | 30 +--- packages/nextjs/src/config/webpack.ts | 150 ++++++------------ 2 files changed, 50 insertions(+), 130 deletions(-) diff --git a/packages/nextjs/src/config/loaders/wrappingLoader.ts b/packages/nextjs/src/config/loaders/wrappingLoader.ts index dab8c767c54f..8689082de95b 100644 --- a/packages/nextjs/src/config/loaders/wrappingLoader.ts +++ b/packages/nextjs/src/config/loaders/wrappingLoader.ts @@ -26,9 +26,6 @@ const middlewareWrapperTemplateCode = fs.readFileSync(middlewareWrapperTemplateP let showedMissingAsyncStorageModuleWarning = false; -const sentryInitWrapperTemplatePath = path.resolve(__dirname, '..', 'templates', 'sentryInitWrapperTemplate.js'); -const sentryInitWrapperTemplateCode = fs.readFileSync(sentryInitWrapperTemplatePath, { encoding: 'utf8' }); - const serverComponentWrapperTemplatePath = path.resolve( __dirname, '..', @@ -45,8 +42,7 @@ export type WrappingLoaderOptions = { appDir: string | undefined; pageExtensionRegex: string; excludeServerRoutes: Array; - wrappingTargetKind: 'page' | 'api-route' | 'middleware' | 'server-component' | 'sentry-init' | 'route-handler'; - sentryConfigFilePath?: string; + wrappingTargetKind: 'page' | 'api-route' | 'middleware' | 'server-component' | 'route-handler'; vercelCronsConfig?: VercelCronsConfig; nextjsRequestAsyncStorageModulePath?: string; }; @@ -70,7 +66,6 @@ export default function wrappingLoader( pageExtensionRegex, excludeServerRoutes = [], wrappingTargetKind, - sentryConfigFilePath, vercelCronsConfig, nextjsRequestAsyncStorageModulePath, } = 'getOptions' in this ? this.getOptions() : this.query; @@ -79,28 +74,7 @@ export default function wrappingLoader( let templateCode: string; - if (wrappingTargetKind === 'sentry-init') { - templateCode = sentryInitWrapperTemplateCode; - - // Absolute paths to the sentry config do not work with Windows: https://github.com/getsentry/sentry-javascript/issues/8133 - // Se we need check whether `this.resourcePath` is absolute because there is no contract by webpack that says it is absolute. - // Examples where `this.resourcePath` could possibly be non-absolute are virtual modules. - if (sentryConfigFilePath && path.isAbsolute(this.resourcePath)) { - const sentryConfigImportPath = path - .relative(path.dirname(this.resourcePath), sentryConfigFilePath) - .replace(/\\/g, '/'); - - // path.relative() may return something like `sentry.server.config.js` which is not allowed. Imports from the - // current directory need to start with './'.This is why we prepend the path with './', which should always again - // be a valid relative path. - // https://github.com/getsentry/sentry-javascript/issues/8798 - templateCode = templateCode.replace(/__SENTRY_CONFIG_IMPORT_PATH__/g, `./${sentryConfigImportPath}`); - } else { - // Bail without doing any wrapping - this.callback(null, userCode, userModuleSourceMap); - return; - } - } else if (wrappingTargetKind === 'page' || wrappingTargetKind === 'api-route') { + if (wrappingTargetKind === 'page' || wrappingTargetKind === 'api-route') { if (pagesDir === undefined) { this.callback(null, userCode, userModuleSourceMap); return; diff --git a/packages/nextjs/src/config/webpack.ts b/packages/nextjs/src/config/webpack.ts index 4fb5234f7b30..8c13da3e0a6a 100644 --- a/packages/nextjs/src/config/webpack.ts +++ b/packages/nextjs/src/config/webpack.ts @@ -8,7 +8,6 @@ import { arrayify, escapeStringForRegex, loadModule, logger } from '@sentry/util import * as chalk from 'chalk'; import { sync as resolveSync } from 'resolve'; -import { DEBUG_BUILD } from '../common/debug-build'; import type { VercelCronsConfig } from '../common/types'; // Note: If you need to import a type from Webpack, do it in `types.ts` and export it from there. Otherwise, our // circular dependency check thinks this file is importing from itself. See https://github.com/pahen/madge/issues/306. @@ -124,7 +123,6 @@ export function constructWebpackConfigFunction( pagesDir: pagesDirPath, pageExtensionRegex, excludeServerRoutes: userSentryOptions.excludeServerRoutes, - sentryConfigFilePath: getUserConfigFilePath(projectDir, runtime), nextjsRequestAsyncStorageModulePath: getRequestAsyncStorageModuleLocation( projectDir, rawNewConfig.resolve?.modules, @@ -227,7 +225,12 @@ export function constructWebpackConfigFunction( // noop if file does not exist } else { // log but noop - logger.error(`${chalk.red('error')} - Sentry failed to read vercel.json`, e); + logger.error( + `${chalk.red( + 'error', + )} - Sentry failed to read vercel.json for automatic cron job monitoring instrumentation`, + e, + ); } } @@ -293,32 +296,9 @@ export function constructWebpackConfigFunction( }); } - if (isServer) { - // Import the Sentry config in every user file - newConfig.module.rules.unshift({ - test: resourcePath => { - return ( - isPageResource(resourcePath) || - isApiRouteResource(resourcePath) || - isMiddlewareResource(resourcePath) || - isServerComponentResource(resourcePath) || - isRouteHandlerResource(resourcePath) - ); - }, - use: [ - { - loader: path.resolve(__dirname, 'loaders', 'wrappingLoader.js'), - options: { - ...staticWrappingLoaderOptions, - wrappingTargetKind: 'sentry-init', - }, - }, - ], - }); - } - if (appDirPath) { const hasGlobalErrorFile = ['global-error.js', 'global-error.jsx', 'global-error.ts', 'global-error.tsx'].some( + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion globalErrorFile => fs.existsSync(path.join(appDirPath!, globalErrorFile)), ); @@ -364,19 +344,21 @@ export function constructWebpackConfigFunction( }); } - // Tell webpack to inject user config files (containing the two `Sentry.init()` calls) into the appropriate output - // bundles. Store a separate reference to the original `entry` value to avoid an infinite loop. (If we don't do - // this, we'll have a statement of the form `x.y = () => f(x.y)`, where one of the things `f` does is call `x.y`. - // Since we're setting `x.y` to be a callback (which, by definition, won't run until some time later), by the time - // the function runs (causing `f` to run, causing `x.y` to run), `x.y` will point to the callback itself, rather - // than its original value. So calling it will call the callback which will call `f` which will call `x.y` which - // will call the callback which will call `f` which will call `x.y`... and on and on. Theoretically this could also - // be fixed by using `bind`, but this is way simpler.) - const origEntryProperty = newConfig.entry; - newConfig.entry = async () => addSentryToEntryProperty(origEntryProperty, buildContext, userSentryOptions); - - // Next doesn't let you change `devtool` in dev even if you want to, so don't bother trying - see - // https://github.com/vercel/next.js/blob/master/errors/improper-devtool.md + if (!isServer) { + // Tell webpack to inject the client config files (containing the client-side `Sentry.init()` call) into the appropriate output + // bundles. Store a separate reference to the original `entry` value to avoid an infinite loop. (If we don't do + // this, we'll have a statement of the form `x.y = () => f(x.y)`, where one of the things `f` does is call `x.y`. + // Since we're setting `x.y` to be a callback (which, by definition, won't run until some time later), by the time + // the function runs (causing `f` to run, causing `x.y` to run), `x.y` will point to the callback itself, rather + // than its original value. So calling it will call the callback which will call `f` which will call `x.y` which + // will call the callback which will call `f` which will call `x.y`... and on and on. Theoretically this could also + // be fixed by using `bind`, but this is way simpler.) + const origEntryProperty = newConfig.entry; + newConfig.entry = async () => addSentryToClientEntryProperty(origEntryProperty, buildContext); + } + + // We don't want to do any webpack plugin stuff OR any source maps stuff in dev mode. + // Symbolication for dev-mode errors is done elsewhere. if (!isDev) { // eslint-disable-next-line @typescript-eslint/no-explicit-any const { sentryWebpackPlugin } = loadModule('@sentry/webpack-plugin') as any; @@ -480,7 +462,7 @@ function findTranspilationRules(rules: WebpackModuleRule[] | undefined, projectD } /** - * Modify the webpack `entry` property so that the code in `sentry.server.config.js` and `sentry.client.config.js` is + * Modify the webpack `entry` property so that the code in `sentry.client.config.js` is * included in the the necessary bundles. * * @param currentEntryProperty The value of the property before Sentry code has been injected @@ -488,10 +470,9 @@ function findTranspilationRules(rules: WebpackModuleRule[] | undefined, projectD * @returns The value which the new `entry` property (which will be a function) will return (TODO: this should return * the function, rather than the function's return value) */ -async function addSentryToEntryProperty( +async function addSentryToClientEntryProperty( currentEntryProperty: WebpackEntryProperty, buildContext: BuildContext, - userSentryOptions: SentryBuildOptions, ): Promise { // The `entry` entry in a webpack config can be a string, array of strings, object, or function. By default, nextjs // sets it to an async function which returns the promise of an object of string arrays. Because we don't know whether @@ -499,37 +480,24 @@ async function addSentryToEntryProperty( // we know is that it won't have gotten *simpler* in form, so we only need to worry about the object and function // options. See https://webpack.js.org/configuration/entry-context/#entry. - const { isServer, dir: projectDir, nextRuntime, dev: isDevMode } = buildContext; - const runtime = isServer ? (buildContext.nextRuntime === 'edge' ? 'edge' : 'node') : 'browser'; + const { dir: projectDir, dev: isDevMode } = buildContext; const newEntryProperty = typeof currentEntryProperty === 'function' ? await currentEntryProperty() : { ...currentEntryProperty }; - // `sentry.server.config.js` or `sentry.client.config.js` (or their TS equivalents) - const userConfigFile = - nextRuntime === 'edge' - ? getUserConfigFile(projectDir, 'edge') - : isServer - ? getUserConfigFile(projectDir, 'server') - : getUserConfigFile(projectDir, 'client'); + const clientSentryConfigFileName = getClientSentryConfigFile(projectDir); // we need to turn the filename into a path so webpack can find it - const filesToInject = userConfigFile ? [`./${userConfigFile}`] : []; + const filesToInject = clientSentryConfigFileName ? [`./${clientSentryConfigFileName}`] : []; // inject into all entry points which might contain user's code for (const entryPointName in newEntryProperty) { - if (shouldAddSentryToEntryPoint(entryPointName, runtime)) { - addFilesToExistingEntryPoint(newEntryProperty, entryPointName, filesToInject, isDevMode); - } else { - if ( - isServer && - // If the user has asked to exclude pages, confirm for them that it's worked - userSentryOptions.excludeServerRoutes && - // We always skip these, so it's not worth telling the user that we've done so - !['pages/_app', 'pages/_document'].includes(entryPointName) - ) { - DEBUG_BUILD && logger.log(`Skipping Sentry injection for ${entryPointName.replace(/^pages/, '')}`); - } + if ( + entryPointName === 'pages/_app' || + // entrypoint for `/app` pages + entryPointName === 'main-app' + ) { + addFilesToWebpackEntryPoint(newEntryProperty, entryPointName, filesToInject, isDevMode); } } @@ -537,15 +505,12 @@ async function addSentryToEntryProperty( } /** - * Search the project directory for a valid user config file for the given platform, allowing for it to be either a - * TypeScript or JavaScript file. + * Searches for old `sentry.(server|edge).config.ts` files and warns if it finds any. * - * @param projectDir The root directory of the project, where the file should be located + * @param projectDir The root directory of the project, where config files would be located * @param platform Either "server", "client" or "edge", so that we know which file to look for - * @returns The name of the relevant file. If the server or client file is not found, this method throws an error. The - * edge file is optional, if it is not found this function will return `undefined`. */ -export function getUserConfigFile(projectDir: string, platform: 'server' | 'client' | 'edge'): string | void { +export function warnAboutDeprecatedConfigFiles(projectDir: string, platform: 'server' | 'client' | 'edge'): void { const possibilities = [`sentry.${platform}.config.ts`, `sentry.${platform}.config.js`]; for (const filename of possibilities) { @@ -553,28 +518,26 @@ export function getUserConfigFile(projectDir: string, platform: 'server' | 'clie if (platform === 'server' || platform === 'edge') { // eslint-disable-next-line no-console console.warn( - `[@sentry/nextjs] It seems you have configured a \`${filename}\` file. It is recommended to put this file's content into a Next.js instrumentation hook instead! Read more: https://nextjs.org/docs/app/building-your-application/optimizing/instrumentation`, + `[@sentry/nextjs] It seems you have configured a \`${filename}\` file. You need to put this file's content into a Next.js instrumentation hook instead! Read more: https://nextjs.org/docs/app/building-your-application/optimizing/instrumentation`, ); } - return filename; } } } /** - * Gets the absolute path to a sentry config file for a particular platform. Returns `undefined` if it doesn't exist. + * Searches for a `sentry.client.config.ts|js` file and returns it's file name if it finds one. (ts being prioritized) + * + * @param projectDir The root directory of the project, where config files would be located */ -export function getUserConfigFilePath(projectDir: string, platform: 'server' | 'client' | 'edge'): string | undefined { - const possibilities = [`sentry.${platform}.config.ts`, `sentry.${platform}.config.js`]; +export function getClientSentryConfigFile(projectDir: string): string | void { + const possibilities = ['sentry.client.config.ts', 'sentry.client.config.js']; for (const filename of possibilities) { - const configPath = path.resolve(projectDir, filename); - if (fs.existsSync(configPath)) { - return configPath; + if (fs.existsSync(path.resolve(projectDir, filename))) { + return filename; } } - - return undefined; } /** @@ -584,7 +547,7 @@ export function getUserConfigFilePath(projectDir: string, platform: 'server' | ' * @param entryPointName The key where the file should be injected * @param filesToInsert An array of paths to the injected files */ -function addFilesToExistingEntryPoint( +function addFilesToWebpackEntryPoint( entryProperty: EntryPropertyObject, entryPointName: string, filesToInsert: string[], @@ -648,23 +611,6 @@ function addFilesToExistingEntryPoint( entryProperty[entryPointName] = newEntryPoint; } -/** - * Determine if this is an entry point into which both `Sentry.init()` code and the release value should be injected - * - * @param entryPointName The name of the entry point in question - * @param isServer Whether or not this function is being called in the context of a server build - * @param excludeServerRoutes A list of excluded serverside entrypoints provided by the user - * @returns `true` if sentry code should be injected, and `false` otherwise - */ -function shouldAddSentryToEntryPoint(entryPointName: string, runtime: 'node' | 'browser' | 'edge'): boolean { - return ( - runtime === 'browser' && - (entryPointName === 'pages/_app' || - // entrypoint for `/app` pages - entryPointName === 'main-app') - ); -} - /** * Ensure that `newConfig.module.rules` exists. Modifies the given config in place but also returns it in order to * change its type. @@ -718,7 +664,7 @@ function addValueInjectionLoader( const clientValues = { ...isomorphicValues, // Get the path part of `assetPrefix`, minus any trailing slash. (We use a placeholder for the origin if - // `assetPreix` doesn't include one. Since we only care about the path, it doesn't matter what it is.) + // `assetPrefix` doesn't include one. Since we only care about the path, it doesn't matter what it is.) __rewriteFramesAssetPrefixPath__: assetPrefix ? new URL(assetPrefix, 'http://dogs.are.great').pathname.replace(/\/$/, '') : '', @@ -761,7 +707,7 @@ function resolveNextPackageDirFromDirectory(basedir: string): string | undefined } } -const POTENTIAL_REQUEST_ASNYC_STORAGE_LOCATIONS = [ +const POTENTIAL_REQUEST_ASYNC_STORAGE_LOCATIONS = [ // Original location of RequestAsyncStorage // https://github.com/vercel/next.js/blob/46151dd68b417e7850146d00354f89930d10b43b/packages/next/src/client/components/request-async-storage.ts 'next/dist/client/components/request-async-storage.js', @@ -785,7 +731,7 @@ function getRequestAsyncStorageModuleLocation( for (const webpackResolvableLocation of absoluteWebpackResolvableModuleLocations) { const nextPackageDir = resolveNextPackageDirFromDirectory(webpackResolvableLocation); if (nextPackageDir) { - const asyncLocalStorageLocation = POTENTIAL_REQUEST_ASNYC_STORAGE_LOCATIONS.find(loc => + const asyncLocalStorageLocation = POTENTIAL_REQUEST_ASYNC_STORAGE_LOCATIONS.find(loc => fs.existsSync(path.join(nextPackageDir, '..', loc)), ); if (asyncLocalStorageLocation) { From 5b8aab082bde110694bac46ad18a49531d7e816a Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 14 Mar 2024 11:14:20 +0000 Subject: [PATCH 08/26] Remove unnecessary test --- packages/nextjs/src/config/webpack.ts | 2 +- .../test/config/webpack/webpack.test.ts | 47 ------------------- 2 files changed, 1 insertion(+), 48 deletions(-) delete mode 100644 packages/nextjs/test/config/webpack/webpack.test.ts diff --git a/packages/nextjs/src/config/webpack.ts b/packages/nextjs/src/config/webpack.ts index 8c13da3e0a6a..1d815bcddee8 100644 --- a/packages/nextjs/src/config/webpack.ts +++ b/packages/nextjs/src/config/webpack.ts @@ -673,7 +673,7 @@ function addValueInjectionLoader( if (buildContext.isServer) { newConfig.module.rules.push({ // TODO: Find a more bulletproof way of matching. For now this is fine and doesn't hurt anyone. It merely sets some globals. - test: /(sentry\.(server|edge)\.config\.(jsx?|tsx?))|(instrumentation.(js|ts))/, + test: /(instrumentation.(js|ts))/, use: [ { loader: path.resolve(__dirname, 'loaders/valueInjectionLoader.js'), diff --git a/packages/nextjs/test/config/webpack/webpack.test.ts b/packages/nextjs/test/config/webpack/webpack.test.ts deleted file mode 100644 index 90508011e8aa..000000000000 --- a/packages/nextjs/test/config/webpack/webpack.test.ts +++ /dev/null @@ -1,47 +0,0 @@ -import * as fs from 'fs'; -import * as os from 'os'; -import * as path from 'path'; - -import { getUserConfigFile } from '../../../src/config/webpack'; -import { exitsSync, mkdtempSyncSpy, mockExistsSync, realExistsSync } from '../mocks'; - -describe('getUserConfigFile', () => { - let tempDir: string; - - beforeAll(() => { - exitsSync.mockImplementation(realExistsSync); - }); - - beforeEach(() => { - // these will get cleaned up by the file's overall `afterAll` function, and the `mkdtempSync` mock above ensures - // that the location of the created folder is stored in `tempDir` - const tempDirPathPrefix = path.join(os.tmpdir(), 'sentry-nextjs-test-'); - fs.mkdtempSync(tempDirPathPrefix); - tempDir = mkdtempSyncSpy.mock.results[0].value; - }); - - afterAll(() => { - exitsSync.mockImplementation(mockExistsSync); - }); - - it('successfully finds js files', () => { - fs.writeFileSync(path.resolve(tempDir, 'sentry.server.config.js'), 'Dogs are great!'); - fs.writeFileSync(path.resolve(tempDir, 'sentry.client.config.js'), 'Squirrel!'); - - expect(getUserConfigFile(tempDir, 'server')).toEqual('sentry.server.config.js'); - expect(getUserConfigFile(tempDir, 'client')).toEqual('sentry.client.config.js'); - }); - - it('successfully finds ts files', () => { - fs.writeFileSync(path.resolve(tempDir, 'sentry.server.config.ts'), 'Sit. Stay. Lie Down.'); - fs.writeFileSync(path.resolve(tempDir, 'sentry.client.config.ts'), 'Good dog!'); - - expect(getUserConfigFile(tempDir, 'server')).toEqual('sentry.server.config.ts'); - expect(getUserConfigFile(tempDir, 'client')).toEqual('sentry.client.config.ts'); - }); - - it('errors when files are missing', () => { - expect(() => getUserConfigFile(tempDir, 'server')).not.toThrow(); - expect(() => getUserConfigFile(tempDir, 'client')).not.toThrow(); - }); -}); From 352aea5706548cbe3093bd438192c55690bd4d8b Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 14 Mar 2024 11:42:48 +0000 Subject: [PATCH 09/26] feat(nextjs): Bump minimum required Next.js version to `13.2.0` --- packages/nextjs/package.json | 4 +- .../nextjs/test/integration/next-env.d.ts | 1 + .../test/integration/next10.config.template | 14 --- .../test/integration/next11.config.template | 15 --- .../test/integration/next12.config.template | 13 -- .../integration/next13.appdir.config.template | 3 - packages/nextjs/test/integration/package.json | 4 +- packages/nextjs/test/run-integration-tests.sh | 112 ++++++------------ packages/nextjs/test/types/package.json | 2 +- 9 files changed, 43 insertions(+), 125 deletions(-) delete mode 100644 packages/nextjs/test/integration/next10.config.template delete mode 100644 packages/nextjs/test/integration/next11.config.template delete mode 100644 packages/nextjs/test/integration/next12.config.template diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index 5776422ce5e8..8597e1ee1239 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -52,10 +52,10 @@ "@types/resolve": "1.20.3", "@types/webpack": "^4.41.31", "eslint-plugin-react": "^7.31.11", - "next": "10.1.3" + "next": "13.2.0" }, "peerDependencies": { - "next": "^10.0.8 || ^11.0 || ^12.0 || ^13.0 || ^14.0", + "next": "^13.2.0 || ^14.0", "react": "16.x || 17.x || 18.x", "webpack": ">= 4.0.0" }, diff --git a/packages/nextjs/test/integration/next-env.d.ts b/packages/nextjs/test/integration/next-env.d.ts index 4f11a03dc6cc..fd36f9494e2c 100644 --- a/packages/nextjs/test/integration/next-env.d.ts +++ b/packages/nextjs/test/integration/next-env.d.ts @@ -1,5 +1,6 @@ /// /// +/// // NOTE: This file should not be edited // see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/packages/nextjs/test/integration/next10.config.template b/packages/nextjs/test/integration/next10.config.template deleted file mode 100644 index e01358c9e4d4..000000000000 --- a/packages/nextjs/test/integration/next10.config.template +++ /dev/null @@ -1,14 +0,0 @@ -const { withSentryConfig } = require('@sentry/nextjs'); - -// NOTE: This will be used by integration tests to distinguish between Webpack 4 and Webpack 5 -const moduleExports = { - future: { - webpack5: %RUN_WEBPACK_5%, - }, - pageExtensions: ['jsx', 'js', 'tsx', 'ts', 'page.tsx'], -}; - -module.exports = withSentryConfig(moduleExports, { - debug: true, - excludeServerRoutes: ['/api/excludedEndpoints/excludedWithString', /\/api\/excludedEndpoints\/excludedWithRegExp/], -}); diff --git a/packages/nextjs/test/integration/next11.config.template b/packages/nextjs/test/integration/next11.config.template deleted file mode 100644 index 5215e38a9e5b..000000000000 --- a/packages/nextjs/test/integration/next11.config.template +++ /dev/null @@ -1,15 +0,0 @@ -const { withSentryConfig } = require('@sentry/nextjs'); - -// NOTE: This will be used by integration tests to distinguish between Webpack 4 and Webpack 5 -const moduleExports = { - webpack5: %RUN_WEBPACK_5%, - eslint: { - ignoreDuringBuilds: true, - }, - pageExtensions: ['jsx', 'js', 'tsx', 'ts', 'page.tsx'], -}; - -module.exports = withSentryConfig(moduleExports, { - debug: true, - excludeServerRoutes: ['/api/excludedEndpoints/excludedWithString', /\/api\/excludedEndpoints\/excludedWithRegExp/], -}); diff --git a/packages/nextjs/test/integration/next12.config.template b/packages/nextjs/test/integration/next12.config.template deleted file mode 100644 index 82fe205e279d..000000000000 --- a/packages/nextjs/test/integration/next12.config.template +++ /dev/null @@ -1,13 +0,0 @@ -const { withSentryConfig } = require('@sentry/nextjs'); - -const moduleExports = async () => ({ - eslint: { - ignoreDuringBuilds: true, - }, - pageExtensions: ['jsx', 'js', 'tsx', 'ts', 'page.tsx'], -}); - -module.exports = withSentryConfig(moduleExports, { - debug: true, - excludeServerRoutes: ['/api/excludedEndpoints/excludedWithString', /\/api\/excludedEndpoints\/excludedWithRegExp/], -}); diff --git a/packages/nextjs/test/integration/next13.appdir.config.template b/packages/nextjs/test/integration/next13.appdir.config.template index e9e4e4e04b2e..815eba98e889 100644 --- a/packages/nextjs/test/integration/next13.appdir.config.template +++ b/packages/nextjs/test/integration/next13.appdir.config.template @@ -4,9 +4,6 @@ const moduleExports = { eslint: { ignoreDuringBuilds: true, }, - experimental: { - appDir: Number(process.env.NODE_MAJOR) >= 16, // experimental.appDir requires Node v16.8.0 or later. - }, pageExtensions: ['jsx', 'js', 'tsx', 'ts', 'page.tsx'], }; diff --git a/packages/nextjs/test/integration/package.json b/packages/nextjs/test/integration/package.json index fd66eb8ec267..fc93bd5681e4 100644 --- a/packages/nextjs/test/integration/package.json +++ b/packages/nextjs/test/integration/package.json @@ -13,8 +13,8 @@ "dependencies": { "@sentry/nextjs": "file:../../", "next": "latest", - "react": "^17.0.1", - "react-dom": "^17.0.1" + "react": "^18.2.0", + "react-dom": "^18.2.0" }, "devDependencies": { "@types/node": "^15.3.1", diff --git a/packages/nextjs/test/run-integration-tests.sh b/packages/nextjs/test/run-integration-tests.sh index 2522b05f6acb..2181edc7cb53 100755 --- a/packages/nextjs/test/run-integration-tests.sh +++ b/packages/nextjs/test/run-integration-tests.sh @@ -31,7 +31,7 @@ echo "Running integration tests on Node $NODE_VERSION" # make a backup of our config file so we can restore it when we're done mv next.config.js next.config.js.bak -for NEXTJS_VERSION in 10 11 12 13; do +for NEXTJS_VERSION in 13; do for USE_APPDIR in true false; do if ([ "$NEXTJS_VERSION" -lt "13" ] || [ "$NODE_MAJOR" -lt "16" ]) && [ "$USE_APPDIR" == true ]; then # App dir doesn not work on Next.js < 13 or Node.js < 16 @@ -64,11 +64,6 @@ for NEXTJS_VERSION in 10 11 12 13; do sed -i /"next.*latest"/s/latest/"${NEXTJS_VERSION}.x"/ package.json fi - # Next.js v13 requires React 18.2.0 - if [ "$NEXTJS_VERSION" -eq "13" ]; then - npm i --save react@18.2.0 react-dom@18.2.0 - fi - # Yarn install randomly started failing because it couldn't find some cache so for now we need to run these two commands which seem to fix it. # It was pretty much this issue: https://github.com/yarnpkg/yarn/issues/5275 rm -rf node_modules @@ -82,84 +77,51 @@ for NEXTJS_VERSION in 10 11 12 13; do linkcli && linkplugin mv -f package.json.bak package.json 2>/dev/null || true - SHOULD_RUN_WEBPACK_5=(true) - # Only run Webpack 4 tests for Next 10 and Next 11 - if [ "$NEXTJS_VERSION" -eq "10" ] || [ "$NEXTJS_VERSION" -eq "11" ]; then - SHOULD_RUN_WEBPACK_5+=(false) - fi - - for RUN_WEBPACK_5 in ${SHOULD_RUN_WEBPACK_5[*]}; do - [ "$RUN_WEBPACK_5" == true ] && - WEBPACK_VERSION=5 || - WEBPACK_VERSION=4 - - if [ "$NODE_MAJOR" -gt "17" ]; then - # Node v17+ does not work with NextJS 10 and 11 because of their legacy openssl use - # Ref: https://github.com/vercel/next.js/issues/30078 - if [ "$NEXTJS_VERSION" -lt "12" ]; then - echo "[nextjs@$NEXTJS_VERSION Node $NODE_MAJOR not compatible with NextJS $NEXTJS_VERSION" - # Continues the 2nd enclosing loop, which is the outer loop that iterates over the NextJS version - continue 2 - fi - - # Node v18 only with Webpack 5 and above - # https://github.com/webpack/webpack/issues/14532#issuecomment-947513562 - # Context: https://github.com/vercel/next.js/issues/30078#issuecomment-947338268 - if [ "$WEBPACK_VERSION" -eq "4" ]; then - echo "[nextjs@$NEXTJS_VERSION | webpack@$WEBPACK_VERSION] Node $NODE_MAJOR not compatible with Webpack $WEBPACK_VERSION" - # Continues the 1st enclosing loop, which is the inner loop that iterates over the Webpack version - continue - fi - + if [ "$NEXTJS_VERSION" -eq "10" ]; then + cat next10.config.template > next.config.js + elif [ "$NEXTJS_VERSION" -eq "11" ]; then + cat next11.config.template > next.config.js + elif [ "$NEXTJS_VERSION" -eq "12" ]; then + cat next12.config.template > next.config.js + elif [ "$NEXTJS_VERSION" -eq "13" ]; then + if [ "$USE_APPDIR" == true ]; then + cat next13.appdir.config.template > next.config.js + else + cat next13.config.template > next.config.js fi + fi - # next 10 defaults to webpack 4 and next 11 defaults to webpack 5, but each can use either based on settings - if [ "$NEXTJS_VERSION" -eq "10" ]; then - sed "s/%RUN_WEBPACK_5%/$RUN_WEBPACK_5/g" next.config.js - elif [ "$NEXTJS_VERSION" -eq "11" ]; then - sed "s/%RUN_WEBPACK_5%/$RUN_WEBPACK_5/g" next.config.js - elif [ "$NEXTJS_VERSION" -eq "12" ]; then - sed "s/%RUN_WEBPACK_5%/$RUN_WEBPACK_5/g" next.config.js - elif [ "$NEXTJS_VERSION" -eq "13" ]; then - if [ "$USE_APPDIR" == true ]; then - sed "s/%RUN_WEBPACK_5%/$RUN_WEBPACK_5/g" next.config.js - else - sed "s/%RUN_WEBPACK_5%/$RUN_WEBPACK_5/g" next.config.js - fi - fi + echo "[nextjs@$NEXTJS_VERSION] Building..." + yarn build - echo "[nextjs@$NEXTJS_VERSION | webpack@$WEBPACK_VERSION] Building..." - yarn build + # we keep this updated as we run the tests, so that if it's ever non-zero, we can bail + EXIT_CODE=0 - # we keep this updated as we run the tests, so that if it's ever non-zero, we can bail - EXIT_CODE=0 + if [ "$USE_APPDIR" == true ]; then + echo "Skipping server tests for appdir" + else + echo "[nextjs@$NEXTJS_VERSION] Running server tests with options: $args" + (cd .. && yarn test:integration:server) || EXIT_CODE=$? + fi - if [ "$USE_APPDIR" == true ]; then - echo "Skipping server tests for appdir" - else - echo "[nextjs@$NEXTJS_VERSION | webpack@$WEBPACK_VERSION] Running server tests with options: $args" - (cd .. && yarn test:integration:server) || EXIT_CODE=$? - fi + if [ $EXIT_CODE -eq 0 ]; then + echo "[nextjs@$NEXTJS_VERSION] Server integration tests passed" + else + echo "[nextjs@$NEXTJS_VERSION] Server integration tests failed" + exit 1 + fi + if [ "$NODE_MAJOR" -lt "14" ]; then + echo "[nextjs@$NEXTJS_VERSION] Skipping client tests on Node $NODE_MAJOR" + else + echo "[nextjs@$NEXTJS_VERSION] Running client tests with options: $args" + (cd .. && yarn test:integration:client) || EXIT_CODE=$? if [ $EXIT_CODE -eq 0 ]; then - echo "[nextjs@$NEXTJS_VERSION | webpack@$WEBPACK_VERSION] Server integration tests passed" + echo "[nextjs@$NEXTJS_VERSION] Client integration tests passed" else - echo "[nextjs@$NEXTJS_VERSION | webpack@$WEBPACK_VERSION] Server integration tests failed" + echo "[nextjs@$NEXTJS_VERSION] Client integration tests failed" exit 1 fi - - if [ "$NODE_MAJOR" -lt "14" ]; then - echo "[nextjs@$NEXTJS_VERSION | webpack@$WEBPACK_VERSION] Skipping client tests on Node $NODE_MAJOR" - else - echo "[nextjs@$NEXTJS_VERSION | webpack@$WEBPACK_VERSION] Running client tests with options: $args" - (cd .. && yarn test:integration:client) || EXIT_CODE=$? - if [ $EXIT_CODE -eq 0 ]; then - echo "[nextjs@$NEXTJS_VERSION | webpack@$WEBPACK_VERSION] Client integration tests passed" - else - echo "[nextjs@$NEXTJS_VERSION | webpack@$WEBPACK_VERSION] Client integration tests failed" - exit 1 - fi - fi - done + fi done done diff --git a/packages/nextjs/test/types/package.json b/packages/nextjs/test/types/package.json index b73620071d6c..86f74bfe060a 100644 --- a/packages/nextjs/test/types/package.json +++ b/packages/nextjs/test/types/package.json @@ -4,6 +4,6 @@ "test": "ts-node test.ts" }, "dependencies": { - "next": "12.3.1" + "next": "13.2.0" } } From 2638403bc44e5a6f740f49b546063fdb297fd2c3 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 14 Mar 2024 11:48:06 +0000 Subject: [PATCH 10/26] . --- packages/nextjs/test/run-integration-tests.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/packages/nextjs/test/run-integration-tests.sh b/packages/nextjs/test/run-integration-tests.sh index 2181edc7cb53..834bd34d659b 100755 --- a/packages/nextjs/test/run-integration-tests.sh +++ b/packages/nextjs/test/run-integration-tests.sh @@ -33,8 +33,8 @@ mv next.config.js next.config.js.bak for NEXTJS_VERSION in 13; do for USE_APPDIR in true false; do - if ([ "$NEXTJS_VERSION" -lt "13" ] || [ "$NODE_MAJOR" -lt "16" ]) && [ "$USE_APPDIR" == true ]; then - # App dir doesn not work on Next.js < 13 or Node.js < 16 + if ([ "$NODE_MAJOR" -lt "16" ]) && [ "$USE_APPDIR" == true ]; then + # App dir doesn not work on Node.js < 16 continue fi @@ -77,13 +77,7 @@ for NEXTJS_VERSION in 13; do linkcli && linkplugin mv -f package.json.bak package.json 2>/dev/null || true - if [ "$NEXTJS_VERSION" -eq "10" ]; then - cat next10.config.template > next.config.js - elif [ "$NEXTJS_VERSION" -eq "11" ]; then - cat next11.config.template > next.config.js - elif [ "$NEXTJS_VERSION" -eq "12" ]; then - cat next12.config.template > next.config.js - elif [ "$NEXTJS_VERSION" -eq "13" ]; then + if [ "$NEXTJS_VERSION" -eq "13" ]; then if [ "$USE_APPDIR" == true ]; then cat next13.appdir.config.template > next.config.js else From 858f7d311e3cdd69b0693beb6f2bbf6c45a82174 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 14 Mar 2024 12:21:01 +0000 Subject: [PATCH 11/26] hm --- yarn.lock | 665 +++++++++++++++--------------------------------------- 1 file changed, 185 insertions(+), 480 deletions(-) diff --git a/yarn.lock b/yarn.lock index a385e28b9309..a85b0fbd0b3c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2479,13 +2479,6 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@7.12.5": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.5.tgz#410e7e487441e1b360c29be715d870d9b985882e" - integrity sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg== - dependencies: - regenerator-runtime "^0.13.4" - "@babel/runtime@7.14.8": version "7.14.8" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.14.8.tgz#7119a56f421018852694290b9f9148097391b446" @@ -2611,15 +2604,6 @@ debug "^4.3.1" globals "^11.1.0" -"@babel/types@7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.3.tgz#5a383dffa5416db1b73dedffd311ffd0788fb31c" - integrity sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg== - dependencies: - esutils "^2.0.2" - lodash "^4.17.13" - to-fast-properties "^2.0.0" - "@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.11.0", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.19.0", "@babel/types@^7.19.4", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4", "@babel/types@^7.7.0", "@babel/types@^7.7.2": version "7.20.2" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.2.tgz#67ac09266606190f496322dbaff360fdaa5e7842" @@ -3850,14 +3834,6 @@ resolved "https://registry.yarnpkg.com/@handlebars/parser/-/parser-2.0.0.tgz#5e8b7298f31ff8f7b260e6b7363c7e9ceed7d9c5" integrity sha512-EP9uEDZv/L5Qh9IWuMUGJRfwhXJ4h1dqKTT4/3+tY0eu7sPis7xh23j61SYUnNF4vqCQvvUXpDo9Bh/+q1zASA== -"@hapi/accept@5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@hapi/accept/-/accept-5.0.1.tgz#068553e867f0f63225a506ed74e899441af53e10" - integrity sha512-fMr4d7zLzsAXo28PRRQPXR1o2Wmu+6z+VY1UzDp0iFo13Twj8WePakwXBiqn3E1aAlTpSNzCXdnnQXFhst8h8Q== - dependencies: - "@hapi/boom" "9.x.x" - "@hapi/hoek" "9.x.x" - "@hapi/accept@^5.0.1": version "5.0.2" resolved "https://registry.yarnpkg.com/@hapi/accept/-/accept-5.0.2.tgz#ab7043b037e68b722f93f376afb05e85c0699523" @@ -4589,37 +4565,75 @@ multer "1.4.4-lts.1" tslib "2.6.2" -"@next/env@10.1.3": - version "10.1.3" - resolved "https://registry.yarnpkg.com/@next/env/-/env-10.1.3.tgz#29e5d62919b4a7b1859f8d36169848dc3f5ddebe" - integrity sha512-q7z7NvmRs66lCQmVJtKjDxVtMTjSwP6ExVzaH46pbTH60MHgzEJ9H4jXrFLTihPmCIvpAv6Ai04jbS8dcg1ZMQ== - -"@next/polyfill-module@10.1.3": - version "10.1.3" - resolved "https://registry.yarnpkg.com/@next/polyfill-module/-/polyfill-module-10.1.3.tgz#beafe89bc4235d436fa0ed02c9d2a5d311fb0238" - integrity sha512-1DtUVcuoBJAn5IrxIZQjUG1KTPkiXMYloykPSkRxawimgvG9dRj2kscU+4KGNSFxHoxW9c68VRCb+7MDz5aGGw== - -"@next/react-dev-overlay@10.1.3": - version "10.1.3" - resolved "https://registry.yarnpkg.com/@next/react-dev-overlay/-/react-dev-overlay-10.1.3.tgz#ee1c6033b29be9b383e061bd9705021d131ea445" - integrity sha512-vIgUah3bR9+MKzwU1Ni5ONfYM0VdI42i7jZ+Ei1c0wjwkG9anVnDqhSQ3mVg62GP2nt7ExaaFyf9THbsw5KYXg== - dependencies: - "@babel/code-frame" "7.12.11" - anser "1.4.9" - chalk "4.0.0" - classnames "2.2.6" - css.escape "1.5.1" - data-uri-to-buffer "3.0.1" - platform "1.3.6" - shell-quote "1.7.2" - source-map "0.8.0-beta.0" - stacktrace-parser "0.1.10" - strip-ansi "6.0.0" - -"@next/react-refresh-utils@10.1.3": - version "10.1.3" - resolved "https://registry.yarnpkg.com/@next/react-refresh-utils/-/react-refresh-utils-10.1.3.tgz#65b3e1b9846c02452787fde1d54ad9c54b506dbd" - integrity sha512-P4GJZuLKfD/o42JvGZ/xP4Hxg68vd3NeZxOLqIuQKFjjaYgC2IrO+lE5PTwGmRkytjfprJC+9j7Jss/xQAS6QA== +"@next/env@13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@next/env/-/env-13.2.0.tgz#1a597a885ce11860446c88e1098fd517dc0e84b1" + integrity sha512-yv9oaRVa+AxFa27uQOVecS931NrE+GcQSqcL2HaRxL8NunStLtPiyNm/VixvdzfiWLabMz4dXvbXfwCNaECzcw== + +"@next/swc-android-arm-eabi@13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.2.0.tgz#241d007fdb2f06f70ab21d5a333e08a29de9cd7f" + integrity sha512-VMetUwBWtDBGzNiOkhiWTP+99ZYW5NVRpIGlUsldEtY8IQIqleaUgW9iamsO0kDSjhWNdCQCB+xu5HcCvmDTww== + +"@next/swc-android-arm64@13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-13.2.0.tgz#924e79197f094a12ac3409b6a416f84c2f74341d" + integrity sha512-fAiP54Om3fSj5aKntxEvW5fWzyMUzLzjFrHuUt5jBnTRWM4QikhLy547OZDoxycyk4GoQVHmNMSA3hILsrV/dQ== + +"@next/swc-darwin-arm64@13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.2.0.tgz#bfd3dfe90903b3bbf81f617f2b1d4f8b9e20e8aa" + integrity sha512-F4zbvPnq3zCTqyyM6WN8ledazzJx3OrxIdc2ewnqnfk6tjBZ/aq1M27GhEfylGjZG1KvbtJCxUqi7dR/6R94bA== + +"@next/swc-darwin-x64@13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.2.0.tgz#3d159bb2889f093d173546a6e5edd6260df7e156" + integrity sha512-Y9+fB7TLAAnkCZQXWjwJg5bi1pT5NuNkI+HoKYp26U1J0SxW5vZWFGc31WFmmHIz3wA0zlaQfRa4mF7cpZL5yw== + +"@next/swc-freebsd-x64@13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.2.0.tgz#33877ad933e1b3d7776dfb060f4e3b55f675523e" + integrity sha512-b9bCLlfznbV6e6Vg9wKYZJs7Uz8z/Py9105MYq95a3JlHiI3e/fvBpm1c7fe5QlvWJlqyNav6Clyu1W+lDk+IQ== + +"@next/swc-linux-arm-gnueabihf@13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.2.0.tgz#31b81ff368e5337019f858c4a0d7ae7f80310728" + integrity sha512-jY/2JjDVVyktzRtMclAIVLgOxk5Ut9NKu8kKMCPdKMf9/ila37UpRfIh2fOXtRhv8AK7Lq/iSI/v2vjopZxZgQ== + +"@next/swc-linux-arm64-gnu@13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.2.0.tgz#e46bd73d1ccc38be46009b88dc87df88d8c44fa1" + integrity sha512-EKjWU3/lSBhOwPQRQLbySUnATnXygCjGd8ag3rP6d7kTIhfuPO4pY+DYW+wHOt5qB1ULNRmW0sXZ/ZKnQrVszw== + +"@next/swc-linux-arm64-musl@13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.2.0.tgz#54a4f0cc1431f3e4e24a5e017e473a5fc761b33b" + integrity sha512-T5R9r23Docwo6PYZRzndeFB5WUN3+smMbyk25K50MAngCiSydr82/YfAetcp7Ov7Shp4a8xXP9DHDIsBas6wbQ== + +"@next/swc-linux-x64-gnu@13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.2.0.tgz#1c17a6121846decac2d701a040649f8f764ac671" + integrity sha512-FeXTc2KFvUSnTJmkpNMKoBHmNA1Ujr3QdfcKnVm/gXWqK+rfuEhAiRNOo+6mPcQ0noEge1j8Ai+W1LTbdDwPZQ== + +"@next/swc-linux-x64-musl@13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.2.0.tgz#a4f39cfeb19123196a2ebc2061e60897b29ffa3f" + integrity sha512-7Y0XMUzWDWI94pxC0xWGMWrgTFKHu/myc+GTNVEwvLtI9WA0brKqZrL1tCQW/+t6J+5XqS7w+AHbViaF+muu1A== + +"@next/swc-win32-arm64-msvc@13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.2.0.tgz#d21ef0d0c2757cee9b1d723aafb9e02ca25852eb" + integrity sha512-NM5h2gEMe8EtvOeRU3vRM83tq1xo6Qvhuz0xJem/176SAMxbqzAz4LLP3l9VyUI3SIzGyiztvF/1c0jqeq7UEA== + +"@next/swc-win32-ia32-msvc@13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.2.0.tgz#529852721e3f00afb9385640cbac1a899342c6ba" + integrity sha512-G7YEJZX9wkcUaBOvXQSCF9Wb2sqP8hhsmFXF6po7M3llw4b+2ut2DXLf+UMdthOdUK0u+Ijhy5F7SbW9HOn2ig== + +"@next/swc-win32-x64-msvc@13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.2.0.tgz#49bc50b1865d20b29892a415fcbaab84217112a5" + integrity sha512-QTAjSuPevnZnlHfC4600+4NvxRuPar6tWdYbPum9vnk3OIH1xu9YLK+2ArPGFd0bB2K8AoY2SIMbs1dhK0GjQQ== "@ngtools/webpack@10.2.4": version "10.2.4" @@ -5049,13 +5063,6 @@ dependencies: "@octokit/openapi-types" "^18.0.0" -"@opentelemetry/api@0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-0.14.0.tgz#4e17d8d2f1da72b19374efa7b6526aa001267cae" - integrity sha512-L7RMuZr5LzMmZiQSQDy9O1jo0q+DaLy6XpYJfIGfYSfoJA5qzYwUP3sP1uMIQ549DvxAgM3ng85EaPTM/hUHwQ== - dependencies: - "@opentelemetry/context-base" "^0.14.0" - "@opentelemetry/api@1.7.0", "@opentelemetry/api@^1.6.0": version "1.7.0" resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.7.0.tgz#b139c81999c23e3c8d3c0a7234480e945920fc40" @@ -5078,11 +5085,6 @@ resolved "https://registry.yarnpkg.com/@opentelemetry/context-base/-/context-base-0.12.0.tgz#4906ae27359d3311e3dea1b63770a16f60848550" integrity sha512-UXwSsXo3F3yZ1dIBOG9ID8v2r9e+bqLWoizCtTb8rXtwF+N5TM7hzzvQz72o3nBU+zrI/D5e+OqAYK8ZgDd3DA== -"@opentelemetry/context-base@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/context-base/-/context-base-0.14.0.tgz#c67fc20a4d891447ca1a855d7d70fa79a3533001" - integrity sha512-sDOAZcYwynHFTbLo6n8kIbLiVF3a3BLkrmehJUyEbT9F+Smbi47kLGS2gG2g0fjBLR/Lr1InPD7kXL7FaTqEkw== - "@opentelemetry/core@1.20.0": version "1.20.0" resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-1.20.0.tgz#ab1a8204ed10cc11e17bb61db658da0f3686d4ac" @@ -6151,6 +6153,13 @@ svelte-hmr "^0.15.1" vitefu "^0.2.2" +"@swc/helpers@0.4.14": + version "0.4.14" + resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.4.14.tgz#1352ac6d95e3617ccb7c1498ff019654f1e12a74" + integrity sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw== + dependencies: + tslib "^2.4.0" + "@szmarczak/http-timer@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" @@ -8415,11 +8424,6 @@ amdefine@>=0.0.4: resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU= -anser@1.4.9: - version "1.4.9" - resolved "https://registry.yarnpkg.com/anser/-/anser-1.4.9.tgz#1f85423a5dcf8da4631a341665ff675b96845760" - integrity sha512-AI+BjTeGt2+WFk4eWcqbQ7snZpDBt8SaLlj0RT2h5xfdWaiy51OjYvqwMrNzJLGy8iOAL6nKDITWO+rd4MkYEA== - ansi-align@^3.0.0, ansi-align@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.1.tgz#0cdf12e111ace773a86e9a1fad1225c43cb19a59" @@ -8486,7 +8490,7 @@ ansi-regex@^4.1.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== -ansi-regex@^5.0.0, ansi-regex@^5.0.1: +ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== @@ -8555,7 +8559,7 @@ anymatch@^2.0.0: micromatch "^3.1.4" normalize-path "^2.1.1" -anymatch@^3.0.0, anymatch@^3.0.3, anymatch@^3.1.1, anymatch@~3.1.1, anymatch@~3.1.2: +anymatch@^3.0.0, anymatch@^3.0.3, anymatch@^3.1.1, anymatch@~3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== @@ -8942,7 +8946,15 @@ assert-plus@1.0.0, assert-plus@^1.0.0: resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= -assert@2.0.0, assert@^2.0.0: +assert@^1.1.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/assert/-/assert-1.5.0.tgz#55c109aaf6e0aefdb3dc4b71240c70bf574b18eb" + integrity sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA== + dependencies: + object-assign "^4.1.1" + util "0.10.3" + +assert@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/assert/-/assert-2.0.0.tgz#95fc1c616d48713510680f2eaf2d10dd22e02d32" integrity sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A== @@ -8952,14 +8964,6 @@ assert@2.0.0, assert@^2.0.0: object-is "^1.0.1" util "^0.12.0" -assert@^1.1.1: - version "1.5.0" - resolved "https://registry.yarnpkg.com/assert/-/assert-1.5.0.tgz#55c109aaf6e0aefdb3dc4b71240c70bf574b18eb" - integrity sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA== - dependencies: - object-assign "^4.1.1" - util "0.10.3" - assertion-error@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" @@ -8975,11 +8979,6 @@ ast-module-types@^2.3.2, ast-module-types@^2.4.0, ast-module-types@^2.7.0, ast-m resolved "https://registry.yarnpkg.com/ast-module-types/-/ast-module-types-2.7.1.tgz#3f7989ef8dfa1fdb82dfe0ab02bdfc7c77a57dd3" integrity sha512-Rnnx/4Dus6fn7fTqdeLEAn5vUll5w7/vts0RN608yFa6si/rDOUonlIIiwugHBFWjylHjxm9owoSZn71KwG4gw== -ast-types@0.13.2: - version "0.13.2" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.2.tgz#df39b677a911a83f3a049644fb74fdded23cea48" - integrity sha512-uWMHxJxtfj/1oZClOxDEV1sQ1HCDkA4MG8Gr69KKeBjEVH0R84WlejZ0y2DcwyBlpAEMltmVYkVgqfLFb2oyiA== - ast-types@0.13.3: version "0.13.3" resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.3.tgz#50da3f28d17bdbc7969a3a2d83a0e4a72ae755a7" @@ -9686,11 +9685,6 @@ babel-plugin-syntax-exponentiation-operator@^6.8.0: resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" integrity sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4= -babel-plugin-syntax-jsx@6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" - integrity sha512-qrPaCSo9c8RHNRHIotaufGbuOBN8rtdC4QrrFFc43vyWCCz7Kl7GL1PGaXtMGQZUXrkCjNEgxDfmAuAabr/rlw== - babel-plugin-syntax-trailing-function-commas@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" @@ -10906,24 +10900,13 @@ browserify-sign@^4.0.0: readable-stream "^3.6.2" safe-buffer "^5.2.1" -browserify-zlib@0.2.0, browserify-zlib@^0.2.0: +browserify-zlib@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== dependencies: pako "~1.0.5" -browserslist@4.16.1: - version "4.16.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.1.tgz#bf757a2da376b3447b800a16f0f1c96358138766" - integrity sha512-UXhDrwqsNcpTYJBTZsbGATDxZbiVDsx6UjpmRUmtnP10pr8wAYr5LgFoEFw9ixriQH2mv/NX2SfGzE/o8GndLA== - dependencies: - caniuse-lite "^1.0.30001173" - colorette "^1.2.1" - electron-to-chromium "^1.3.634" - escalade "^3.1.1" - node-releases "^1.1.69" - browserslist@^3.2.6: version "3.2.8" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.2.8.tgz#b0005361d6471f0f5952797a76fc985f1f978fc6" @@ -11059,14 +11042,6 @@ buffer@4.9.2, buffer@^4.3.0: ieee754 "^1.1.4" isarray "^1.0.0" -buffer@5.6.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786" - integrity sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw== - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - buffer@^5.2.1, buffer@^5.5.0, buffer@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" @@ -11142,11 +11117,6 @@ bytes@3.0.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= -bytes@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" - integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== - bytes@3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" @@ -11455,7 +11425,7 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000844, caniuse-lite@^1.0.30001032, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001173, caniuse-lite@^1.0.30001179, caniuse-lite@^1.0.30001400: +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000844, caniuse-lite@^1.0.30001032, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001400: version "1.0.30001422" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001422.tgz#f2d7c6202c49a8359e6e35add894d88ef93edba1" integrity sha512-hSesn02u1QacQHhaxl/kNMZwqVG35Sz/8DgvmgedxSH8z9UUpcDYSPYgsj3x5dQNRcNp6BwpSfQfVzYUTm+fog== @@ -11465,6 +11435,11 @@ caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001449: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001453.tgz#6d3a1501622bf424a3cee5ad9550e640b0de3de8" integrity sha512-R9o/uySW38VViaTrOtwfbFEiBFUh7ST3uIG4OEymIG3/uKdHDO4xk/FaqfUw0d+irSUyFPy3dZszf9VvSTPnsA== +caniuse-lite@^1.0.30001406: + version "1.0.30001597" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001597.tgz#8be94a8c1d679de23b22fbd944232aa1321639e6" + integrity sha512-7LjJvmQU6Sj7bL0j5b5WY/3n7utXUJvAe1lxhsHDbLmwX9mdL86Yjtr+5SRCyf8qME4M7pU2hswj0FpyBVCv9w== + caniuse-lite@^1.0.30001541: version "1.0.30001546" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001546.tgz#10fdad03436cfe3cc632d3af7a99a0fb497407f0" @@ -11547,14 +11522,6 @@ chalk@3.0.0, chalk@^3.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.0.0.tgz#6e98081ed2d17faab615eb52ac66ec1fe6209e72" - integrity sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - chalk@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" @@ -11624,21 +11591,6 @@ check-error@^1.0.2: resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= -chokidar@3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a" - integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== - dependencies: - anymatch "~3.1.1" - braces "~3.0.2" - glob-parent "~5.1.0" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.5.0" - optionalDependencies: - fsevents "~2.3.1" - "chokidar@>=2.0.0 <4.0.0", "chokidar@>=3.0.0 <4.0.0", chokidar@^3.0.0, chokidar@^3.0.2, chokidar@^3.2.1, chokidar@^3.3.1, chokidar@^3.4.1, chokidar@^3.5.1, chokidar@^3.5.2, chokidar@^3.5.3: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" @@ -11757,11 +11709,6 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" -classnames@2.2.6: - version "2.2.6" - resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce" - integrity sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q== - clean-base-url@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/clean-base-url/-/clean-base-url-1.0.0.tgz#c901cf0a20b972435b0eccd52d056824a4351b7b" @@ -11876,6 +11823,11 @@ cli-width@^3.0.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== +client-only@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/client-only/-/client-only-0.0.1.tgz#38bba5d403c41ab150bff64a95c85013cf73bca1" + integrity sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA== + cliui@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" @@ -12311,7 +12263,7 @@ consolidate@^0.16.0: dependencies: bluebird "^3.7.2" -constants-browserify@1.0.0, constants-browserify@^1.0.0: +constants-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= @@ -12706,7 +12658,7 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -crypto-browserify@3.12.0, crypto-browserify@^3.11.0, crypto-browserify@^3.12.0: +crypto-browserify@^3.11.0, crypto-browserify@^3.12.0: version "3.12.0" resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== @@ -12912,11 +12864,6 @@ css-what@^5.0.0: resolved "https://registry.yarnpkg.com/css-what/-/css-what-5.1.0.tgz#3f7b707aadf633baf62c2ceb8579b545bb40f7fe" integrity sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw== -css.escape@1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/css.escape/-/css.escape-1.5.1.tgz#42e27d4fa04ae32f931a4b4d4191fa9cddee97cb" - integrity sha1-QuJ9T6BK4y+TGktNQZH6nN3ul8s= - css@^2.0.0: version "2.2.4" resolved "https://registry.yarnpkg.com/css/-/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929" @@ -13018,22 +12965,6 @@ cssnano-preset-default@^5.2.14: postcss-svgo "^5.1.0" postcss-unique-selectors "^5.1.1" -cssnano-preset-simple@1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/cssnano-preset-simple/-/cssnano-preset-simple-1.2.2.tgz#c631bf79ffec7fdfc4069e2f2da3ca67d99d8413" - integrity sha512-gtvrcRSGtP3hA/wS8mFVinFnQdEsEpm3v4I/s/KmNjpdWaThV/4E5EojAzFXxyT5OCSRPLlHR9iQexAqKHlhGQ== - dependencies: - caniuse-lite "^1.0.30001179" - postcss "^7.0.32" - -cssnano-simple@1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/cssnano-simple/-/cssnano-simple-1.2.2.tgz#72c2c3970e67123c3b4130894a30dc1050267007" - integrity sha512-4slyYc1w4JhSbhVX5xi9G0aQ42JnRyPg+7l7cqoNyoIDzfWx40Rq3JQZnoAWDu60A4AvKVp9ln/YSUOdhDX68g== - dependencies: - cssnano-preset-simple "1.2.2" - postcss "^7.0.32" - cssnano-util-get-arguments@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/cssnano-util-get-arguments/-/cssnano-util-get-arguments-4.0.0.tgz#ed3a08299f21d75741b20f3b81f194ed49cc150f" @@ -13166,7 +13097,7 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -data-uri-to-buffer@3.0.1, data-uri-to-buffer@^3.0.1: +data-uri-to-buffer@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz#594b8973938c5bc2c33046535785341abc4f3636" integrity sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og== @@ -13801,11 +13732,6 @@ dom-serializer@^1.0.1: domhandler "^4.2.0" entities "^2.0.0" -domain-browser@4.19.0: - version "4.19.0" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-4.19.0.tgz#1093e17c0a17dbd521182fe90d49ac1370054af1" - integrity sha512-fRA+BaAWOR/yr/t7T9E9GJztHPeFjj8U35ajyAjCDtAAnTn1Rc1f6W6VGPJrO1tkQv9zWu+JRof7z6oQtiYVFQ== - domain-browser@^1.1.1, domain-browser@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" @@ -13985,7 +13911,7 @@ ejs@^3.1.7: dependencies: jake "^10.8.5" -electron-to-chromium@^1.3.47, electron-to-chromium@^1.3.634, electron-to-chromium@^1.4.251: +electron-to-chromium@^1.3.47, electron-to-chromium@^1.4.251: version "1.4.284" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz#61046d1e4cab3a25238f6bf7413795270f125592" integrity sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA== @@ -14744,7 +14670,7 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= -encoding@0.1.13, encoding@^0.1.11, encoding@^0.1.12, encoding@^0.1.13: +encoding@^0.1.11, encoding@^0.1.12, encoding@^0.1.13: version "0.1.13" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== @@ -15669,7 +15595,7 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -etag@1.8.1, etag@~1.8.1: +etag@~1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= @@ -16814,7 +16740,7 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@2.3.2, fsevents@^2.3.2, fsevents@~2.3.1, fsevents@~2.3.2: +fsevents@2.3.2, fsevents@^2.3.2, fsevents@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== @@ -16944,13 +16870,6 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1, get-intrinsic@ has "^1.0.3" has-symbols "^1.0.3" -get-orientation@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/get-orientation/-/get-orientation-1.1.2.tgz#20507928951814f8a91ded0a0e67b29dfab98947" - integrity sha512-/pViTfifW+gBbh/RnlFYHINvELT9Znt+SYyDKAUL6uV6By019AK/s+i9XP4jSwq7lwP38Fd8HVeTxym3+hkwmQ== - dependencies: - stream-parser "^0.3.1" - get-own-enumerable-property-symbols@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664" @@ -17107,7 +17026,7 @@ github-slugger@^2.0.0: resolved "https://registry.yarnpkg.com/github-slugger/-/github-slugger-2.0.0.tgz#52cf2f9279a21eb6c59dd385b410f0c0adda8f1a" integrity sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw== -glob-parent@5.1.2, glob-parent@^5.1.1, glob-parent@^5.1.2, glob-parent@~5.1.0, glob-parent@~5.1.2: +glob-parent@5.1.2, glob-parent@^5.1.1, glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== @@ -18212,17 +18131,6 @@ http-deceiver@^1.2.7: resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" integrity sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc= -http-errors@1.7.3: - version "1.7.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" - integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== - dependencies: - depd "~1.1.2" - inherits "2.0.4" - setprototypeof "1.1.1" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" - http-errors@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" @@ -18313,7 +18221,7 @@ http-terminator@^3.2.0: roarr "^7.0.4" type-fest "^2.3.3" -https-browserify@1.0.0, https-browserify@^1.0.0: +https-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= @@ -18594,7 +18502,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -20051,15 +19959,6 @@ jest-worker@26.3.0: merge-stream "^2.0.0" supports-color "^7.0.0" -jest-worker@27.0.0-next.5: - version "27.0.0-next.5" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.0.0-next.5.tgz#5985ee29b12a4e191f4aae4bb73b97971d86ec28" - integrity sha512-mk0umAQ5lT+CaOJ+Qp01N6kz48sJG2kr2n1rX0koqKf6FIygQV0qLOdN9SCYID4IVeSigDOcPeGLozdMLYfb5g== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^8.0.0" - jest-worker@^26.2.1, jest-worker@^26.3.0: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" @@ -21345,7 +21244,7 @@ lodash.uniqby@^4.7.0: resolved "https://registry.yarnpkg.com/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz#d99c07a669e9e6d24e1362dfe266c67616af1302" integrity sha1-2ZwHpmnp5tJOE2Lf4mbGdhavEwI= -lodash@4.17.21, lodash@^4.17.0, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.7.0: +lodash@4.17.21, lodash@^4.17.0, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.7.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -23207,21 +23106,21 @@ nan@^2.12.1: resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19" integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ== -nanoid@^3.1.16, nanoid@^3.1.23: +nanoid@^3.1.23: version "3.3.4" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== +nanoid@^3.3.4, nanoid@^3.3.7: + version "3.3.7" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" + integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== + nanoid@^3.3.6: version "3.3.6" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== -nanoid@^3.3.7: - version "3.3.7" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" - integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== - nanoid@^5.0.4: version "5.0.4" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-5.0.4.tgz#d2b608d8169d7da669279127615535705aa52edf" @@ -23261,13 +23160,6 @@ native-request@^1.0.5: resolved "https://registry.yarnpkg.com/native-request/-/native-request-1.1.0.tgz#acdb30fe2eefa3e1bc8c54b3a6852e9c5c0d3cb0" integrity sha512-uZ5rQaeRn15XmpgE0xoPL8YWqcX90VtCFglYwAgkvKM5e8fog+vePLAhHxuuv/gRkrQxIeh5U3q9sMNUrENqWw== -native-url@0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/native-url/-/native-url-0.3.4.tgz#29c943172aed86c63cee62c8c04db7f5756661f8" - integrity sha512-6iM8R99ze45ivyH8vybJ7X0yekIcPf5GgLV5K0ENCbmRcaRIDoj37BC8iLEmaaBfqqb8enuZ5p0uhY+lVAbAcA== - dependencies: - querystring "^0.2.0" - natural-compare-lite@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" @@ -23319,61 +23211,30 @@ next-tick@^1.1.0: resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== -next@10.1.3: - version "10.1.3" - resolved "https://registry.yarnpkg.com/next/-/next-10.1.3.tgz#e26e8371343a42bc2ba9be5cb253a7d324d03673" - integrity sha512-8Jf38F+s0YcXXkJGF5iUxOqSmbHrey0fX5Epc43L0uwDKmN2jK9vhc2ihCwXC1pmu8d2m/8wfTiXRJKGti55yw== - dependencies: - "@babel/runtime" "7.12.5" - "@hapi/accept" "5.0.1" - "@next/env" "10.1.3" - "@next/polyfill-module" "10.1.3" - "@next/react-dev-overlay" "10.1.3" - "@next/react-refresh-utils" "10.1.3" - "@opentelemetry/api" "0.14.0" - assert "2.0.0" - ast-types "0.13.2" - browserify-zlib "0.2.0" - browserslist "4.16.1" - buffer "5.6.0" - caniuse-lite "^1.0.30001179" - chalk "2.4.2" - chokidar "3.5.1" - constants-browserify "1.0.0" - crypto-browserify "3.12.0" - cssnano-simple "1.2.2" - domain-browser "4.19.0" - encoding "0.1.13" - etag "1.8.1" - find-cache-dir "3.3.1" - get-orientation "1.1.2" - https-browserify "1.0.0" - jest-worker "27.0.0-next.5" - native-url "0.3.4" - node-fetch "2.6.1" - node-html-parser "1.4.9" - node-libs-browser "^2.2.1" - os-browserify "0.3.0" - p-limit "3.1.0" - path-browserify "1.0.1" - pnp-webpack-plugin "1.6.4" - postcss "8.1.7" - process "0.11.10" - prop-types "15.7.2" - querystring-es3 "0.2.1" - raw-body "2.4.1" - react-is "16.13.1" - react-refresh "0.8.3" - stream-browserify "3.0.0" - stream-http "3.1.1" - string_decoder "1.3.0" - styled-jsx "3.3.2" - timers-browserify "2.0.12" - tty-browserify "0.0.1" - use-subscription "1.5.1" - util "0.12.3" - vm-browserify "1.1.2" - watchpack "2.1.1" +next@13.2.0: + version "13.2.0" + resolved "https://registry.yarnpkg.com/next/-/next-13.2.0.tgz#100b2d1dca120a3460c767ccdad80fc8e2463e31" + integrity sha512-vhByvKHedsaMwNTwXKzK4IMmNp7XI7vN4etcGUoIpLrIuDfoYA3bS0ImS4X9F6lKzopG5aVp7a1CjuzF2NGkvA== + dependencies: + "@next/env" "13.2.0" + "@swc/helpers" "0.4.14" + caniuse-lite "^1.0.30001406" + postcss "8.4.14" + styled-jsx "5.1.1" + optionalDependencies: + "@next/swc-android-arm-eabi" "13.2.0" + "@next/swc-android-arm64" "13.2.0" + "@next/swc-darwin-arm64" "13.2.0" + "@next/swc-darwin-x64" "13.2.0" + "@next/swc-freebsd-x64" "13.2.0" + "@next/swc-linux-arm-gnueabihf" "13.2.0" + "@next/swc-linux-arm64-gnu" "13.2.0" + "@next/swc-linux-arm64-musl" "13.2.0" + "@next/swc-linux-x64-gnu" "13.2.0" + "@next/swc-linux-x64-musl" "13.2.0" + "@next/swc-win32-arm64-msvc" "13.2.0" + "@next/swc-win32-ia32-msvc" "13.2.0" + "@next/swc-win32-x64-msvc" "13.2.0" ng-packagr@^10.1.0: version "10.1.2" @@ -23546,11 +23407,6 @@ node-fetch-npm@^2.0.2: json-parse-better-errors "^1.0.0" safe-buffer "^5.1.1" -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== - node-fetch@2.6.7, node-fetch@^2.2.0, node-fetch@^2.3.0, node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" @@ -23630,13 +23486,6 @@ node-gyp@^9.4.1: tar "^6.1.2" which "^2.0.2" -node-html-parser@1.4.9: - version "1.4.9" - resolved "https://registry.yarnpkg.com/node-html-parser/-/node-html-parser-1.4.9.tgz#3c8f6cac46479fae5800725edb532e9ae8fd816c" - integrity sha512-UVcirFD1Bn0O+TSmloHeHqZZCxHjvtIeGdVdGMhyZ8/PWlEiZaZ5iJzR189yKZr8p0FXN58BUeC7RHRkf/KYGw== - dependencies: - he "1.2.0" - node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -23688,11 +23537,6 @@ node-notifier@^10.0.0: uuid "^8.3.2" which "^2.0.2" -node-releases@^1.1.69: - version "1.1.77" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.77.tgz#50b0cfede855dd374e7585bf228ff34e57c1c32e" - integrity sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ== - node-releases@^2.0.13: version "2.0.13" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d" @@ -24554,7 +24398,7 @@ original@^1.0.0: dependencies: url-parse "^1.4.3" -os-browserify@0.3.0, os-browserify@^0.3.0: +os-browserify@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= @@ -24619,13 +24463,6 @@ p-is-promise@^1.1.0: resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e" integrity sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4= -p-limit@3.1.0, p-limit@^3.0.1, p-limit@^3.0.2, p-limit@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - p-limit@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" @@ -24640,6 +24477,13 @@ p-limit@^2.0.0, p-limit@^2.2.0: dependencies: p-try "^2.0.0" +p-limit@^3.0.1, p-limit@^3.0.2, p-limit@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + p-limit@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-4.0.0.tgz#914af6544ed32bfa54670b061cafcbd04984b644" @@ -25062,7 +24906,7 @@ path-browserify@0.0.1: resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a" integrity sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ== -path-browserify@1.0.1, path-browserify@^1.0.0: +path-browserify@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g== @@ -25453,11 +25297,6 @@ pkg-up@^3.1.0: dependencies: find-up "^3.0.0" -platform@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.6.tgz#48b4ce983164b209c2d45a107adb31f473a6e7a7" - integrity sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg== - playwright-core@1.40.1, playwright-core@^1.29.1: version "1.40.1" resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.40.1.tgz#442d15e86866a87d90d07af528e0afabe4c75c05" @@ -26465,16 +26304,6 @@ postcss@7.0.32: source-map "^0.6.1" supports-color "^6.1.0" -postcss@8.1.7: - version "8.1.7" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.1.7.tgz#ff6a82691bd861f3354fd9b17b2332f88171233f" - integrity sha512-llCQW1Pz4MOPwbZLmOddGM9eIJ8Bh7SZ2Oj5sxZva77uVaotYDsYTch1WBTNu7fUY0fpWp0fdt7uW40D4sRiiQ== - dependencies: - colorette "^1.2.1" - line-column "^1.0.2" - nanoid "^3.1.16" - source-map "^0.6.1" - postcss@8.3.6: version "8.3.6" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.6.tgz#2730dd76a97969f37f53b9a6096197be311cc4ea" @@ -26484,6 +26313,15 @@ postcss@8.3.6: nanoid "^3.1.23" source-map-js "^0.6.2" +postcss@8.4.14: + version "8.4.14" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf" + integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig== + dependencies: + nanoid "^3.3.4" + picocolors "^1.0.0" + source-map-js "^1.0.2" + postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.27, postcss@^7.0.29, postcss@^7.0.32, postcss@^7.0.35, postcss@^7.0.5, postcss@^7.0.6: version "7.0.39" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.39.tgz#9624375d965630e2e1f2c02a935c82a59cb48309" @@ -26738,7 +26576,7 @@ process-relative-require@^1.0.0: dependencies: node-modules-path "^1.0.0" -process@0.11.10, process@^0.11.10: +process@^0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= @@ -26816,15 +26654,6 @@ promzard@^1.0.0: dependencies: read "^2.0.0" -prop-types@15.7.2: - version "15.7.2" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" - integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== - dependencies: - loose-envify "^1.4.0" - object-assign "^4.1.1" - react-is "^16.8.1" - prop-types@^15.5.4, prop-types@^15.5.6, prop-types@^15.6.2, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" @@ -27026,7 +26855,7 @@ query-string@^5.0.1: object-assign "^4.1.0" strict-uri-encode "^1.0.0" -querystring-es3@0.2.1, querystring-es3@^0.2.0, querystring-es3@^0.2.1: +querystring-es3@^0.2.0, querystring-es3@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= @@ -27036,11 +26865,6 @@ querystring@0.2.0: resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= -querystring@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.1.tgz#40d77615bb09d16902a85c3e38aa8b5ed761c2dd" - integrity sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg== - querystringify@^2.1.1: version "2.2.0" resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" @@ -27109,16 +26933,6 @@ range-parser@^1.2.1, range-parser@~1.2.1: resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== -raw-body@2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.1.tgz#30ac82f98bb5ae8c152e67149dac8d55153b168c" - integrity sha512-9WmIKF6mkvA0SLmA2Knm9+qj89e+j1zqgyn8aXGd7+nAduPoqgI9lO57SAZNn/Byzo5P7JhXTyg9PzaJbH73bA== - dependencies: - bytes "3.1.0" - http-errors "1.7.3" - iconv-lite "0.4.24" - unpipe "1.0.0" - raw-body@2.5.1: version "2.5.1" resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" @@ -27180,7 +26994,7 @@ react-error-boundary@^3.1.0: dependencies: "@babel/runtime" "^7.12.5" -react-is@16.13.1, react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1: +react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== @@ -27195,11 +27009,6 @@ react-is@^18.0.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== -react-refresh@0.8.3: - version "0.8.3" - resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.8.3.tgz#721d4657672d400c5e3c75d063c4a85fb2d5d68f" - integrity sha512-X8jZHc7nCMjaCqoU+V2I0cOhNW+QMBwSUkeXnTi8IPe6zaRWfn60ZzvFDZqWPfmSJfjub7dDW1SP0jaHWLu/hg== - "react-router-3@npm:react-router@3.2.0": version "3.2.0" resolved "https://registry.yarnpkg.com/react-router/-/react-router-3.2.0.tgz#62b6279d589b70b34e265113e4c0a9261a02ed36" @@ -27427,7 +27236,7 @@ read@^2.0.0: string_decoder "~1.1.1" util-deprecate "~1.0.1" -"readable-stream@2 || 3", readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.5.0, readable-stream@^3.6.0: +"readable-stream@2 || 3", readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -27474,13 +27283,6 @@ readdirp@^2.2.1: micromatch "^3.1.10" readable-stream "^2.0.2" -readdirp@~3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" - integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== - dependencies: - picomatch "^2.2.1" - readdirp@~3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" @@ -28950,11 +28752,6 @@ setprototypeof@1.1.0: resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== -setprototypeof@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" - integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== - setprototypeof@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" @@ -29013,7 +28810,7 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shell-quote@1.7.2, shell-quote@^1.6.1: +shell-quote@^1.6.1: version "1.7.2" resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2" integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg== @@ -29534,13 +29331,6 @@ source-map@0.7.4, source-map@~0.7.2: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== -source-map@0.8.0-beta.0: - version "0.8.0-beta.0" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.8.0-beta.0.tgz#d4c1bb42c3f7ee925f005927ba10709e0d1d1f11" - integrity sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA== - dependencies: - whatwg-url "^7.0.0" - source-map@^0.5.0, source-map@^0.5.1, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.3: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" @@ -29801,7 +29591,7 @@ stackback@0.0.2: resolved "https://registry.yarnpkg.com/stackback/-/stackback-0.0.2.tgz#1ac8a0d9483848d1695e418b6d031a3c3ce68e3b" integrity sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw== -stacktrace-parser@0.1.10, stacktrace-parser@^0.1.10: +stacktrace-parser@^0.1.10: version "0.1.10" resolved "https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz#29fb0cae4e0d0b85155879402857a1639eb6051a" integrity sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg== @@ -29828,7 +29618,7 @@ statuses@2.0.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== -"statuses@>= 1.4.0 < 2", "statuses@>= 1.5.0 < 2", statuses@~1.5.0: +"statuses@>= 1.4.0 < 2", statuses@~1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= @@ -29845,14 +29635,6 @@ stdin-discarder@^0.1.0: dependencies: bl "^5.0.0" -stream-browserify@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-3.0.0.tgz#22b0a2850cdf6503e73085da1fc7b7d0c2122f2f" - integrity sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA== - dependencies: - inherits "~2.0.4" - readable-stream "^3.5.0" - stream-browserify@^2.0.1, stream-browserify@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b" @@ -29883,16 +29665,6 @@ stream-events@^1.0.5: dependencies: stubs "^3.0.0" -stream-http@3.1.1, stream-http@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-3.1.1.tgz#0370a8017cf8d050b9a8554afe608f043eaff564" - integrity sha512-S7OqaYu0EkFpgeGFb/NPOoPLxFko7TPqtEeFg5DXPB4v/KETHG0Ln6fRFrNezoelpaDKmycEmmZ81cC9DAwgYg== - dependencies: - builtin-status-codes "^3.0.0" - inherits "^2.0.4" - readable-stream "^3.6.0" - xtend "^4.0.2" - stream-http@^2.7.2: version "2.8.3" resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" @@ -29904,7 +29676,17 @@ stream-http@^2.7.2: to-arraybuffer "^1.0.0" xtend "^4.0.0" -stream-parser@^0.3.1, stream-parser@~0.3.1: +stream-http@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-3.1.1.tgz#0370a8017cf8d050b9a8554afe608f043eaff564" + integrity sha512-S7OqaYu0EkFpgeGFb/NPOoPLxFko7TPqtEeFg5DXPB4v/KETHG0Ln6fRFrNezoelpaDKmycEmmZ81cC9DAwgYg== + dependencies: + builtin-status-codes "^3.0.0" + inherits "^2.0.4" + readable-stream "^3.6.0" + xtend "^4.0.2" + +stream-parser@~0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/stream-parser/-/stream-parser-0.3.1.tgz#1618548694420021a1182ff0af1911c129761773" integrity sha1-FhhUhpRCACGhGC/wrxkRwSl2F3M= @@ -29959,11 +29741,6 @@ strict-uri-encode@^1.0.0: resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= -string-hash@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/string-hash/-/string-hash-1.1.3.tgz#e8aafc0ac1855b4666929ed7dd1275df5d6c811b" - integrity sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs= - string-length@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" @@ -30072,7 +29849,7 @@ string_decoder@0.10, string_decoder@~0.10.x: resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= -string_decoder@1.3.0, string_decoder@^1.0.0, string_decoder@^1.1.1, string_decoder@^1.2.0: +string_decoder@^1.0.0, string_decoder@^1.1.1, string_decoder@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== @@ -30110,13 +29887,6 @@ stringify-object@^3.2.1: dependencies: ansi-regex "^5.0.1" -strip-ansi@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" - integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== - dependencies: - ansi-regex "^5.0.0" - strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" @@ -30255,19 +30025,12 @@ style-loader@^2.0.0: loader-utils "^2.0.0" schema-utils "^3.0.0" -styled-jsx@3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-3.3.2.tgz#2474601a26670a6049fb4d3f94bd91695b3ce018" - integrity sha512-daAkGd5mqhbBhLd6jYAjYBa9LpxYCzsgo/f6qzPdFxVB8yoGbhxvzQgkC0pfmCVvW3JuAEBn0UzFLBfkHVZG1g== +styled-jsx@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.1.1.tgz#839a1c3aaacc4e735fed0781b8619ea5d0009d1f" + integrity sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw== dependencies: - "@babel/types" "7.8.3" - babel-plugin-syntax-jsx "6.18.0" - convert-source-map "1.7.0" - loader-utils "1.2.3" - source-map "0.7.3" - string-hash "1.1.3" - stylis "3.5.4" - stylis-rule-sheet "0.0.10" + client-only "0.0.1" styled_string@0.0.1: version "0.0.1" @@ -30291,16 +30054,6 @@ stylehacks@^5.1.1: browserslist "^4.21.4" postcss-selector-parser "^6.0.4" -stylis-rule-sheet@0.0.10: - version "0.0.10" - resolved "https://registry.yarnpkg.com/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz#44e64a2b076643f4b52e5ff71efc04d8c3c4a430" - integrity sha512-nTbZoaqoBnmK+ptANthb10ZRZOGC+EmTLLUxeYIuHNkEKcmKgXX1XWKkUBT2Ac4es3NybooPe0SmvKdhKJZAuw== - -stylis@3.5.4: - version "3.5.4" - resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.5.4.tgz#f665f25f5e299cf3d64654ab949a57c768b73fbe" - integrity sha512-8/3pSmthWM7lsPBKv7NXkzn2Uc9W7NotcwGNpJaa3k7WMM1XDCA4MgT5k/8BIexd5ydZdboXtU90XH9Ec4Bv/Q== - stylus-loader@3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/stylus-loader/-/stylus-loader-3.0.2.tgz#27a706420b05a38e038e7cacb153578d450513c6" @@ -30941,7 +30694,7 @@ timed-out@^4.0.1: resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= -timers-browserify@2.0.12, timers-browserify@^2.0.10, timers-browserify@^2.0.4: +timers-browserify@^2.0.10, timers-browserify@^2.0.4: version "2.0.12" resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.12.tgz#44a45c11fbf407f34f97bccd1577c652361b00ee" integrity sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ== @@ -31083,11 +30836,6 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" -toidentifier@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" - integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== - toidentifier@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" @@ -31122,13 +30870,6 @@ tough-cookie@~2.5.0: psl "^1.1.28" punycode "^2.1.1" -tr46@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" - integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= - dependencies: - punycode "^2.1.0" - tr46@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.0.2.tgz#03273586def1595ae08fedb38d7733cee91d2479" @@ -31321,7 +31062,7 @@ tty-browserify@0.0.0: resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= -tty-browserify@0.0.1, tty-browserify@^0.0.1: +tty-browserify@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811" integrity sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw== @@ -31949,13 +31690,6 @@ urlgrey@0.4.4: resolved "https://registry.yarnpkg.com/urlgrey/-/urlgrey-0.4.4.tgz#892fe95960805e85519f1cd4389f2cb4cbb7652f" integrity sha1-iS/pWWCAXoVRnxzUOJ8stMu3ZS8= -use-subscription@1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/use-subscription/-/use-subscription-1.5.1.tgz#73501107f02fad84c6dd57965beb0b75c68c42d1" - integrity sha512-Xv2a1P/yReAjAbhylMfFplFKj9GssgTwN7RlcTxBujFQcloStWNDQdc4g4NRWH9xS4i/FDk04vQBptAXoF3VcA== - dependencies: - object-assign "^4.1.1" - use@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" @@ -32006,18 +31740,6 @@ util@0.10.3: dependencies: inherits "2.0.1" -util@0.12.3: - version "0.12.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.12.3.tgz#971bb0292d2cc0c892dab7c6a5d37c2bec707888" - integrity sha512-I8XkoQwE+fPQEhy9v012V+TSdH2kp9ts29i20TaaDUXsg7x/onePbhFJUExBfv/2ay1ZOp/Vsm3nDlmnFGSAog== - dependencies: - inherits "^2.0.3" - is-arguments "^1.0.4" - is-generator-function "^1.0.7" - is-typed-array "^1.1.3" - safe-buffer "^5.1.2" - which-typed-array "^1.1.2" - util@^0.11.0: version "0.11.1" resolved "https://registry.yarnpkg.com/util/-/util-0.11.1.tgz#3236733720ec64bb27f6e26f421aaa2e1b588d61" @@ -32353,7 +32075,7 @@ vm-browserify@1.1.0: resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.0.tgz#bd76d6a23323e2ca8ffa12028dc04559c75f9019" integrity sha512-iq+S7vZJE60yejDYM0ek6zg308+UZsdtPExWP9VZoCFCz1zkJoXFnAX7aZfd/ZwrkidzdUZL0C/ryW+JwAiIGw== -vm-browserify@1.1.2, vm-browserify@^1.0.1: +vm-browserify@^1.0.1: version "1.1.2" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== @@ -32475,14 +32197,6 @@ watchpack-chokidar2@^2.0.1: dependencies: chokidar "^2.1.8" -watchpack@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.1.1.tgz#e99630550fca07df9f90a06056987baa40a689c7" - integrity sha512-Oo7LXCmc1eE1AjyuSBmtC3+Wy4HcV8PxWh2kP6fOl8yTlNS7r0K9l1ao2lrrUza7V39Y3D/BbJgY8VeSlc5JKw== - dependencies: - glob-to-regexp "^0.4.1" - graceful-fs "^4.1.2" - watchpack@^1.7.4: version "1.7.5" resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.7.5.tgz#1267e6c55e0b9b5be44c2023aed5437a2c26c453" @@ -32941,15 +32655,6 @@ whatwg-url@^5.0.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" -whatwg-url@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06" - integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg== - dependencies: - lodash.sortby "^4.7.0" - tr46 "^1.0.1" - webidl-conversions "^4.0.2" - whatwg-url@^8.0.0, whatwg-url@^8.5.0: version "8.5.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.5.0.tgz#7752b8464fc0903fec89aa9846fc9efe07351fd3" From 39a36229f46f05547781706b44f77a7251d182d9 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 14 Mar 2024 12:45:46 +0000 Subject: [PATCH 12/26] fix --- MIGRATION.md | 5 +++++ .../src/client/routing/pagesRouterRoutingInstrumentation.ts | 5 +++-- .../nextjs/src/common/wrapGetServerSidePropsWithSentry.ts | 5 +++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index a9bdf8bbd049..565d5035bd29 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -596,6 +596,11 @@ The following previously deprecated API has been removed from the `@sentry/nextj - `IS_BUILD` - `isBuild` +#### Updated minimum compatible Next.js version to `13.2.0` + +The minimum version of Next.js compatible with the Sentry Next.js SDK has been raised to `13.2.0`. +Older versions may exhibit bugs or unexpected behaviour. + #### Merging of the Sentry Webpack Plugin options and SDK Build options With version 8 of the Sentry Next.js SDK, `withSentryConfig` will no longer accept 3 arguments. The second argument diff --git a/packages/nextjs/src/client/routing/pagesRouterRoutingInstrumentation.ts b/packages/nextjs/src/client/routing/pagesRouterRoutingInstrumentation.ts index 720921ddb1e9..3685f9590fbb 100644 --- a/packages/nextjs/src/client/routing/pagesRouterRoutingInstrumentation.ts +++ b/packages/nextjs/src/client/routing/pagesRouterRoutingInstrumentation.ts @@ -7,7 +7,8 @@ import { import { WINDOW, startBrowserTracingNavigationSpan, startBrowserTracingPageLoadSpan } from '@sentry/react'; import type { Client, TransactionSource } from '@sentry/types'; import { browserPerformanceTimeOrigin, logger, stripUrlQueryAndFragment } from '@sentry/utils'; -import type { NEXT_DATA as NextData } from 'next/dist/next-server/lib/utils'; + +import type { NEXT_DATA } from 'next/dist/shared/lib/utils'; import RouterImport from 'next/router'; // next/router v10 is CJS @@ -27,7 +28,7 @@ const globalObject = WINDOW as typeof WINDOW & { /** * Describes data located in the __NEXT_DATA__ script tag. This tag is present on every page of a Next.js app. */ -interface SentryEnhancedNextData extends NextData { +interface SentryEnhancedNextData extends NEXT_DATA { props: { pageProps?: { _sentryTraceData?: string; // trace parent info, if injected by a data-fetcher diff --git a/packages/nextjs/src/common/wrapGetServerSidePropsWithSentry.ts b/packages/nextjs/src/common/wrapGetServerSidePropsWithSentry.ts index 32122869b8f4..782bc523f935 100644 --- a/packages/nextjs/src/common/wrapGetServerSidePropsWithSentry.ts +++ b/packages/nextjs/src/common/wrapGetServerSidePropsWithSentry.ts @@ -48,10 +48,11 @@ export function wrapGetServerSidePropsWithSentry( const activeSpan = getActiveSpan(); const requestTransaction = getSpanFromRequest(req) ?? (activeSpan ? getRootSpan(activeSpan) : undefined); if (requestTransaction) { - serverSideProps.props._sentryTraceData = spanToTraceHeader(requestTransaction); + (serverSideProps.props as Record)._sentryTraceData = spanToTraceHeader(requestTransaction); const dynamicSamplingContext = getDynamicSamplingContextFromSpan(requestTransaction); - serverSideProps.props._sentryBaggage = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext); + (serverSideProps.props as Record)._sentryBaggage = + dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext); } } From f55d1228a20f979a2c1900df6c5a844fd3a9e282 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 14 Mar 2024 12:54:26 +0000 Subject: [PATCH 13/26] lint --- MIGRATION.md | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index 851bf18668ef..8e34058923ab 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -676,12 +676,17 @@ or look at the TypeScript type definitions of `withSentryConfig`. #### Updated the recommended way of calling `Sentry.init()` -With version 8 of the SDK we will no longer support the use of `sentry.server.config.ts` and `sentry.edge.config.ts` files (note that `sentry.client.config.ts` is still supported and encouraged). -Instead, please initialize the Sentry Next.js SDK for the serverside in a [Next.js instrumentation hook](https://nextjs.org/docs/app/building-your-application/optimizing/instrumentation). +With version 8 of the SDK we will no longer support the use of `sentry.server.config.ts` and `sentry.edge.config.ts` +files (note that `sentry.client.config.ts` is still supported and encouraged). Instead, please initialize the Sentry +Next.js SDK for the serverside in a +[Next.js instrumentation hook](https://nextjs.org/docs/app/building-your-application/optimizing/instrumentation). The following is an example of how to initialize the serverside SDK in a Next.js instrumentation hook: -1. First, enable the Next.js instrumentation hook by setting the `experimental.instrumentationHook` to `true` in your `next.config.js`. -2. Next, create a `instrumentation.ts|js` file in the root directory of your project (or in the `src` folder if you have have one). + +1. First, enable the Next.js instrumentation hook by setting the `experimental.instrumentationHook` to `true` in your + `next.config.js`. +2. Next, create a `instrumentation.ts|js` file in the root directory of your project (or in the `src` folder if you have + have one). 3. Now, export a `register` function from the `instrumentation.ts|js` file and call `Sentry.init()` inside of it: ```ts @@ -706,7 +711,13 @@ The following is an example of how to initialize the serverside SDK in a Next.js Note that you can initialize the SDK differently depending on which server runtime is being used. -**Why are we making this change?** The very simple reason is that Next.js requires us to set up OpenTelemetry instrumentation inside the `register` function of the instrumentation hook. Looking a little bit further into the future, we also would like the Sentry SDK to be compatible with [Turbopack](https://turbo.build/pack), which is gonna be the bundler that Next.js will be using instead of Webpack. The SDK in its previous version depended heavily on Webpack in order to inject the `sentry.(server|edge).config.ts` files into the server-side code. Because this will not be possible in the future, we are doing ourselves a favor and doing things the way Next.js intends us to do them - hopefully reducing bugs and jank. +**Why are we making this change?** The very simple reason is that Next.js requires us to set up OpenTelemetry +instrumentation inside the `register` function of the instrumentation hook. Looking a little bit further into the +future, we also would like the Sentry SDK to be compatible with [Turbopack](https://turbo.build/pack), which is gonna be +the bundler that Next.js will be using instead of Webpack. The SDK in its previous version depended heavily on Webpack +in order to inject the `sentry.(server|edge).config.ts` files into the server-side code. Because this will not be +possible in the future, we are doing ourselves a favor and doing things the way Next.js intends us to do them - +hopefully reducing bugs and jank. ### Astro SDK From a8966a681452c6379dc0271de94e1a7087fe0426 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 14 Mar 2024 13:12:06 +0000 Subject: [PATCH 14/26] migrate --- .../create-next-app/instrumentation.ts | 33 +++++++++++++++++++ .../create-next-app/sentry.server.config.ts | 33 ------------------- .../nextjs-14/instrumentation.ts | 13 ++++++++ .../nextjs-14/sentry.edge.config.ts | 9 ----- .../nextjs-14/sentry.server.config.ts | 9 ----- .../nextjs-app-dir/instrumentation.ts | 13 ++++++++ .../nextjs-app-dir/sentry.edge.config.ts | 9 ----- .../nextjs-app-dir/sentry.server.config.ts | 9 ----- .../test/integration/sentry.edge.config.js | 8 ----- .../test/integration/sentry.server.config.js | 24 -------------- .../test/integration/src/instrumentation.ts | 31 +++++++++++++++++ 11 files changed, 90 insertions(+), 101 deletions(-) create mode 100644 dev-packages/e2e-tests/test-applications/create-next-app/instrumentation.ts delete mode 100644 dev-packages/e2e-tests/test-applications/create-next-app/sentry.server.config.ts create mode 100644 dev-packages/e2e-tests/test-applications/nextjs-14/instrumentation.ts delete mode 100644 dev-packages/e2e-tests/test-applications/nextjs-14/sentry.edge.config.ts delete mode 100644 dev-packages/e2e-tests/test-applications/nextjs-14/sentry.server.config.ts create mode 100644 dev-packages/e2e-tests/test-applications/nextjs-app-dir/instrumentation.ts delete mode 100644 dev-packages/e2e-tests/test-applications/nextjs-app-dir/sentry.edge.config.ts delete mode 100644 dev-packages/e2e-tests/test-applications/nextjs-app-dir/sentry.server.config.ts delete mode 100644 packages/nextjs/test/integration/sentry.edge.config.js delete mode 100644 packages/nextjs/test/integration/sentry.server.config.js create mode 100644 packages/nextjs/test/integration/src/instrumentation.ts diff --git a/dev-packages/e2e-tests/test-applications/create-next-app/instrumentation.ts b/dev-packages/e2e-tests/test-applications/create-next-app/instrumentation.ts new file mode 100644 index 000000000000..5ddf6e7b823a --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/create-next-app/instrumentation.ts @@ -0,0 +1,33 @@ +import * as Sentry from '@sentry/nextjs'; + +declare global { + namespace globalThis { + var transactionIds: string[]; + } +} + +export function register() { + if (process.env.NEXT_RUNTIME === 'nodejs') { + Sentry.init({ + environment: 'qa', // dynamic sampling bias to keep transactions + dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN, + // Adjust this value in production, or use tracesSampler for greater control + tracesSampleRate: 1.0, + integrations: [Sentry.localVariablesIntegration()], + }); + + Sentry.addEventProcessor(event => { + global.transactionIds = global.transactionIds || []; + + if (event.type === 'transaction') { + const eventId = event.event_id; + + if (eventId) { + global.transactionIds.push(eventId); + } + } + + return event; + }); + } +} diff --git a/dev-packages/e2e-tests/test-applications/create-next-app/sentry.server.config.ts b/dev-packages/e2e-tests/test-applications/create-next-app/sentry.server.config.ts deleted file mode 100644 index 3750d0f5c5fd..000000000000 --- a/dev-packages/e2e-tests/test-applications/create-next-app/sentry.server.config.ts +++ /dev/null @@ -1,33 +0,0 @@ -// 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 * as Sentry from '@sentry/nextjs'; - -declare global { - namespace globalThis { - var transactionIds: string[]; - } -} - -Sentry.init({ - environment: 'qa', // dynamic sampling bias to keep transactions - dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN, - // Adjust this value in production, or use tracesSampler for greater control - tracesSampleRate: 1.0, - integrations: [Sentry.localVariablesIntegration()], -}); - -Sentry.addEventProcessor(event => { - global.transactionIds = global.transactionIds || []; - - if (event.type === 'transaction') { - const eventId = event.event_id; - - if (eventId) { - global.transactionIds.push(eventId); - } - } - - return event; -}); diff --git a/dev-packages/e2e-tests/test-applications/nextjs-14/instrumentation.ts b/dev-packages/e2e-tests/test-applications/nextjs-14/instrumentation.ts new file mode 100644 index 000000000000..6ede827b556a --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nextjs-14/instrumentation.ts @@ -0,0 +1,13 @@ +import * as Sentry from '@sentry/nextjs'; + +export function register() { + if (process.env.NEXT_RUNTIME === 'nodejs' || process.env.NEXT_RUNTIME === 'edge') { + Sentry.init({ + environment: 'qa', // dynamic sampling bias to keep transactions + dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN, + tunnel: `http://localhost:3031/`, // proxy server + tracesSampleRate: 1.0, + sendDefaultPii: true, + }); + } +} diff --git a/dev-packages/e2e-tests/test-applications/nextjs-14/sentry.edge.config.ts b/dev-packages/e2e-tests/test-applications/nextjs-14/sentry.edge.config.ts deleted file mode 100644 index 85bd765c9c44..000000000000 --- a/dev-packages/e2e-tests/test-applications/nextjs-14/sentry.edge.config.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as Sentry from '@sentry/nextjs'; - -Sentry.init({ - environment: 'qa', // dynamic sampling bias to keep transactions - dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN, - tunnel: `http://localhost:3031/`, // proxy server - tracesSampleRate: 1.0, - sendDefaultPii: true, -}); diff --git a/dev-packages/e2e-tests/test-applications/nextjs-14/sentry.server.config.ts b/dev-packages/e2e-tests/test-applications/nextjs-14/sentry.server.config.ts deleted file mode 100644 index 85bd765c9c44..000000000000 --- a/dev-packages/e2e-tests/test-applications/nextjs-14/sentry.server.config.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as Sentry from '@sentry/nextjs'; - -Sentry.init({ - environment: 'qa', // dynamic sampling bias to keep transactions - dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN, - tunnel: `http://localhost:3031/`, // proxy server - tracesSampleRate: 1.0, - sendDefaultPii: true, -}); diff --git a/dev-packages/e2e-tests/test-applications/nextjs-app-dir/instrumentation.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/instrumentation.ts new file mode 100644 index 000000000000..6ede827b556a --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/instrumentation.ts @@ -0,0 +1,13 @@ +import * as Sentry from '@sentry/nextjs'; + +export function register() { + if (process.env.NEXT_RUNTIME === 'nodejs' || process.env.NEXT_RUNTIME === 'edge') { + Sentry.init({ + environment: 'qa', // dynamic sampling bias to keep transactions + dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN, + tunnel: `http://localhost:3031/`, // proxy server + tracesSampleRate: 1.0, + sendDefaultPii: true, + }); + } +} diff --git a/dev-packages/e2e-tests/test-applications/nextjs-app-dir/sentry.edge.config.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/sentry.edge.config.ts deleted file mode 100644 index 85bd765c9c44..000000000000 --- a/dev-packages/e2e-tests/test-applications/nextjs-app-dir/sentry.edge.config.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as Sentry from '@sentry/nextjs'; - -Sentry.init({ - environment: 'qa', // dynamic sampling bias to keep transactions - dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN, - tunnel: `http://localhost:3031/`, // proxy server - tracesSampleRate: 1.0, - sendDefaultPii: true, -}); diff --git a/dev-packages/e2e-tests/test-applications/nextjs-app-dir/sentry.server.config.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/sentry.server.config.ts deleted file mode 100644 index 85bd765c9c44..000000000000 --- a/dev-packages/e2e-tests/test-applications/nextjs-app-dir/sentry.server.config.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as Sentry from '@sentry/nextjs'; - -Sentry.init({ - environment: 'qa', // dynamic sampling bias to keep transactions - dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN, - tunnel: `http://localhost:3031/`, // proxy server - tracesSampleRate: 1.0, - sendDefaultPii: true, -}); diff --git a/packages/nextjs/test/integration/sentry.edge.config.js b/packages/nextjs/test/integration/sentry.edge.config.js deleted file mode 100644 index 36600e702048..000000000000 --- a/packages/nextjs/test/integration/sentry.edge.config.js +++ /dev/null @@ -1,8 +0,0 @@ -import * as Sentry from '@sentry/nextjs'; - -Sentry.init({ - dsn: 'https://public@dsn.ingest.sentry.io/1337', - tracesSampleRate: 1.0, - tracePropagationTargets: ['http://example.com'], - debug: process.env.SDK_DEBUG, -}); diff --git a/packages/nextjs/test/integration/sentry.server.config.js b/packages/nextjs/test/integration/sentry.server.config.js deleted file mode 100644 index 54c5db73a1a2..000000000000 --- a/packages/nextjs/test/integration/sentry.server.config.js +++ /dev/null @@ -1,24 +0,0 @@ -import * as Sentry from '@sentry/nextjs'; - -Sentry.init({ - dsn: 'https://public@dsn.ingest.sentry.io/1337', - tracesSampleRate: 1.0, - tracePropagationTargets: ['http://example.com'], - debug: process.env.SDK_DEBUG, - - integrations: defaults => [ - ...defaults.filter( - integration => - // filter out `Console` since the tests are happening in the console and we don't need to record what's printed - // there, because we can see it (this makes debug logging much less noisy, since intercepted events which are - // printed to the console no longer create console breadcrumbs, which then get printed, creating even longer - // console breadcrumbs, which get printed, etc, etc) - - // filter out `Http` so its options can be changed below (otherwise, default one wins because it's initialized first) - integration.name !== 'Console' && integration.name !== 'Http', - ), - - // Used for testing http tracing - new Sentry.Integrations.Http({ tracing: true }), - ], -}); diff --git a/packages/nextjs/test/integration/src/instrumentation.ts b/packages/nextjs/test/integration/src/instrumentation.ts new file mode 100644 index 000000000000..8431f792e7af --- /dev/null +++ b/packages/nextjs/test/integration/src/instrumentation.ts @@ -0,0 +1,31 @@ +import * as Sentry from '@sentry/nextjs'; + +export function register() { + if (process.env.NEXT_RUNTIME === 'nodejs') { + Sentry.init({ + dsn: 'https://public@dsn.ingest.sentry.io/1337', + tracesSampleRate: 1.0, + tracePropagationTargets: ['http://example.com'], + debug: !!process.env.SDK_DEBUG, + integrations: defaults => [ + ...defaults.filter( + integration => + // filter out `Console` since the tests are happening in the console and we don't need to record what's printed + // there, because we can see it (this makes debug logging much less noisy, since intercepted events which are + // printed to the console no longer create console breadcrumbs, which then get printed, creating even longer + // console breadcrumbs, which get printed, etc, etc) + integration.name !== 'Console', + ), + ], + }); + } + + if (process.env.NEXT_RUNTIME === 'edge') { + Sentry.init({ + dsn: 'https://public@dsn.ingest.sentry.io/1337', + tracesSampleRate: 1.0, + tracePropagationTargets: ['http://example.com'], + debug: !!process.env.SDK_DEBUG, + }); + } +} From de7a1a915ad27490faa4351823ec740cc49956e4 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 14 Mar 2024 13:20:25 +0000 Subject: [PATCH 15/26] fix --- MIGRATION.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index 565d5035bd29..75208d710d23 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -598,8 +598,8 @@ The following previously deprecated API has been removed from the `@sentry/nextj #### Updated minimum compatible Next.js version to `13.2.0` -The minimum version of Next.js compatible with the Sentry Next.js SDK has been raised to `13.2.0`. -Older versions may exhibit bugs or unexpected behaviour. +The minimum version of Next.js compatible with the Sentry Next.js SDK has been raised to `13.2.0`. Older versions may +exhibit bugs or unexpected behaviour. #### Merging of the Sentry Webpack Plugin options and SDK Build options From 9a8ed80657e0cd09c4072352e2a018187256e309 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 14 Mar 2024 14:52:58 +0000 Subject: [PATCH 16/26] . --- packages/nextjs/src/config/webpack.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nextjs/src/config/webpack.ts b/packages/nextjs/src/config/webpack.ts index 1d815bcddee8..2e7c8bb57a80 100644 --- a/packages/nextjs/src/config/webpack.ts +++ b/packages/nextjs/src/config/webpack.ts @@ -673,7 +673,7 @@ function addValueInjectionLoader( if (buildContext.isServer) { newConfig.module.rules.push({ // TODO: Find a more bulletproof way of matching. For now this is fine and doesn't hurt anyone. It merely sets some globals. - test: /(instrumentation.(js|ts))/, + test: /(src[\\/])?instrumentation.(js|ts)/, use: [ { loader: path.resolve(__dirname, 'loaders/valueInjectionLoader.js'), From 6bfbfbbea1184c16216199f07033553ba411302c Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 14 Mar 2024 15:12:15 +0000 Subject: [PATCH 17/26] test --- .../test/performance/pagesRouterInstrumentation.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nextjs/test/performance/pagesRouterInstrumentation.test.ts b/packages/nextjs/test/performance/pagesRouterInstrumentation.test.ts index 7ca1f01ff8d6..55a55b9b208a 100644 --- a/packages/nextjs/test/performance/pagesRouterInstrumentation.test.ts +++ b/packages/nextjs/test/performance/pagesRouterInstrumentation.test.ts @@ -1,7 +1,7 @@ import { WINDOW } from '@sentry/react'; import type { Client } from '@sentry/types'; import { JSDOM } from 'jsdom'; -import type { NEXT_DATA as NextData } from 'next/dist/next-server/lib/utils'; +import type { NEXT_DATA } from 'next/dist/shared/lib/utils'; import Router from 'next/router'; import { @@ -60,7 +60,7 @@ describe('pagesRouterInstrumentPageLoad', () => { navigatableRoutes?: string[]; hasNextData: boolean; }) { - const nextDataContent: NextData = { + const nextDataContent: NEXT_DATA = { props: pageProperties.props, page: pageProperties.route, query: pageProperties.query, From 6a89e31d033a8fa883cfe232550e1bda8684bb40 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 14 Mar 2024 15:12:47 +0000 Subject: [PATCH 18/26] . --- .../nextjs/test/performance/pagesRouterInstrumentation.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nextjs/test/performance/pagesRouterInstrumentation.test.ts b/packages/nextjs/test/performance/pagesRouterInstrumentation.test.ts index 55a55b9b208a..3091fea80cec 100644 --- a/packages/nextjs/test/performance/pagesRouterInstrumentation.test.ts +++ b/packages/nextjs/test/performance/pagesRouterInstrumentation.test.ts @@ -222,7 +222,7 @@ describe('pagesRouterInstrumentNavigation', () => { navigatableRoutes?: string[]; hasNextData: boolean; }) { - const nextDataContent: NextData = { + const nextDataContent: NEXT_DATA = { props: pageProperties.props, page: pageProperties.route, query: pageProperties.query, From 7adf28f7594afeea488f9ee049f3efc9a3229c47 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 15 Mar 2024 12:04:29 +0000 Subject: [PATCH 19/26] . --- packages/nextjs/playwright.config.ts | 2 ++ .../test/integration/next13.appdir.config.template | 3 +++ packages/nextjs/test/integration/package.json | 2 +- packages/nextjs/test/run-integration-tests.sh | 12 ++++++++++-- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/packages/nextjs/playwright.config.ts b/packages/nextjs/playwright.config.ts index 917c05cb9ed3..97dfdd760da1 100644 --- a/packages/nextjs/playwright.config.ts +++ b/packages/nextjs/playwright.config.ts @@ -15,6 +15,8 @@ const config: PlaywrightTestConfig = { cwd: path.join(__dirname, 'test', 'integration'), command: 'yarn start', port: 3000, + stdout: 'pipe', + stderr: 'pipe', }, }; diff --git a/packages/nextjs/test/integration/next13.appdir.config.template b/packages/nextjs/test/integration/next13.appdir.config.template index 815eba98e889..e9e4e4e04b2e 100644 --- a/packages/nextjs/test/integration/next13.appdir.config.template +++ b/packages/nextjs/test/integration/next13.appdir.config.template @@ -4,6 +4,9 @@ const moduleExports = { eslint: { ignoreDuringBuilds: true, }, + experimental: { + appDir: Number(process.env.NODE_MAJOR) >= 16, // experimental.appDir requires Node v16.8.0 or later. + }, pageExtensions: ['jsx', 'js', 'tsx', 'ts', 'page.tsx'], }; diff --git a/packages/nextjs/test/integration/package.json b/packages/nextjs/test/integration/package.json index fc93bd5681e4..9ff4e10eae8c 100644 --- a/packages/nextjs/test/integration/package.json +++ b/packages/nextjs/test/integration/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@sentry/nextjs": "file:../../", - "next": "latest", + "next": "13.2.0", "react": "^18.2.0", "react-dom": "^18.2.0" }, diff --git a/packages/nextjs/test/run-integration-tests.sh b/packages/nextjs/test/run-integration-tests.sh index 834bd34d659b..4c336b4ee53f 100755 --- a/packages/nextjs/test/run-integration-tests.sh +++ b/packages/nextjs/test/run-integration-tests.sh @@ -55,13 +55,21 @@ for NEXTJS_VERSION in 13; do rm -rf node_modules .next .env.local 2>/dev/null || true echo "[nextjs@$NEXTJS_VERSION] Installing dependencies..." + + # Pin to a specific version + if [ "$NEXTJS_VERSION" -eq "13" ]; then + NEXTJS_PACKAGE_JSON_VERSION="13.2.0" + else + NEXTJS_PACKAGE_JSON_VERSION="$NEXTJS_VERSION.x" + fi + # set the desired version of next long enough to run yarn, and then restore the old version (doing the restoration now # rather than during overall cleanup lets us look for "latest" in every loop) cp package.json package.json.bak if [[ $(uname) == "Darwin" ]]; then - sed -i "" /"next.*latest"/s/latest/"${NEXTJS_VERSION}.x"/ package.json + sed -i "" /"next.*latest"/s/latest/"${NEXTJS_PACKAGE_JSON_VERSION}"/ package.json else - sed -i /"next.*latest"/s/latest/"${NEXTJS_VERSION}.x"/ package.json + sed -i /"next.*latest"/s/latest/"${NEXTJS_PACKAGE_JSON_VERSION}"/ package.json fi # Yarn install randomly started failing because it couldn't find some cache so for now we need to run these two commands which seem to fix it. From 864defc22cdd5cbdb6b4d5cfa96b43c2a9554664 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 15 Mar 2024 12:41:44 +0000 Subject: [PATCH 20/26] hell yea --- packages/nextjs/test/integration/{src => }/instrumentation.ts | 0 packages/nextjs/test/integration/next.config.js | 3 +++ 2 files changed, 3 insertions(+) rename packages/nextjs/test/integration/{src => }/instrumentation.ts (100%) diff --git a/packages/nextjs/test/integration/src/instrumentation.ts b/packages/nextjs/test/integration/instrumentation.ts similarity index 100% rename from packages/nextjs/test/integration/src/instrumentation.ts rename to packages/nextjs/test/integration/instrumentation.ts diff --git a/packages/nextjs/test/integration/next.config.js b/packages/nextjs/test/integration/next.config.js index 815eba98e889..e9e4e4e04b2e 100644 --- a/packages/nextjs/test/integration/next.config.js +++ b/packages/nextjs/test/integration/next.config.js @@ -4,6 +4,9 @@ const moduleExports = { eslint: { ignoreDuringBuilds: true, }, + experimental: { + appDir: Number(process.env.NODE_MAJOR) >= 16, // experimental.appDir requires Node v16.8.0 or later. + }, pageExtensions: ['jsx', 'js', 'tsx', 'ts', 'page.tsx'], }; From d7c866910f59a462da9545e67c36605bc9b8dec1 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 15 Mar 2024 12:49:55 +0000 Subject: [PATCH 21/26] . --- packages/nextjs/test/run-integration-tests.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/nextjs/test/run-integration-tests.sh b/packages/nextjs/test/run-integration-tests.sh index 4c336b4ee53f..17e8ace8f446 100755 --- a/packages/nextjs/test/run-integration-tests.sh +++ b/packages/nextjs/test/run-integration-tests.sh @@ -45,12 +45,6 @@ for NEXTJS_VERSION in 13; do export NODE_MAJOR=$NODE_MAJOR export USE_APPDIR=$USE_APPDIR - # Next.js v13 requires at least Node v16 - if [ "$NODE_MAJOR" -lt "16" ] && [ "$NEXTJS_VERSION" -ge "13" ]; then - echo "[nextjs@$NEXTJS_VERSION] Not compatible with Node $NODE_MAJOR" - exit 0 - fi - echo "[nextjs@$NEXTJS_VERSION] Preparing environment..." rm -rf node_modules .next .env.local 2>/dev/null || true From e48c81d6189691f5abc0a45e88d4a5059578b945 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 15 Mar 2024 14:04:04 +0000 Subject: [PATCH 22/26] . --- packages/nextjs/src/config/withSentryConfig.ts | 2 +- packages/nextjs/test/integration/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nextjs/src/config/withSentryConfig.ts b/packages/nextjs/src/config/withSentryConfig.ts index 47dba4af93bb..0d68448f81ba 100644 --- a/packages/nextjs/src/config/withSentryConfig.ts +++ b/packages/nextjs/src/config/withSentryConfig.ts @@ -74,7 +74,7 @@ function getFinalConfigObject( if (incomingUserNextConfigObject.experimental?.instrumentationHook === false) { // eslint-disable-next-line no-console console.warn( - '[@sentry/nextjs] You turned off the `instrumentationHook` option. Note that Sentry will not be initialized if you set it up inside `instrumentation.ts`.', + '[@sentry/nextjs] You turned off the `instrumentationHook` option. Note that Sentry will not be initialized if you did not set it up inside `instrumentation.ts`.', ); } incomingUserNextConfigObject.experimental = { diff --git a/packages/nextjs/test/integration/package.json b/packages/nextjs/test/integration/package.json index 9ff4e10eae8c..fc93bd5681e4 100644 --- a/packages/nextjs/test/integration/package.json +++ b/packages/nextjs/test/integration/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@sentry/nextjs": "file:../../", - "next": "13.2.0", + "next": "latest", "react": "^18.2.0", "react-dom": "^18.2.0" }, From 752580fb630ef5e939273b41294ce455ba2c1085 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Mon, 18 Mar 2024 10:13:08 +0000 Subject: [PATCH 23/26] fix tests --- MIGRATION.md | 5 ++ .../nextjs/test/config/wrappingLoader.test.ts | 1 - .../test/integration/instrumentation.ts | 9 ---- .../nextjs/test/integration/next-env.d.ts | 1 - .../test/server/tracingWithSentryAPI.test.ts | 50 +++++++++---------- .../integration/test/server/utils/helpers.ts | 10 ++++ 6 files changed, 40 insertions(+), 36 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index fcd2077f4e4f..f1e8540eb110 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -750,6 +750,11 @@ The following is an example of how to initialize the serverside SDK in a Next.js Note that you can initialize the SDK differently depending on which server runtime is being used. +If you are using a +[Next.js custom server](https://nextjs.org/docs/pages/building-your-application/configuring/custom-server), the +`instrumentation.ts` hook is not called by Next.js so you need to manually call it yourself from within your server +code. It is recommended to do so as early as possible in your application lifecycle. + **Why are we making this change?** The very simple reason is that Next.js requires us to set up OpenTelemetry instrumentation inside the `register` function of the instrumentation hook. Looking a little bit further into the future, we also would like the Sentry SDK to be compatible with [Turbopack](https://turbo.build/pack), which is gonna be diff --git a/packages/nextjs/test/config/wrappingLoader.test.ts b/packages/nextjs/test/config/wrappingLoader.test.ts index eec179725e74..4458a9ce16b6 100644 --- a/packages/nextjs/test/config/wrappingLoader.test.ts +++ b/packages/nextjs/test/config/wrappingLoader.test.ts @@ -86,7 +86,6 @@ describe('wrappingLoader', () => { pageExtensionRegex: DEFAULT_PAGE_EXTENSION_REGEX, excludeServerRoutes: [], wrappingTargetKind: 'api-route', - sentryConfigFilePath: '/my/sentry.server.config.ts', vercelCronsConfig: undefined, nextjsRequestAsyncStorageModulePath: '/my/request-async-storage.js', }; diff --git a/packages/nextjs/test/integration/instrumentation.ts b/packages/nextjs/test/integration/instrumentation.ts index 8431f792e7af..b2ea76760101 100644 --- a/packages/nextjs/test/integration/instrumentation.ts +++ b/packages/nextjs/test/integration/instrumentation.ts @@ -19,13 +19,4 @@ export function register() { ], }); } - - if (process.env.NEXT_RUNTIME === 'edge') { - Sentry.init({ - dsn: 'https://public@dsn.ingest.sentry.io/1337', - tracesSampleRate: 1.0, - tracePropagationTargets: ['http://example.com'], - debug: !!process.env.SDK_DEBUG, - }); - } } diff --git a/packages/nextjs/test/integration/next-env.d.ts b/packages/nextjs/test/integration/next-env.d.ts index fd36f9494e2c..4f11a03dc6cc 100644 --- a/packages/nextjs/test/integration/next-env.d.ts +++ b/packages/nextjs/test/integration/next-env.d.ts @@ -1,6 +1,5 @@ /// /// -/// // NOTE: This file should not be edited // see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/packages/nextjs/test/integration/test/server/tracingWithSentryAPI.test.ts b/packages/nextjs/test/integration/test/server/tracingWithSentryAPI.test.ts index 73302842e15e..18be247b00b2 100644 --- a/packages/nextjs/test/integration/test/server/tracingWithSentryAPI.test.ts +++ b/packages/nextjs/test/integration/test/server/tracingWithSentryAPI.test.ts @@ -6,31 +6,31 @@ const cases = [ url: `/api/wrapApiHandlerWithSentry/unwrapped/noParams`, transactionName: '/api/wrapApiHandlerWithSentry/unwrapped/noParams', }, - { - name: 'unwrappedDynamicURL', - url: `/api/wrapApiHandlerWithSentry/unwrapped/dog`, - transactionName: '/api/wrapApiHandlerWithSentry/unwrapped/[animal]', - }, - { - name: 'unwrappedCatchAllURL', - url: `/api/wrapApiHandlerWithSentry/unwrapped/dog/facts`, - transactionName: '/api/wrapApiHandlerWithSentry/unwrapped/[...pathParts]', - }, - { - name: 'wrappedNoParamURL', - url: `/api/wrapApiHandlerWithSentry/wrapped/noParams`, - transactionName: '/api/wrapApiHandlerWithSentry/wrapped/noParams', - }, - { - name: 'wrappedDynamicURL', - url: `/api/wrapApiHandlerWithSentry/wrapped/dog`, - transactionName: '/api/wrapApiHandlerWithSentry/wrapped/[animal]', - }, - { - name: 'wrappedCatchAllURL', - url: `/api/wrapApiHandlerWithSentry/wrapped/dog/facts`, - transactionName: '/api/wrapApiHandlerWithSentry/wrapped/[...pathParts]', - }, + // { + // name: 'unwrappedDynamicURL', + // url: `/api/wrapApiHandlerWithSentry/unwrapped/dog`, + // transactionName: '/api/wrapApiHandlerWithSentry/unwrapped/[animal]', + // }, + // { + // name: 'unwrappedCatchAllURL', + // url: `/api/wrapApiHandlerWithSentry/unwrapped/dog/facts`, + // transactionName: '/api/wrapApiHandlerWithSentry/unwrapped/[...pathParts]', + // }, + // { + // name: 'wrappedNoParamURL', + // url: `/api/wrapApiHandlerWithSentry/wrapped/noParams`, + // transactionName: '/api/wrapApiHandlerWithSentry/wrapped/noParams', + // }, + // { + // name: 'wrappedDynamicURL', + // url: `/api/wrapApiHandlerWithSentry/wrapped/dog`, + // transactionName: '/api/wrapApiHandlerWithSentry/wrapped/[animal]', + // }, + // { + // name: 'wrappedCatchAllURL', + // url: `/api/wrapApiHandlerWithSentry/wrapped/dog/facts`, + // transactionName: '/api/wrapApiHandlerWithSentry/wrapped/[...pathParts]', + // }, ]; describe('getServerSideProps', () => { diff --git a/packages/nextjs/test/integration/test/server/utils/helpers.ts b/packages/nextjs/test/integration/test/server/utils/helpers.ts index 590590c8710d..badc22c18424 100644 --- a/packages/nextjs/test/integration/test/server/utils/helpers.ts +++ b/packages/nextjs/test/integration/test/server/utils/helpers.ts @@ -5,6 +5,9 @@ import * as path from 'path'; import { parse } from 'url'; import next from 'next'; import { TestEnv } from '../../../../../../../dev-packages/node-integration-tests/utils'; +import { register } from '../../../instrumentation'; + +let initializedSdk = false; // Type not exported from NextJS // @ts-expect-error @@ -40,6 +43,13 @@ export class NextTestEnv extends TestEnv { } public static async init(): Promise { + if (!initializedSdk) { + // Normally, Next.js calls the `register` hook by itself, but since we are using a custom server for the tests we need to do it manually. + process.env.NEXT_RUNTIME = 'nodejs'; + await register(); + initializedSdk = true; + } + const server = await createNextServer({ dev: false, dir: path.resolve(__dirname, '../../..'), From 9e4b8f320d3c4d8e7f49880dcfb2cfef13cf3035 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Mon, 18 Mar 2024 10:15:12 +0000 Subject: [PATCH 24/26] undeactivate tests --- .../test/server/tracingWithSentryAPI.test.ts | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/packages/nextjs/test/integration/test/server/tracingWithSentryAPI.test.ts b/packages/nextjs/test/integration/test/server/tracingWithSentryAPI.test.ts index 18be247b00b2..73302842e15e 100644 --- a/packages/nextjs/test/integration/test/server/tracingWithSentryAPI.test.ts +++ b/packages/nextjs/test/integration/test/server/tracingWithSentryAPI.test.ts @@ -6,31 +6,31 @@ const cases = [ url: `/api/wrapApiHandlerWithSentry/unwrapped/noParams`, transactionName: '/api/wrapApiHandlerWithSentry/unwrapped/noParams', }, - // { - // name: 'unwrappedDynamicURL', - // url: `/api/wrapApiHandlerWithSentry/unwrapped/dog`, - // transactionName: '/api/wrapApiHandlerWithSentry/unwrapped/[animal]', - // }, - // { - // name: 'unwrappedCatchAllURL', - // url: `/api/wrapApiHandlerWithSentry/unwrapped/dog/facts`, - // transactionName: '/api/wrapApiHandlerWithSentry/unwrapped/[...pathParts]', - // }, - // { - // name: 'wrappedNoParamURL', - // url: `/api/wrapApiHandlerWithSentry/wrapped/noParams`, - // transactionName: '/api/wrapApiHandlerWithSentry/wrapped/noParams', - // }, - // { - // name: 'wrappedDynamicURL', - // url: `/api/wrapApiHandlerWithSentry/wrapped/dog`, - // transactionName: '/api/wrapApiHandlerWithSentry/wrapped/[animal]', - // }, - // { - // name: 'wrappedCatchAllURL', - // url: `/api/wrapApiHandlerWithSentry/wrapped/dog/facts`, - // transactionName: '/api/wrapApiHandlerWithSentry/wrapped/[...pathParts]', - // }, + { + name: 'unwrappedDynamicURL', + url: `/api/wrapApiHandlerWithSentry/unwrapped/dog`, + transactionName: '/api/wrapApiHandlerWithSentry/unwrapped/[animal]', + }, + { + name: 'unwrappedCatchAllURL', + url: `/api/wrapApiHandlerWithSentry/unwrapped/dog/facts`, + transactionName: '/api/wrapApiHandlerWithSentry/unwrapped/[...pathParts]', + }, + { + name: 'wrappedNoParamURL', + url: `/api/wrapApiHandlerWithSentry/wrapped/noParams`, + transactionName: '/api/wrapApiHandlerWithSentry/wrapped/noParams', + }, + { + name: 'wrappedDynamicURL', + url: `/api/wrapApiHandlerWithSentry/wrapped/dog`, + transactionName: '/api/wrapApiHandlerWithSentry/wrapped/[animal]', + }, + { + name: 'wrappedCatchAllURL', + url: `/api/wrapApiHandlerWithSentry/wrapped/dog/facts`, + transactionName: '/api/wrapApiHandlerWithSentry/wrapped/[...pathParts]', + }, ]; describe('getServerSideProps', () => { From f169beae6bd59e2378e19c4fed95db48cfd5dfc5 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Mon, 18 Mar 2024 12:04:14 +0000 Subject: [PATCH 25/26] Update readme --- packages/nextjs/README.md | 47 +++++++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/packages/nextjs/README.md b/packages/nextjs/README.md index 119a591621df..c7afd15d46c5 100644 --- a/packages/nextjs/README.md +++ b/packages/nextjs/README.md @@ -17,35 +17,64 @@ ## Compatibility -Currently, the minimum Next.js supported version is `10.0.8`. +Currently, the minimum Next.js supported version is `11.2.0`. ## General This package is a wrapper around `@sentry/node` for the server and `@sentry/react` for the client, with added functionality related to Next.js. -To use this SDK, init it in the Sentry config files. +To use this SDK, initialize it in the Next.js configuration, in the `sentry.client.config.ts|js` file, and in the +[Next.js Instrumentation Hook](https://nextjs.org/docs/app/building-your-application/optimizing/instrumentation) +(`instrumentation.ts|js`). ```javascript -// sentry.client.config.js +// next.config.js + +const { withSentryConfig } = require('@sentry/nextjs'); + +const nextConfig = { + experimental: { + // The instrumentation hook is required for Sentry to work on the serverside + instrumentationHook: true, + }, +}; + +// Wrap the Next.js configuration with Sentry +module.exports = withSentryConfig(nextConfig); +``` + +```javascript +// sentry.client.config.js or .ts import * as Sentry from '@sentry/nextjs'; Sentry.init({ dsn: '__DSN__', - // ... + // Your Sentry configuration for the Browser... }); ``` ```javascript -// sentry.server.config.js +// instrumentation.ts import * as Sentry from '@sentry/nextjs'; -Sentry.init({ - dsn: '__DSN__', - // ... -}); +export function register() { + if (process.env.NEXT_RUNTIME === 'nodejs') { + Sentry.init({ + dsn: '__DSN__', + // Your Node.js Sentry configuration... + }); + } + + if (process.env.NEXT_RUNTIME === 'edge') { + Sentry.init({ + dsn: '__DSN__', + // Your Edge Runtime Sentry configuration... + }); + } +} ``` To set context information or send manual events, use the exported functions of `@sentry/nextjs`. From 5e2f44c27582d2f7e7134c74bce41a7f0741d878 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Mon, 18 Mar 2024 12:05:02 +0000 Subject: [PATCH 26/26] Be more clear that sentry.client.config.ts is still supported --- MIGRATION.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index 5847a8893725..deca88db2a7c 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -718,9 +718,9 @@ or look at the TypeScript type definitions of `withSentryConfig`. #### Updated the recommended way of calling `Sentry.init()` With version 8 of the SDK we will no longer support the use of `sentry.server.config.ts` and `sentry.edge.config.ts` -files (note that `sentry.client.config.ts` is still supported and encouraged). Instead, please initialize the Sentry -Next.js SDK for the serverside in a +files. Instead, please initialize the Sentry Next.js SDK for the serverside in a [Next.js instrumentation hook](https://nextjs.org/docs/app/building-your-application/optimizing/instrumentation). +**`sentry.client.config.ts|js` is still supported and encouraged for initializing the clientside SDK.** The following is an example of how to initialize the serverside SDK in a Next.js instrumentation hook: