From f378772b3d1e7a0dbb3807f9ff12a31c01b312b5 Mon Sep 17 00:00:00 2001 From: Billy Vong Date: Fri, 12 Jul 2024 11:14:30 -0230 Subject: [PATCH 01/53] feat(replay): Bump `rrweb` to 2.25.0 (#12478) * Uses clean `Array.from` implementation * Revert css parsing (player) * Implements multitouch gestures (player) * Many upstream fixes --- .size-limit.js | 2 +- .../canvas/manualSnapshot/template.html | 1 - .../replay/canvas/records/template.html | 1 - packages/replay-canvas/package.json | 2 +- packages/replay-internal/package.json | 4 +- packages/replay-internal/src/types/rrweb.ts | 5 ++- yarn.lock | 43 ++++++++++--------- 7 files changed, 30 insertions(+), 28 deletions(-) diff --git a/.size-limit.js b/.size-limit.js index a5ce210ef737..2e7899cb934a 100644 --- a/.size-limit.js +++ b/.size-limit.js @@ -177,7 +177,7 @@ module.exports = [ path: createCDNPath('bundle.tracing.replay.min.js'), gzip: false, brotli: false, - limit: '221 KB', + limit: '230 KB', }, { name: 'CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed', diff --git a/dev-packages/browser-integration-tests/suites/replay/canvas/manualSnapshot/template.html b/dev-packages/browser-integration-tests/suites/replay/canvas/manualSnapshot/template.html index 5f23d569fcc2..bd12f84b090a 100644 --- a/dev-packages/browser-integration-tests/suites/replay/canvas/manualSnapshot/template.html +++ b/dev-packages/browser-integration-tests/suites/replay/canvas/manualSnapshot/template.html @@ -13,7 +13,6 @@ function draw() { const canvas = document.getElementById("canvas"); if (canvas.getContext) { - console.log('has canvas') const ctx = canvas.getContext("2d"); ctx.fillRect(25, 25, 100, 100); diff --git a/dev-packages/browser-integration-tests/suites/replay/canvas/records/template.html b/dev-packages/browser-integration-tests/suites/replay/canvas/records/template.html index 5f23d569fcc2..bd12f84b090a 100644 --- a/dev-packages/browser-integration-tests/suites/replay/canvas/records/template.html +++ b/dev-packages/browser-integration-tests/suites/replay/canvas/records/template.html @@ -13,7 +13,6 @@ function draw() { const canvas = document.getElementById("canvas"); if (canvas.getContext) { - console.log('has canvas') const ctx = canvas.getContext("2d"); ctx.fillRect(25, 25, 100, 100); diff --git a/packages/replay-canvas/package.json b/packages/replay-canvas/package.json index 9d0bdb6eac50..2af80dec1c27 100644 --- a/packages/replay-canvas/package.json +++ b/packages/replay-canvas/package.json @@ -66,7 +66,7 @@ "homepage": "https://docs.sentry.io/platforms/javascript/session-replay/", "devDependencies": { "@babel/core": "^7.17.5", - "@sentry-internal/rrweb": "2.15.0" + "@sentry-internal/rrweb": "2.25.0" }, "dependencies": { "@sentry-internal/replay": "8.17.0", diff --git a/packages/replay-internal/package.json b/packages/replay-internal/package.json index 1ac8466f0e90..bc05dfb4ea80 100644 --- a/packages/replay-internal/package.json +++ b/packages/replay-internal/package.json @@ -69,8 +69,8 @@ "devDependencies": { "@babel/core": "^7.17.5", "@sentry-internal/replay-worker": "8.17.0", - "@sentry-internal/rrweb": "2.15.0", - "@sentry-internal/rrweb-snapshot": "2.15.0", + "@sentry-internal/rrweb": "2.25.0", + "@sentry-internal/rrweb-snapshot": "2.25.0", "fflate": "^0.8.1", "jest-matcher-utils": "^29.0.0", "jsdom-worker": "^0.2.1" diff --git a/packages/replay-internal/src/types/rrweb.ts b/packages/replay-internal/src/types/rrweb.ts index a490a6e46c1b..cb194e193a5d 100644 --- a/packages/replay-internal/src/types/rrweb.ts +++ b/packages/replay-internal/src/types/rrweb.ts @@ -31,7 +31,7 @@ export type ReplayEventWithTime = { /** * This is a partial copy of rrweb's recording options which only contains the properties - * we specifically us in the SDK. Users can specify additional properties, hence we add the + * we specifically use in the SDK. Users can specify additional properties, hence we add the * Record union type. */ export type RrwebRecordOptions = { @@ -52,6 +52,9 @@ export interface CanvasManagerInterface { lock(): void; unlock(): void; snapshot(): void; + addWindow(win: typeof globalThis & Window): void; + addShadowRoot(shadowRoot: ShadowRoot): void; + resetShadowRoots(): void; } export interface CanvasManagerOptions { diff --git a/yarn.lock b/yarn.lock index 1319545eda21..7cb6273253bc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8055,22 +8055,22 @@ dependencies: "@sentry-internal/rrweb-snapshot" "2.11.0" -"@sentry-internal/rrdom@2.15.0": - version "2.15.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/rrdom/-/rrdom-2.15.0.tgz#1ac070a7a00664b2c5351c8ba13979369024128a" - integrity sha512-LDy2LbmEytIuV9vKTr2dK4iMCTTFTpNW/eJ6IoapB0syYBc4yuUsbH39s/gamxcR5Y7KjkySSh0XkMnCHyV5gg== +"@sentry-internal/rrdom@2.25.0": + version "2.25.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/rrdom/-/rrdom-2.25.0.tgz#4be842f7f4efae383bbd5a9dcbbecc212d378d70" + integrity sha512-YTxGHnCdv6D2JVJ6YFezMsGOHLy7CM8x8qMaY3Yh3QTubFOjdGpcGJGITF/9Lkx+rFVCTdjL32cQu9NUgEJO8g== dependencies: - "@sentry-internal/rrweb-snapshot" "2.15.0" + "@sentry-internal/rrweb-snapshot" "2.25.0" "@sentry-internal/rrweb-snapshot@2.11.0": version "2.11.0" resolved "https://registry.yarnpkg.com/@sentry-internal/rrweb-snapshot/-/rrweb-snapshot-2.11.0.tgz#1af79130604afea989d325465b209ac015b27c9a" integrity sha512-1nP22QlplMNooSNvTh+L30NSZ+E3UcfaJyxXSMLxUjQHTGPyM1VkndxZMmxlKhyR5X+rLbxi/+RvuAcpM43VoA== -"@sentry-internal/rrweb-snapshot@2.15.0": - version "2.15.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/rrweb-snapshot/-/rrweb-snapshot-2.15.0.tgz#04c79d3dc723ed80e4f10685d5ebc6c1b90fcf1b" - integrity sha512-g/gqzKab6lQ/YvioIXVWQTaQXrUctepqIgXP7vYvpnU+ZmxmsOVd10gQuryDCSLYt2wQiwkffYyeaP2BVqxbwQ== +"@sentry-internal/rrweb-snapshot@2.25.0": + version "2.25.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/rrweb-snapshot/-/rrweb-snapshot-2.25.0.tgz#f20bd20436edac24ed1075b47fc4773894739d97" + integrity sha512-7j90eSGFRS1YWcuo0bXPtV9oDdCQxutilyYbim/I09GA7kx4/d8OG8ryxQl6WWXW+E50x6dEpDsZXWMPkSleEg== "@sentry-internal/rrweb-types@2.11.0": version "2.11.0" @@ -8079,12 +8079,13 @@ dependencies: "@sentry-internal/rrweb-snapshot" "2.11.0" -"@sentry-internal/rrweb-types@2.15.0": - version "2.15.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/rrweb-types/-/rrweb-types-2.15.0.tgz#caeabffc227405110946447f30893aa037493b23" - integrity sha512-D3i9+G4h6gLlG/B1lkP3jc3pM84hP2d2WFGrapTBI0bJou822ERD3Wj9KBVPEkwsRM+qDZRqRMrq0PicdAqJAA== +"@sentry-internal/rrweb-types@2.25.0": + version "2.25.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/rrweb-types/-/rrweb-types-2.25.0.tgz#61662befc57ed7054a491eb35ad3deda7d66157c" + integrity sha512-sM2YdevhIRxQ/Kr89cfbNBO7/EFhycTmQT0NKg4owdKkIvuuqz1AhbRpMMdpJ4NJnos+h06VPObeXm6rcrffsw== dependencies: - "@sentry-internal/rrweb-snapshot" "2.15.0" + "@sentry-internal/rrweb-snapshot" "2.25.0" + "@types/css-font-loading-module" "0.0.7" "@sentry-internal/rrweb@2.11.0": version "2.11.0" @@ -8100,14 +8101,14 @@ fflate "^0.4.4" mitt "^3.0.0" -"@sentry-internal/rrweb@2.15.0": - version "2.15.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/rrweb/-/rrweb-2.15.0.tgz#a38dff464624c7ab421579b5ec626007e10c9da8" - integrity sha512-WO2QJJMJYVcuc8aq6j4YEzNo512FZ2Ro7/04Ip1MYhPI4BpHhn3KI7lRoHvprZeVNYWXyBtiPy7JFehuVCppdw== +"@sentry-internal/rrweb@2.25.0": + version "2.25.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/rrweb/-/rrweb-2.25.0.tgz#0148f1904f1e9549f2c2cae209fe3d3fe891d3ec" + integrity sha512-0tgBI0CFpyO3Z3dw4IjS/D6AnQypro4dquRrcZZzqnMH65Vxw3yytGDtmvE/FzHzGC0vmKFTM+sTkzFY0bo+Bg== dependencies: - "@sentry-internal/rrdom" "2.15.0" - "@sentry-internal/rrweb-snapshot" "2.15.0" - "@sentry-internal/rrweb-types" "2.15.0" + "@sentry-internal/rrdom" "2.25.0" + "@sentry-internal/rrweb-snapshot" "2.25.0" + "@sentry-internal/rrweb-types" "2.25.0" "@types/css-font-loading-module" "0.0.7" "@xstate/fsm" "^1.4.0" base64-arraybuffer "^1.0.1" From 9c92ece0a4a594afa3673f1759f0dc1feb55f004 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Fri, 12 Jul 2024 16:28:25 +0200 Subject: [PATCH 02/53] ref(e2e-tests): Make `startCommand` optional in shared playwright config (#12842) Not all our e2e tests require a `startCommand` as we sometimes directly invoke an application from within tests. For example in our AWS lambda e2e tests. This PR makes the `startCommand` option optional so that we can avoid a larger override of the entire `webServer` playwright config object. --- .../aws-lambda-layer-cjs/playwright.config.ts | 80 +------------------ .../aws-serverless-esm/playwright.config.ts | 26 +----- dev-packages/test-utils/.eslintrc.js | 9 ++- .../test-utils/src/playwright-config.ts | 35 ++++---- 4 files changed, 31 insertions(+), 119 deletions(-) diff --git a/dev-packages/e2e-tests/test-applications/aws-lambda-layer-cjs/playwright.config.ts b/dev-packages/e2e-tests/test-applications/aws-lambda-layer-cjs/playwright.config.ts index 7b14daadc6d1..174593c307df 100644 --- a/dev-packages/e2e-tests/test-applications/aws-lambda-layer-cjs/playwright.config.ts +++ b/dev-packages/e2e-tests/test-applications/aws-lambda-layer-cjs/playwright.config.ts @@ -1,79 +1,3 @@ -import type { PlaywrightTestConfig } from '@playwright/test'; -import { devices } from '@playwright/test'; +import { getPlaywrightConfig } from '@sentry-internal/test-utils'; -// Fix urls not resolving to localhost on Node v17+ -// See: https://github.com/axios/axios/issues/3821#issuecomment-1413727575 -import { setDefaultResultOrder } from 'dns'; -setDefaultResultOrder('ipv4first'); - -const eventProxyPort = 3031; -const lambdaPort = 3030; - -/** - * See https://playwright.dev/docs/test-configuration. - */ -const config: PlaywrightTestConfig = { - testDir: './tests', - /* Maximum time one test can run for. */ - timeout: 150_000, - expect: { - /** - * Maximum time expect() should wait for the condition to be met. - * For example in `await expect(locator).toHaveText();` - */ - timeout: 5000, - }, - /* Run tests in files in parallel */ - fullyParallel: true, - /* Fail the build on CI if you accidentally left test.only in the source code. */ - forbidOnly: !!process.env.CI, - /* Retry on CI only */ - retries: 0, - /* Reporter to use. See https://playwright.dev/docs/test-reporters */ - reporter: 'list', - /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ - use: { - /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ - actionTimeout: 0, - - /* Base URL to use in actions like `await page.goto('/')`. */ - baseURL: `http://localhost:${lambdaPort}`, - - /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ - trace: 'on-first-retry', - }, - - /* Configure projects for major browsers */ - projects: [ - { - name: 'chromium', - use: { - ...devices['Desktop Chrome'], - }, - }, - // For now we only test Chrome! - // { - // name: 'firefox', - // use: { - // ...devices['Desktop Firefox'], - // }, - // }, - // { - // name: 'webkit', - // use: { - // ...devices['Desktop Safari'], - // }, - // }, - ], - - /* Run your local dev server before starting the tests */ - webServer: [ - { - command: `node start-event-proxy.mjs && pnpm wait-port ${eventProxyPort}`, - port: eventProxyPort, - stdout: 'pipe', - }, - ], -}; - -export default config; +export default getPlaywrightConfig(); diff --git a/dev-packages/e2e-tests/test-applications/aws-serverless-esm/playwright.config.ts b/dev-packages/e2e-tests/test-applications/aws-serverless-esm/playwright.config.ts index 9b4853af2033..174593c307df 100644 --- a/dev-packages/e2e-tests/test-applications/aws-serverless-esm/playwright.config.ts +++ b/dev-packages/e2e-tests/test-applications/aws-serverless-esm/playwright.config.ts @@ -1,27 +1,3 @@ import { getPlaywrightConfig } from '@sentry-internal/test-utils'; -// Fix urls not resolving to localhost on Node v17+ -// See: https://github.com/axios/axios/issues/3821#issuecomment-1413727575 -import { setDefaultResultOrder } from 'dns'; -setDefaultResultOrder('ipv4first'); - -const eventProxyPort = 3031; - -/** - * See https://playwright.dev/docs/test-configuration. - */ -const config = getPlaywrightConfig( - { startCommand: '' }, - { - /* Run your local dev server before starting the tests */ - webServer: [ - { - command: `node start-event-proxy.mjs && pnpm wait-port ${eventProxyPort}`, - port: eventProxyPort, - stdout: 'pipe', - }, - ], - }, -); - -export default config; +export default getPlaywrightConfig(); diff --git a/dev-packages/test-utils/.eslintrc.js b/dev-packages/test-utils/.eslintrc.js index 175b9389af00..98318aea5c41 100644 --- a/dev-packages/test-utils/.eslintrc.js +++ b/dev-packages/test-utils/.eslintrc.js @@ -3,5 +3,12 @@ module.exports = { node: true, }, extends: ['../../.eslintrc.js'], - overrides: [], + overrides: [ + { + files: ['**/*.ts'], + rules: { + '@sentry-internal/sdk/no-optional-chaining': 'off', + }, + }, + ], }; diff --git a/dev-packages/test-utils/src/playwright-config.ts b/dev-packages/test-utils/src/playwright-config.ts index 33de29f5a7fc..a48ca969ad06 100644 --- a/dev-packages/test-utils/src/playwright-config.ts +++ b/dev-packages/test-utils/src/playwright-config.ts @@ -2,8 +2,8 @@ import type { PlaywrightTestConfig } from '@playwright/test'; /** Get a playwright config to use in an E2E test app. */ export function getPlaywrightConfig( - options: { - startCommand: string; + options?: { + startCommand?: string; port?: number; eventProxyPort?: number; eventProxyFile?: string; @@ -11,10 +11,10 @@ export function getPlaywrightConfig( overwriteConfig?: Partial, ): PlaywrightTestConfig { const testEnv = process.env['TEST_ENV'] || 'production'; - const appPort = options.port || 3030; - const eventProxyPort = options.eventProxyPort || 3031; - const eventProxyFile = options.eventProxyFile || 'start-event-proxy.mjs'; - const { startCommand } = options; + const appPort = options?.port || 3030; + const eventProxyPort = options?.eventProxyPort || 3031; + const eventProxyFile = options?.eventProxyFile || 'start-event-proxy.mjs'; + const startCommand = options?.startCommand; /** * See https://playwright.dev/docs/test-configuration. @@ -76,18 +76,23 @@ export function getPlaywrightConfig( stdout: 'pipe', stderr: 'pipe', }, - { - command: startCommand, - port: appPort, - stdout: 'pipe', - stderr: 'pipe', - env: { - PORT: appPort.toString(), - }, - }, ], }; + if (startCommand) { + // @ts-expect-error - we set `config.webserver` to an array above. + // TS just can't infer that and thinks it could also be undefined or an object. + config.webServer.push({ + command: startCommand, + port: appPort, + stdout: 'pipe', + stderr: 'pipe', + env: { + PORT: appPort.toString(), + }, + }); + } + return { ...config, ...overwriteConfig, From 673addc5d111b5ae27778df3ef1a2a5259059865 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Fri, 12 Jul 2024 10:29:37 -0400 Subject: [PATCH 03/53] docs: Add apollo integration to migration docs (#12889) resolves https://github.com/getsentry/sentry-javascript/issues/12887 --- MIGRATION.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/MIGRATION.md b/MIGRATION.md index 172d6cb433f3..88235b6fd235 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -711,6 +711,7 @@ Removed top-level exports: `enableAnrDetection`, `Anr`, `deepReadDirSync`, `runW - [Removal of `enableAnrDetection` and `Anr` class](./MIGRATION.md#removal-of-enableanrdetection-and-anr-class) - [Removal of `deepReadDirSync` method](./MIGRATION.md#removal-of-deepreaddirsync-method) - [Removal of `runWithAsyncContext` method](./MIGRATION.md#removal-of-runwithasynccontext-method) +- [Removal of `Apollo` integration](./MIGRATION.md#removal-of-apollo-integration) #### Removal of `enableAnrDetection` and `Anr` class @@ -737,6 +738,21 @@ Sentry.withIsolationScope(() => { }); ``` +#### Removal of Apollo integration + +The Apollo integration has been removed in `8.x` as `8.x` automatically adds GraphQL support via `graphqlIntegration` +which is automatically enabled. + +```js +// before (v7) +Sentry.init({ + integrations: [Sentry.integrations.Apollo()], +}); + +// after (v8) +Sentry.init({}); +``` + ### Next.js SDK Removed top-level exports: `withSentryApi`, `withSentryAPI`, `withSentryGetServerSideProps`, `withSentryGetStaticProps`, From 289d06977eda4ba64cc3390ed3af9f400e40467f Mon Sep 17 00:00:00 2001 From: Jonas Date: Fri, 12 Jul 2024 14:32:22 -0400 Subject: [PATCH 04/53] chore: add python version requirement to contributing doc (#12901) Adding a note here too as first time users are likely to be following this doc when they see the build fail due to python version incompatibility --- CONTRIBUTING.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 215527c16495..b74d59693a18 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -40,6 +40,9 @@ able to use it. From the top level of the repo, there are three commands availab dependencies (`utils`, `core`, `browser`, etc), and all packages which depend on it (currently `gatsby` and `nextjs`)) - `yarn build:dev:watch`, which runs `yarn build:dev` in watch mode (recommended) +Note: Due to package incompatibilities between Python versions, building native binaries currently requires a Python +version <3.12. + You can also run a production build via `yarn build`, which will build everything except for the tarballs for publishing to NPM. You can use this if you want to bundle Sentry yourself. The build output can be found in the packages `build/` folder, e.g. `packages/browser/build`. Bundled files can be found in `packages/browser/build/bundles`. Note that there From eaf605550d643ede07bcbfb943210f15d943ca98 Mon Sep 17 00:00:00 2001 From: Jonas Date: Fri, 12 Jul 2024 14:33:32 -0400 Subject: [PATCH 05/53] docs(profiling-node): add detailed docs on how to build bindings (#12900) Add better build docs on how to build profiling binaries from source #12899 --- packages/profiling-node/README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/packages/profiling-node/README.md b/packages/profiling-node/README.md index 7203752643ed..4357e23bb194 100644 --- a/packages/profiling-node/README.md +++ b/packages/profiling-node/README.md @@ -56,6 +56,8 @@ there is a fairly good chance this will work out of the box. The required packag **Windows:** If you are building on windows, you may need to install windows-build-tools +**_Python:_** Python 3.12 is not supported yet so you will need a version of python that is lower than 3.12 + ```bash # using yarn package manager @@ -64,6 +66,22 @@ yarn global add windows-build-tools npm i -g windows-build-tools ``` +After you have installed the toolchain, you should be able to build the binaries from source + +```bash +# configure node-gyp using yarn +yarn build:bindings:configure +# or using npm +npm run build:bindings:configure + +# compile the binaries using yarn +yarn build:bindings +# or using npm +npm run build:bindings +``` + +After the binaries are built, you should see them inside the profiling-node/lib folder. + ### Prebuilt binaries We currently ship prebuilt binaries for a few of the most common platforms and node versions (v16-22). From 616915b7aeeeb08f66024a940d88a64e241cb4ad Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Mon, 15 Jul 2024 10:38:52 +0200 Subject: [PATCH 06/53] ref: Deprecate `enableTracing` (#12897) --- CHANGELOG.md | 9 +++++++++ packages/core/src/utils/hasTracingEnabled.ts | 1 + packages/node/src/sdk/index.ts | 1 + packages/types/src/options.ts | 6 +++++- 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68d01cdce384..6fd671757241 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,15 @@ - "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott +### Important Changes + +- **ref: Deprecate `enableTracing` (12897)** + +The `enableTracing` option has been deprecated and will be removed in the next major version. We recommend removing it +in favor of the `tracesSampleRate` and `tracesSampler` options. If you want to enable performance monitoring, please set +the `tracesSampleRate` to a sample rate of your choice, or provide a sampling function as `tracesSampler` option +instead. If you wan't to disable performance monitoring, remove the `tracesSampler` and `tracesSampleRate` options. + Work in this release was contributed by @GitSquared. Thank you for your contribution! ## 8.17.0 diff --git a/packages/core/src/utils/hasTracingEnabled.ts b/packages/core/src/utils/hasTracingEnabled.ts index 97463d9d5e5e..5e673bc08caa 100644 --- a/packages/core/src/utils/hasTracingEnabled.ts +++ b/packages/core/src/utils/hasTracingEnabled.ts @@ -17,6 +17,7 @@ export function hasTracingEnabled( } const options = maybeOptions || getClientOptions(); + // eslint-disable-next-line deprecation/deprecation return !!options && (options.enableTracing || 'tracesSampleRate' in options || 'tracesSampler' in options); } diff --git a/packages/node/src/sdk/index.ts b/packages/node/src/sdk/index.ts index 2ac62a2b5b91..0fb7774827f9 100644 --- a/packages/node/src/sdk/index.ts +++ b/packages/node/src/sdk/index.ts @@ -92,6 +92,7 @@ function shouldAddPerformanceIntegrations(options: Options): boolean { } // We want to ensure `tracesSampleRate` is not just undefined/null here + // eslint-disable-next-line deprecation/deprecation return options.enableTracing || options.tracesSampleRate != null || 'tracesSampler' in options; } diff --git a/packages/types/src/options.ts b/packages/types/src/options.ts index 8b2dbebdd574..d6c407d60bd0 100644 --- a/packages/types/src/options.ts +++ b/packages/types/src/options.ts @@ -89,9 +89,13 @@ export interface ClientOptions Date: Mon, 15 Jul 2024 10:39:20 +0200 Subject: [PATCH 07/53] ref(core): Small bundle size improvement (#12830) --- packages/core/src/integrations/metadata.ts | 2 +- packages/core/src/integrations/third-party-errors-filter.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/integrations/metadata.ts b/packages/core/src/integrations/metadata.ts index 48fa23d6b6ab..0bf11746dc1b 100644 --- a/packages/core/src/integrations/metadata.ts +++ b/packages/core/src/integrations/metadata.ts @@ -33,7 +33,7 @@ export const moduleMetadataIntegration = defineIntegration(() => { client.on('applyFrameMetadata', event => { // Only apply stack frame metadata to error events - if (event.type !== undefined) { + if (event.type) { return; } diff --git a/packages/core/src/integrations/third-party-errors-filter.ts b/packages/core/src/integrations/third-party-errors-filter.ts index 1f1887604866..652ca23a6da6 100644 --- a/packages/core/src/integrations/third-party-errors-filter.ts +++ b/packages/core/src/integrations/third-party-errors-filter.ts @@ -56,7 +56,7 @@ export const thirdPartyErrorFilterIntegration = defineIntegration((options: Opti client.on('applyFrameMetadata', event => { // Only apply stack frame metadata to error events - if (event.type !== undefined) { + if (event.type) { return; } From b538f8979318eb1f49f5d040826764677405d876 Mon Sep 17 00:00:00 2001 From: Tim Fish Date: Mon, 15 Jul 2024 14:02:29 +0200 Subject: [PATCH 08/53] docs(node): Update Node `README.md` (#12916) --- packages/node/README.md | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/packages/node/README.md b/packages/node/README.md index 20fe8cc175c3..6471538fb4f0 100644 --- a/packages/node/README.md +++ b/packages/node/README.md @@ -21,6 +21,11 @@ yarn add @sentry/node ## Usage +Sentry should be initialized as early in your app as possible. It is essential that you call `Sentry.init` before you +require any other modules in your application, otherwise auto-instrumentation of these modules will **not** work. + +You need to create a file named `instrument.js` that imports and initializes Sentry: + ```js // CJS Syntax const Sentry = require('@sentry/node'); @@ -33,26 +38,39 @@ Sentry.init({ }); ``` -Note that it is necessary to initialize Sentry **before you import any package that may be instrumented by us**. +You need to require or import the `instrument.js` file before importing any other modules in your application. This is +necessary to ensure that Sentry can automatically instrument all modules in your application: + +```js +// Import this first! +import './instrument'; + +// Now import other modules +import http from 'http'; -[More information on how to set up Sentry for Node in v8.](https://github.com/getsentry/sentry-javascript/blob/develop/docs/v8-node.md) +// Your application code goes here +``` ### ESM Support -Due to the way OpenTelemetry handles instrumentation, this only works out of the box for CommonJS (`require`) -applications. +When running your application in ESM mode, you should use the Node.js +[`--import`](https://nodejs.org/api/cli.html#--importmodule) command line option to ensure that Sentry is loaded before +the application code is evaluated. -There is experimental support for running OpenTelemetry with ESM (`"type": "module"`): +Adjust the Node.js call for your application to use the `--import` parameter and point it at `instrument.js`, which +contains your `Sentry.init`() code: ```bash -node --experimental-loader=@opentelemetry/instrumentation/hook.mjs ./app.js +# Note: This is only available for Node v18.19.0 onwards. +node --import ./instrument.mjs app.mjs ``` -You'll need to install `@opentelemetry/instrumentation` in your app to ensure this works. +If it is not possible for you to pass the `--import` flag to the Node.js binary, you can alternatively use the +`NODE_OPTIONS` environment variable as follows: -See -[OpenTelemetry Instrumentation Docs](https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation#instrumentation-for-es-modules-in-nodejs-experimental) -for details on this - but note that this is a) experimental, and b) does not work with all integrations. +```bash +NODE_OPTIONS="--import ./instrument.mjs" npm run start +``` ## Links From 05b2754b28bbfc122d8e5897ce42d9531457a570 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Mon, 15 Jul 2024 14:19:46 +0200 Subject: [PATCH 09/53] ci: Fix canary test implosion (#12915) --- .github/workflows/canary.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index 9dcbd43e5547..42c1594ebc5b 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -18,6 +18,7 @@ env: ${{ github.workspace }}/node_modules ${{ github.workspace }}/packages/*/node_modules ${{ github.workspace }}/dev-packages/*/node_modules + ${{ github.workspace }}/packages/utils/build permissions: contents: read From 1d3e2087c8ea64d0439c3d558b8284d046cdce66 Mon Sep 17 00:00:00 2001 From: Tim Fish Date: Mon, 15 Jul 2024 17:21:43 +0200 Subject: [PATCH 10/53] feat: Expose `exclude` and `include` options for ESM loader (#12910) Closes #12878 I added this feature to `import-in-the-middle` which was released in v1.9.0: - https://github.com/nodejs/import-in-the-middle/pull/124 This PR changes the hook from `@opentelemetry/instrumentation/hook.mjs` to `import-in-the-middle/hook.mjs` as it was only pasing though anyway and the otel hook doesn't pass the `initialize` export. --- packages/node/src/sdk/index.ts | 2 +- packages/node/src/sdk/initOtel.ts | 5 +++-- packages/node/src/types.ts | 18 ++++++++++++++++-- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/packages/node/src/sdk/index.ts b/packages/node/src/sdk/index.ts index 0fb7774827f9..7dd145854993 100644 --- a/packages/node/src/sdk/index.ts +++ b/packages/node/src/sdk/index.ts @@ -132,7 +132,7 @@ function _init( } if (!isCjs() && options.registerEsmLoaderHooks !== false) { - maybeInitializeEsmLoader(); + maybeInitializeEsmLoader(options.registerEsmLoaderHooks === true ? undefined : options.registerEsmLoaderHooks); } setOpenTelemetryContextAsyncContextStrategy(); diff --git a/packages/node/src/sdk/initOtel.ts b/packages/node/src/sdk/initOtel.ts index 47c8879ae3e9..947486ba26cb 100644 --- a/packages/node/src/sdk/initOtel.ts +++ b/packages/node/src/sdk/initOtel.ts @@ -13,6 +13,7 @@ import { GLOBAL_OBJ, consoleSandbox, logger } from '@sentry/utils'; import { getOpenTelemetryInstrumentationToPreload } from '../integrations/tracing'; import { SentryContextManager } from '../otel/contextManager'; +import type { EsmLoaderHookOptions } from '../types'; import { isCjs } from '../utils/commonjs'; import type { NodeClient } from './client'; @@ -31,7 +32,7 @@ export function initOpenTelemetry(client: NodeClient): void { } /** Initialize the ESM loader. */ -export function maybeInitializeEsmLoader(): void { +export function maybeInitializeEsmLoader(esmHookConfig?: EsmLoaderHookOptions): void { const [nodeMajor = 0, nodeMinor = 0] = process.versions.node.split('.').map(Number); // Register hook was added in v20.6.0 and v18.19.0 @@ -43,7 +44,7 @@ export function maybeInitializeEsmLoader(): void { if (!GLOBAL_OBJ._sentryEsmLoaderHookRegistered && importMetaUrl) { try { // @ts-expect-error register is available in these versions - moduleModule.register('@opentelemetry/instrumentation/hook.mjs', importMetaUrl); + moduleModule.register('import-in-the-middle/hook.mjs', importMetaUrl, { data: esmHookConfig }); GLOBAL_OBJ._sentryEsmLoaderHookRegistered = true; } catch (error) { logger.warn('Failed to register ESM hook', error); diff --git a/packages/node/src/types.ts b/packages/node/src/types.ts index 882114a013f9..9cf3047e6c0a 100644 --- a/packages/node/src/types.ts +++ b/packages/node/src/types.ts @@ -4,6 +4,11 @@ import type { ClientOptions, Options, SamplingContext, Scope, Span, TracePropaga import type { NodeTransportOptions } from './transports'; +export interface EsmLoaderHookOptions { + include?: string[]; + exclude?: string[]; +} + export interface BaseNodeOptions { /** * List of strings/regex controlling to which outgoing requests @@ -87,13 +92,22 @@ export interface BaseNodeOptions { /** * Whether to register ESM loader hooks to automatically instrument libraries. - * This is necessary to auto instrument libraries that are loaded via ESM imports, but might it can cause issues + * This is necessary to auto instrument libraries that are loaded via ESM imports, but it can cause issues * with certain libraries. If you run into problems running your app with this enabled, * please raise an issue in https://github.com/getsentry/sentry-javascript. * + * You can optionally exclude specific modules or only include specific modules from being instrumented by providing + * an object with `include` or `exclude` properties. + * + * ```js + * registerEsmLoaderHooks: { + * exclude: ['openai'], + * } + * ``` + * * Defaults to `true`. */ - registerEsmLoaderHooks?: boolean; + registerEsmLoaderHooks?: boolean | EsmLoaderHookOptions; /** Callback that is executed when a fatal global error occurs. */ onFatalError?(this: void, error: Error): void; From 383743a8e7150d6f68913b439c3eba8c5cf8874d Mon Sep 17 00:00:00 2001 From: Andrei <168741329+andreiborza@users.noreply.github.com> Date: Mon, 15 Jul 2024 17:22:38 +0200 Subject: [PATCH 11/53] fix(solidstart): Set proper sentry origin for solid router integration when used in solidstart sdk (#12919) The `@sentry/solid/solidrouter` integration is used within the solid start sdk as well, so we need a way to update the `sentry.origin` for navigation spans to be for the correct framework. I opted to read this out of the sdk metadata instead of exposing extra api surface and passing it through several levels. --- .../solidstart/tests/performance.client.test.ts | 6 +++--- packages/solid/src/solidrouter.ts | 9 ++++++++- packages/solid/test/solidrouter.test.tsx | 5 +++++ packages/solidstart/test/client/solidrouter.test.tsx | 9 +++++++-- 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/dev-packages/e2e-tests/test-applications/solidstart/tests/performance.client.test.ts b/dev-packages/e2e-tests/test-applications/solidstart/tests/performance.client.test.ts index 17e57ba47d8d..6e5f43e016c8 100644 --- a/dev-packages/e2e-tests/test-applications/solidstart/tests/performance.client.test.ts +++ b/dev-packages/e2e-tests/test-applications/solidstart/tests/performance.client.test.ts @@ -36,7 +36,7 @@ test('sends a navigation transaction', async ({ page }) => { contexts: { trace: { op: 'navigation', - origin: 'auto.navigation.solid.solidrouter', + origin: 'auto.navigation.solidstart.solidrouter', }, }, transaction: '/users/5', @@ -62,7 +62,7 @@ test('updates the transaction when using the back button', async ({ page }) => { contexts: { trace: { op: 'navigation', - origin: 'auto.navigation.solid.solidrouter', + origin: 'auto.navigation.solidstart.solidrouter', }, }, transaction: '/users/6', @@ -82,7 +82,7 @@ test('updates the transaction when using the back button', async ({ page }) => { contexts: { trace: { op: 'navigation', - origin: 'auto.navigation.solid.solidrouter', + origin: 'auto.navigation.solidstart.solidrouter', }, }, transaction: '/', diff --git a/packages/solid/src/solidrouter.ts b/packages/solid/src/solidrouter.ts index 2f343cfe9d7c..da0391dea35e 100644 --- a/packages/solid/src/solidrouter.ts +++ b/packages/solid/src/solidrouter.ts @@ -33,11 +33,18 @@ function handleNavigation(location: string): void { return; } + // The solid router integration will be used for both solid and solid start. + // To avoid increasing the api surface with internal properties, we look at + // the sdk metadata. + const metaData = client.getSdkMetadata(); + const { name } = (metaData && metaData.sdk) || {}; + const framework = name && name.includes('solidstart') ? 'solidstart' : 'solid'; + startBrowserTracingNavigationSpan(client, { name: location, attributes: { [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'navigation', - [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.solid.solidrouter', + [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: `auto.navigation.${framework}.solidrouter`, [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url', }, }); diff --git a/packages/solid/test/solidrouter.test.tsx b/packages/solid/test/solidrouter.test.tsx index 029b90794b70..44268e6716ab 100644 --- a/packages/solid/test/solidrouter.test.tsx +++ b/packages/solid/test/solidrouter.test.tsx @@ -44,6 +44,11 @@ describe('solidRouterBrowserTracingIntegration', () => { tracesSampleRate: 1, transport: () => createTransport({ recordDroppedEvent: () => undefined }, _ => Promise.resolve({})), stackParser: () => [], + _metadata: { + sdk: { + name: 'sentry.javascript.solid', + }, + }, }); } diff --git a/packages/solidstart/test/client/solidrouter.test.tsx b/packages/solidstart/test/client/solidrouter.test.tsx index d6b161c3a7d9..681b8d7b5ce7 100644 --- a/packages/solidstart/test/client/solidrouter.test.tsx +++ b/packages/solidstart/test/client/solidrouter.test.tsx @@ -44,6 +44,11 @@ describe('solidRouterBrowserTracingIntegration', () => { tracesSampleRate: 1, transport: () => createTransport({ recordDroppedEvent: () => undefined }, _ => Promise.resolve({})), stackParser: () => [], + _metadata: { + sdk: { + name: 'sentry.javascript.solidstart', + }, + }, }); } @@ -138,7 +143,7 @@ describe('solidRouterBrowserTracingIntegration', () => { data: expect.objectContaining({ [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url', [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'navigation', - [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.solid.solidrouter', + [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.solidstart.solidrouter', }), }), ); @@ -170,7 +175,7 @@ describe('solidRouterBrowserTracingIntegration', () => { data: expect.objectContaining({ [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url', [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'navigation', - [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.solid.solidrouter', + [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.solidstart.solidrouter', }), }), ); From f9ab13848b3c50bd144b096f0261a1c3e1c5b226 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Tue, 16 Jul 2024 09:46:50 +0200 Subject: [PATCH 12/53] ci: Do not run external contributor job for bots (#12886) While we specifically ignored dependabot, we did not ignore github bot. So now, just generally skipping this for any bot users. --- .github/workflows/external-contributors.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/external-contributors.yml b/.github/workflows/external-contributors.yml index 0feac33e1307..50acb2be8e73 100644 --- a/.github/workflows/external-contributors.yml +++ b/.github/workflows/external-contributors.yml @@ -18,7 +18,7 @@ jobs: && github.event.pull_request.author_association != 'COLLABORATOR' && github.event.pull_request.author_association != 'MEMBER' && github.event.pull_request.author_association != 'OWNER' - && github.actor != 'dependabot[bot]' + && endsWith(github.actor, '[bot]') == false steps: - uses: actions/checkout@v4 - name: Set up Node From 9d1b35d4c62f9ad299790f549344c756951b36f1 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Tue, 16 Jul 2024 12:43:32 +0200 Subject: [PATCH 13/53] feat(browser): Add user agent to INP standalone span attributes (#12896) Add the `window.navigator.userAgent` string as the [`user_agent.original`](https://opentelemetry.io/docs/specs/semconv/attributes-registry/user-agent/) attribute to INP standalone spans. --- .../suites/tracing/metrics/web-vitals-inp-late/test.ts | 1 + .../tracing/metrics/web-vitals-inp-parametrized-late/test.ts | 1 + .../tracing/metrics/web-vitals-inp-parametrized/test.ts | 1 + .../suites/tracing/metrics/web-vitals-inp/test.ts | 1 + .../create-remix-app/tests/client-inp.test.ts | 4 ++++ .../test-applications/react-17/tests/transactions.test.ts | 1 + .../react-router-6/tests/transactions.test.ts | 1 + packages/browser-utils/src/metrics/inp.ts | 4 ++++ 8 files changed, 14 insertions(+) diff --git a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-late/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-late/test.ts index 1ec7ec50998a..1b6bc5bc686d 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-late/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-late/test.ts @@ -77,6 +77,7 @@ sentryTest('should capture an INP click event span after pageload', async ({ bro 'sentry.sample_rate': 1, 'sentry.source': 'custom', transaction: 'test-url', + 'user_agent.original': expect.stringContaining('Chrome'), }, measurements: { inp: { diff --git a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-parametrized-late/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-parametrized-late/test.ts index 1354c373253e..a9d5191b5cf3 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-parametrized-late/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-parametrized-late/test.ts @@ -80,6 +80,7 @@ sentryTest( 'sentry.sample_rate': 1, 'sentry.source': 'custom', transaction: 'test-route', + 'user_agent.original': expect.stringContaining('Chrome'), }, measurements: { inp: { diff --git a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-parametrized/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-parametrized/test.ts index 248cb7d1e510..87ba1fd8632c 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-parametrized/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-parametrized/test.ts @@ -76,6 +76,7 @@ sentryTest( 'sentry.op': 'ui.interaction.click', 'sentry.origin': 'auto.http.browser.inp', transaction: 'test-route', + 'user_agent.original': expect.stringContaining('Chrome'), }, measurements: { inp: { diff --git a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp/test.ts index 3f9684cf7f2a..594bd9904052 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp/test.ts @@ -77,6 +77,7 @@ sentryTest( 'sentry.op': 'ui.interaction.click', 'sentry.origin': 'auto.http.browser.inp', transaction: 'test-url', + 'user_agent.original': expect.stringContaining('Chrome'), }, measurements: { inp: { diff --git a/dev-packages/e2e-tests/test-applications/create-remix-app/tests/client-inp.test.ts b/dev-packages/e2e-tests/test-applications/create-remix-app/tests/client-inp.test.ts index 9469a4462563..8fe1993db3f8 100644 --- a/dev-packages/e2e-tests/test-applications/create-remix-app/tests/client-inp.test.ts +++ b/dev-packages/e2e-tests/test-applications/create-remix-app/tests/client-inp.test.ts @@ -30,6 +30,7 @@ test('sends an INP span during pageload', async ({ page }) => { 'sentry.sample_rate': 1, 'sentry.source': 'custom', replay_id: expect.any(String), + 'user_agent.original': expect.stringContaining('Chrome'), }, description: 'body > div > input#exception-button[type="button"]', op: 'ui.interaction.click', @@ -81,6 +82,7 @@ test('sends an INP span after pageload', async ({ page }) => { 'sentry.sample_rate': 1, 'sentry.source': 'custom', replay_id: expect.any(String), + 'user_agent.original': expect.stringContaining('Chrome'), }, description: 'body > div > input#exception-button[type="button"]', op: 'ui.interaction.click', @@ -125,6 +127,7 @@ test('sends an INP span during navigation', async ({ page }) => { transaction: 'routes/user.$id', 'sentry.exclusive_time': expect.any(Number), replay_id: expect.any(String), + 'user_agent.original': expect.stringContaining('Chrome'), }, description: '', op: 'ui.interaction.click', @@ -178,6 +181,7 @@ test('sends an INP span after navigation', async ({ page }) => { replay_id: expect.any(String), 'sentry.sample_rate': 1, 'sentry.source': 'custom', + 'user_agent.original': expect.stringContaining('Chrome'), }, description: '', op: 'ui.interaction.click', diff --git a/dev-packages/e2e-tests/test-applications/react-17/tests/transactions.test.ts b/dev-packages/e2e-tests/test-applications/react-17/tests/transactions.test.ts index 665b5c02aafe..3b9c5ab1fdaf 100644 --- a/dev-packages/e2e-tests/test-applications/react-17/tests/transactions.test.ts +++ b/dev-packages/e2e-tests/test-applications/react-17/tests/transactions.test.ts @@ -82,6 +82,7 @@ test('sends an INP span', async ({ page }) => { transaction: '/', 'sentry.exclusive_time': expect.any(Number), replay_id: expect.any(String), + 'user_agent.original': expect.stringContaining('Chrome'), }, description: 'body > div#root > input#exception-button[type="button"]', op: 'ui.interaction.click', diff --git a/dev-packages/e2e-tests/test-applications/react-router-6/tests/transactions.test.ts b/dev-packages/e2e-tests/test-applications/react-router-6/tests/transactions.test.ts index 39e07b89c0ee..3f108931b00e 100644 --- a/dev-packages/e2e-tests/test-applications/react-router-6/tests/transactions.test.ts +++ b/dev-packages/e2e-tests/test-applications/react-router-6/tests/transactions.test.ts @@ -82,6 +82,7 @@ test('sends an INP span', async ({ page }) => { transaction: '/', 'sentry.exclusive_time': expect.any(Number), replay_id: expect.any(String), + 'user_agent.original': expect.stringContaining('Chrome'), }, description: 'body > div#root > input#exception-button[type="button"]', op: 'ui.interaction.click', diff --git a/packages/browser-utils/src/metrics/inp.ts b/packages/browser-utils/src/metrics/inp.ts index 1055635bc32f..c4186a20f17e 100644 --- a/packages/browser-utils/src/metrics/inp.ts +++ b/packages/browser-utils/src/metrics/inp.ts @@ -12,6 +12,7 @@ import { } from '@sentry/core'; import type { Integration, Span, SpanAttributes } from '@sentry/types'; import { browserPerformanceTimeOrigin, dropUndefinedKeys, htmlTreeAsString } from '@sentry/utils'; +import { WINDOW } from '../types'; import { addInpInstrumentationHandler, addPerformanceInstrumentationHandler, @@ -129,6 +130,9 @@ function _trackINP(): () => void { user: userDisplay || undefined, profile_id: profileId || undefined, replay_id: replayId || undefined, + // INP score calculation in the sentry backend relies on the user agent + // to account for different INP values being reported from different browsers + 'user_agent.original': WINDOW.navigator && WINDOW.navigator.userAgent, }); const span = startInactiveSpan({ From 475d66f29fc87282110fb256c69b77740dd36c7d Mon Sep 17 00:00:00 2001 From: Michael Cousins Date: Tue, 16 Jul 2024 07:43:52 -0400 Subject: [PATCH 14/53] fix(sveltekit): Add Vite peer dep for proper type resolution (#12926) Add a simple, optional peer dependency on Vite to `@sentry/sveltekit` to ensure that it picks up whatever version of Vite is being used in the specific package it's installed in. This is necessary because `pnpm` otherwise could resolve the `vite` import to a wrong version, especially in monorepo environments --- packages/sveltekit/package.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/sveltekit/package.json b/packages/sveltekit/package.json index cbf009831ef0..d2edf5487ed2 100644 --- a/packages/sveltekit/package.json +++ b/packages/sveltekit/package.json @@ -31,7 +31,13 @@ "access": "public" }, "peerDependencies": { - "@sveltejs/kit": "1.x || 2.x" + "@sveltejs/kit": "1.x || 2.x", + "vite": "*" + }, + "peerDependenciesMeta": { + "vite": { + "optional": true + } }, "dependencies": { "@sentry/core": "8.17.0", From 707afd6ad16d72ebc3f575bf7822bbc088738445 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Tue, 16 Jul 2024 13:47:47 +0200 Subject: [PATCH 15/53] fix(tracing): Ensure you can pass `null` as `parentSpan` in `startSpan*` (#12928) Noticed this while writing docs, this makes this a bit harder to understand. With this change you can say that `parentSpan` behaves the same and accepts the same as `withActiveSpan`. See https://github.com/getsentry/sentry-docs/pull/10729 --- packages/core/src/tracing/trace.ts | 6 ++-- packages/core/test/lib/tracing/trace.test.ts | 25 +++++++++++++++ packages/opentelemetry/src/trace.ts | 4 +-- packages/opentelemetry/test/trace.test.ts | 32 ++++++++++++++++++++ packages/types/src/startSpanOptions.ts | 3 +- 5 files changed, 64 insertions(+), 6 deletions(-) diff --git a/packages/core/src/tracing/trace.ts b/packages/core/src/tracing/trace.ts index cdb2efd7221c..0cb98082c590 100644 --- a/packages/core/src/tracing/trace.ts +++ b/packages/core/src/tracing/trace.ts @@ -157,7 +157,7 @@ export function startInactiveSpan(options: StartSpanOptions): Span { // If `options.parentSpan` is defined, we want to wrap the callback in `withActiveSpan` const wrapper = options.scope ? (callback: () => Span) => withScope(options.scope, callback) - : customParentSpan + : customParentSpan !== undefined ? (callback: () => Span) => withActiveSpan(customParentSpan, callback) : (callback: () => Span) => callback(); @@ -445,8 +445,8 @@ function getParentSpan(scope: Scope): SentrySpan | undefined { return span; } -function getActiveSpanWrapper(parentSpan?: Span): (callback: () => T) => T { - return parentSpan +function getActiveSpanWrapper(parentSpan: Span | undefined | null): (callback: () => T) => T { + return parentSpan !== undefined ? (callback: () => T) => { return withActiveSpan(parentSpan, callback); } diff --git a/packages/core/test/lib/tracing/trace.test.ts b/packages/core/test/lib/tracing/trace.test.ts index 33b8e0572835..fe58ce6f9f7d 100644 --- a/packages/core/test/lib/tracing/trace.test.ts +++ b/packages/core/test/lib/tracing/trace.test.ts @@ -282,6 +282,14 @@ describe('startSpan', () => { expect(getActiveSpan()).toBe(undefined); }); + it('allows to pass parentSpan=null', () => { + startSpan({ name: 'GET users/[id]' }, () => { + startSpan({ name: 'GET users/[id]', parentSpan: null }, span => { + expect(spanToJSON(span).parent_span_id).toBe(undefined); + }); + }); + }); + it('allows to force a transaction with forceTransaction=true', async () => { const options = getDefaultTestClientOptions({ tracesSampleRate: 1.0 }); client = new TestClient(options); @@ -693,6 +701,15 @@ describe('startSpanManual', () => { expect(getActiveSpan()).toBe(undefined); }); + it('allows to pass parentSpan=null', () => { + startSpan({ name: 'GET users/[id]' }, () => { + startSpanManual({ name: 'child', parentSpan: null }, span => { + expect(spanToJSON(span).parent_span_id).toBe(undefined); + span.end(); + }); + }); + }); + it('allows to force a transaction with forceTransaction=true', async () => { const options = getDefaultTestClientOptions({ tracesSampleRate: 1.0 }); client = new TestClient(options); @@ -1014,6 +1031,14 @@ describe('startInactiveSpan', () => { expect(getActiveSpan()).toBeUndefined(); }); + it('allows to pass parentSpan=null', () => { + startSpan({ name: 'outer' }, () => { + const span = startInactiveSpan({ name: 'GET users/[id]', parentSpan: null }); + expect(spanToJSON(span).parent_span_id).toBe(undefined); + span.end(); + }); + }); + it('allows to force a transaction with forceTransaction=true', async () => { const options = getDefaultTestClientOptions({ tracesSampleRate: 1.0 }); client = new TestClient(options); diff --git a/packages/opentelemetry/src/trace.ts b/packages/opentelemetry/src/trace.ts index 5ea5381a2db3..6f9fe5dad6d1 100644 --- a/packages/opentelemetry/src/trace.ts +++ b/packages/opentelemetry/src/trace.ts @@ -286,8 +286,8 @@ export function continueTrace(options: Parameters[0 }); } -function getActiveSpanWrapper(parentSpan?: Span | SentrySpan): (callback: () => T) => T { - return parentSpan +function getActiveSpanWrapper(parentSpan: Span | SentrySpan | undefined | null): (callback: () => T) => T { + return parentSpan !== undefined ? (callback: () => T) => { // We cast this, because the OTEL Span has a few more methods than our Span interface // TODO: Add these missing methods to the Span interface diff --git a/packages/opentelemetry/test/trace.test.ts b/packages/opentelemetry/test/trace.test.ts index d3ac52327bb6..2332fd1ced05 100644 --- a/packages/opentelemetry/test/trace.test.ts +++ b/packages/opentelemetry/test/trace.test.ts @@ -325,6 +325,16 @@ describe('trace', () => { expect(getActiveSpan()).toBe(undefined); }); + it('allows to pass parentSpan=null', () => { + startSpan({ name: 'GET users/[id' }, () => { + startSpan({ name: 'child', parentSpan: null }, span => { + // Due to the way we propagate the scope in OTEL, + // the parent_span_id is not actually undefined here, but comes from the propagation context + expect(spanToJSON(span).parent_span_id).toBe(getCurrentScope().getPropagationContext().spanId); + }); + }); + }); + it('allows to force a transaction with forceTransaction=true', async () => { const client = getClient()!; const transactionEvents: Event[] = []; @@ -577,6 +587,17 @@ describe('trace', () => { expect(getActiveSpan()).toBe(undefined); }); + it('allows to pass parentSpan=null', () => { + startSpan({ name: 'outer' }, () => { + const span = startInactiveSpan({ name: 'test span', parentSpan: null }); + + // Due to the way we propagate the scope in OTEL, + // the parent_span_id is not actually undefined here, but comes from the propagation context + expect(spanToJSON(span).parent_span_id).toBe(getCurrentScope().getPropagationContext().spanId); + span.end(); + }); + }); + it('allows to force a transaction with forceTransaction=true', async () => { const client = getClient()!; const transactionEvents: Event[] = []; @@ -856,6 +877,17 @@ describe('trace', () => { expect(getActiveSpan()).toBe(undefined); }); + it('allows to pass parentSpan=null', () => { + startSpan({ name: 'outer' }, () => { + startSpanManual({ name: 'GET users/[id]', parentSpan: null }, span => { + // Due to the way we propagate the scope in OTEL, + // the parent_span_id is not actually undefined here, but comes from the propagation context + expect(spanToJSON(span).parent_span_id).toBe(getCurrentScope().getPropagationContext().spanId); + span.end(); + }); + }); + }); + it('allows to force a transaction with forceTransaction=true', async () => { const client = getClient()!; const transactionEvents: Event[] = []; diff --git a/packages/types/src/startSpanOptions.ts b/packages/types/src/startSpanOptions.ts index 89e523f6c922..35d5326e32f3 100644 --- a/packages/types/src/startSpanOptions.ts +++ b/packages/types/src/startSpanOptions.ts @@ -20,8 +20,9 @@ export interface StartSpanOptions { /** * If provided, make the new span a child of this span. * If this is not provided, the new span will be a child of the currently active span. + * If this is set to `null`, the new span will have no parent span. */ - parentSpan?: Span; + parentSpan?: Span | null; /** * If set to true, this span will be forced to be treated as a transaction in the Sentry UI, if possible and applicable. From 6f4c0452f213ac263787727437efd38846c0505c Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Tue, 16 Jul 2024 13:56:55 +0200 Subject: [PATCH 16/53] fix(node): Ensure correct URL is passed to `ignoreIncomingRequests` callback (#12929) Fix an oversight in our Node `httpIntegration`. It looks like we assumed that the `request` object being passed to `ignoreIncomingRequestHook` and `ignoreOutgoingRequestHook` was of the same type. However, it's not: - `request` is of type `IncomingMessage` in `ignoreIncomingRequestHook` - `request` is of type `RequestOptions` in `ignoreOutgoingRequestHook` fix the bug by simply taking the request.url property instead and adds integration tests to properly test the two options. --- .../node-integration-tests/src/index.ts | 10 +++- .../server-ignoreIncomingRequests.js | 38 +++++++++++++ .../server-ignoreOutgoingRequests.js | 42 ++++++++++++++ .../suites/tracing/httpIntegration/test.ts | 55 +++++++++++++++++++ packages/node/src/integrations/http.ts | 14 ++++- 5 files changed, 153 insertions(+), 6 deletions(-) create mode 100644 dev-packages/node-integration-tests/suites/tracing/httpIntegration/server-ignoreIncomingRequests.js create mode 100644 dev-packages/node-integration-tests/suites/tracing/httpIntegration/server-ignoreOutgoingRequests.js diff --git a/dev-packages/node-integration-tests/src/index.ts b/dev-packages/node-integration-tests/src/index.ts index 08afc11fe7ea..4bd0a9ccce25 100644 --- a/dev-packages/node-integration-tests/src/index.ts +++ b/dev-packages/node-integration-tests/src/index.ts @@ -20,13 +20,17 @@ export function loggingTransport(_options: BaseTransportOptions): Transport { /** * Starts an express server and sends the port to the runner + * @param app Express app + * @param port Port to start the app on. USE WITH CAUTION! By default a random port will be chosen. + * Setting this port to something specific is useful for local debugging but dangerous for + * CI/CD environments where port collisions can cause flakes! */ -export function startExpressServerAndSendPortToRunner(app: Express): void { - const server = app.listen(0, () => { +export function startExpressServerAndSendPortToRunner(app: Express, port: number | undefined = undefined): void { + const server = app.listen(port || 0, () => { const address = server.address() as AddressInfo; // eslint-disable-next-line no-console - console.log(`{"port":${address.port}}`); + console.log(`{"port":${port || address.port}}`); }); } diff --git a/dev-packages/node-integration-tests/suites/tracing/httpIntegration/server-ignoreIncomingRequests.js b/dev-packages/node-integration-tests/suites/tracing/httpIntegration/server-ignoreIncomingRequests.js new file mode 100644 index 000000000000..f1e5d9870fcf --- /dev/null +++ b/dev-packages/node-integration-tests/suites/tracing/httpIntegration/server-ignoreIncomingRequests.js @@ -0,0 +1,38 @@ +const { loggingTransport } = require('@sentry-internal/node-integration-tests'); +const Sentry = require('@sentry/node'); + +Sentry.init({ + dsn: 'https://public@dsn.ingest.sentry.io/1337', + release: '1.0', + tracesSampleRate: 1.0, + transport: loggingTransport, + + integrations: [ + Sentry.httpIntegration({ + ignoreIncomingRequests: url => { + return url.includes('/liveness'); + }, + }), + ], +}); + +// express must be required after Sentry is initialized +const express = require('express'); +const cors = require('cors'); +const { startExpressServerAndSendPortToRunner } = require('@sentry-internal/node-integration-tests'); + +const app = express(); + +app.use(cors()); + +app.get('/test', (_req, res) => { + res.send({ response: 'response 1' }); +}); + +app.get('/liveness', (_req, res) => { + res.send({ response: 'liveness' }); +}); + +Sentry.setupExpressErrorHandler(app); + +startExpressServerAndSendPortToRunner(app); diff --git a/dev-packages/node-integration-tests/suites/tracing/httpIntegration/server-ignoreOutgoingRequests.js b/dev-packages/node-integration-tests/suites/tracing/httpIntegration/server-ignoreOutgoingRequests.js new file mode 100644 index 000000000000..ce520c999259 --- /dev/null +++ b/dev-packages/node-integration-tests/suites/tracing/httpIntegration/server-ignoreOutgoingRequests.js @@ -0,0 +1,42 @@ +const { loggingTransport } = require('@sentry-internal/node-integration-tests'); +const Sentry = require('@sentry/node'); +const http = require('http'); + +Sentry.init({ + dsn: 'https://public@dsn.ingest.sentry.io/1337', + release: '1.0', + tracesSampleRate: 1.0, + transport: loggingTransport, + + integrations: [ + Sentry.httpIntegration({ + ignoreOutgoingRequests: url => { + return url.includes('example.com'); + }, + }), + ], +}); + +// express must be required after Sentry is initialized +const express = require('express'); +const cors = require('cors'); +const { startExpressServerAndSendPortToRunner } = require('@sentry-internal/node-integration-tests'); + +const app = express(); + +app.use(cors()); + +app.get('/test', (_req, response) => { + http + .request('http://example.com/', res => { + res.on('data', () => {}); + res.on('end', () => { + response.send({ response: 'done' }); + }); + }) + .end(); +}); + +Sentry.setupExpressErrorHandler(app); + +startExpressServerAndSendPortToRunner(app); diff --git a/dev-packages/node-integration-tests/suites/tracing/httpIntegration/test.ts b/dev-packages/node-integration-tests/suites/tracing/httpIntegration/test.ts index 6be5d36e2ee3..aebe0dd676ba 100644 --- a/dev-packages/node-integration-tests/suites/tracing/httpIntegration/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/httpIntegration/test.ts @@ -75,4 +75,59 @@ describe('httpIntegration', () => { .start(done) .makeRequest('get', '/test'); }); + + test("doesn't create a root span for incoming requests ignored via `ignoreIncomingRequests`", done => { + const runner = createRunner(__dirname, 'server-ignoreIncomingRequests.js') + .expect({ + transaction: { + contexts: { + trace: { + span_id: expect.any(String), + trace_id: expect.any(String), + data: { + url: expect.stringMatching(/\/test$/), + 'http.response.status_code': 200, + }, + op: 'http.server', + status: 'ok', + }, + }, + transaction: 'GET /test', + }, + }) + .start(done); + + runner.makeRequest('get', '/liveness'); // should be ignored + runner.makeRequest('get', '/test'); + }); + + test("doesn't create child spans for outgoing requests ignored via `ignoreOutgoingRequests`", done => { + const runner = createRunner(__dirname, 'server-ignoreOutgoingRequests.js') + .expect({ + transaction: { + contexts: { + trace: { + span_id: expect.any(String), + trace_id: expect.any(String), + data: { + url: expect.stringMatching(/\/test$/), + 'http.response.status_code': 200, + }, + op: 'http.server', + status: 'ok', + }, + }, + transaction: 'GET /test', + spans: [ + expect.objectContaining({ op: 'middleware.express', description: 'query' }), + expect.objectContaining({ op: 'middleware.express', description: 'expressInit' }), + expect.objectContaining({ op: 'middleware.express', description: 'corsMiddleware' }), + expect.objectContaining({ op: 'request_handler.express', description: '/test' }), + ], + }, + }) + .start(done); + + runner.makeRequest('get', '/test'); + }); }); diff --git a/packages/node/src/integrations/http.ts b/packages/node/src/integrations/http.ts index 418fa8aa7853..632b6023e7a3 100644 --- a/packages/node/src/integrations/http.ts +++ b/packages/node/src/integrations/http.ts @@ -34,14 +34,20 @@ interface HttpOptions { /** * Do not capture spans or breadcrumbs for outgoing HTTP requests to URLs where the given callback returns `true`. * This controls both span & breadcrumb creation - spans will be non recording if tracing is disabled. + * + * The `url` param contains the entire URL, including query string (if any), protocol, host, etc. of the outgoing request. + * For example: `'https://someService.com/users/details?id=123'` */ ignoreOutgoingRequests?: (url: string) => boolean; /** * Do not capture spans or breadcrumbs for incoming HTTP requests to URLs where the given callback returns `true`. * This controls both span & breadcrumb creation - spans will be non recording if tracing is disabled. + * + * The `urlPath` param consists of the URL path and query string (if any) of the incoming request. + * For example: `'/users/details?id=123'` */ - ignoreIncomingRequests?: (url: string) => boolean; + ignoreIncomingRequests?: (urlPath: string) => boolean; /** * Additional instrumentation options that are passed to the underlying HttpInstrumentation. @@ -103,7 +109,9 @@ export const instrumentHttp = Object.assign( }, ignoreIncomingRequestHook: request => { - const url = getRequestUrl(request); + // request.url is the only property that holds any information about the url + // it only consists of the URL path and query string (if any) + const urlPath = request.url; const method = request.method?.toUpperCase(); // We do not capture OPTIONS/HEAD requests as transactions @@ -112,7 +120,7 @@ export const instrumentHttp = Object.assign( } const _ignoreIncomingRequests = _httpOptions.ignoreIncomingRequests; - if (_ignoreIncomingRequests && _ignoreIncomingRequests(url)) { + if (urlPath && _ignoreIncomingRequests && _ignoreIncomingRequests(urlPath)) { return true; } From 54a889e13100e10c6b164b9acdb835f15f4ebe74 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Tue, 16 Jul 2024 14:21:47 +0200 Subject: [PATCH 17/53] ci: Fix nextjs-15 canary tests (#12918) --- .../test-applications/nextjs-15/package.json | 2 +- .../nextjs-15/tests/nested-rsc-error.test.ts | 11 +++++++++++ .../nextjs-15/tests/streaming-rsc-error.test.ts | 11 +++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/dev-packages/e2e-tests/test-applications/nextjs-15/package.json b/dev-packages/e2e-tests/test-applications/nextjs-15/package.json index 4c3f56b0aa0c..265ee010b8d5 100644 --- a/dev-packages/e2e-tests/test-applications/nextjs-15/package.json +++ b/dev-packages/e2e-tests/test-applications/nextjs-15/package.json @@ -8,7 +8,7 @@ "test:prod": "TEST_ENV=production __NEXT_EXPERIMENTAL_INSTRUMENTATION=1 playwright test", "test:dev": "TEST_ENV=development __NEXT_EXPERIMENTAL_INSTRUMENTATION=1 playwright test", "test:build": "pnpm install && npx playwright install && pnpm build", - "test:build-canary": "pnpm install && pnpm add next@rc && pnpm add react@beta && pnpm add react-dom@beta && npx playwright install && pnpm build", + "test:build-canary": "pnpm install && pnpm add next@canary && pnpm add react@beta && pnpm add react-dom@beta && npx playwright install && pnpm build", "test:build-latest": "pnpm install && pnpm add next@rc && pnpm add react@beta && pnpm add react-dom@beta && npx playwright install && pnpm build", "test:assert": "pnpm test:prod && pnpm test:dev" }, diff --git a/dev-packages/e2e-tests/test-applications/nextjs-15/tests/nested-rsc-error.test.ts b/dev-packages/e2e-tests/test-applications/nextjs-15/tests/nested-rsc-error.test.ts index 223da5b245e9..863e5de111a2 100644 --- a/dev-packages/e2e-tests/test-applications/nextjs-15/tests/nested-rsc-error.test.ts +++ b/dev-packages/e2e-tests/test-applications/nextjs-15/tests/nested-rsc-error.test.ts @@ -1,9 +1,20 @@ import { expect, test } from '@playwright/test'; import { waitForError, waitForTransaction } from '@sentry-internal/test-utils'; +const packageJson = require('../package.json'); + test('Should capture errors from nested server components when `Sentry.captureRequestError` is added to the `onRequestError` hook', async ({ page, }) => { + const [, minor, patch, canary] = packageJson.dependencies.next.split('.'); + + test.skip( + minor === '0' && + patch.startsWith('0-') && + ((patch.includes('canary') && Number(canary) < 63) || patch.includes('rc')), + 'Next.js version does not expose these errors', + ); + const errorEventPromise = waitForError('nextjs-15', errorEvent => { return !!errorEvent?.exception?.values?.some(value => value.value === 'I am technically uncatchable'); }); diff --git a/dev-packages/e2e-tests/test-applications/nextjs-15/tests/streaming-rsc-error.test.ts b/dev-packages/e2e-tests/test-applications/nextjs-15/tests/streaming-rsc-error.test.ts index b50e9688861e..0a20e97be74a 100644 --- a/dev-packages/e2e-tests/test-applications/nextjs-15/tests/streaming-rsc-error.test.ts +++ b/dev-packages/e2e-tests/test-applications/nextjs-15/tests/streaming-rsc-error.test.ts @@ -1,9 +1,20 @@ import { expect, test } from '@playwright/test'; import { waitForError, waitForTransaction } from '@sentry-internal/test-utils'; +const packageJson = require('../package.json'); + test('Should capture errors for crashing streaming promises in server components when `Sentry.captureRequestError` is added to the `onRequestError` hook', async ({ page, }) => { + const [, minor, patch, canary] = packageJson.dependencies.next.split('.'); + + test.skip( + minor === '0' && + patch.startsWith('0-') && + ((patch.includes('canary') && Number(canary) < 63) || patch.includes('rc')), + 'Next.js version does not expose these errors', + ); + const errorEventPromise = waitForError('nextjs-15', errorEvent => { return !!errorEvent?.exception?.values?.some(value => value.value === 'I am a data streaming error'); }); From c57e363e23840a54eab796cdc016d912cb8256bf Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Tue, 16 Jul 2024 14:03:25 +0200 Subject: [PATCH 18/53] meta: Update CHANGELOG for 8.18.0 --- CHANGELOG.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fd671757241..392564b0c24e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ - "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott +## 8.18.0 + ### Important Changes - **ref: Deprecate `enableTracing` (12897)** @@ -15,9 +17,28 @@ The `enableTracing` option has been deprecated and will be removed in the next major version. We recommend removing it in favor of the `tracesSampleRate` and `tracesSampler` options. If you want to enable performance monitoring, please set the `tracesSampleRate` to a sample rate of your choice, or provide a sampling function as `tracesSampler` option -instead. If you wan't to disable performance monitoring, remove the `tracesSampler` and `tracesSampleRate` options. +instead. If you want to disable performance monitoring, remove the `tracesSampler` and `tracesSampleRate` options. + +### Other Changes -Work in this release was contributed by @GitSquared. Thank you for your contribution! +- feat(node): Expose `exclude` and `include` options for ESM loader (#12910) +- feat(browser): Add user agent to INP standalone span attributes (#12896) +- feat(nextjs): Add `experimental_captureRequestError` for `onRequestError` hook (#12885) +- feat(replay): Bump `rrweb` to 2.25.0 (#12478) +- feat(tracing): Add long animation frame tracing (#12646) +- fix: Cleanup hooks when they are not used anymore (#12852) +- fix(angular): Guard `ErrorEvent` check in ErrorHandler to avoid throwing in Node environments (#12892) +- fix(inp): Ensure INP spans have correct transaction (#12871) +- fix(nestjs): Do not make SentryTraced() decorated functions async (#12879) +- fix(nextjs): Support automatic instrumentation for app directory with custom page extensions (#12858) +- fix(node): Ensure correct URL is passed to `ignoreIncomingRequests` callback (#12929) +- fix(otel): Do not add `otel.kind: INTERNAL` attribute (#12841) +- fix(solidstart): Set proper sentry origin for solid router integration when used in solidstart sdk (#12919) +- fix(sveltekit): Add Vite peer dep for proper type resolution (#12926) +- fix(tracing): Ensure you can pass `null` as `parentSpan` in `startSpan*` (#12928) +- ref(core): Small bundle size improvement (#12830) + +Work in this release was contributed by @GitSquared and @mcous. Thank you for your contributions! ## 8.17.0 From c9ea6b89ba3547a67bf8d365edfe1e962fcf270e Mon Sep 17 00:00:00 2001 From: getsentry-bot Date: Tue, 16 Jul 2024 13:11:23 +0000 Subject: [PATCH 19/53] release: 8.18.0 --- .../browser-integration-tests/package.json | 4 ++-- .../bundle-analyzer-scenarios/package.json | 2 +- dev-packages/e2e-tests/package.json | 2 +- .../package.json | 2 +- .../node-integration-tests/package.json | 6 +++--- dev-packages/overhead-metrics/package.json | 2 +- dev-packages/rollup-utils/package.json | 2 +- dev-packages/size-limit-gh-action/package.json | 2 +- dev-packages/test-utils/package.json | 6 +++--- lerna.json | 2 +- packages/angular/package.json | 10 +++++----- packages/astro/package.json | 12 ++++++------ packages/aws-serverless/package.json | 10 +++++----- packages/browser-utils/package.json | 8 ++++---- packages/browser/package.json | 18 +++++++++--------- packages/bun/package.json | 12 ++++++------ packages/cloudflare/package.json | 8 ++++---- packages/core/package.json | 6 +++--- packages/deno/package.json | 8 ++++---- packages/ember/package.json | 10 +++++----- packages/eslint-config-sdk/package.json | 6 +++--- packages/eslint-plugin-sdk/package.json | 2 +- packages/feedback/package.json | 8 ++++---- packages/gatsby/package.json | 10 +++++----- packages/google-cloud-serverless/package.json | 10 +++++----- packages/integration-shims/package.json | 8 ++++---- packages/nestjs/package.json | 6 +++--- packages/nextjs/package.json | 16 ++++++++-------- packages/node/package.json | 10 +++++----- packages/nuxt/package.json | 16 ++++++++-------- packages/opentelemetry/package.json | 8 ++++---- packages/profiling-node/package.json | 10 +++++----- packages/react/package.json | 10 +++++----- packages/remix/package.json | 14 +++++++------- packages/replay-canvas/package.json | 10 +++++----- packages/replay-internal/package.json | 12 ++++++------ packages/replay-worker/package.json | 2 +- packages/solid/package.json | 10 +++++----- packages/solidstart/package.json | 14 +++++++------- packages/svelte/package.json | 10 +++++----- packages/sveltekit/package.json | 14 +++++++------- packages/types/package.json | 2 +- packages/typescript/package.json | 2 +- packages/utils/package.json | 4 ++-- packages/utils/src/version.ts | 2 +- packages/vercel-edge/package.json | 8 ++++---- packages/vue/package.json | 10 +++++----- packages/wasm/package.json | 10 +++++----- 48 files changed, 188 insertions(+), 188 deletions(-) diff --git a/dev-packages/browser-integration-tests/package.json b/dev-packages/browser-integration-tests/package.json index bf54aedffede..c575f75c88b3 100644 --- a/dev-packages/browser-integration-tests/package.json +++ b/dev-packages/browser-integration-tests/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/browser-integration-tests", - "version": "8.17.0", + "version": "8.18.0", "main": "index.js", "license": "MIT", "engines": { @@ -43,7 +43,7 @@ "@babel/preset-typescript": "^7.16.7", "@playwright/test": "^1.44.1", "@sentry-internal/rrweb": "2.11.0", - "@sentry/browser": "8.17.0", + "@sentry/browser": "8.18.0", "axios": "1.6.7", "babel-loader": "^8.2.2", "html-webpack-plugin": "^5.5.0", diff --git a/dev-packages/bundle-analyzer-scenarios/package.json b/dev-packages/bundle-analyzer-scenarios/package.json index c878c460dade..071bae35d7ae 100644 --- a/dev-packages/bundle-analyzer-scenarios/package.json +++ b/dev-packages/bundle-analyzer-scenarios/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/bundle-analyzer-scenarios", - "version": "8.17.0", + "version": "8.18.0", "description": "Scenarios to test bundle analysis with", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/dev-packages/bundle-analyzer-scenarios", diff --git a/dev-packages/e2e-tests/package.json b/dev-packages/e2e-tests/package.json index 6b07a13e5a64..3be47b27a0ea 100644 --- a/dev-packages/e2e-tests/package.json +++ b/dev-packages/e2e-tests/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/e2e-tests", - "version": "8.17.0", + "version": "8.18.0", "license": "MIT", "private": true, "scripts": { diff --git a/dev-packages/external-contributor-gh-action/package.json b/dev-packages/external-contributor-gh-action/package.json index 34c99564d96d..f541b62433da 100644 --- a/dev-packages/external-contributor-gh-action/package.json +++ b/dev-packages/external-contributor-gh-action/package.json @@ -1,7 +1,7 @@ { "name": "@sentry-internal/external-contributor-gh-action", "description": "An internal Github Action to add external contributors to the CHANGELOG.md file.", - "version": "8.17.0", + "version": "8.18.0", "license": "MIT", "engines": { "node": ">=18" diff --git a/dev-packages/node-integration-tests/package.json b/dev-packages/node-integration-tests/package.json index 4083fa0158df..e3f569427a41 100644 --- a/dev-packages/node-integration-tests/package.json +++ b/dev-packages/node-integration-tests/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/node-integration-tests", - "version": "8.17.0", + "version": "8.18.0", "license": "MIT", "engines": { "node": ">=14.18" @@ -31,8 +31,8 @@ "@nestjs/core": "^10.3.3", "@nestjs/platform-express": "^10.3.3", "@prisma/client": "5.9.1", - "@sentry/node": "8.17.0", - "@sentry/types": "8.17.0", + "@sentry/node": "8.18.0", + "@sentry/types": "8.18.0", "@types/mongodb": "^3.6.20", "@types/mysql": "^2.15.21", "@types/pg": "^8.6.5", diff --git a/dev-packages/overhead-metrics/package.json b/dev-packages/overhead-metrics/package.json index 181b0e1e0c61..3c87ec7f50cf 100644 --- a/dev-packages/overhead-metrics/package.json +++ b/dev-packages/overhead-metrics/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "8.17.0", + "version": "8.18.0", "name": "@sentry-internal/overhead-metrics", "main": "index.js", "author": "Sentry", diff --git a/dev-packages/rollup-utils/package.json b/dev-packages/rollup-utils/package.json index b6cf46778611..16a3ef4a4461 100644 --- a/dev-packages/rollup-utils/package.json +++ b/dev-packages/rollup-utils/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/rollup-utils", - "version": "8.17.0", + "version": "8.18.0", "description": "Rollup utilities used at Sentry for the Sentry JavaScript SDK", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/rollup-utils", diff --git a/dev-packages/size-limit-gh-action/package.json b/dev-packages/size-limit-gh-action/package.json index bae0b9e3371c..ceadc99f4933 100644 --- a/dev-packages/size-limit-gh-action/package.json +++ b/dev-packages/size-limit-gh-action/package.json @@ -1,7 +1,7 @@ { "name": "@sentry-internal/size-limit-gh-action", "description": "An internal Github Action to compare the current size of a PR against the one on develop.", - "version": "8.17.0", + "version": "8.18.0", "license": "MIT", "engines": { "node": ">=18" diff --git a/dev-packages/test-utils/package.json b/dev-packages/test-utils/package.json index f6c125517861..6a2e3207217d 100644 --- a/dev-packages/test-utils/package.json +++ b/dev-packages/test-utils/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "8.17.0", + "version": "8.18.0", "name": "@sentry-internal/test-utils", "author": "Sentry", "license": "MIT", @@ -45,8 +45,8 @@ }, "devDependencies": { "@playwright/test": "^1.44.1", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0" + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0" }, "volta": { "extends": "../../package.json" diff --git a/lerna.json b/lerna.json index 4365e3601d65..fb0c3e961499 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "version": "8.17.0", + "version": "8.18.0", "npmClient": "yarn" } diff --git a/packages/angular/package.json b/packages/angular/package.json index ba12e247ec17..5a6e8918a255 100644 --- a/packages/angular/package.json +++ b/packages/angular/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/angular", - "version": "8.17.0", + "version": "8.18.0", "description": "Official Sentry SDK for Angular", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/angular", @@ -21,10 +21,10 @@ "rxjs": "^6.5.5 || ^7.x" }, "dependencies": { - "@sentry/browser": "8.17.0", - "@sentry/core": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0", + "@sentry/browser": "8.18.0", + "@sentry/core": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0", "tslib": "^2.4.1" }, "devDependencies": { diff --git a/packages/astro/package.json b/packages/astro/package.json index 2982fc1b2c95..dff9e897c785 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/astro", - "version": "8.17.0", + "version": "8.18.0", "description": "Official Sentry SDK for Astro", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/astro", @@ -56,11 +56,11 @@ "astro": ">=3.x || >=4.0.0-beta" }, "dependencies": { - "@sentry/browser": "8.17.0", - "@sentry/core": "8.17.0", - "@sentry/node": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0", + "@sentry/browser": "8.18.0", + "@sentry/core": "8.18.0", + "@sentry/node": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0", "@sentry/vite-plugin": "^2.20.1" }, "devDependencies": { diff --git a/packages/aws-serverless/package.json b/packages/aws-serverless/package.json index f94fbb596982..e6b3a1aa67e3 100644 --- a/packages/aws-serverless/package.json +++ b/packages/aws-serverless/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/aws-serverless", - "version": "8.17.0", + "version": "8.18.0", "description": "Official Sentry SDK for AWS Lambda and AWS Serverless Environments", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/serverless", @@ -66,10 +66,10 @@ "dependencies": { "@opentelemetry/instrumentation-aws-lambda": "0.42.0", "@opentelemetry/instrumentation-aws-sdk": "0.42.0", - "@sentry/core": "8.17.0", - "@sentry/node": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0", + "@sentry/core": "8.18.0", + "@sentry/node": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0", "@types/aws-lambda": "^8.10.62" }, "devDependencies": { diff --git a/packages/browser-utils/package.json b/packages/browser-utils/package.json index 8618050e627b..7b24398d2c79 100644 --- a/packages/browser-utils/package.json +++ b/packages/browser-utils/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/browser-utils", - "version": "8.17.0", + "version": "8.18.0", "description": "Browser Utilities for all Sentry JavaScript SDKs", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/browser-utils", @@ -39,9 +39,9 @@ "access": "public" }, "dependencies": { - "@sentry/core": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0" + "@sentry/core": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0" }, "scripts": { "build": "run-p build:transpile build:types", diff --git a/packages/browser/package.json b/packages/browser/package.json index 4d71bfcae665..f5347bc45996 100644 --- a/packages/browser/package.json +++ b/packages/browser/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/browser", - "version": "8.17.0", + "version": "8.18.0", "description": "Official Sentry SDK for browsers", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/browser", @@ -39,16 +39,16 @@ "access": "public" }, "dependencies": { - "@sentry-internal/browser-utils": "8.17.0", - "@sentry-internal/feedback": "8.17.0", - "@sentry-internal/replay": "8.17.0", - "@sentry-internal/replay-canvas": "8.17.0", - "@sentry/core": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0" + "@sentry-internal/browser-utils": "8.18.0", + "@sentry-internal/feedback": "8.18.0", + "@sentry-internal/replay": "8.18.0", + "@sentry-internal/replay-canvas": "8.18.0", + "@sentry/core": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0" }, "devDependencies": { - "@sentry-internal/integration-shims": "8.17.0", + "@sentry-internal/integration-shims": "8.18.0", "fake-indexeddb": "^4.0.1", "webpack": "^4.47.0" }, diff --git a/packages/bun/package.json b/packages/bun/package.json index c5af58039854..5e276d268fe8 100644 --- a/packages/bun/package.json +++ b/packages/bun/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/bun", - "version": "8.17.0", + "version": "8.18.0", "description": "Official Sentry SDK for bun", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/bun", @@ -39,11 +39,11 @@ "access": "public" }, "dependencies": { - "@sentry/core": "8.17.0", - "@sentry/node": "8.17.0", - "@sentry/opentelemetry": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0" + "@sentry/core": "8.18.0", + "@sentry/node": "8.18.0", + "@sentry/opentelemetry": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0" }, "devDependencies": { "bun-types": "latest" diff --git a/packages/cloudflare/package.json b/packages/cloudflare/package.json index eff219dd1cf8..21cf38ccfbb2 100644 --- a/packages/cloudflare/package.json +++ b/packages/cloudflare/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/cloudflare", - "version": "8.17.0", + "version": "8.18.0", "description": "Offical Sentry SDK for Cloudflare Workers and Pages", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/cloudflare", @@ -39,9 +39,9 @@ "access": "public" }, "dependencies": { - "@sentry/core": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0" + "@sentry/core": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0" }, "devDependencies": { "@cloudflare/workers-types": "^4.20240620.0", diff --git a/packages/core/package.json b/packages/core/package.json index 55f99dc7f6e8..eb650843a1fb 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/core", - "version": "8.17.0", + "version": "8.18.0", "description": "Base implementation for all Sentry JavaScript SDKs", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/core", @@ -39,8 +39,8 @@ "access": "public" }, "dependencies": { - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0" + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0" }, "scripts": { "build": "run-p build:transpile build:types", diff --git a/packages/deno/package.json b/packages/deno/package.json index 53104fd721dc..70dbcc347930 100644 --- a/packages/deno/package.json +++ b/packages/deno/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/deno", - "version": "8.17.0", + "version": "8.18.0", "description": "Official Sentry SDK for Deno", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/deno", @@ -24,9 +24,9 @@ "/build" ], "dependencies": { - "@sentry/core": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0" + "@sentry/core": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0" }, "devDependencies": { "@rollup/plugin-typescript": "^11.1.5", diff --git a/packages/ember/package.json b/packages/ember/package.json index e3a9b157b8f3..96f1e63ddd28 100644 --- a/packages/ember/package.json +++ b/packages/ember/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/ember", - "version": "8.17.0", + "version": "8.18.0", "description": "Official Sentry SDK for Ember.js", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/ember", @@ -33,10 +33,10 @@ "dependencies": { "@babel/core": "^7.24.4", "@embroider/macros": "^1.16.0", - "@sentry/browser": "8.17.0", - "@sentry/core": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0", + "@sentry/browser": "8.18.0", + "@sentry/core": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0", "ember-auto-import": "^2.7.2", "ember-cli-babel": "^8.2.0", "ember-cli-htmlbars": "^6.1.1", diff --git a/packages/eslint-config-sdk/package.json b/packages/eslint-config-sdk/package.json index 7a60f92c57cc..d5c47cb33f66 100644 --- a/packages/eslint-config-sdk/package.json +++ b/packages/eslint-config-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/eslint-config-sdk", - "version": "8.17.0", + "version": "8.18.0", "description": "Official Sentry SDK eslint config", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/eslint-config-sdk", @@ -22,8 +22,8 @@ "access": "public" }, "dependencies": { - "@sentry-internal/eslint-plugin-sdk": "8.17.0", - "@sentry-internal/typescript": "8.17.0", + "@sentry-internal/eslint-plugin-sdk": "8.18.0", + "@sentry-internal/typescript": "8.18.0", "@typescript-eslint/eslint-plugin": "^5.48.0", "@typescript-eslint/parser": "^5.48.0", "eslint-config-prettier": "^6.11.0", diff --git a/packages/eslint-plugin-sdk/package.json b/packages/eslint-plugin-sdk/package.json index ca0bd9b38705..0e23f0cda1ca 100644 --- a/packages/eslint-plugin-sdk/package.json +++ b/packages/eslint-plugin-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/eslint-plugin-sdk", - "version": "8.17.0", + "version": "8.18.0", "description": "Official Sentry SDK eslint plugin", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/eslint-plugin-sdk", diff --git a/packages/feedback/package.json b/packages/feedback/package.json index 5cab5fd232ee..1eaec6eb4225 100644 --- a/packages/feedback/package.json +++ b/packages/feedback/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/feedback", - "version": "8.17.0", + "version": "8.18.0", "description": "Sentry SDK integration for user feedback", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/feedback", @@ -39,9 +39,9 @@ "access": "public" }, "dependencies": { - "@sentry/core": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0" + "@sentry/core": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0" }, "devDependencies": { "preact": "^10.19.4" diff --git a/packages/gatsby/package.json b/packages/gatsby/package.json index aab0a97ff8b0..84da430bc18b 100644 --- a/packages/gatsby/package.json +++ b/packages/gatsby/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/gatsby", - "version": "8.17.0", + "version": "8.18.0", "description": "Official Sentry SDK for Gatsby.js", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/gatsby", @@ -45,10 +45,10 @@ "access": "public" }, "dependencies": { - "@sentry/core": "8.17.0", - "@sentry/react": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0", + "@sentry/core": "8.18.0", + "@sentry/react": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0", "@sentry/webpack-plugin": "2.16.0" }, "peerDependencies": { diff --git a/packages/google-cloud-serverless/package.json b/packages/google-cloud-serverless/package.json index 67c4e0b11c5b..7d4d95f230ce 100644 --- a/packages/google-cloud-serverless/package.json +++ b/packages/google-cloud-serverless/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/google-cloud-serverless", - "version": "8.17.0", + "version": "8.18.0", "description": "Official Sentry SDK for Google Cloud Functions", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/google-cloud", @@ -48,10 +48,10 @@ "access": "public" }, "dependencies": { - "@sentry/core": "8.17.0", - "@sentry/node": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0", + "@sentry/core": "8.18.0", + "@sentry/node": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0", "@types/express": "^4.17.14" }, "devDependencies": { diff --git a/packages/integration-shims/package.json b/packages/integration-shims/package.json index aff0473f929c..1ce32c40c32d 100644 --- a/packages/integration-shims/package.json +++ b/packages/integration-shims/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/integration-shims", - "version": "8.17.0", + "version": "8.18.0", "description": "Shims for integrations in Sentry SDK.", "main": "build/cjs/index.js", "module": "build/esm/index.js", @@ -55,9 +55,9 @@ "url": "https://github.com/getsentry/sentry-javascript/issues" }, "dependencies": { - "@sentry/core": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0" + "@sentry/core": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0" }, "engines": { "node": ">=14.18" diff --git a/packages/nestjs/package.json b/packages/nestjs/package.json index b5058bf2c597..ba00995126be 100644 --- a/packages/nestjs/package.json +++ b/packages/nestjs/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/nestjs", - "version": "8.17.0", + "version": "8.18.0", "description": "Official Sentry SDK for NestJS", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/nestjs", @@ -39,8 +39,8 @@ "access": "public" }, "dependencies": { - "@sentry/core": "8.17.0", - "@sentry/node": "8.17.0" + "@sentry/core": "8.18.0", + "@sentry/node": "8.18.0" }, "scripts": { "build": "run-p build:transpile build:types", diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index 3b812f37b46c..7685bbfb5f8d 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/nextjs", - "version": "8.17.0", + "version": "8.18.0", "description": "Official Sentry SDK for Next.js", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/nextjs", @@ -71,13 +71,13 @@ "@opentelemetry/instrumentation-http": "0.52.1", "@opentelemetry/semantic-conventions": "^1.25.1", "@rollup/plugin-commonjs": "26.0.1", - "@sentry/core": "8.17.0", - "@sentry/node": "8.17.0", - "@sentry/opentelemetry": "8.17.0", - "@sentry/react": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0", - "@sentry/vercel-edge": "8.17.0", + "@sentry/core": "8.18.0", + "@sentry/node": "8.18.0", + "@sentry/opentelemetry": "8.18.0", + "@sentry/react": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0", + "@sentry/vercel-edge": "8.18.0", "@sentry/webpack-plugin": "2.20.1", "chalk": "3.0.0", "resolve": "1.22.8", diff --git a/packages/node/package.json b/packages/node/package.json index 08b29345de79..6a607c5c09fe 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/node", - "version": "8.17.0", + "version": "8.18.0", "description": "Sentry Node SDK using OpenTelemetry for performance instrumentation", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/node", @@ -88,10 +88,10 @@ "@opentelemetry/sdk-trace-base": "^1.25.1", "@opentelemetry/semantic-conventions": "^1.25.1", "@prisma/instrumentation": "5.16.1", - "@sentry/core": "8.17.0", - "@sentry/opentelemetry": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0" + "@sentry/core": "8.18.0", + "@sentry/opentelemetry": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0" }, "devDependencies": { "@types/node": "^14.18.0" diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index 984d2e9b7668..e72d20fc91de 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/nuxt", - "version": "8.17.0", + "version": "8.18.0", "description": "Official Sentry SDK for Nuxt (EXPERIMENTAL)", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/nuxt", @@ -43,14 +43,14 @@ }, "dependencies": { "@nuxt/kit": "^3.12.2", - "@sentry/browser": "8.17.0", - "@sentry/core": "8.17.0", - "@sentry/node": "8.17.0", - "@sentry/opentelemetry": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0", + "@sentry/browser": "8.18.0", + "@sentry/core": "8.18.0", + "@sentry/node": "8.18.0", + "@sentry/opentelemetry": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0", "@sentry/vite-plugin": "2.20.1", - "@sentry/vue": "8.17.0" + "@sentry/vue": "8.18.0" }, "devDependencies": { "@nuxt/module-builder": "0.8.0", diff --git a/packages/opentelemetry/package.json b/packages/opentelemetry/package.json index 3ff264281023..181501ec7820 100644 --- a/packages/opentelemetry/package.json +++ b/packages/opentelemetry/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/opentelemetry", - "version": "8.17.0", + "version": "8.18.0", "description": "Official Sentry utilities for OpenTelemetry", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/opentelemetry", @@ -39,9 +39,9 @@ "access": "public" }, "dependencies": { - "@sentry/core": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0" + "@sentry/core": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0" }, "peerDependencies": { "@opentelemetry/api": "^1.9.0", diff --git a/packages/profiling-node/package.json b/packages/profiling-node/package.json index 68b9e369153d..6c850cd4c426 100644 --- a/packages/profiling-node/package.json +++ b/packages/profiling-node/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/profiling-node", - "version": "8.17.0", + "version": "8.18.0", "description": "Official Sentry SDK for Node.js Profiling", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/profiling-node", @@ -75,10 +75,10 @@ "test": "cross-env SENTRY_PROFILER_BINARY_DIR=lib jest --config jest.config.js" }, "dependencies": { - "@sentry/core": "8.17.0", - "@sentry/node": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0", + "@sentry/core": "8.18.0", + "@sentry/node": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0", "detect-libc": "^2.0.2", "node-abi": "^3.61.0" }, diff --git a/packages/react/package.json b/packages/react/package.json index 5fdfd0633f13..42a364179340 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/react", - "version": "8.17.0", + "version": "8.18.0", "description": "Official Sentry SDK for React.js", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/react", @@ -39,10 +39,10 @@ "access": "public" }, "dependencies": { - "@sentry/browser": "8.17.0", - "@sentry/core": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0", + "@sentry/browser": "8.18.0", + "@sentry/core": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0", "hoist-non-react-statics": "^3.3.2" }, "peerDependencies": { diff --git a/packages/remix/package.json b/packages/remix/package.json index 1ec9d62b3b7f..92a6d04b3436 100644 --- a/packages/remix/package.json +++ b/packages/remix/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/remix", - "version": "8.17.0", + "version": "8.18.0", "description": "Official Sentry SDK for Remix", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/remix", @@ -55,12 +55,12 @@ "@opentelemetry/instrumentation-http": "0.52.1", "@remix-run/router": "1.x", "@sentry/cli": "^2.32.1", - "@sentry/core": "8.17.0", - "@sentry/node": "8.17.0", - "@sentry/opentelemetry": "8.17.0", - "@sentry/react": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0", + "@sentry/core": "8.18.0", + "@sentry/node": "8.18.0", + "@sentry/opentelemetry": "8.18.0", + "@sentry/react": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0", "glob": "^10.3.4", "opentelemetry-instrumentation-remix": "0.7.1", "yargs": "^17.6.0" diff --git a/packages/replay-canvas/package.json b/packages/replay-canvas/package.json index 2af80dec1c27..cc0c3d589847 100644 --- a/packages/replay-canvas/package.json +++ b/packages/replay-canvas/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/replay-canvas", - "version": "8.17.0", + "version": "8.18.0", "description": "Replay canvas integration", "main": "build/npm/cjs/index.js", "module": "build/npm/esm/index.js", @@ -69,10 +69,10 @@ "@sentry-internal/rrweb": "2.25.0" }, "dependencies": { - "@sentry-internal/replay": "8.17.0", - "@sentry/core": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0" + "@sentry-internal/replay": "8.18.0", + "@sentry/core": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0" }, "engines": { "node": ">=14.18" diff --git a/packages/replay-internal/package.json b/packages/replay-internal/package.json index bc05dfb4ea80..38dc581d0353 100644 --- a/packages/replay-internal/package.json +++ b/packages/replay-internal/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/replay", - "version": "8.17.0", + "version": "8.18.0", "description": "User replays for Sentry", "main": "build/npm/cjs/index.js", "module": "build/npm/esm/index.js", @@ -68,7 +68,7 @@ "homepage": "https://docs.sentry.io/platforms/javascript/session-replay/", "devDependencies": { "@babel/core": "^7.17.5", - "@sentry-internal/replay-worker": "8.17.0", + "@sentry-internal/replay-worker": "8.18.0", "@sentry-internal/rrweb": "2.25.0", "@sentry-internal/rrweb-snapshot": "2.25.0", "fflate": "^0.8.1", @@ -76,10 +76,10 @@ "jsdom-worker": "^0.2.1" }, "dependencies": { - "@sentry-internal/browser-utils": "8.17.0", - "@sentry/core": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0" + "@sentry-internal/browser-utils": "8.18.0", + "@sentry/core": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0" }, "engines": { "node": ">=14.18" diff --git a/packages/replay-worker/package.json b/packages/replay-worker/package.json index 5e4aaa62be0d..07e967a3bc33 100644 --- a/packages/replay-worker/package.json +++ b/packages/replay-worker/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/replay-worker", - "version": "8.17.0", + "version": "8.18.0", "description": "Worker for @sentry-internal/replay", "main": "build/esm/index.js", "module": "build/esm/index.js", diff --git a/packages/solid/package.json b/packages/solid/package.json index 66c13d8a7f8d..1c7a44d14d00 100644 --- a/packages/solid/package.json +++ b/packages/solid/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/solid", - "version": "8.17.0", + "version": "8.18.0", "description": "Official Sentry SDK for Solid", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/solid", @@ -44,10 +44,10 @@ "access": "public" }, "dependencies": { - "@sentry/browser": "8.17.0", - "@sentry/core": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0" + "@sentry/browser": "8.18.0", + "@sentry/core": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0" }, "peerDependencies": { "@solidjs/router": "^0.13.4", diff --git a/packages/solidstart/package.json b/packages/solidstart/package.json index 6a8e3d432bc9..962dff72965e 100644 --- a/packages/solidstart/package.json +++ b/packages/solidstart/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/solidstart", - "version": "8.17.0", + "version": "8.18.0", "description": "Official Sentry SDK for Solid Start", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/solidstart", @@ -66,12 +66,12 @@ } }, "dependencies": { - "@sentry/core": "8.17.0", - "@sentry/node": "8.17.0", - "@sentry/opentelemetry": "8.17.0", - "@sentry/solid": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0", + "@sentry/core": "8.18.0", + "@sentry/node": "8.18.0", + "@sentry/opentelemetry": "8.18.0", + "@sentry/solid": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0", "@sentry/vite-plugin": "2.19.0" }, "devDependencies": { diff --git a/packages/svelte/package.json b/packages/svelte/package.json index 5e7406747832..e1a50af38a64 100644 --- a/packages/svelte/package.json +++ b/packages/svelte/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/svelte", - "version": "8.17.0", + "version": "8.18.0", "description": "Official Sentry SDK for Svelte", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/svelte", @@ -39,10 +39,10 @@ "access": "public" }, "dependencies": { - "@sentry/browser": "8.17.0", - "@sentry/core": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0", + "@sentry/browser": "8.18.0", + "@sentry/core": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0", "magic-string": "^0.30.0" }, "peerDependencies": { diff --git a/packages/sveltekit/package.json b/packages/sveltekit/package.json index d2edf5487ed2..373f2c5503b1 100644 --- a/packages/sveltekit/package.json +++ b/packages/sveltekit/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/sveltekit", - "version": "8.17.0", + "version": "8.18.0", "description": "Official Sentry SDK for SvelteKit", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/sveltekit", @@ -40,12 +40,12 @@ } }, "dependencies": { - "@sentry/core": "8.17.0", - "@sentry/node": "8.17.0", - "@sentry/opentelemetry": "8.17.0", - "@sentry/svelte": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0", + "@sentry/core": "8.18.0", + "@sentry/node": "8.18.0", + "@sentry/opentelemetry": "8.18.0", + "@sentry/svelte": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0", "@sentry/vite-plugin": "2.20.1", "magic-string": "0.30.7", "magicast": "0.2.8", diff --git a/packages/types/package.json b/packages/types/package.json index eeea7743d4e1..968639b72d5e 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/types", - "version": "8.17.0", + "version": "8.18.0", "description": "Types for all Sentry JavaScript SDKs", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/types", diff --git a/packages/typescript/package.json b/packages/typescript/package.json index 689c4965a8a3..c9f3af3f1769 100644 --- a/packages/typescript/package.json +++ b/packages/typescript/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/typescript", - "version": "8.17.0", + "version": "8.18.0", "description": "Typescript configuration used at Sentry", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/typescript", diff --git a/packages/utils/package.json b/packages/utils/package.json index 8e4f1e87b8cb..f5d59a17ce0e 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/utils", - "version": "8.17.0", + "version": "8.18.0", "description": "Utilities for all Sentry JavaScript SDKs", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/utils", @@ -39,7 +39,7 @@ "access": "public" }, "dependencies": { - "@sentry/types": "8.17.0" + "@sentry/types": "8.18.0" }, "devDependencies": { "@types/array.prototype.flat": "^1.2.1", diff --git a/packages/utils/src/version.ts b/packages/utils/src/version.ts index d0a2d3036f3d..d0c41d3c905b 100644 --- a/packages/utils/src/version.ts +++ b/packages/utils/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = '8.17.0'; +export const SDK_VERSION = '8.18.0'; diff --git a/packages/vercel-edge/package.json b/packages/vercel-edge/package.json index ef93102d9163..34c4a5a0e828 100644 --- a/packages/vercel-edge/package.json +++ b/packages/vercel-edge/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/vercel-edge", - "version": "8.17.0", + "version": "8.18.0", "description": "Offical Sentry SDK for the Vercel Edge Runtime", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/vercel-edge", @@ -39,9 +39,9 @@ "access": "public" }, "dependencies": { - "@sentry/core": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0" + "@sentry/core": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0" }, "devDependencies": { "@edge-runtime/jest-environment": "2.2.3", diff --git a/packages/vue/package.json b/packages/vue/package.json index 74fafdc807e4..0dc72164cdc9 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/vue", - "version": "8.17.0", + "version": "8.18.0", "description": "Official Sentry SDK for Vue.js", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/vue", @@ -39,10 +39,10 @@ "access": "public" }, "dependencies": { - "@sentry/browser": "8.17.0", - "@sentry/core": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0" + "@sentry/browser": "8.18.0", + "@sentry/core": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0" }, "peerDependencies": { "vue": "2.x || 3.x" diff --git a/packages/wasm/package.json b/packages/wasm/package.json index 6c779926e475..c1e36fd79a02 100644 --- a/packages/wasm/package.json +++ b/packages/wasm/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/wasm", - "version": "8.17.0", + "version": "8.18.0", "description": "Support for WASM.", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/wasm", @@ -39,10 +39,10 @@ "access": "public" }, "dependencies": { - "@sentry/browser": "8.17.0", - "@sentry/core": "8.17.0", - "@sentry/types": "8.17.0", - "@sentry/utils": "8.17.0" + "@sentry/browser": "8.18.0", + "@sentry/core": "8.18.0", + "@sentry/types": "8.18.0", + "@sentry/utils": "8.18.0" }, "scripts": { "build": "run-p build:transpile build:bundle build:types", From 52eb466c4ed0a80edd0436fb78c4574051f88b33 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 14:02:40 +0000 Subject: [PATCH 20/53] feat(deps): bump @opentelemetry/instrumentation-aws-sdk from 0.42.0 to 0.43.0 (#12921) --- packages/aws-serverless/package.json | 2 +- yarn.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/aws-serverless/package.json b/packages/aws-serverless/package.json index f94fbb596982..e43e9f77570a 100644 --- a/packages/aws-serverless/package.json +++ b/packages/aws-serverless/package.json @@ -65,7 +65,7 @@ }, "dependencies": { "@opentelemetry/instrumentation-aws-lambda": "0.42.0", - "@opentelemetry/instrumentation-aws-sdk": "0.42.0", + "@opentelemetry/instrumentation-aws-sdk": "0.43.0", "@sentry/core": "8.17.0", "@sentry/node": "8.17.0", "@sentry/types": "8.17.0", diff --git a/yarn.lock b/yarn.lock index 7cb6273253bc..9e2ff07d8c53 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6968,14 +6968,14 @@ dependencies: "@opentelemetry/semantic-conventions" "1.24.1" -"@opentelemetry/core@1.25.0", "@opentelemetry/core@^1.1.0", "@opentelemetry/core@^1.8.0": +"@opentelemetry/core@1.25.0": version "1.25.0" resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-1.25.0.tgz#ad034f5c2669f589bd703bfbbaa38b51f8504053" integrity sha512-n0B3s8rrqGrasTgNkXLKXzN0fXo+6IYP7M5b7AMsrZM33f/y6DS6kJ0Btd7SespASWq8bgL3taLo0oe0vB52IQ== dependencies: "@opentelemetry/semantic-conventions" "1.25.0" -"@opentelemetry/core@1.25.1", "@opentelemetry/core@^1.23.0", "@opentelemetry/core@^1.25.1": +"@opentelemetry/core@1.25.1", "@opentelemetry/core@^1.1.0", "@opentelemetry/core@^1.23.0", "@opentelemetry/core@^1.25.1", "@opentelemetry/core@^1.8.0": version "1.25.1" resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-1.25.1.tgz#ff667d939d128adfc7c793edae2f6bca177f829d" integrity sha512-GeT/l6rBYWVQ4XArluLVB6WWQ8flHbdb6r2FCHC3smtdOAbrJBIv35tpV/yp9bmYUJf+xmZpu9DRTIeJVhFbEQ== @@ -7002,10 +7002,10 @@ "@opentelemetry/semantic-conventions" "^1.22.0" "@types/aws-lambda" "8.10.122" -"@opentelemetry/instrumentation-aws-sdk@0.42.0": - version "0.42.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-aws-sdk/-/instrumentation-aws-sdk-0.42.0.tgz#5e0884282814163c328c1b3ec68fe257108a2a04" - integrity sha512-6b4LQAeBSKU5RhKEP9rH+wMcKswlllIT9J65uREmnWQQJo5zogD6cWa2sJ814o9K25/aDi+zheVHDFDuA7iVCQ== +"@opentelemetry/instrumentation-aws-sdk@0.43.0": + version "0.43.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-aws-sdk/-/instrumentation-aws-sdk-0.43.0.tgz#b579d66e624cc1545f29d2858c180204e515e110" + integrity sha512-klfA48MT0uZY/mGw3cYdQeCXTyMhtY4FzHcZy9R7DdTcuCExgbxWrUlOSiqIJ5kBgsCZfBMEeA6UQKDBwa6X7Q== dependencies: "@opentelemetry/core" "^1.8.0" "@opentelemetry/instrumentation" "^0.52.0" @@ -7305,12 +7305,12 @@ resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.1.tgz#d4bcebda1cb5146d47a2a53daaa7922f8e084dfb" integrity sha512-VkliWlS4/+GHLLW7J/rVBA00uXus1SWvwFvcUDxDwmFxYfg/2VI6ekwdXS28cjI8Qz2ky2BzG8OUHo+WeYIWqw== -"@opentelemetry/semantic-conventions@1.25.0", "@opentelemetry/semantic-conventions@^1.17.0", "@opentelemetry/semantic-conventions@^1.22.0", "@opentelemetry/semantic-conventions@^1.23.0": +"@opentelemetry/semantic-conventions@1.25.0": version "1.25.0" resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.25.0.tgz#390eb4d42a29c66bdc30066af9035645e9bb7270" integrity sha512-M+kkXKRAIAiAP6qYyesfrC5TOmDpDVtsxuGfPcqd9B/iBrac+E14jYwrgm0yZBUIbIP2OnqC3j+UgkXLm1vxUQ== -"@opentelemetry/semantic-conventions@1.25.1", "@opentelemetry/semantic-conventions@^1.25.1": +"@opentelemetry/semantic-conventions@1.25.1", "@opentelemetry/semantic-conventions@^1.17.0", "@opentelemetry/semantic-conventions@^1.22.0", "@opentelemetry/semantic-conventions@^1.23.0", "@opentelemetry/semantic-conventions@^1.25.1": version "1.25.1" resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.25.1.tgz#0deecb386197c5e9c2c28f2f89f51fb8ae9f145e" integrity sha512-ZDjMJJQRlyk8A1KZFCc+bCbsyrn1wTwdNt56F7twdfUfnHUZUq77/WfONCj8p72NZOyP7pNTdUWSTYC3GTbuuQ== From 8b2473153cf50dc769da7f88e9d8affde166d4f6 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Tue, 16 Jul 2024 17:58:58 +0200 Subject: [PATCH 21/53] feat(node): Add `request` parameter to `httpIntegration` ignore callbacks (#12930) Add a second parameter (`request`) to the `httpIntegration`'s `ignoreIncomingRequests` and `ignoreOutgoingRequests` callbacks. This allows users to not only filter on the URL as previously but on the entire request objects. --- .../server-ignoreIncomingRequests.js | 14 +- .../server-ignoreOutgoingRequests.js | 21 ++- .../suites/tracing/httpIntegration/test.ts | 145 ++++++++++++------ packages/node/src/integrations/http.ts | 16 +- 4 files changed, 144 insertions(+), 52 deletions(-) diff --git a/dev-packages/node-integration-tests/suites/tracing/httpIntegration/server-ignoreIncomingRequests.js b/dev-packages/node-integration-tests/suites/tracing/httpIntegration/server-ignoreIncomingRequests.js index f1e5d9870fcf..bafd8b8f2bc4 100644 --- a/dev-packages/node-integration-tests/suites/tracing/httpIntegration/server-ignoreIncomingRequests.js +++ b/dev-packages/node-integration-tests/suites/tracing/httpIntegration/server-ignoreIncomingRequests.js @@ -9,8 +9,14 @@ Sentry.init({ integrations: [ Sentry.httpIntegration({ - ignoreIncomingRequests: url => { - return url.includes('/liveness'); + ignoreIncomingRequests: (url, request) => { + if (url.includes('/liveness')) { + return true; + } + if (request.method === 'POST' && request.url.includes('readiness')) { + return true; + } + return false; }, }), ], @@ -33,6 +39,10 @@ app.get('/liveness', (_req, res) => { res.send({ response: 'liveness' }); }); +app.post('/readiness', (_req, res) => { + res.send({ response: 'readiness' }); +}); + Sentry.setupExpressErrorHandler(app); startExpressServerAndSendPortToRunner(app); diff --git a/dev-packages/node-integration-tests/suites/tracing/httpIntegration/server-ignoreOutgoingRequests.js b/dev-packages/node-integration-tests/suites/tracing/httpIntegration/server-ignoreOutgoingRequests.js index ce520c999259..9d7d2ed069d1 100644 --- a/dev-packages/node-integration-tests/suites/tracing/httpIntegration/server-ignoreOutgoingRequests.js +++ b/dev-packages/node-integration-tests/suites/tracing/httpIntegration/server-ignoreOutgoingRequests.js @@ -10,8 +10,14 @@ Sentry.init({ integrations: [ Sentry.httpIntegration({ - ignoreOutgoingRequests: url => { - return url.includes('example.com'); + ignoreOutgoingRequests: (url, request) => { + if (url.includes('example.com')) { + return true; + } + if (request.method === 'POST' && request.path === '/path') { + return true; + } + return false; }, }), ], @@ -37,6 +43,17 @@ app.get('/test', (_req, response) => { .end(); }); +app.post('/testPath', (_req, response) => { + http + .request('http://example.com/path', res => { + res.on('data', () => {}); + res.on('end', () => { + response.send({ response: 'done' }); + }); + }) + .end(); +}); + Sentry.setupExpressErrorHandler(app); startExpressServerAndSendPortToRunner(app); diff --git a/dev-packages/node-integration-tests/suites/tracing/httpIntegration/test.ts b/dev-packages/node-integration-tests/suites/tracing/httpIntegration/test.ts index aebe0dd676ba..972ba30eab43 100644 --- a/dev-packages/node-integration-tests/suites/tracing/httpIntegration/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/httpIntegration/test.ts @@ -76,58 +76,117 @@ describe('httpIntegration', () => { .makeRequest('get', '/test'); }); - test("doesn't create a root span for incoming requests ignored via `ignoreIncomingRequests`", done => { - const runner = createRunner(__dirname, 'server-ignoreIncomingRequests.js') - .expect({ - transaction: { - contexts: { - trace: { - span_id: expect.any(String), - trace_id: expect.any(String), - data: { - url: expect.stringMatching(/\/test$/), - 'http.response.status_code': 200, + describe("doesn't create a root span for incoming requests ignored via `ignoreIncomingRequests`", () => { + test('via the url param', done => { + const runner = createRunner(__dirname, 'server-ignoreIncomingRequests.js') + .expect({ + transaction: { + contexts: { + trace: { + span_id: expect.any(String), + trace_id: expect.any(String), + data: { + url: expect.stringMatching(/\/test$/), + 'http.response.status_code': 200, + }, + op: 'http.server', + status: 'ok', }, - op: 'http.server', - status: 'ok', }, + transaction: 'GET /test', }, - transaction: 'GET /test', - }, - }) - .start(done); + }) + .start(done); + + runner.makeRequest('get', '/liveness'); // should be ignored + runner.makeRequest('get', '/test'); + }); + + test('via the request param', done => { + const runner = createRunner(__dirname, 'server-ignoreIncomingRequests.js') + .expect({ + transaction: { + contexts: { + trace: { + span_id: expect.any(String), + trace_id: expect.any(String), + data: { + url: expect.stringMatching(/\/test$/), + 'http.response.status_code': 200, + }, + op: 'http.server', + status: 'ok', + }, + }, + transaction: 'GET /test', + }, + }) + .start(done); - runner.makeRequest('get', '/liveness'); // should be ignored - runner.makeRequest('get', '/test'); + runner.makeRequest('post', '/readiness'); // should be ignored + runner.makeRequest('get', '/test'); + }); }); - test("doesn't create child spans for outgoing requests ignored via `ignoreOutgoingRequests`", done => { - const runner = createRunner(__dirname, 'server-ignoreOutgoingRequests.js') - .expect({ - transaction: { - contexts: { - trace: { - span_id: expect.any(String), - trace_id: expect.any(String), - data: { - url: expect.stringMatching(/\/test$/), - 'http.response.status_code': 200, + describe("doesn't create child spans for outgoing requests ignored via `ignoreOutgoingRequests`", () => { + test('via the url param', done => { + const runner = createRunner(__dirname, 'server-ignoreOutgoingRequests.js') + .expect({ + transaction: { + contexts: { + trace: { + span_id: expect.any(String), + trace_id: expect.any(String), + data: { + url: expect.stringMatching(/\/test$/), + 'http.response.status_code': 200, + }, + op: 'http.server', + status: 'ok', }, - op: 'http.server', - status: 'ok', }, + transaction: 'GET /test', + spans: [ + expect.objectContaining({ op: 'middleware.express', description: 'query' }), + expect.objectContaining({ op: 'middleware.express', description: 'expressInit' }), + expect.objectContaining({ op: 'middleware.express', description: 'corsMiddleware' }), + expect.objectContaining({ op: 'request_handler.express', description: '/test' }), + ], }, - transaction: 'GET /test', - spans: [ - expect.objectContaining({ op: 'middleware.express', description: 'query' }), - expect.objectContaining({ op: 'middleware.express', description: 'expressInit' }), - expect.objectContaining({ op: 'middleware.express', description: 'corsMiddleware' }), - expect.objectContaining({ op: 'request_handler.express', description: '/test' }), - ], - }, - }) - .start(done); + }) + .start(done); + + runner.makeRequest('get', '/test'); + }); + + test('via the request param', done => { + const runner = createRunner(__dirname, 'server-ignoreOutgoingRequests.js') + .expect({ + transaction: { + contexts: { + trace: { + span_id: expect.any(String), + trace_id: expect.any(String), + data: { + url: expect.stringMatching(/\/testPath$/), + 'http.response.status_code': 200, + }, + op: 'http.server', + status: 'ok', + }, + }, + transaction: 'POST /testPath', + spans: [ + expect.objectContaining({ op: 'middleware.express', description: 'query' }), + expect.objectContaining({ op: 'middleware.express', description: 'expressInit' }), + expect.objectContaining({ op: 'middleware.express', description: 'corsMiddleware' }), + expect.objectContaining({ op: 'request_handler.express', description: '/testPath' }), + ], + }, + }) + .start(done); - runner.makeRequest('get', '/test'); + runner.makeRequest('post', '/testPath'); + }); }); }); diff --git a/packages/node/src/integrations/http.ts b/packages/node/src/integrations/http.ts index 632b6023e7a3..615506605c9b 100644 --- a/packages/node/src/integrations/http.ts +++ b/packages/node/src/integrations/http.ts @@ -1,4 +1,4 @@ -import type { ClientRequest, ServerResponse } from 'node:http'; +import type { ClientRequest, IncomingMessage, RequestOptions, ServerResponse } from 'node:http'; import type { Span } from '@opentelemetry/api'; import { HttpInstrumentation } from '@opentelemetry/instrumentation-http'; import { addOpenTelemetryInstrumentation } from '@sentry/opentelemetry'; @@ -37,8 +37,11 @@ interface HttpOptions { * * The `url` param contains the entire URL, including query string (if any), protocol, host, etc. of the outgoing request. * For example: `'https://someService.com/users/details?id=123'` + * + * The `request` param contains the original {@type RequestOptions} object used to make the outgoing request. + * You can use it to filter on additional properties like method, headers, etc. */ - ignoreOutgoingRequests?: (url: string) => boolean; + ignoreOutgoingRequests?: (url: string, request: RequestOptions) => boolean; /** * Do not capture spans or breadcrumbs for incoming HTTP requests to URLs where the given callback returns `true`. @@ -46,8 +49,11 @@ interface HttpOptions { * * The `urlPath` param consists of the URL path and query string (if any) of the incoming request. * For example: `'/users/details?id=123'` + * + * The `request` param contains the original {@type IncomingMessage} object of the incoming request. + * You can use it to filter on additional properties like method, headers, etc. */ - ignoreIncomingRequests?: (urlPath: string) => boolean; + ignoreIncomingRequests?: (urlPath: string, request: IncomingMessage) => boolean; /** * Additional instrumentation options that are passed to the underlying HttpInstrumentation. @@ -101,7 +107,7 @@ export const instrumentHttp = Object.assign( } const _ignoreOutgoingRequests = _httpOptions.ignoreOutgoingRequests; - if (_ignoreOutgoingRequests && _ignoreOutgoingRequests(url)) { + if (_ignoreOutgoingRequests && _ignoreOutgoingRequests(url, request)) { return true; } @@ -120,7 +126,7 @@ export const instrumentHttp = Object.assign( } const _ignoreIncomingRequests = _httpOptions.ignoreIncomingRequests; - if (urlPath && _ignoreIncomingRequests && _ignoreIncomingRequests(urlPath)) { + if (urlPath && _ignoreIncomingRequests && _ignoreIncomingRequests(urlPath, request)) { return true; } From 29c90c532e15ffce0810319679192eaef2b83b72 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 17:44:12 +0000 Subject: [PATCH 22/53] feat(deps): bump @prisma/instrumentation from 5.16.1 to 5.17.0 (#12937) --- packages/node/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/node/package.json b/packages/node/package.json index 6a607c5c09fe..68dec88cf54c 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -87,7 +87,7 @@ "@opentelemetry/resources": "^1.25.1", "@opentelemetry/sdk-trace-base": "^1.25.1", "@opentelemetry/semantic-conventions": "^1.25.1", - "@prisma/instrumentation": "5.16.1", + "@prisma/instrumentation": "5.17.0", "@sentry/core": "8.18.0", "@sentry/opentelemetry": "8.18.0", "@sentry/types": "8.18.0", diff --git a/yarn.lock b/yarn.lock index 9e2ff07d8c53..ee9e5ff6b791 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7465,10 +7465,10 @@ resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.9.1.tgz#d92bd2f7f006e0316cb4fda9d73f235965cf2c64" integrity sha512-caSOnG4kxcSkhqC/2ShV7rEoWwd3XrftokxJqOCMVvia4NYV/TPtJlS9C2os3Igxw/Qyxumj9GBQzcStzECvtQ== -"@prisma/instrumentation@5.16.1": - version "5.16.1" - resolved "https://registry.yarnpkg.com/@prisma/instrumentation/-/instrumentation-5.16.1.tgz#93f996f9c95874156badbb5edbb97994667f7c3f" - integrity sha512-4m5gRFWnQb8s/yTyGbMZkL7A5uJgqOWcWJxapwcAD0T0kh5sGPEVSQl/zTQvE9aduXhFAxOtC3gO+R8Hb5xO1Q== +"@prisma/instrumentation@5.17.0": + version "5.17.0" + resolved "https://registry.yarnpkg.com/@prisma/instrumentation/-/instrumentation-5.17.0.tgz#f741ff517f54b1a896fb8605e0d702f29855c6cb" + integrity sha512-c1Sle4ji8aasMcYfBBHFM56We4ljfenVtRmS8aY06BllS7SoU6SmJBwG7vil+GHiR0Yrh+t9iBwt4AY0Jr4KNQ== dependencies: "@opentelemetry/api" "^1.8" "@opentelemetry/instrumentation" "^0.49 || ^0.50 || ^0.51 || ^0.52.0" From c7e7cc91a086f95d103b0b375b028392c2923a6c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 19:12:35 +0000 Subject: [PATCH 23/53] feat(deps): bump @sentry/cli from 2.32.1 to 2.32.2 (#12923) --- packages/remix/package.json | 2 +- yarn.lock | 92 ++++++++++++++++++------------------- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/packages/remix/package.json b/packages/remix/package.json index 92a6d04b3436..7fb23dbce78d 100644 --- a/packages/remix/package.json +++ b/packages/remix/package.json @@ -54,7 +54,7 @@ "dependencies": { "@opentelemetry/instrumentation-http": "0.52.1", "@remix-run/router": "1.x", - "@sentry/cli": "^2.32.1", + "@sentry/cli": "^2.32.2", "@sentry/core": "8.18.0", "@sentry/node": "8.18.0", "@sentry/opentelemetry": "8.18.0", diff --git a/yarn.lock b/yarn.lock index ee9e5ff6b791..f573adce7753 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8172,45 +8172,45 @@ magic-string "0.30.8" unplugin "1.0.1" -"@sentry/cli-darwin@2.32.1": - version "2.32.1" - resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.32.1.tgz#9cb3b8cfb7068d40979514dee72e2bb3ad2c6d0a" - integrity sha512-z/lEwANTYPCzbWTZ2+eeeNYxRLllC8knd0h+vtAKlhmGw/fyc/N39cznIFyFu+dLJ6tTdjOWOeikHtKuS/7onw== - -"@sentry/cli-linux-arm64@2.32.1": - version "2.32.1" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.32.1.tgz#785a5d5d3d2919c581bf5b4efc638c3695d8c3bf" - integrity sha512-hsGqHYuecUl1Yhq4MhiRejfh1gNlmhyNPcQEoO/DDRBnGnJyEAdiDpKXJcc2e/lT9k40B55Ob2CP1SeY040T2w== - -"@sentry/cli-linux-arm@2.32.1": - version "2.32.1" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.32.1.tgz#7f9e8292850311bab263e7b84800eb407ff37998" - integrity sha512-m0lHkn+o4YKBq8KptGZvpT64FAwSl9mYvHZO9/ChnEGIJ/WyJwiN1X1r9JHVaW4iT5lD0Y5FAyq3JLkk0m0XHg== - -"@sentry/cli-linux-i686@2.32.1": - version "2.32.1" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.32.1.tgz#8e85fa58dee042e6a4642e960d226788f8e7288b" - integrity sha512-SuMLN1/ceFd3Q/B0DVyh5igjetTAF423txiABAHASenEev0lG0vZkRDXFclfgDtDUKRPmOXW7VDMirM3yZWQHQ== - -"@sentry/cli-linux-x64@2.32.1": - version "2.32.1" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.32.1.tgz#b68ed9c4ba163b6730d386dbeca828114f1c979b" - integrity sha512-x4FGd6xgvFddz8V/dh6jii4wy9qjWyvYLBTz8Fhi9rIP+b8wQ3oxwHIdzntareetZP7C1ggx+hZheiYocNYVwA== - -"@sentry/cli-win32-i686@2.32.1": - version "2.32.1" - resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.32.1.tgz#e2532893f87f5d180f6e56f49904d4ac141c8788" - integrity sha512-i6aZma9mFzR+hqMY5VliQZEX6ypP/zUjPK0VtIMYWs5cC6PsQLRmuoeJmy3Z7d4nlh0CdK5NPC813Ej6RY6/vg== - -"@sentry/cli-win32-x64@2.32.1": - version "2.32.1" - resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.32.1.tgz#6b60607cbba243f3708779443cd3f16e09d4289c" - integrity sha512-B58w/lRHLb4MUSjJNfMMw2cQykfimDCMLMmeK+1EiT2RmSeNQliwhhBxYcKk82a8kszH6zg3wT2vCea7LyPUyA== - -"@sentry/cli@^2.22.3", "@sentry/cli@^2.32.1": - version "2.32.1" - resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.32.1.tgz#80932d3d58e6d3b52e2bd705673e08deeb9cb5b0" - integrity sha512-MWkbkzZfnlE7s2pPbg4VozRSAeMlIObfZlTIou9ye6XnPt6ZmmxCLOuOgSKMv4sXg6aeqKNzMNiadThxCWyvPg== +"@sentry/cli-darwin@2.32.2": + version "2.32.2" + resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.32.2.tgz#ae0147b73c2d98f8a64d1e9a1431c1afc0d6ec33" + integrity sha512-GDtePIavx3FKSRowdPdtIssahn46MfFFYNN+s7a9MjlhFwJtvC9A1bSDw7ksEtDaQolepUwmLPHaVe19y0T/zw== + +"@sentry/cli-linux-arm64@2.32.2": + version "2.32.2" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.32.2.tgz#a2f47447e1ad4053a7cff4f176e3b7c66b8ad24e" + integrity sha512-VECLVC1rLyvXk6rTVUfmfs4vhANjMgm4BVKGlA3rydmf2PJw2/NfipH3KeyijdE2vEoyLri+/6HH883pP0iniQ== + +"@sentry/cli-linux-arm@2.32.2": + version "2.32.2" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.32.2.tgz#59fa70957d4fd8e06fdb2f2a59cfaf7165431859" + integrity sha512-u9s08wr8bDDqsAl6pk9iGGlOHtU+T8btU6voNKy71QzeIBpV9c8VVk/OnmP9aswp/ea4NY416yjnzcTvCrFKAw== + +"@sentry/cli-linux-i686@2.32.2": + version "2.32.2" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.32.2.tgz#479c972781ffce2ca448f084a4d7787106dfaef1" + integrity sha512-XhofQz32OqLrQK1DEOsryhT7d29Df6VkccvxueGoIt2gpXEXtgRczsUwZjZqquDdkNCt+HPj9eUGcj8pY8JkmQ== + +"@sentry/cli-linux-x64@2.32.2": + version "2.32.2" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.32.2.tgz#fa4ede3ac428a92e305f15f23515a9f977f1d1e9" + integrity sha512-anyng4Qqt7zX4ZY4IzDH1RJWAVZNBe6sUHcuciNy7giCU3B4/XnxAHlwYmBSN5txpaumsWdstPgRKEUJG6AOSA== + +"@sentry/cli-win32-i686@2.32.2": + version "2.32.2" + resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.32.2.tgz#393176a54fecd5226571d980b84425ef73cf0b1a" + integrity sha512-/auqx7QXG7F556fNK7vaB26pX7Far1CQMfI65iV4u/VWg6gV2WfvJWXB4iowhjqkYv56sZ+zOymLkEVF0R8wtg== + +"@sentry/cli-win32-x64@2.32.2": + version "2.32.2" + resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.32.2.tgz#145b56132c04c62bb09bac802602295cd60e43e1" + integrity sha512-w7hW2sEWVYQquqdILBSFhcVW+HdoyLqVPPkLPAXRSLTwBnuni9nQEIdXr0h/7db+K3cm7PvWndp5ixVyswLHZA== + +"@sentry/cli@^2.22.3", "@sentry/cli@^2.32.2": + version "2.32.2" + resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.32.2.tgz#ed1ee74a498a3cf1e3344309f600184ab270b52e" + integrity sha512-m/6Z3FWu+rTd8jepVlJPKQhvbT8vCjt0N7BSWZiEUVW/8mhwAYJiwO0b+Ch/u4IqbBg1dp3805q5TFPl4AdrNw== dependencies: https-proxy-agent "^5.0.0" node-fetch "^2.6.7" @@ -8218,13 +8218,13 @@ proxy-from-env "^1.1.0" which "^2.0.2" optionalDependencies: - "@sentry/cli-darwin" "2.32.1" - "@sentry/cli-linux-arm" "2.32.1" - "@sentry/cli-linux-arm64" "2.32.1" - "@sentry/cli-linux-i686" "2.32.1" - "@sentry/cli-linux-x64" "2.32.1" - "@sentry/cli-win32-i686" "2.32.1" - "@sentry/cli-win32-x64" "2.32.1" + "@sentry/cli-darwin" "2.32.2" + "@sentry/cli-linux-arm" "2.32.2" + "@sentry/cli-linux-arm64" "2.32.2" + "@sentry/cli-linux-i686" "2.32.2" + "@sentry/cli-linux-x64" "2.32.2" + "@sentry/cli-win32-i686" "2.32.2" + "@sentry/cli-win32-x64" "2.32.2" "@sentry/vite-plugin@2.19.0": version "2.19.0" From 7adbec4d50f1c8ec3008c6abecbb22071467c2c7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 19:29:24 +0000 Subject: [PATCH 24/53] feat(deps): bump @opentelemetry/instrumentation-aws-lambda from 0.42.0 to 0.43.0 (#12922) --- packages/aws-serverless/package.json | 2 +- yarn.lock | 30 +++++----------------------- 2 files changed, 6 insertions(+), 26 deletions(-) diff --git a/packages/aws-serverless/package.json b/packages/aws-serverless/package.json index d15b48f3e86a..9d89e4f2a327 100644 --- a/packages/aws-serverless/package.json +++ b/packages/aws-serverless/package.json @@ -64,7 +64,7 @@ "access": "public" }, "dependencies": { - "@opentelemetry/instrumentation-aws-lambda": "0.42.0", + "@opentelemetry/instrumentation-aws-lambda": "0.43.0", "@opentelemetry/instrumentation-aws-sdk": "0.43.0", "@sentry/core": "8.18.0", "@sentry/node": "8.18.0", diff --git a/yarn.lock b/yarn.lock index f573adce7753..e703f7baaec2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6961,13 +6961,6 @@ dependencies: "@opentelemetry/semantic-conventions" "1.23.0" -"@opentelemetry/core@1.24.1": - version "1.24.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-1.24.1.tgz#35ab9d2ac9ca938e0ffbdfa40c49c169ac8ba80d" - integrity sha512-wMSGfsdmibI88K9wB498zXY04yThPexo8jvwNNlm542HZB7XrrMRBbAyKJqG8qDRJwIBdBrPMi4V9ZPW/sqrcg== - dependencies: - "@opentelemetry/semantic-conventions" "1.24.1" - "@opentelemetry/core@1.25.0": version "1.25.0" resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-1.25.0.tgz#ad034f5c2669f589bd703bfbbaa38b51f8504053" @@ -6991,10 +6984,10 @@ "@opentelemetry/context-base" "^0.12.0" semver "^7.1.3" -"@opentelemetry/instrumentation-aws-lambda@0.42.0": - version "0.42.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-aws-lambda/-/instrumentation-aws-lambda-0.42.0.tgz#b832660078cbcd65293405c9bcbf9d335f021f4d" - integrity sha512-GhV3s62W8gWXDuCdPkWj60W3giHGadHoGBPGW5Wud2fUK9lY6FiYxv6AmCokzugTaiRfB2RjsaJWd9xTtYttVA== +"@opentelemetry/instrumentation-aws-lambda@0.43.0": + version "0.43.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-aws-lambda/-/instrumentation-aws-lambda-0.43.0.tgz#6a96d582627873bb34d197655b7b69792f0f8da3" + integrity sha512-pSxcWlsE/pCWQRIw92sV2C+LmKXelYkjkA7C5s39iPUi4pZ2lA1nIiw+1R/y2pDEhUHcaKkNyljQr3cx9ZpVlQ== dependencies: "@opentelemetry/instrumentation" "^0.52.0" "@opentelemetry/propagator-aws-xray" "^1.3.1" @@ -7227,7 +7220,7 @@ "@opentelemetry/core" "1.25.0" "@opentelemetry/semantic-conventions" "1.25.0" -"@opentelemetry/resources@1.25.1", "@opentelemetry/resources@^1.23.0", "@opentelemetry/resources@^1.25.1": +"@opentelemetry/resources@1.25.1", "@opentelemetry/resources@^1.23.0", "@opentelemetry/resources@^1.25.1", "@opentelemetry/resources@^1.8.0": version "1.25.1" resolved "https://registry.yarnpkg.com/@opentelemetry/resources/-/resources-1.25.1.tgz#bb9a674af25a1a6c30840b755bc69da2796fefbb" integrity sha512-pkZT+iFYIZsVn6+GzM0kSX+u3MSLCY9md+lIJOoKl/P+gJFfxJte/60Usdp8Ce4rOs8GduUpSPNe1ddGyDT1sQ== @@ -7243,14 +7236,6 @@ "@opentelemetry/api" "^0.12.0" "@opentelemetry/core" "^0.12.0" -"@opentelemetry/resources@^1.8.0": - version "1.24.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/resources/-/resources-1.24.1.tgz#5e2cb84814824f3b1e1017e6caeeee8402e0ad6e" - integrity sha512-cyv0MwAaPF7O86x5hk3NNgenMObeejZFLJJDVuSeSMIsknlsj3oOZzRv3qSzlwYomXsICfBeFFlxwHQte5mGXQ== - dependencies: - "@opentelemetry/core" "1.24.1" - "@opentelemetry/semantic-conventions" "1.24.1" - "@opentelemetry/sdk-logs@0.50.0": version "0.50.0" resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-logs/-/sdk-logs-0.50.0.tgz#6636492cf626a9666f61d91025e25243d1a43bfc" @@ -7300,11 +7285,6 @@ resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.23.0.tgz#627f2721b960fe586b7f72a07912cb7699f06eef" integrity sha512-MiqFvfOzfR31t8cc74CTP1OZfz7MbqpAnLCra8NqQoaHJX6ncIRTdYOQYBDQ2uFISDq0WY8Y9dDTWvsgzzBYRg== -"@opentelemetry/semantic-conventions@1.24.1": - version "1.24.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.1.tgz#d4bcebda1cb5146d47a2a53daaa7922f8e084dfb" - integrity sha512-VkliWlS4/+GHLLW7J/rVBA00uXus1SWvwFvcUDxDwmFxYfg/2VI6ekwdXS28cjI8Qz2ky2BzG8OUHo+WeYIWqw== - "@opentelemetry/semantic-conventions@1.25.0": version "1.25.0" resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.25.0.tgz#390eb4d42a29c66bdc30066af9035645e9bb7270" From a8bce24908b4546936b416bae175b124c391a720 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Wed, 17 Jul 2024 08:51:20 +0200 Subject: [PATCH 25/53] docs: Add docs about resolving gitflow merge conflicts (#12936) This adds docs about how to resolve gitflow merge conflicts. --------- Co-authored-by: Andrei <168741329+andreiborza@users.noreply.github.com> --- docs/gitflow.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/gitflow.md b/docs/gitflow.md index 8926c614bcfc..8bc853e8dbf0 100644 --- a/docs/gitflow.md +++ b/docs/gitflow.md @@ -18,3 +18,16 @@ We use [Gitflow](https://docs.github.com/en/get-started/quickstart/github-flow) While a release is pending, we may merge anything into develop, **except for changes to package.json files**. If we change the package.json files on develop, the gitflow PR master -> develop will have merge conflicts, because during the release the package.json files are updated on master. + +## What to do if there is a merge conflict? + +Although gitflow should help us to avoid merge conflicts, as mentioned above in "Important Caveats" it can still happen +that you get a merge conflict when trying to merge master into develop after a successful release. + +If this happen, you can resolve this as follows: + +- Close the automated PR that was created by the gitflow automation +- Create a new branch on top of `master` (e.g. `manual-develop-sync`) +- Merge `develop` into this branch, with a merge commit (and fix any merge conflicts that come up) +- Now create a PR against `develop` from your branch (e.g. `manual-develop-sync`) +- Merge this PR with a merge commit From 36d1d432476c8a1dd483a1b50b655b1b886012cc Mon Sep 17 00:00:00 2001 From: Andrei <168741329+andreiborza@users.noreply.github.com> Date: Wed, 17 Jul 2024 10:24:18 +0200 Subject: [PATCH 26/53] meta(changelog): Add missing contributor attribution (#12946) Unfortunately, we missed adding a contributor to the changelog https://github.com/getsentry/sentry-javascript/pull/12932/files#r1679943685 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 392564b0c24e..336529b9ff23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,7 +38,7 @@ instead. If you want to disable performance monitoring, remove the `tracesSample - fix(tracing): Ensure you can pass `null` as `parentSpan` in `startSpan*` (#12928) - ref(core): Small bundle size improvement (#12830) -Work in this release was contributed by @GitSquared and @mcous. Thank you for your contributions! +Work in this release was contributed by @GitSquared, @ziyadkhalil and @mcous. Thank you for your contributions! ## 8.17.0 From e710f3bcdbe8b77fd24a4bb7e487fa8456286a68 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 17 Jul 2024 14:34:48 +0200 Subject: [PATCH 27/53] fix(browser): Fix bug causing unintentional dropping of transactions (#12933) --- packages/browser-utils/src/metrics/browserMetrics.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/browser-utils/src/metrics/browserMetrics.ts b/packages/browser-utils/src/metrics/browserMetrics.ts index cb48c2e8b675..02c044322bd3 100644 --- a/packages/browser-utils/src/metrics/browserMetrics.ts +++ b/packages/browser-utils/src/metrics/browserMetrics.ts @@ -287,7 +287,13 @@ export function addPerformanceEntries(span: Span): void { // eslint-disable-next-line @typescript-eslint/no-explicit-any performanceEntries.slice(_performanceCursor).forEach((entry: Record) => { const startTime = msToSec(entry.startTime); - const duration = msToSec(entry.duration); + const duration = msToSec( + // Inexplicibly, Chrome sometimes emits a negative duration. We need to work around this. + // There is a SO post attempting to explain this, but it leaves one with open questions: https://stackoverflow.com/questions/23191918/peformance-getentries-and-negative-duration-display + // The way we clamp the value is probably not accurate, since we have observed this happen for things that may take a while to load, like for example the replay worker. + // TODO: Investigate why this happens and how to properly mitigate. For now, this is a workaround to prevent transactions being dropped due to negative duration spans. + Math.max(0, entry.duration), + ); if (op === 'navigation' && transactionStartTime && timeOrigin + startTime < transactionStartTime) { return; From 5ceb1f4a0c76e2be195b0bd489655796ce381f66 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Wed, 17 Jul 2024 11:16:21 -0400 Subject: [PATCH 28/53] chore: Update changed package paths (#12954) I noticed these while working on the cloudflare sdk. - update browser path to use new replay packages We were previously referencing `packages/replay`, which does not exist anymore. This updates us to use the correct paths. - add vercel-edge to nextjs The nextjs sdk depends on vercel-edge, so we should be running tests for it when that package changes. - remove browser from deno The deno sdk no longer relies on the browser sdk, this updates the paths accordingly - add bun section We can be smarter about CI time and only run bun tests when relevant package paths change. --- .github/workflows/build.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 91e40645e0fc..cbf2fe9030da 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -105,7 +105,8 @@ jobs: - *shared - 'packages/browser/**' - 'packages/browser-utils/**' - - 'packages/replay/**' + - 'packages/replay-internal/**' + - 'packages/replay-worker/**' - 'packages/replay-canvas/**' - 'packages/feedback/**' - 'packages/wasm/**' @@ -131,6 +132,7 @@ jobs: - *node - 'packages/nextjs/**' - 'packages/react/**' + - 'packages/vercel-edge/**' remix: - *shared - *browser @@ -147,8 +149,10 @@ jobs: - 'dev-packages/e2e-tests/test-applications/node-profiling/**' deno: - *shared - - *browser - 'packages/deno/**' + bun: + - *shared + - 'packages/bun/**' any_code: - '!**/*.md' @@ -166,6 +170,7 @@ jobs: changed_profiling_node: ${{ steps.changed.outputs.profiling_node }} changed_profiling_node_bindings: ${{ steps.changed.outputs.profiling_node_bindings }} changed_deno: ${{ steps.changed.outputs.deno }} + changed_bun: ${{ steps.changed.outputs.bun }} changed_browser: ${{ steps.changed.outputs.browser }} changed_browser_integration: ${{ steps.changed.outputs.browser_integration }} changed_any_code: ${{ steps.changed.outputs.any_code }} @@ -451,6 +456,7 @@ jobs: job_bun_unit_tests: name: Bun Unit Tests needs: [job_get_metadata, job_build] + if: needs.job_get_metadata.outputs.changed_bun == 'true' || github.event_name != 'pull_request' timeout-minutes: 10 runs-on: ubuntu-20.04 strategy: From 80d76c9a475684d88abd0d04b48f0987ef52f960 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Wed, 17 Jul 2024 13:30:34 -0400 Subject: [PATCH 29/53] test(vercel-edge): Switch to using vitest (#12958) Before: `Time: 2.621 s` After: `Duration 638ms (transform 343ms, setup 0ms, collect 1.61s, tests 22ms, environment 0ms, prepare 278ms)` ref https://github.com/getsentry/sentry-javascript/issues/11084 Also removes `edge-runtime/jest-environment` which we weren't using anyway, removes a lot of unnecessary stuff in our `yarn.lock` (-151 lines!) --- packages/vercel-edge/jest.config.js | 7 - packages/vercel-edge/package.json | 7 +- packages/vercel-edge/test/async.test.ts | 233 +++++++++--------- packages/vercel-edge/test/sdk.test.ts | 4 +- .../vercel-edge/test/transports/index.test.ts | 22 +- .../vercel-edge/test/wintercg-fetch.test.ts | 12 +- packages/vercel-edge/tsconfig.test.json | 4 +- packages/vercel-edge/vite.config.ts | 5 + yarn.lock | 151 +----------- 9 files changed, 164 insertions(+), 281 deletions(-) delete mode 100644 packages/vercel-edge/jest.config.js create mode 100644 packages/vercel-edge/vite.config.ts diff --git a/packages/vercel-edge/jest.config.js b/packages/vercel-edge/jest.config.js deleted file mode 100644 index dfc8f746b929..000000000000 --- a/packages/vercel-edge/jest.config.js +++ /dev/null @@ -1,7 +0,0 @@ -const baseConfig = require('../../jest/jest.config.js'); - -module.exports = { - ...baseConfig, - // TODO: Fix tests to work with the Edge environment - // testEnvironment: '@edge-runtime/jest-environment', -}; diff --git a/packages/vercel-edge/package.json b/packages/vercel-edge/package.json index 34c4a5a0e828..f9dbdc7789e9 100644 --- a/packages/vercel-edge/package.json +++ b/packages/vercel-edge/package.json @@ -44,8 +44,7 @@ "@sentry/utils": "8.18.0" }, "devDependencies": { - "@edge-runtime/jest-environment": "2.2.3", - "@edge-runtime/types": "2.2.3" + "@edge-runtime/types": "3.0.1" }, "scripts": { "build": "run-p build:transpile build:types", @@ -63,8 +62,8 @@ "clean": "rimraf build coverage sentry-vercel-edge-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", - "test": "jest", - "test:watch": "jest --watch", + "test": "vitest run", + "test:watch": "vitest --watch", "yalc:publish": "yalc publish --push --sig" }, "volta": { diff --git a/packages/vercel-edge/test/async.test.ts b/packages/vercel-edge/test/async.test.ts index 37b357ab4910..a4423e0ca434 100644 --- a/packages/vercel-edge/test/async.test.ts +++ b/packages/vercel-edge/test/async.test.ts @@ -1,6 +1,7 @@ import { Scope, getCurrentScope, getGlobalScope, getIsolationScope, withIsolationScope, withScope } from '@sentry/core'; import { GLOBAL_OBJ } from '@sentry/utils'; import { AsyncLocalStorage } from 'async_hooks'; +import { beforeEach, describe, expect, it } from 'vitest'; import { setAsyncLocalStorageAsyncContextStrategy } from '../src/async'; describe('withScope()', () => { @@ -13,67 +14,73 @@ describe('withScope()', () => { setAsyncLocalStorageAsyncContextStrategy(); }); - it('will make the passed scope the active scope within the callback', done => { - withScope(scope => { - expect(getCurrentScope()).toBe(scope); - done(); - }); - }); - - it('will pass a scope that is different from the current active isolation scope', done => { - withScope(scope => { - expect(getIsolationScope()).not.toBe(scope); - done(); - }); - }); - - it('will always make the inner most passed scope the current scope when nesting calls', done => { - withIsolationScope(_scope1 => { - withIsolationScope(scope2 => { - expect(getIsolationScope()).toBe(scope2); + it('will make the passed scope the active scope within the callback', () => + new Promise(done => { + withScope(scope => { + expect(getCurrentScope()).toBe(scope); done(); }); - }); - }); + })); - it('forks the scope when not passing any scope', done => { - const initialScope = getCurrentScope(); - initialScope.setTag('aa', 'aa'); - - withScope(scope => { - expect(getCurrentScope()).toBe(scope); - scope.setTag('bb', 'bb'); - expect(scope).not.toBe(initialScope); - expect(scope.getScopeData().tags).toEqual({ aa: 'aa', bb: 'bb' }); - done(); - }); - }); - - it('forks the scope when passing undefined', done => { - const initialScope = getCurrentScope(); - initialScope.setTag('aa', 'aa'); - - withScope(undefined, scope => { - expect(getCurrentScope()).toBe(scope); - scope.setTag('bb', 'bb'); - expect(scope).not.toBe(initialScope); - expect(scope.getScopeData().tags).toEqual({ aa: 'aa', bb: 'bb' }); - done(); - }); - }); + it('will pass a scope that is different from the current active isolation scope', () => + new Promise(done => { + withScope(scope => { + expect(getIsolationScope()).not.toBe(scope); + done(); + }); + })); + + it('will always make the inner most passed scope the current scope when nesting calls', () => + new Promise(done => { + withIsolationScope(_scope1 => { + withIsolationScope(scope2 => { + expect(getIsolationScope()).toBe(scope2); + done(); + }); + }); + })); + + it('forks the scope when not passing any scope', () => + new Promise(done => { + const initialScope = getCurrentScope(); + initialScope.setTag('aa', 'aa'); + + withScope(scope => { + expect(getCurrentScope()).toBe(scope); + scope.setTag('bb', 'bb'); + expect(scope).not.toBe(initialScope); + expect(scope.getScopeData().tags).toEqual({ aa: 'aa', bb: 'bb' }); + done(); + }); + })); + + it('forks the scope when passing undefined', () => + new Promise(done => { + const initialScope = getCurrentScope(); + initialScope.setTag('aa', 'aa'); + + withScope(undefined, scope => { + expect(getCurrentScope()).toBe(scope); + scope.setTag('bb', 'bb'); + expect(scope).not.toBe(initialScope); + expect(scope.getScopeData().tags).toEqual({ aa: 'aa', bb: 'bb' }); + done(); + }); + })); - it('sets the passed in scope as active scope', done => { - const initialScope = getCurrentScope(); - initialScope.setTag('aa', 'aa'); + it('sets the passed in scope as active scope', () => + new Promise(done => { + const initialScope = getCurrentScope(); + initialScope.setTag('aa', 'aa'); - const customScope = new Scope(); + const customScope = new Scope(); - withScope(customScope, scope => { - expect(getCurrentScope()).toBe(customScope); - expect(scope).toBe(customScope); - done(); - }); - }); + withScope(customScope, scope => { + expect(getCurrentScope()).toBe(customScope); + expect(scope).toBe(customScope); + done(); + }); + })); }); describe('withIsolationScope()', () => { @@ -86,65 +93,71 @@ describe('withIsolationScope()', () => { setAsyncLocalStorageAsyncContextStrategy(); }); - it('will make the passed isolation scope the active isolation scope within the callback', done => { - withIsolationScope(scope => { - expect(getIsolationScope()).toBe(scope); - done(); - }); - }); - - it('will pass an isolation scope that is different from the current active scope', done => { - withIsolationScope(scope => { - expect(getCurrentScope()).not.toBe(scope); - done(); - }); - }); - - it('will always make the inner most passed scope the current scope when nesting calls', done => { - withIsolationScope(_scope1 => { - withIsolationScope(scope2 => { - expect(getIsolationScope()).toBe(scope2); + it('will make the passed isolation scope the active isolation scope within the callback', () => + new Promise(done => { + withIsolationScope(scope => { + expect(getIsolationScope()).toBe(scope); done(); }); - }); - }); + })); - it('forks the isolation scope when not passing any isolation scope', done => { - const initialScope = getIsolationScope(); - initialScope.setTag('aa', 'aa'); - - withIsolationScope(scope => { - expect(getIsolationScope()).toBe(scope); - scope.setTag('bb', 'bb'); - expect(scope).not.toBe(initialScope); - expect(scope.getScopeData().tags).toEqual({ aa: 'aa', bb: 'bb' }); - done(); - }); - }); - - it('forks the isolation scope when passing undefined', done => { - const initialScope = getIsolationScope(); - initialScope.setTag('aa', 'aa'); - - withIsolationScope(undefined, scope => { - expect(getIsolationScope()).toBe(scope); - scope.setTag('bb', 'bb'); - expect(scope).not.toBe(initialScope); - expect(scope.getScopeData().tags).toEqual({ aa: 'aa', bb: 'bb' }); - done(); - }); - }); + it('will pass an isolation scope that is different from the current active scope', () => + new Promise(done => { + withIsolationScope(scope => { + expect(getCurrentScope()).not.toBe(scope); + done(); + }); + })); + + it('will always make the inner most passed scope the current scope when nesting calls', () => + new Promise(done => { + withIsolationScope(_scope1 => { + withIsolationScope(scope2 => { + expect(getIsolationScope()).toBe(scope2); + done(); + }); + }); + })); + + it('forks the isolation scope when not passing any isolation scope', () => + new Promise(done => { + const initialScope = getIsolationScope(); + initialScope.setTag('aa', 'aa'); + + withIsolationScope(scope => { + expect(getIsolationScope()).toBe(scope); + scope.setTag('bb', 'bb'); + expect(scope).not.toBe(initialScope); + expect(scope.getScopeData().tags).toEqual({ aa: 'aa', bb: 'bb' }); + done(); + }); + })); + + it('forks the isolation scope when passing undefined', () => + new Promise(done => { + const initialScope = getIsolationScope(); + initialScope.setTag('aa', 'aa'); + + withIsolationScope(undefined, scope => { + expect(getIsolationScope()).toBe(scope); + scope.setTag('bb', 'bb'); + expect(scope).not.toBe(initialScope); + expect(scope.getScopeData().tags).toEqual({ aa: 'aa', bb: 'bb' }); + done(); + }); + })); - it('sets the passed in isolation scope as active isolation scope', done => { - const initialScope = getIsolationScope(); - initialScope.setTag('aa', 'aa'); + it('sets the passed in isolation scope as active isolation scope', () => + new Promise(done => { + const initialScope = getIsolationScope(); + initialScope.setTag('aa', 'aa'); - const customScope = new Scope(); + const customScope = new Scope(); - withIsolationScope(customScope, scope => { - expect(getIsolationScope()).toBe(customScope); - expect(scope).toBe(customScope); - done(); - }); - }); + withIsolationScope(customScope, scope => { + expect(getIsolationScope()).toBe(customScope); + expect(scope).toBe(customScope); + done(); + }); + })); }); diff --git a/packages/vercel-edge/test/sdk.test.ts b/packages/vercel-edge/test/sdk.test.ts index f693e2777d99..b1367716c73a 100644 --- a/packages/vercel-edge/test/sdk.test.ts +++ b/packages/vercel-edge/test/sdk.test.ts @@ -1,9 +1,11 @@ +import { describe, expect, it, vi } from 'vitest'; + import * as SentryCore from '@sentry/core'; import { init } from '../src/sdk'; describe('init', () => { it('initializes and returns client', () => { - const initSpy = jest.spyOn(SentryCore, 'initAndBind'); + const initSpy = vi.spyOn(SentryCore, 'initAndBind'); expect(init({})).not.toBeUndefined(); expect(initSpy).toHaveBeenCalledTimes(1); diff --git a/packages/vercel-edge/test/transports/index.test.ts b/packages/vercel-edge/test/transports/index.test.ts index 252522171780..c2ead21998be 100644 --- a/packages/vercel-edge/test/transports/index.test.ts +++ b/packages/vercel-edge/test/transports/index.test.ts @@ -1,3 +1,5 @@ +import { afterAll, describe, expect, it, vi } from 'vitest'; + import type { EventEnvelope, EventItem } from '@sentry/types'; import { createEnvelope, serializeEnvelope } from '@sentry/utils'; @@ -23,7 +25,7 @@ class Headers { } } -const mockFetch = jest.fn(); +const mockFetch = vi.fn(); const oldFetch = global.fetch; global.fetch = mockFetch; @@ -57,7 +59,7 @@ describe('Edge Transport', () => { it('sets rate limit headers', async () => { const headers = { - get: jest.fn(), + get: vi.fn(), }; mockFetch.mockImplementationOnce(() => @@ -110,8 +112,8 @@ describe('IsolatedPromiseBuffer', () => { it('should not call tasks until drained', async () => { const ipb = new IsolatedPromiseBuffer(); - const task1 = jest.fn(() => Promise.resolve({})); - const task2 = jest.fn(() => Promise.resolve({})); + const task1 = vi.fn(() => Promise.resolve({})); + const task2 = vi.fn(() => Promise.resolve({})); await ipb.add(task1); await ipb.add(task2); @@ -128,10 +130,10 @@ describe('IsolatedPromiseBuffer', () => { it('should not allow adding more items than the specified limit', async () => { const ipb = new IsolatedPromiseBuffer(3); - const task1 = jest.fn(() => Promise.resolve({})); - const task2 = jest.fn(() => Promise.resolve({})); - const task3 = jest.fn(() => Promise.resolve({})); - const task4 = jest.fn(() => Promise.resolve({})); + const task1 = vi.fn(() => Promise.resolve({})); + const task2 = vi.fn(() => Promise.resolve({})); + const task3 = vi.fn(() => Promise.resolve({})); + const task4 = vi.fn(() => Promise.resolve({})); await ipb.add(task1); await ipb.add(task2); @@ -143,8 +145,8 @@ describe('IsolatedPromiseBuffer', () => { it('should not throw when one of the tasks throws when drained', async () => { const ipb = new IsolatedPromiseBuffer(); - const task1 = jest.fn(() => Promise.resolve({})); - const task2 = jest.fn(() => Promise.reject(new Error())); + const task1 = vi.fn(() => Promise.resolve({})); + const task2 = vi.fn(() => Promise.reject(new Error())); await ipb.add(task1); await ipb.add(task2); diff --git a/packages/vercel-edge/test/wintercg-fetch.test.ts b/packages/vercel-edge/test/wintercg-fetch.test.ts index ae830ed9c1e8..34328734cd83 100644 --- a/packages/vercel-edge/test/wintercg-fetch.test.ts +++ b/packages/vercel-edge/test/wintercg-fetch.test.ts @@ -1,3 +1,5 @@ +import { beforeEach, describe, expect, it, vi } from 'vitest'; + import * as sentryCore from '@sentry/core'; import type { HandlerDataFetch, Integration } from '@sentry/types'; import * as sentryUtils from '@sentry/utils'; @@ -12,15 +14,15 @@ class FakeClient extends VercelEdgeClient { } } -const addFetchInstrumentationHandlerSpy = jest.spyOn(sentryUtils, 'addFetchInstrumentationHandler'); -const instrumentFetchRequestSpy = jest.spyOn(sentryCore, 'instrumentFetchRequest'); -const addBreadcrumbSpy = jest.spyOn(sentryCore, 'addBreadcrumb'); +const addFetchInstrumentationHandlerSpy = vi.spyOn(sentryUtils, 'addFetchInstrumentationHandler'); +const instrumentFetchRequestSpy = vi.spyOn(sentryCore, 'instrumentFetchRequest'); +const addBreadcrumbSpy = vi.spyOn(sentryCore, 'addBreadcrumb'); describe('WinterCGFetch instrumentation', () => { let client: FakeClient; beforeEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); client = new FakeClient({ dsn: 'https://public@dsn.ingest.sentry.io/1337', @@ -35,7 +37,7 @@ describe('WinterCGFetch instrumentation', () => { stackParser: createStackParser(), }); - jest.spyOn(sentryCore, 'getClient').mockImplementation(() => client); + vi.spyOn(sentryCore, 'getClient').mockImplementation(() => client); }); it('should call `instrumentFetchRequest` for outgoing fetch requests', () => { diff --git a/packages/vercel-edge/tsconfig.test.json b/packages/vercel-edge/tsconfig.test.json index 87f6afa06b86..ca7dbeb3be94 100644 --- a/packages/vercel-edge/tsconfig.test.json +++ b/packages/vercel-edge/tsconfig.test.json @@ -1,11 +1,11 @@ { "extends": "./tsconfig.json", - "include": ["test/**/*"], + "include": ["test/**/*", "vite.config.ts"], "compilerOptions": { // should include all types from `./tsconfig.json` plus types for all test frameworks used - "types": ["node", "jest"] + "types": ["node"] // other package-specific, test-specific options } diff --git a/packages/vercel-edge/vite.config.ts b/packages/vercel-edge/vite.config.ts new file mode 100644 index 000000000000..0582a58f479a --- /dev/null +++ b/packages/vercel-edge/vite.config.ts @@ -0,0 +1,5 @@ +import baseConfig from '../../vite/vite.config'; + +export default { + ...baseConfig, +}; diff --git a/yarn.lock b/yarn.lock index e703f7baaec2..e1afaa9a9f1f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4008,40 +4008,17 @@ resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== -"@edge-runtime/jest-environment@2.2.3": - version "2.2.3" - resolved "https://registry.yarnpkg.com/@edge-runtime/jest-environment/-/jest-environment-2.2.3.tgz#2fef094d769f45b5018b33bdc58e664b35bbc312" - integrity sha512-5DEv8nzuMFGoVbNYbOz7/mileYSbq1/oIvisyTeSfyjId7Pc5Qh2t3BH7ixLa62aVz7oCQlALM4cYGbZQZw1YQ== - dependencies: - "@edge-runtime/vm" "3.0.3" - "@jest/environment" "29.5.0" - "@jest/fake-timers" "29.5.0" - jest-mock "29.5.0" - jest-util "29.5.0" - -"@edge-runtime/primitives@3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@edge-runtime/primitives/-/primitives-3.0.3.tgz#adc6a4bd34c44faf81c954cf8e5816c7d408a1ea" - integrity sha512-YnfMWMRQABAH8IsnFMJWMW+SyB4ZeYBPnR7V0aqdnew7Pq60cbH5DyFjS/FhiLwvHQk9wBREmXD7PP0HooEQ1A== - -"@edge-runtime/primitives@4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@edge-runtime/primitives/-/primitives-4.0.1.tgz#12efffac1caa8a29ae8f86a3f87f20cc0ae07131" - integrity sha512-hxWUzx1SeyOed/Ea9Z6y6tyFKSj8gQWIdLilybTR2ene1IthLZE01A1SLGoch1szUdhFlUwpWDaYBYQw00lj2g== - -"@edge-runtime/types@2.2.3": - version "2.2.3" - resolved "https://registry.yarnpkg.com/@edge-runtime/types/-/types-2.2.3.tgz#cb57b7215bcf406324ec591346b7b51c75a54bdf" - integrity sha512-zL0ENQWwdocECEQXVopGTfnqI0tJ8wzDOCoQymoc8MLRz+Zw2V1W0ex9vczniTUzB+H/P7ubMgx3GFzLp3NPBg== - dependencies: - "@edge-runtime/primitives" "4.0.1" +"@edge-runtime/primitives@5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@edge-runtime/primitives/-/primitives-5.0.1.tgz#29e2de862d8e02d1e85fd8aa1c73afe0317e6740" + integrity sha512-qjqqCa9v3IE7Fo9OnmkIWg9l0WUu3uOfUYomuOVxaaHqlIvNI75E5IB0XNNDypz249ObRSmjRj8jLjkBUmFYYw== -"@edge-runtime/vm@3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@edge-runtime/vm/-/vm-3.0.3.tgz#92f1930d1eb8d0ccf6a3c165561cc22b2d9ddff8" - integrity sha512-SPfI1JeIRNs/4EEE2Oc0X6gG3RqjD1TnKu2lwmwFXq0435xgZGKhc3UiKkYAdoMn2dNFD73nlabMKHBRoMRpxg== +"@edge-runtime/types@3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@edge-runtime/types/-/types-3.0.1.tgz#907bd98ec551deba6fd26b72189fde651779191b" + integrity sha512-yZSWlGMQXXtpE4m1WYRpjA8V9+uU3uKHJzx9lngSYDZYYABuYxb2bICBwE1NQD0WS/u/PreP/83GcndezMFmnQ== dependencies: - "@edge-runtime/primitives" "3.0.3" + "@edge-runtime/primitives" "5.0.1" "@ember-data/rfc395-data@^0.0.4": version "0.0.4" @@ -5664,16 +5641,6 @@ slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.5.0.tgz#9152d56317c1fdb1af389c46640ba74ef0bb4c65" - integrity sha512-5FXw2+wD29YU1d4I2htpRX7jYnAyTRjP2CsXQdo9SAM8g3ifxWPSV0HnClSn71xwctr0U3oZIIH+dtbfmnbXVQ== - dependencies: - "@jest/fake-timers" "^29.5.0" - "@jest/types" "^29.5.0" - "@types/node" "*" - jest-mock "^29.5.0" - "@jest/environment@^27.5.1": version "27.5.1" resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.5.1.tgz#d7425820511fe7158abbecc010140c3fd3be9c74" @@ -5684,18 +5651,6 @@ "@types/node" "*" jest-mock "^27.5.1" -"@jest/fake-timers@29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.5.0.tgz#d4d09ec3286b3d90c60bdcd66ed28d35f1b4dc2c" - integrity sha512-9ARvuAAQcBwDAqOnglWq2zwNIRUDtk/SCkp/ToGEhFv5r86K21l+VEs0qNTaXtyiY0lEePl3kylijSYJQqdbDg== - dependencies: - "@jest/types" "^29.5.0" - "@sinonjs/fake-timers" "^10.0.2" - "@types/node" "*" - jest-message-util "^29.5.0" - jest-mock "^29.5.0" - jest-util "^29.5.0" - "@jest/fake-timers@^27.5.1": version "27.5.1" resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.5.1.tgz#76979745ce0579c8a94a4678af7a748eda8ada74" @@ -5708,18 +5663,6 @@ jest-mock "^27.5.1" jest-util "^27.5.1" -"@jest/fake-timers@^29.5.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz#fd91bf1fffb16d7d0d24a426ab1a47a49881a565" - integrity sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ== - dependencies: - "@jest/types" "^29.6.3" - "@sinonjs/fake-timers" "^10.0.2" - "@types/node" "*" - jest-message-util "^29.7.0" - jest-mock "^29.7.0" - jest-util "^29.7.0" - "@jest/globals@^27.5.1": version "27.5.1" resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.5.1.tgz#7ac06ce57ab966566c7963431cef458434601b2b" @@ -5835,18 +5778,6 @@ "@types/yargs" "^16.0.0" chalk "^4.0.0" -"@jest/types@^29.5.0", "@jest/types@^29.6.3": - version "29.6.3" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59" - integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== - dependencies: - "@jest/schemas" "^29.6.3" - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^17.0.8" - chalk "^4.0.0" - "@josephg/resolvable@^1.0.0": version "1.0.1" resolved "https://registry.yarnpkg.com/@josephg/resolvable/-/resolvable-1.0.1.tgz#69bc4db754d79e1a2f17a650d3466e038d94a5eb" @@ -10123,13 +10054,6 @@ dependencies: "@types/yargs-parser" "*" -"@types/yargs@^17.0.8": - version "17.0.24" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.24.tgz#b3ef8d50ad4aa6aecf6ddc97c580a00f5aa11902" - integrity sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw== - dependencies: - "@types/yargs-parser" "*" - "@types/yauzl@^2.9.1": version "2.10.0" resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.10.0.tgz#b3248295276cf8c6f153ebe6a9aba0c988cb2599" @@ -22452,30 +22376,6 @@ jest-message-util@^27.5.1: slash "^3.0.0" stack-utils "^2.0.3" -jest-message-util@^29.5.0, jest-message-util@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3" - integrity sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w== - dependencies: - "@babel/code-frame" "^7.12.13" - "@jest/types" "^29.6.3" - "@types/stack-utils" "^2.0.0" - chalk "^4.0.0" - graceful-fs "^4.2.9" - micromatch "^4.0.4" - pretty-format "^29.7.0" - slash "^3.0.0" - stack-utils "^2.0.3" - -jest-mock@29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.5.0.tgz#26e2172bcc71d8b0195081ff1f146ac7e1518aed" - integrity sha512-GqOzvdWDE4fAV2bWQLQCkujxYWL7RxjCnj71b5VhDAGOevB3qj3Ovg26A5NI84ZpODxyzaozXLOh2NCgkbvyaw== - dependencies: - "@jest/types" "^29.5.0" - "@types/node" "*" - jest-util "^29.5.0" - jest-mock@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.5.1.tgz#19948336d49ef4d9c52021d34ac7b5f36ff967d6" @@ -22484,15 +22384,6 @@ jest-mock@^27.5.1: "@jest/types" "^27.5.1" "@types/node" "*" -jest-mock@^29.5.0, jest-mock@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347" - integrity sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw== - dependencies: - "@jest/types" "^29.6.3" - "@types/node" "*" - jest-util "^29.7.0" - jest-pnp-resolver@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" @@ -22619,18 +22510,6 @@ jest-snapshot@^27.5.1: pretty-format "^27.5.1" semver "^7.3.2" -jest-util@29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.5.0.tgz#24a4d3d92fc39ce90425311b23c27a6e0ef16b8f" - integrity sha512-RYMgG/MTadOr5t8KdhejfvUU82MxsCu5MF6KuDUHl+NuwzUt+Sm6jJWxTJVrDR1j5M/gJVCPKQEpWXY+yIQ6lQ== - dependencies: - "@jest/types" "^29.5.0" - "@types/node" "*" - chalk "^4.0.0" - ci-info "^3.2.0" - graceful-fs "^4.2.9" - picomatch "^2.2.3" - jest-util@^27.0.0, jest-util@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.5.1.tgz#3ba9771e8e31a0b85da48fe0b0891fb86c01c2f9" @@ -22643,18 +22522,6 @@ jest-util@^27.0.0, jest-util@^27.5.1: graceful-fs "^4.2.9" picomatch "^2.2.3" -jest-util@^29.5.0, jest-util@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" - integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA== - dependencies: - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - ci-info "^3.2.0" - graceful-fs "^4.2.9" - picomatch "^2.2.3" - jest-validate@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.5.1.tgz#9197d54dc0bdb52260b8db40b46ae668e04df067" From b4272be98af0ede8ed9cbdaae2a120e0c458e492 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Wed, 17 Jul 2024 15:29:12 -0400 Subject: [PATCH 30/53] test(replay): Switch to using vitest for replay worker (#12961) Before: `Time: 0.303 s` After: `Duration 271ms (transform 28ms, setup 0ms, collect 26ms, tests 3ms, environment 0ms, prepare 68ms)` --- packages/replay-worker/jest.config.js | 1 - packages/replay-worker/package.json | 4 ++-- packages/replay-worker/test/unit/Compressor.test.ts | 2 ++ packages/replay-worker/tsconfig.test.json | 4 ++-- packages/replay-worker/vite.config.ts | 5 +++++ 5 files changed, 11 insertions(+), 5 deletions(-) delete mode 100644 packages/replay-worker/jest.config.js create mode 100644 packages/replay-worker/vite.config.ts diff --git a/packages/replay-worker/jest.config.js b/packages/replay-worker/jest.config.js deleted file mode 100644 index 24f49ab59a4c..000000000000 --- a/packages/replay-worker/jest.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../jest/jest.config.js'); diff --git a/packages/replay-worker/package.json b/packages/replay-worker/package.json index 07e967a3bc33..597e44329f33 100644 --- a/packages/replay-worker/package.json +++ b/packages/replay-worker/package.json @@ -32,8 +32,8 @@ "clean": "rimraf build", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", - "test": "jest", - "test:watch": "jest --watch" + "test": "vitest run", + "test:watch": "vitest --watch" }, "repository": { "type": "git", diff --git a/packages/replay-worker/test/unit/Compressor.test.ts b/packages/replay-worker/test/unit/Compressor.test.ts index 9ac4a5bb5a6c..dcce14edce70 100644 --- a/packages/replay-worker/test/unit/Compressor.test.ts +++ b/packages/replay-worker/test/unit/Compressor.test.ts @@ -1,3 +1,5 @@ +import { describe, expect, it } from 'vitest'; + import { decompressSync, strFromU8 } from 'fflate'; import { Compressor } from '../../src/Compressor'; diff --git a/packages/replay-worker/tsconfig.test.json b/packages/replay-worker/tsconfig.test.json index 6a49bbfc2a41..2910a21e50fc 100644 --- a/packages/replay-worker/tsconfig.test.json +++ b/packages/replay-worker/tsconfig.test.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.json", - "include": ["test/**/*.ts"], + "include": ["test/**/*.ts", "vite.config.ts"], "compilerOptions": { - "types": ["node", "jest"] + "types": ["node"] } } diff --git a/packages/replay-worker/vite.config.ts b/packages/replay-worker/vite.config.ts new file mode 100644 index 000000000000..0582a58f479a --- /dev/null +++ b/packages/replay-worker/vite.config.ts @@ -0,0 +1,5 @@ +import baseConfig from '../../vite/vite.config'; + +export default { + ...baseConfig, +}; From d70182e2a5250a4a1f7eef99dab82825d58d8bd5 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Wed, 17 Jul 2024 16:13:45 -0400 Subject: [PATCH 31/53] test(replay-canvas): Switch to using vitest (#12964) Before: `Time: 2.026 s` After: `Duration 960ms (transform 291ms, setup 0ms, collect 446ms, tests 5ms, environment 283ms, prepare 65ms)` Also: - removes unused `@babel/core` dev dep - removes unused eslintrc logic --- packages/replay-canvas/.eslintrc.js | 14 -------------- packages/replay-canvas/jest.config.js | 6 ------ packages/replay-canvas/package.json | 5 ++--- packages/replay-canvas/test/canvas.test.ts | 10 ++++++++-- packages/replay-canvas/tsconfig.test.json | 4 ++-- packages/replay-canvas/vite.config.ts | 5 +++++ 6 files changed, 17 insertions(+), 27 deletions(-) delete mode 100644 packages/replay-canvas/jest.config.js create mode 100644 packages/replay-canvas/vite.config.ts diff --git a/packages/replay-canvas/.eslintrc.js b/packages/replay-canvas/.eslintrc.js index 216184b75e47..0c83f7d0ff9d 100644 --- a/packages/replay-canvas/.eslintrc.js +++ b/packages/replay-canvas/.eslintrc.js @@ -5,18 +5,4 @@ module.exports = { extends: ['../../.eslintrc.js'], - overrides: [ - { - files: ['src/**/*.ts'], - }, - { - files: ['jest.setup.ts', 'jest.config.ts'], - parserOptions: { - project: ['tsconfig.test.json'], - }, - rules: { - 'no-console': 'off', - }, - }, - ], }; diff --git a/packages/replay-canvas/jest.config.js b/packages/replay-canvas/jest.config.js deleted file mode 100644 index cd02790794a7..000000000000 --- a/packages/replay-canvas/jest.config.js +++ /dev/null @@ -1,6 +0,0 @@ -const baseConfig = require('../../jest/jest.config.js'); - -module.exports = { - ...baseConfig, - testEnvironment: 'jsdom', -}; diff --git a/packages/replay-canvas/package.json b/packages/replay-canvas/package.json index cc0c3d589847..014342ac2482 100644 --- a/packages/replay-canvas/package.json +++ b/packages/replay-canvas/package.json @@ -47,8 +47,8 @@ "clean": "rimraf build sentry-replay-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", - "test": "jest", - "test:watch": "jest --watch", + "test": "vitest run", + "test:watch": "vitest --watch", "yalc:publish": "yalc publish --push --sig" }, "publishConfig": { @@ -65,7 +65,6 @@ }, "homepage": "https://docs.sentry.io/platforms/javascript/session-replay/", "devDependencies": { - "@babel/core": "^7.17.5", "@sentry-internal/rrweb": "2.25.0" }, "dependencies": { diff --git a/packages/replay-canvas/test/canvas.test.ts b/packages/replay-canvas/test/canvas.test.ts index a7de3b6a28a3..6f75321a5ab5 100644 --- a/packages/replay-canvas/test/canvas.test.ts +++ b/packages/replay-canvas/test/canvas.test.ts @@ -1,10 +1,16 @@ +/** + * @vitest-environment jsdom + */ + +import { beforeEach, expect, it, vi } from 'vitest'; + import { CanvasManager } from '@sentry-internal/rrweb'; import { _replayCanvasIntegration, replayCanvasIntegration } from '../src/canvas'; -jest.mock('@sentry-internal/rrweb'); +vi.mock('@sentry-internal/rrweb'); beforeEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('initializes with default options', () => { diff --git a/packages/replay-canvas/tsconfig.test.json b/packages/replay-canvas/tsconfig.test.json index 3995d3e18e59..f4e8a1624f08 100644 --- a/packages/replay-canvas/tsconfig.test.json +++ b/packages/replay-canvas/tsconfig.test.json @@ -1,11 +1,11 @@ { "extends": "./tsconfig.json", - "include": ["test/**/*.ts", "jest.config.ts", "jest.setup.ts"], + "include": ["test/**/*.ts", "vite.config.ts"], "compilerOptions": { "lib": ["DOM", "ES2018"], - "types": ["node", "jest"], + "types": ["node"], "esModuleInterop": true, "allowJs": true, "noImplicitAny": true, diff --git a/packages/replay-canvas/vite.config.ts b/packages/replay-canvas/vite.config.ts new file mode 100644 index 000000000000..0582a58f479a --- /dev/null +++ b/packages/replay-canvas/vite.config.ts @@ -0,0 +1,5 @@ +import baseConfig from '../../vite/vite.config'; + +export default { + ...baseConfig, +}; From ce1e7c7ff158a80c22ae4dd484a0cef98ea92ed7 Mon Sep 17 00:00:00 2001 From: Nicolas Hrubec Date: Thu, 18 Jul 2024 10:16:50 +0200 Subject: [PATCH 32/53] docs(nestjs): Update README to include SentryCron (#12972) SentryCron was missing from the nest readme --- packages/nestjs/README.md | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/packages/nestjs/README.md b/packages/nestjs/README.md index b9ac0c9371c2..e336a856c03e 100644 --- a/packages/nestjs/README.md +++ b/packages/nestjs/README.md @@ -24,7 +24,7 @@ yarn add @sentry/nestjs ## Usage -```js +```typescript // CJS Syntax const Sentry = require('@sentry/nestjs'); // ESM Syntax @@ -38,12 +38,12 @@ Sentry.init({ Note that it is necessary to initialize Sentry **before you import any package that may be instrumented by us**. -## Span Decorator +## SentryTraced -Use the @SentryTraced() decorator to gain additional performance insights for any function within your NestJS +Use the `@SentryTraced()` decorator to gain additional performance insights for any function within your NestJS applications. -```js +```typescript import { Injectable } from '@nestjs/common'; import { SentryTraced } from '@sentry/nestjs'; @@ -56,6 +56,35 @@ export class ExampleService { } ``` +## SentryCron + +Use the `@SentryCron()` decorator to augment the native NestJS `@Cron` decorator to send check-ins to Sentry before and +after each cron job run. + +```typescript +import { Cron } from '@nestjs/schedule'; +import { SentryCron, MonitorConfig } from '@sentry/nestjs'; +import type { MonitorConfig } from '@sentry/types'; + +const monitorConfig: MonitorConfig = { + schedule: { + type: 'crontab', + value: '* * * * *', + }, + checkinMargin: 2, // In minutes. Optional. + maxRuntime: 10, // In minutes. Optional. + timezone: 'America/Los_Angeles', // Optional. +}; + +export class MyCronService { + @Cron('* * * * *') + @SentryCron('my-monitor-slug', monitorConfig) + handleCron() { + // Your cron job logic here + } +} +``` + ## Links - [Official SDK Docs](https://docs.sentry.io/platforms/javascript/guides/nestjs/) From 935bb617c7220191c545a585165c8f3a3e8a76ae Mon Sep 17 00:00:00 2001 From: Charly Gomez Date: Thu, 18 Jul 2024 11:21:57 +0200 Subject: [PATCH 33/53] feat(core): Align Span interface with OTEL (#12898) --- .../src/tracing/sentryNonRecordingSpan.ts | 33 +++++++++++++++ packages/core/src/tracing/sentrySpan.ts | 40 ++++++++++++++++++- packages/opentelemetry/src/trace.ts | 4 +- packages/types/src/span.ts | 19 ++++++++- 4 files changed, 89 insertions(+), 7 deletions(-) diff --git a/packages/core/src/tracing/sentryNonRecordingSpan.ts b/packages/core/src/tracing/sentryNonRecordingSpan.ts index 1debb45aa282..867b5684d1da 100644 --- a/packages/core/src/tracing/sentryNonRecordingSpan.ts +++ b/packages/core/src/tracing/sentryNonRecordingSpan.ts @@ -68,4 +68,37 @@ export class SentryNonRecordingSpan implements Span { ): this { return this; } + + /** + * This should generally not be used, + * but we need it for being comliant with the OTEL Span interface. + * + * @hidden + * @internal + */ + public addLink(_link: unknown): this { + return this; + } + + /** + * This should generally not be used, + * but we need it for being comliant with the OTEL Span interface. + * + * @hidden + * @internal + */ + public addLinks(_links: unknown[]): this { + return this; + } + + /** + * This should generally not be used, + * but we need it for being comliant with the OTEL Span interface. + * + * @hidden + * @internal + */ + public recordException(_exception: unknown, _time?: number | undefined): void { + // noop + } } diff --git a/packages/core/src/tracing/sentrySpan.ts b/packages/core/src/tracing/sentrySpan.ts index d7c800e338a7..7e1083142314 100644 --- a/packages/core/src/tracing/sentrySpan.ts +++ b/packages/core/src/tracing/sentrySpan.ts @@ -107,6 +107,39 @@ export class SentrySpan implements Span { } } + /** + * This should generally not be used, + * but it is needed for being compliant with the OTEL Span interface. + * + * @hidden + * @internal + */ + public addLink(_link: unknown): this { + return this; + } + + /** + * This should generally not be used, + * but it is needed for being compliant with the OTEL Span interface. + * + * @hidden + * @internal + */ + public addLinks(_links: unknown[]): this { + return this; + } + + /** + * This should generally not be used, + * but it is needed for being compliant with the OTEL Span interface. + * + * @hidden + * @internal + */ + public recordException(_exception: unknown, _time?: number | undefined): void { + // noop + } + /** @inheritdoc */ public spanContext(): SpanContextData { const { _spanId: spanId, _traceId: traceId, _sampled: sampled } = this; @@ -118,18 +151,21 @@ export class SentrySpan implements Span { } /** @inheritdoc */ - public setAttribute(key: string, value: SpanAttributeValue | undefined): void { + public setAttribute(key: string, value: SpanAttributeValue | undefined): this { if (value === undefined) { // eslint-disable-next-line @typescript-eslint/no-dynamic-delete delete this._attributes[key]; } else { this._attributes[key] = value; } + + return this; } /** @inheritdoc */ - public setAttributes(attributes: SpanAttributes): void { + public setAttributes(attributes: SpanAttributes): this { Object.keys(attributes).forEach(key => this.setAttribute(key, attributes[key])); + return this; } /** diff --git a/packages/opentelemetry/src/trace.ts b/packages/opentelemetry/src/trace.ts index 6f9fe5dad6d1..6a2acd874e67 100644 --- a/packages/opentelemetry/src/trace.ts +++ b/packages/opentelemetry/src/trace.ts @@ -289,9 +289,7 @@ export function continueTrace(options: Parameters[0 function getActiveSpanWrapper(parentSpan: Span | SentrySpan | undefined | null): (callback: () => T) => T { return parentSpan !== undefined ? (callback: () => T) => { - // We cast this, because the OTEL Span has a few more methods than our Span interface - // TODO: Add these missing methods to the Span interface - return withActiveSpan(parentSpan as Span, callback); + return withActiveSpan(parentSpan, callback); } : (callback: () => T) => callback(); } diff --git a/packages/types/src/span.ts b/packages/types/src/span.ts index cc5cb45213b9..a2ee74fd7cfa 100644 --- a/packages/types/src/span.ts +++ b/packages/types/src/span.ts @@ -219,13 +219,13 @@ export interface Span { * Set a single attribute on the span. * Set it to `undefined` to remove the attribute. */ - setAttribute(key: string, value: SpanAttributeValue | undefined): void; + setAttribute(key: string, value: SpanAttributeValue | undefined): this; /** * Set multiple attributes on the span. * Any attribute set to `undefined` will be removed. */ - setAttributes(attributes: SpanAttributes): void; + setAttributes(attributes: SpanAttributes): this; /** * Sets the status attribute on the current span. @@ -247,4 +247,19 @@ export interface Span { * Adds an event to the Span. */ addEvent(name: string, attributesOrStartTime?: SpanAttributes | SpanTimeInput, startTime?: SpanTimeInput): this; + + /** + * NOT USED IN SENTRY, only added for compliance with OTEL Span interface + */ + addLink(link: unknown): this; + + /** + * NOT USED IN SENTRY, only added for compliance with OTEL Span interface + */ + addLinks(links: unknown): this; + + /** + * NOT USED IN SENTRY, only added for compliance with OTEL Span interface + */ + recordException(exception: unknown, time?: number): void; } From d629991be0894d2ee9440ac194d5e3478550d4f4 Mon Sep 17 00:00:00 2001 From: Nicolas Hrubec Date: Thu, 18 Jul 2024 12:04:16 +0200 Subject: [PATCH 34/53] tests(e2e): Refactor nestjs e2e applications into multiple smaller test applications (#12948) Refactor of the existing nestjs test applications. Before we had one sample application testing everything nest-related. This PR splits them up into three applications to make it more readable and easier to understand what is being tested. It also allows for iterating a bit quicker in local development. No new functionality was added. Will add more tests in a follow-up. The three new services are: - nestjs-basic: Simple nestjs application with no submodules and tests for basic functionality of the SDK like error monitoring and span instrumentation. - nestjs-with-submodules: NestJS application that is bit more complex including a submodule (and potentially multiple in the future) to have a more realistic setup for more advanced testing. - nestjs-distributed-tracing: Includes tests for trace propagation with multiple services. --- .github/workflows/build.yml | 4 +- .../{nestjs => nestjs-basic}/.gitignore | 0 .../{nestjs => nestjs-basic}/.npmrc | 0 .../{nestjs => nestjs-basic}/nest-cli.json | 0 .../{nestjs => nestjs-basic}/package.json | 2 +- .../playwright.config.mjs | 0 .../nestjs-basic/src/app.controller.ts | 37 +++++++ .../nestjs-basic/src/app.module.ts | 11 ++ .../src/app.service.ts | 78 +------------- .../nestjs-basic/src/instrument.ts | 8 ++ .../nestjs-basic/src/main.ts | 20 ++++ .../start-event-proxy.mjs | 0 .../tests/cron-decorator.test.ts | 0 .../tests/errors.test.ts | 29 ----- .../tests/span-decorator.test.ts | 0 .../tests/transactions.test.ts | 0 .../tsconfig.build.json | 0 .../{nestjs => nestjs-basic}/tsconfig.json | 0 .../nestjs-distributed-tracing/.gitignore | 56 ++++++++++ .../nestjs-distributed-tracing/.npmrc | 2 + .../nestjs-distributed-tracing/nest-cli.json | 8 ++ .../nestjs-distributed-tracing/package.json | 47 ++++++++ .../playwright.config.mjs | 7 ++ .../src/instrument.ts | 0 .../nestjs-distributed-tracing/src/main.ts | 25 +++++ .../src/trace-initiator.controller.ts | 42 ++++++++ .../src/trace-initiator.module.ts | 10 ++ .../src/trace-initiator.service.ts | 47 ++++++++ .../src/trace-receiver.controller.ts | 17 +++ .../src/trace-receiver.module.ts | 10 ++ .../src/trace-receiver.service.ts | 18 ++++ .../src/utils.ts | 0 .../start-event-proxy.mjs | 6 ++ .../tests/propagation.test.ts | 0 .../tsconfig.build.json | 4 + .../nestjs-distributed-tracing/tsconfig.json | 21 ++++ .../nestjs-with-submodules/.gitignore | 56 ++++++++++ .../nestjs-with-submodules/.npmrc | 2 + .../nestjs-with-submodules/nest-cli.json | 8 ++ .../nestjs-with-submodules/package.json | 47 ++++++++ .../playwright.config.mjs | 7 ++ .../src/app.controller.ts | 17 +++ .../nestjs-with-submodules/src/app.module.ts | 11 ++ .../nestjs-with-submodules/src/app.service.ts | 14 +++ .../src/example-module/example.controller.ts | 12 +++ .../src/example-module/example.exception.ts | 5 + .../src/example-module/example.filter.ts} | 8 +- .../src/example-module/example.module.ts | 16 +++ .../nestjs-with-submodules/src/instrument.ts | 8 ++ .../nestjs-with-submodules/src/main.ts | 20 ++++ .../start-event-proxy.mjs | 6 ++ .../tests/errors.test.ts | 31 ++++++ .../tsconfig.build.json | 4 + .../nestjs-with-submodules/tsconfig.json | 21 ++++ .../nestjs/src/app.controller.ts | 102 ------------------ .../nestjs/src/app.module.ts | 19 ---- .../test-applications/nestjs/src/main.ts | 24 ----- .../nestjs/src/test-module/test.controller.ts | 12 --- .../nestjs/src/test-module/test.exception.ts | 5 - .../nestjs/src/test-module/test.module.ts | 16 --- 60 files changed, 690 insertions(+), 290 deletions(-) rename dev-packages/e2e-tests/test-applications/{nestjs => nestjs-basic}/.gitignore (100%) rename dev-packages/e2e-tests/test-applications/{nestjs => nestjs-basic}/.npmrc (100%) rename dev-packages/e2e-tests/test-applications/{nestjs => nestjs-basic}/nest-cli.json (100%) rename dev-packages/e2e-tests/test-applications/{nestjs => nestjs-basic}/package.json (98%) rename dev-packages/e2e-tests/test-applications/{nestjs => nestjs-basic}/playwright.config.mjs (100%) create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-basic/src/app.controller.ts create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-basic/src/app.module.ts rename dev-packages/e2e-tests/test-applications/{nestjs => nestjs-basic}/src/app.service.ts (51%) create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-basic/src/instrument.ts create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-basic/src/main.ts rename dev-packages/e2e-tests/test-applications/{nestjs => nestjs-basic}/start-event-proxy.mjs (100%) rename dev-packages/e2e-tests/test-applications/{nestjs => nestjs-basic}/tests/cron-decorator.test.ts (100%) rename dev-packages/e2e-tests/test-applications/{nestjs => nestjs-basic}/tests/errors.test.ts (63%) rename dev-packages/e2e-tests/test-applications/{nestjs => nestjs-basic}/tests/span-decorator.test.ts (100%) rename dev-packages/e2e-tests/test-applications/{nestjs => nestjs-basic}/tests/transactions.test.ts (100%) rename dev-packages/e2e-tests/test-applications/{nestjs => nestjs-basic}/tsconfig.build.json (100%) rename dev-packages/e2e-tests/test-applications/{nestjs => nestjs-basic}/tsconfig.json (100%) create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/.gitignore create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/.npmrc create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/nest-cli.json create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/package.json create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/playwright.config.mjs rename dev-packages/e2e-tests/test-applications/{nestjs => nestjs-distributed-tracing}/src/instrument.ts (100%) create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/main.ts create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/trace-initiator.controller.ts create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/trace-initiator.module.ts create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/trace-initiator.service.ts create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/trace-receiver.controller.ts create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/trace-receiver.module.ts create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/trace-receiver.service.ts rename dev-packages/e2e-tests/test-applications/{nestjs => nestjs-distributed-tracing}/src/utils.ts (100%) create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/start-event-proxy.mjs rename dev-packages/e2e-tests/test-applications/{nestjs => nestjs-distributed-tracing}/tests/propagation.test.ts (100%) create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/tsconfig.build.json create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/tsconfig.json create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-with-submodules/.gitignore create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-with-submodules/.npmrc create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-with-submodules/nest-cli.json create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-with-submodules/package.json create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-with-submodules/playwright.config.mjs create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/app.controller.ts create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/app.module.ts create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/app.service.ts create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/example-module/example.controller.ts create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/example-module/example.exception.ts rename dev-packages/e2e-tests/test-applications/{nestjs/src/test-module/test.filter.ts => nestjs-with-submodules/src/example-module/example.filter.ts} (61%) create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/example-module/example.module.ts create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/instrument.ts create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/main.ts create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-with-submodules/start-event-proxy.mjs create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-with-submodules/tests/errors.test.ts create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-with-submodules/tsconfig.build.json create mode 100644 dev-packages/e2e-tests/test-applications/nestjs-with-submodules/tsconfig.json delete mode 100644 dev-packages/e2e-tests/test-applications/nestjs/src/app.controller.ts delete mode 100644 dev-packages/e2e-tests/test-applications/nestjs/src/app.module.ts delete mode 100644 dev-packages/e2e-tests/test-applications/nestjs/src/main.ts delete mode 100644 dev-packages/e2e-tests/test-applications/nestjs/src/test-module/test.controller.ts delete mode 100644 dev-packages/e2e-tests/test-applications/nestjs/src/test-module/test.exception.ts delete mode 100644 dev-packages/e2e-tests/test-applications/nestjs/src/test-module/test.module.ts diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cbf2fe9030da..4cf711bd42ff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1037,7 +1037,9 @@ jobs: 'generic-ts3.8', 'node-fastify', 'node-hapi', - 'nestjs', + 'nestjs-basic', + 'nestjs-distributed-tracing', + 'nestjs-with-submodules', 'node-exports-test-app', 'node-koa', 'node-connect', diff --git a/dev-packages/e2e-tests/test-applications/nestjs/.gitignore b/dev-packages/e2e-tests/test-applications/nestjs-basic/.gitignore similarity index 100% rename from dev-packages/e2e-tests/test-applications/nestjs/.gitignore rename to dev-packages/e2e-tests/test-applications/nestjs-basic/.gitignore diff --git a/dev-packages/e2e-tests/test-applications/nestjs/.npmrc b/dev-packages/e2e-tests/test-applications/nestjs-basic/.npmrc similarity index 100% rename from dev-packages/e2e-tests/test-applications/nestjs/.npmrc rename to dev-packages/e2e-tests/test-applications/nestjs-basic/.npmrc diff --git a/dev-packages/e2e-tests/test-applications/nestjs/nest-cli.json b/dev-packages/e2e-tests/test-applications/nestjs-basic/nest-cli.json similarity index 100% rename from dev-packages/e2e-tests/test-applications/nestjs/nest-cli.json rename to dev-packages/e2e-tests/test-applications/nestjs-basic/nest-cli.json diff --git a/dev-packages/e2e-tests/test-applications/nestjs/package.json b/dev-packages/e2e-tests/test-applications/nestjs-basic/package.json similarity index 98% rename from dev-packages/e2e-tests/test-applications/nestjs/package.json rename to dev-packages/e2e-tests/test-applications/nestjs-basic/package.json index 94c4e445bfe0..f4c44ff7cef3 100644 --- a/dev-packages/e2e-tests/test-applications/nestjs/package.json +++ b/dev-packages/e2e-tests/test-applications/nestjs-basic/package.json @@ -1,5 +1,5 @@ { - "name": "nestjs", + "name": "nestjs-basic", "version": "0.0.1", "private": true, "scripts": { diff --git a/dev-packages/e2e-tests/test-applications/nestjs/playwright.config.mjs b/dev-packages/e2e-tests/test-applications/nestjs-basic/playwright.config.mjs similarity index 100% rename from dev-packages/e2e-tests/test-applications/nestjs/playwright.config.mjs rename to dev-packages/e2e-tests/test-applications/nestjs-basic/playwright.config.mjs diff --git a/dev-packages/e2e-tests/test-applications/nestjs-basic/src/app.controller.ts b/dev-packages/e2e-tests/test-applications/nestjs-basic/src/app.controller.ts new file mode 100644 index 000000000000..b54604d999cb --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-basic/src/app.controller.ts @@ -0,0 +1,37 @@ +import { Controller, Get, Param } from '@nestjs/common'; +import { AppService } from './app.service'; + +@Controller() +export class AppController { + constructor(private readonly appService: AppService) {} + + @Get('test-transaction') + testTransaction() { + return this.appService.testTransaction(); + } + + @Get('test-exception/:id') + async testException(@Param('id') id: string) { + return this.appService.testException(id); + } + + @Get('test-expected-exception/:id') + async testExpectedException(@Param('id') id: string) { + return this.appService.testExpectedException(id); + } + + @Get('test-span-decorator-async') + async testSpanDecoratorAsync() { + return { result: await this.appService.testSpanDecoratorAsync() }; + } + + @Get('test-span-decorator-sync') + async testSpanDecoratorSync() { + return { result: await this.appService.testSpanDecoratorSync() }; + } + + @Get('kill-test-cron') + async killTestCron() { + this.appService.killTestCron(); + } +} diff --git a/dev-packages/e2e-tests/test-applications/nestjs-basic/src/app.module.ts b/dev-packages/e2e-tests/test-applications/nestjs-basic/src/app.module.ts new file mode 100644 index 000000000000..ceb7199a99cf --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-basic/src/app.module.ts @@ -0,0 +1,11 @@ +import { Module } from '@nestjs/common'; +import { ScheduleModule } from '@nestjs/schedule'; +import { AppController } from './app.controller'; +import { AppService } from './app.service'; + +@Module({ + imports: [ScheduleModule.forRoot()], + controllers: [AppController], + providers: [AppService], +}) +export class AppModule {} diff --git a/dev-packages/e2e-tests/test-applications/nestjs/src/app.service.ts b/dev-packages/e2e-tests/test-applications/nestjs-basic/src/app.service.ts similarity index 51% rename from dev-packages/e2e-tests/test-applications/nestjs/src/app.service.ts rename to dev-packages/e2e-tests/test-applications/nestjs-basic/src/app.service.ts index f5666bffeb46..3afb7b5147bd 100644 --- a/dev-packages/e2e-tests/test-applications/nestjs/src/app.service.ts +++ b/dev-packages/e2e-tests/test-applications/nestjs-basic/src/app.service.ts @@ -3,7 +3,6 @@ import { Cron, SchedulerRegistry } from '@nestjs/schedule'; import * as Sentry from '@sentry/nestjs'; import { SentryCron, SentryTraced } from '@sentry/nestjs'; import type { MonitorConfig } from '@sentry/types'; -import { makeHttpRequest } from './utils'; const monitorConfig: MonitorConfig = { schedule: { @@ -13,53 +12,15 @@ const monitorConfig: MonitorConfig = { }; @Injectable() -export class AppService1 { +export class AppService { constructor(private schedulerRegistry: SchedulerRegistry) {} - testSuccess() { - return { version: 'v1' }; - } - - testParam(id: string) { - return { - paramWas: id, - }; - } - - testInboundHeaders(headers: Record, id: string) { - return { - headers, - id, - }; - } - - async testOutgoingHttp(id: string) { - const data = await makeHttpRequest(`http://localhost:3030/test-inbound-headers/${id}`); - - return data; - } - - async testOutgoingFetch(id: string) { - const response = await fetch(`http://localhost:3030/test-inbound-headers/${id}`); - const data = await response.json(); - - return data; - } - testTransaction() { Sentry.startSpan({ name: 'test-span' }, () => { Sentry.startSpan({ name: 'child-span' }, () => {}); }); } - async testError() { - const exceptionId = Sentry.captureException(new Error('This is an error')); - - await Sentry.flush(2000); - - return { exceptionId }; - } - testException(id: string) { throw new Error(`This is an exception with id ${id}`); } @@ -68,26 +29,6 @@ export class AppService1 { throw new HttpException(`This is an expected exception with id ${id}`, HttpStatus.FORBIDDEN); } - async testOutgoingFetchExternalAllowed() { - const fetchResponse = await fetch('http://localhost:3040/external-allowed'); - - return fetchResponse.json(); - } - - async testOutgoingFetchExternalDisallowed() { - const fetchResponse = await fetch('http://localhost:3040/external-disallowed'); - - return fetchResponse.json(); - } - - async testOutgoingHttpExternalAllowed() { - return makeHttpRequest('http://localhost:3040/external-allowed'); - } - - async testOutgoingHttpExternalDisallowed() { - return makeHttpRequest('http://localhost:3040/external-disallowed'); - } - @SentryTraced('wait and return a string') async wait() { await new Promise(resolve => setTimeout(resolve, 500)); @@ -124,20 +65,3 @@ export class AppService1 { this.schedulerRegistry.deleteCronJob('test-cron-job'); } } - -@Injectable() -export class AppService2 { - externalAllowed(headers: Record) { - return { - headers, - route: 'external-allowed', - }; - } - - externalDisallowed(headers: Record) { - return { - headers, - route: 'external-disallowed', - }; - } -} diff --git a/dev-packages/e2e-tests/test-applications/nestjs-basic/src/instrument.ts b/dev-packages/e2e-tests/test-applications/nestjs-basic/src/instrument.ts new file mode 100644 index 000000000000..f1f4de865435 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-basic/src/instrument.ts @@ -0,0 +1,8 @@ +import * as Sentry from '@sentry/nestjs'; + +Sentry.init({ + environment: 'qa', // dynamic sampling bias to keep transactions + dsn: process.env.E2E_TEST_DSN, + tunnel: `http://localhost:3031/`, // proxy server + tracesSampleRate: 1, +}); diff --git a/dev-packages/e2e-tests/test-applications/nestjs-basic/src/main.ts b/dev-packages/e2e-tests/test-applications/nestjs-basic/src/main.ts new file mode 100644 index 000000000000..3a7b5ded8645 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-basic/src/main.ts @@ -0,0 +1,20 @@ +// Import this first +import './instrument'; + +// Import other modules +import { BaseExceptionFilter, HttpAdapterHost, NestFactory } from '@nestjs/core'; +import * as Sentry from '@sentry/nestjs'; +import { AppModule } from './app.module'; + +const PORT = 3030; + +async function bootstrap() { + const app = await NestFactory.create(AppModule); + + const { httpAdapter } = app.get(HttpAdapterHost); + Sentry.setupNestErrorHandler(app, new BaseExceptionFilter(httpAdapter)); + + await app.listen(PORT); +} + +bootstrap(); diff --git a/dev-packages/e2e-tests/test-applications/nestjs/start-event-proxy.mjs b/dev-packages/e2e-tests/test-applications/nestjs-basic/start-event-proxy.mjs similarity index 100% rename from dev-packages/e2e-tests/test-applications/nestjs/start-event-proxy.mjs rename to dev-packages/e2e-tests/test-applications/nestjs-basic/start-event-proxy.mjs diff --git a/dev-packages/e2e-tests/test-applications/nestjs/tests/cron-decorator.test.ts b/dev-packages/e2e-tests/test-applications/nestjs-basic/tests/cron-decorator.test.ts similarity index 100% rename from dev-packages/e2e-tests/test-applications/nestjs/tests/cron-decorator.test.ts rename to dev-packages/e2e-tests/test-applications/nestjs-basic/tests/cron-decorator.test.ts diff --git a/dev-packages/e2e-tests/test-applications/nestjs/tests/errors.test.ts b/dev-packages/e2e-tests/test-applications/nestjs-basic/tests/errors.test.ts similarity index 63% rename from dev-packages/e2e-tests/test-applications/nestjs/tests/errors.test.ts rename to dev-packages/e2e-tests/test-applications/nestjs-basic/tests/errors.test.ts index ffb48f4e5e70..349b25b0eee9 100644 --- a/dev-packages/e2e-tests/test-applications/nestjs/tests/errors.test.ts +++ b/dev-packages/e2e-tests/test-applications/nestjs-basic/tests/errors.test.ts @@ -53,32 +53,3 @@ test('Does not send expected exception to Sentry', async ({ baseURL }) => { expect(errorEventOccurred).toBe(false); }); - -test('Does not handle expected exception if exception is thrown in module', async ({ baseURL }) => { - const errorEventPromise = waitForError('nestjs', event => { - return !event.type && event.exception?.values?.[0]?.value === 'Something went wrong in the test module!'; - }); - - const response = await fetch(`${baseURL}/test-module`); - expect(response.status).toBe(500); // should be 400 - - // should never arrive, but does because the exception is not handled properly - const errorEvent = await errorEventPromise; - - expect(errorEvent.exception?.values).toHaveLength(1); - expect(errorEvent.exception?.values?.[0]?.value).toBe('Something went wrong in the test module!'); - - expect(errorEvent.request).toEqual({ - method: 'GET', - cookies: {}, - headers: expect.any(Object), - url: 'http://localhost:3030/test-module', - }); - - expect(errorEvent.transaction).toEqual('GET /test-module'); - - expect(errorEvent.contexts?.trace).toEqual({ - trace_id: expect.any(String), - span_id: expect.any(String), - }); -}); diff --git a/dev-packages/e2e-tests/test-applications/nestjs/tests/span-decorator.test.ts b/dev-packages/e2e-tests/test-applications/nestjs-basic/tests/span-decorator.test.ts similarity index 100% rename from dev-packages/e2e-tests/test-applications/nestjs/tests/span-decorator.test.ts rename to dev-packages/e2e-tests/test-applications/nestjs-basic/tests/span-decorator.test.ts diff --git a/dev-packages/e2e-tests/test-applications/nestjs/tests/transactions.test.ts b/dev-packages/e2e-tests/test-applications/nestjs-basic/tests/transactions.test.ts similarity index 100% rename from dev-packages/e2e-tests/test-applications/nestjs/tests/transactions.test.ts rename to dev-packages/e2e-tests/test-applications/nestjs-basic/tests/transactions.test.ts diff --git a/dev-packages/e2e-tests/test-applications/nestjs/tsconfig.build.json b/dev-packages/e2e-tests/test-applications/nestjs-basic/tsconfig.build.json similarity index 100% rename from dev-packages/e2e-tests/test-applications/nestjs/tsconfig.build.json rename to dev-packages/e2e-tests/test-applications/nestjs-basic/tsconfig.build.json diff --git a/dev-packages/e2e-tests/test-applications/nestjs/tsconfig.json b/dev-packages/e2e-tests/test-applications/nestjs-basic/tsconfig.json similarity index 100% rename from dev-packages/e2e-tests/test-applications/nestjs/tsconfig.json rename to dev-packages/e2e-tests/test-applications/nestjs-basic/tsconfig.json diff --git a/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/.gitignore b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/.gitignore new file mode 100644 index 000000000000..4b56acfbebf4 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/.gitignore @@ -0,0 +1,56 @@ +# compiled output +/dist +/node_modules +/build + +# Logs +logs +*.log +npm-debug.log* +pnpm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# OS +.DS_Store + +# Tests +/coverage +/.nyc_output + +# IDEs and editors +/.idea +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# IDE - VSCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# temp directory +.temp +.tmp + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json diff --git a/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/.npmrc b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/.npmrc new file mode 100644 index 000000000000..070f80f05092 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/.npmrc @@ -0,0 +1,2 @@ +@sentry:registry=http://127.0.0.1:4873 +@sentry-internal:registry=http://127.0.0.1:4873 diff --git a/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/nest-cli.json b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/nest-cli.json new file mode 100644 index 000000000000..f9aa683b1ad5 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/nest-cli.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json.schemastore.org/nest-cli", + "collection": "@nestjs/schematics", + "sourceRoot": "src", + "compilerOptions": { + "deleteOutDir": true + } +} diff --git a/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/package.json b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/package.json new file mode 100644 index 000000000000..b4d0ead875f9 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/package.json @@ -0,0 +1,47 @@ +{ + "name": "nestjs-distributed-tracing", + "version": "0.0.1", + "private": true, + "scripts": { + "build": "nest build", + "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", + "start": "nest start", + "start:dev": "nest start --watch", + "start:debug": "nest start --debug --watch", + "start:prod": "node dist/main", + "clean": "npx rimraf node_modules pnpm-lock.yaml", + "test": "playwright test", + "test:build": "pnpm install", + "test:assert": "pnpm test" + }, + "dependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/core": "^10.0.0", + "@nestjs/platform-express": "^10.0.0", + "@sentry/nestjs": "latest || *", + "@sentry/types": "latest || *", + "reflect-metadata": "^0.2.0", + "rxjs": "^7.8.1" + }, + "devDependencies": { + "@playwright/test": "^1.44.1", + "@sentry-internal/test-utils": "link:../../../test-utils", + "@nestjs/cli": "^10.0.0", + "@nestjs/schematics": "^10.0.0", + "@nestjs/testing": "^10.0.0", + "@types/express": "^4.17.17", + "@types/node": "18.15.1", + "@types/supertest": "^6.0.0", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "eslint": "^8.42.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-prettier": "^5.0.0", + "prettier": "^3.0.0", + "source-map-support": "^0.5.21", + "supertest": "^6.3.3", + "ts-loader": "^9.4.3", + "tsconfig-paths": "^4.2.0", + "typescript": "^4.9.5" + } +} diff --git a/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/playwright.config.mjs b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/playwright.config.mjs new file mode 100644 index 000000000000..31f2b913b58b --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/playwright.config.mjs @@ -0,0 +1,7 @@ +import { getPlaywrightConfig } from '@sentry-internal/test-utils'; + +const config = getPlaywrightConfig({ + startCommand: `pnpm start`, +}); + +export default config; diff --git a/dev-packages/e2e-tests/test-applications/nestjs/src/instrument.ts b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/instrument.ts similarity index 100% rename from dev-packages/e2e-tests/test-applications/nestjs/src/instrument.ts rename to dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/instrument.ts diff --git a/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/main.ts b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/main.ts new file mode 100644 index 000000000000..83d0b33d687d --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/main.ts @@ -0,0 +1,25 @@ +// Import this first +import './instrument'; + +// Import other modules +import { BaseExceptionFilter, HttpAdapterHost, NestFactory } from '@nestjs/core'; +import * as Sentry from '@sentry/nestjs'; +import { TraceInitiatorModule } from './trace-initiator.module'; +import { TraceReceiverModule } from './trace-receiver.module'; + +const TRACE_INITIATOR_PORT = 3030; +const TRACE_RECEIVER_PORT = 3040; + +async function bootstrap() { + const trace_initiator_app = await NestFactory.create(TraceInitiatorModule); + + const { httpAdapter } = trace_initiator_app.get(HttpAdapterHost); + Sentry.setupNestErrorHandler(trace_initiator_app, new BaseExceptionFilter(httpAdapter)); + + await trace_initiator_app.listen(TRACE_INITIATOR_PORT); + + const trace_receiver_app = await NestFactory.create(TraceReceiverModule); + await trace_receiver_app.listen(TRACE_RECEIVER_PORT); +} + +bootstrap(); diff --git a/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/trace-initiator.controller.ts b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/trace-initiator.controller.ts new file mode 100644 index 000000000000..62e0c299a239 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/trace-initiator.controller.ts @@ -0,0 +1,42 @@ +import { Controller, Get, Headers, Param } from '@nestjs/common'; +import { TraceInitiatorService } from './trace-initiator.service'; + +@Controller() +export class TraceInitiatorController { + constructor(private readonly traceInitiatorService: TraceInitiatorService) {} + + @Get('test-inbound-headers/:id') + testInboundHeaders(@Headers() headers, @Param('id') id: string) { + return this.traceInitiatorService.testInboundHeaders(headers, id); + } + + @Get('test-outgoing-http/:id') + async testOutgoingHttp(@Param('id') id: string) { + return this.traceInitiatorService.testOutgoingHttp(id); + } + + @Get('test-outgoing-fetch/:id') + async testOutgoingFetch(@Param('id') id: string) { + return this.traceInitiatorService.testOutgoingFetch(id); + } + + @Get('test-outgoing-fetch-external-allowed') + async testOutgoingFetchExternalAllowed() { + return this.traceInitiatorService.testOutgoingFetchExternalAllowed(); + } + + @Get('test-outgoing-fetch-external-disallowed') + async testOutgoingFetchExternalDisallowed() { + return this.traceInitiatorService.testOutgoingFetchExternalDisallowed(); + } + + @Get('test-outgoing-http-external-allowed') + async testOutgoingHttpExternalAllowed() { + return this.traceInitiatorService.testOutgoingHttpExternalAllowed(); + } + + @Get('test-outgoing-http-external-disallowed') + async testOutgoingHttpExternalDisallowed() { + return this.traceInitiatorService.testOutgoingHttpExternalDisallowed(); + } +} diff --git a/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/trace-initiator.module.ts b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/trace-initiator.module.ts new file mode 100644 index 000000000000..9256f29928ab --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/trace-initiator.module.ts @@ -0,0 +1,10 @@ +import { Module } from '@nestjs/common'; +import { TraceInitiatorController } from './trace-initiator.controller'; +import { TraceInitiatorService } from './trace-initiator.service'; + +@Module({ + imports: [], + controllers: [TraceInitiatorController], + providers: [TraceInitiatorService], +}) +export class TraceInitiatorModule {} diff --git a/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/trace-initiator.service.ts b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/trace-initiator.service.ts new file mode 100644 index 000000000000..67c5333cedaf --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/trace-initiator.service.ts @@ -0,0 +1,47 @@ +import { Injectable } from '@nestjs/common'; +import { makeHttpRequest } from './utils'; + +@Injectable() +export class TraceInitiatorService { + constructor() {} + + testInboundHeaders(headers: Record, id: string) { + return { + headers, + id, + }; + } + + async testOutgoingHttp(id: string) { + const data = await makeHttpRequest(`http://localhost:3030/test-inbound-headers/${id}`); + + return data; + } + + async testOutgoingFetch(id: string) { + const response = await fetch(`http://localhost:3030/test-inbound-headers/${id}`); + const data = await response.json(); + + return data; + } + + async testOutgoingFetchExternalAllowed() { + const fetchResponse = await fetch('http://localhost:3040/external-allowed'); + + return fetchResponse.json(); + } + + async testOutgoingFetchExternalDisallowed() { + const fetchResponse = await fetch('http://localhost:3040/external-disallowed'); + + return fetchResponse.json(); + } + + async testOutgoingHttpExternalAllowed() { + return makeHttpRequest('http://localhost:3040/external-allowed'); + } + + async testOutgoingHttpExternalDisallowed() { + return makeHttpRequest('http://localhost:3040/external-disallowed'); + } +} diff --git a/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/trace-receiver.controller.ts b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/trace-receiver.controller.ts new file mode 100644 index 000000000000..2a1899f1097d --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/trace-receiver.controller.ts @@ -0,0 +1,17 @@ +import { Controller, Get, Headers } from '@nestjs/common'; +import { TraceReceiverService } from './trace-receiver.service'; + +@Controller() +export class TraceReceiverController { + constructor(private readonly traceReceiverService: TraceReceiverService) {} + + @Get('external-allowed') + externalAllowed(@Headers() headers) { + return this.traceReceiverService.externalAllowed(headers); + } + + @Get('external-disallowed') + externalDisallowed(@Headers() headers) { + return this.traceReceiverService.externalDisallowed(headers); + } +} diff --git a/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/trace-receiver.module.ts b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/trace-receiver.module.ts new file mode 100644 index 000000000000..2680b3071fb7 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/trace-receiver.module.ts @@ -0,0 +1,10 @@ +import { Module } from '@nestjs/common'; +import { TraceReceiverController } from './trace-receiver.controller'; +import { TraceReceiverService } from './trace-receiver.service'; + +@Module({ + imports: [], + controllers: [TraceReceiverController], + providers: [TraceReceiverService], +}) +export class TraceReceiverModule {} diff --git a/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/trace-receiver.service.ts b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/trace-receiver.service.ts new file mode 100644 index 000000000000..a40b28ad0778 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/trace-receiver.service.ts @@ -0,0 +1,18 @@ +import { Injectable } from '@nestjs/common'; + +@Injectable() +export class TraceReceiverService { + externalAllowed(headers: Record) { + return { + headers, + route: 'external-allowed', + }; + } + + externalDisallowed(headers: Record) { + return { + headers, + route: 'external-disallowed', + }; + } +} diff --git a/dev-packages/e2e-tests/test-applications/nestjs/src/utils.ts b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/utils.ts similarity index 100% rename from dev-packages/e2e-tests/test-applications/nestjs/src/utils.ts rename to dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/utils.ts diff --git a/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/start-event-proxy.mjs b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/start-event-proxy.mjs new file mode 100644 index 000000000000..e9917b9273da --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/start-event-proxy.mjs @@ -0,0 +1,6 @@ +import { startEventProxyServer } from '@sentry-internal/test-utils'; + +startEventProxyServer({ + port: 3031, + proxyServerName: 'nestjs', +}); diff --git a/dev-packages/e2e-tests/test-applications/nestjs/tests/propagation.test.ts b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/tests/propagation.test.ts similarity index 100% rename from dev-packages/e2e-tests/test-applications/nestjs/tests/propagation.test.ts rename to dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/tests/propagation.test.ts diff --git a/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/tsconfig.build.json b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/tsconfig.build.json new file mode 100644 index 000000000000..26c30d4eddf2 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/tsconfig.build.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "exclude": ["node_modules", "test", "dist"] +} diff --git a/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/tsconfig.json b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/tsconfig.json new file mode 100644 index 000000000000..95f5641cf7f3 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "declaration": true, + "removeComments": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "target": "ES2021", + "sourceMap": true, + "outDir": "./dist", + "baseUrl": "./", + "incremental": true, + "skipLibCheck": true, + "strictNullChecks": false, + "noImplicitAny": false, + "strictBindCallApply": false, + "forceConsistentCasingInFileNames": false, + "noFallthroughCasesInSwitch": false + } +} diff --git a/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/.gitignore b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/.gitignore new file mode 100644 index 000000000000..4b56acfbebf4 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/.gitignore @@ -0,0 +1,56 @@ +# compiled output +/dist +/node_modules +/build + +# Logs +logs +*.log +npm-debug.log* +pnpm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# OS +.DS_Store + +# Tests +/coverage +/.nyc_output + +# IDEs and editors +/.idea +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# IDE - VSCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# temp directory +.temp +.tmp + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json diff --git a/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/.npmrc b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/.npmrc new file mode 100644 index 000000000000..070f80f05092 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/.npmrc @@ -0,0 +1,2 @@ +@sentry:registry=http://127.0.0.1:4873 +@sentry-internal:registry=http://127.0.0.1:4873 diff --git a/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/nest-cli.json b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/nest-cli.json new file mode 100644 index 000000000000..f9aa683b1ad5 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/nest-cli.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json.schemastore.org/nest-cli", + "collection": "@nestjs/schematics", + "sourceRoot": "src", + "compilerOptions": { + "deleteOutDir": true + } +} diff --git a/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/package.json b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/package.json new file mode 100644 index 000000000000..dfbe5e83e640 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/package.json @@ -0,0 +1,47 @@ +{ + "name": "nestjs-with-submodules", + "version": "0.0.1", + "private": true, + "scripts": { + "build": "nest build", + "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", + "start": "nest start", + "start:dev": "nest start --watch", + "start:debug": "nest start --debug --watch", + "start:prod": "node dist/main", + "clean": "npx rimraf node_modules pnpm-lock.yaml", + "test": "playwright test", + "test:build": "pnpm install", + "test:assert": "pnpm test" + }, + "dependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/core": "^10.0.0", + "@nestjs/platform-express": "^10.0.0", + "@sentry/nestjs": "latest || *", + "@sentry/types": "latest || *", + "reflect-metadata": "^0.2.0", + "rxjs": "^7.8.1" + }, + "devDependencies": { + "@playwright/test": "^1.44.1", + "@sentry-internal/test-utils": "link:../../../test-utils", + "@nestjs/cli": "^10.0.0", + "@nestjs/schematics": "^10.0.0", + "@nestjs/testing": "^10.0.0", + "@types/express": "^4.17.17", + "@types/node": "18.15.1", + "@types/supertest": "^6.0.0", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "eslint": "^8.42.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-prettier": "^5.0.0", + "prettier": "^3.0.0", + "source-map-support": "^0.5.21", + "supertest": "^6.3.3", + "ts-loader": "^9.4.3", + "tsconfig-paths": "^4.2.0", + "typescript": "^4.9.5" + } +} diff --git a/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/playwright.config.mjs b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/playwright.config.mjs new file mode 100644 index 000000000000..31f2b913b58b --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/playwright.config.mjs @@ -0,0 +1,7 @@ +import { getPlaywrightConfig } from '@sentry-internal/test-utils'; + +const config = getPlaywrightConfig({ + startCommand: `pnpm start`, +}); + +export default config; diff --git a/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/app.controller.ts b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/app.controller.ts new file mode 100644 index 000000000000..71a410e8d0a8 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/app.controller.ts @@ -0,0 +1,17 @@ +import { Controller, Get, Param } from '@nestjs/common'; +import { AppService } from './app.service'; + +@Controller() +export class AppController { + constructor(private readonly appService: AppService) {} + + @Get('test-exception/:id') + async testException(@Param('id') id: string) { + return this.appService.testException(id); + } + + @Get('test-expected-exception/:id') + async testExpectedException(@Param('id') id: string) { + return this.appService.testExpectedException(id); + } +} diff --git a/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/app.module.ts b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/app.module.ts new file mode 100644 index 000000000000..944b84e66d27 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/app.module.ts @@ -0,0 +1,11 @@ +import { Module } from '@nestjs/common'; +import { AppController } from './app.controller'; +import { AppService } from './app.service'; +import { ExampleModule } from './example-module/example.module'; + +@Module({ + imports: [ExampleModule], + controllers: [AppController], + providers: [AppService], +}) +export class AppModule {} diff --git a/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/app.service.ts b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/app.service.ts new file mode 100644 index 000000000000..242408023586 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/app.service.ts @@ -0,0 +1,14 @@ +import { HttpException, HttpStatus, Injectable } from '@nestjs/common'; + +@Injectable() +export class AppService { + constructor() {} + + testException(id: string) { + throw new Error(`This is an exception with id ${id}`); + } + + testExpectedException(id: string) { + throw new HttpException(`This is an expected exception with id ${id}`, HttpStatus.FORBIDDEN); + } +} diff --git a/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/example-module/example.controller.ts b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/example-module/example.controller.ts new file mode 100644 index 000000000000..b71179c195cb --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/example-module/example.controller.ts @@ -0,0 +1,12 @@ +import { Controller, Get } from '@nestjs/common'; +import { ExampleException } from './example.exception'; + +@Controller('example-module') +export class ExampleController { + constructor() {} + + @Get() + getTest(): string { + throw new ExampleException(); + } +} diff --git a/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/example-module/example.exception.ts b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/example-module/example.exception.ts new file mode 100644 index 000000000000..ac43dddfa8dc --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/example-module/example.exception.ts @@ -0,0 +1,5 @@ +export class ExampleException extends Error { + constructor() { + super('Something went wrong in the example module!'); + } +} diff --git a/dev-packages/e2e-tests/test-applications/nestjs/src/test-module/test.filter.ts b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/example-module/example.filter.ts similarity index 61% rename from dev-packages/e2e-tests/test-applications/nestjs/src/test-module/test.filter.ts rename to dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/example-module/example.filter.ts index 87a4ca0920e5..848441caf855 100644 --- a/dev-packages/e2e-tests/test-applications/nestjs/src/test-module/test.filter.ts +++ b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/example-module/example.filter.ts @@ -1,11 +1,11 @@ import { ArgumentsHost, BadRequestException, Catch } from '@nestjs/common'; import { BaseExceptionFilter } from '@nestjs/core'; -import { TestException } from './test.exception'; +import { ExampleException } from './example.exception'; -@Catch(TestException) -export class TestExceptionFilter extends BaseExceptionFilter { +@Catch(ExampleException) +export class ExampleExceptionFilter extends BaseExceptionFilter { catch(exception: unknown, host: ArgumentsHost) { - if (exception instanceof TestException) { + if (exception instanceof ExampleException) { return super.catch(new BadRequestException(exception.message), host); } return super.catch(exception, host); diff --git a/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/example-module/example.module.ts b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/example-module/example.module.ts new file mode 100644 index 000000000000..fabd71c4df90 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/example-module/example.module.ts @@ -0,0 +1,16 @@ +import { Module } from '@nestjs/common'; +import { APP_FILTER } from '@nestjs/core'; +import { ExampleController } from './example.controller'; +import { ExampleExceptionFilter } from './example.filter'; + +@Module({ + imports: [], + controllers: [ExampleController], + providers: [ + { + provide: APP_FILTER, + useClass: ExampleExceptionFilter, + }, + ], +}) +export class ExampleModule {} diff --git a/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/instrument.ts b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/instrument.ts new file mode 100644 index 000000000000..f1f4de865435 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/instrument.ts @@ -0,0 +1,8 @@ +import * as Sentry from '@sentry/nestjs'; + +Sentry.init({ + environment: 'qa', // dynamic sampling bias to keep transactions + dsn: process.env.E2E_TEST_DSN, + tunnel: `http://localhost:3031/`, // proxy server + tracesSampleRate: 1, +}); diff --git a/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/main.ts b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/main.ts new file mode 100644 index 000000000000..3a7b5ded8645 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/src/main.ts @@ -0,0 +1,20 @@ +// Import this first +import './instrument'; + +// Import other modules +import { BaseExceptionFilter, HttpAdapterHost, NestFactory } from '@nestjs/core'; +import * as Sentry from '@sentry/nestjs'; +import { AppModule } from './app.module'; + +const PORT = 3030; + +async function bootstrap() { + const app = await NestFactory.create(AppModule); + + const { httpAdapter } = app.get(HttpAdapterHost); + Sentry.setupNestErrorHandler(app, new BaseExceptionFilter(httpAdapter)); + + await app.listen(PORT); +} + +bootstrap(); diff --git a/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/start-event-proxy.mjs b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/start-event-proxy.mjs new file mode 100644 index 000000000000..e9917b9273da --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/start-event-proxy.mjs @@ -0,0 +1,6 @@ +import { startEventProxyServer } from '@sentry-internal/test-utils'; + +startEventProxyServer({ + port: 3031, + proxyServerName: 'nestjs', +}); diff --git a/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/tests/errors.test.ts b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/tests/errors.test.ts new file mode 100644 index 000000000000..3711cbe8fd0f --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/tests/errors.test.ts @@ -0,0 +1,31 @@ +import { expect, test } from '@playwright/test'; +import { waitForError } from '@sentry-internal/test-utils'; + +test('Does not handle expected exception if exception is thrown in module', async ({ baseURL }) => { + const errorEventPromise = waitForError('nestjs', event => { + return !event.type && event.exception?.values?.[0]?.value === 'Something went wrong in the example module!'; + }); + + const response = await fetch(`${baseURL}/example-module`); + expect(response.status).toBe(500); // should be 400 + + // should never arrive, but does because the exception is not handled properly + const errorEvent = await errorEventPromise; + + expect(errorEvent.exception?.values).toHaveLength(1); + expect(errorEvent.exception?.values?.[0]?.value).toBe('Something went wrong in the example module!'); + + expect(errorEvent.request).toEqual({ + method: 'GET', + cookies: {}, + headers: expect.any(Object), + url: 'http://localhost:3030/example-module', + }); + + expect(errorEvent.transaction).toEqual('GET /example-module'); + + expect(errorEvent.contexts?.trace).toEqual({ + trace_id: expect.any(String), + span_id: expect.any(String), + }); +}); diff --git a/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/tsconfig.build.json b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/tsconfig.build.json new file mode 100644 index 000000000000..26c30d4eddf2 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/tsconfig.build.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "exclude": ["node_modules", "test", "dist"] +} diff --git a/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/tsconfig.json b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/tsconfig.json new file mode 100644 index 000000000000..95f5641cf7f3 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/nestjs-with-submodules/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "declaration": true, + "removeComments": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "target": "ES2021", + "sourceMap": true, + "outDir": "./dist", + "baseUrl": "./", + "incremental": true, + "skipLibCheck": true, + "strictNullChecks": false, + "noImplicitAny": false, + "strictBindCallApply": false, + "forceConsistentCasingInFileNames": false, + "noFallthroughCasesInSwitch": false + } +} diff --git a/dev-packages/e2e-tests/test-applications/nestjs/src/app.controller.ts b/dev-packages/e2e-tests/test-applications/nestjs/src/app.controller.ts deleted file mode 100644 index 7fda9eef768e..000000000000 --- a/dev-packages/e2e-tests/test-applications/nestjs/src/app.controller.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { Controller, Get, Headers, Param } from '@nestjs/common'; -import { AppService1, AppService2 } from './app.service'; - -@Controller() -export class AppController1 { - constructor(private readonly appService: AppService1) {} - - @Get('test-success') - testSuccess() { - return this.appService.testSuccess(); - } - - @Get('test-param/:param') - testParam(@Param() params) { - return this.appService.testParam(params.param); - } - - @Get('test-inbound-headers/:id') - testInboundHeaders(@Headers() headers, @Param('id') id: string) { - return this.appService.testInboundHeaders(headers, id); - } - - @Get('test-outgoing-http/:id') - async testOutgoingHttp(@Param('id') id: string) { - return this.appService.testOutgoingHttp(id); - } - - @Get('test-outgoing-fetch/:id') - async testOutgoingFetch(@Param('id') id: string) { - return this.appService.testOutgoingFetch(id); - } - - @Get('test-transaction') - testTransaction() { - return this.appService.testTransaction(); - } - - @Get('test-error') - async testError() { - return this.appService.testError(); - } - - @Get('test-exception/:id') - async testException(@Param('id') id: string) { - return this.appService.testException(id); - } - - @Get('test-expected-exception/:id') - async testExpectedException(@Param('id') id: string) { - return this.appService.testExpectedException(id); - } - - @Get('test-outgoing-fetch-external-allowed') - async testOutgoingFetchExternalAllowed() { - return this.appService.testOutgoingFetchExternalAllowed(); - } - - @Get('test-outgoing-fetch-external-disallowed') - async testOutgoingFetchExternalDisallowed() { - return this.appService.testOutgoingFetchExternalDisallowed(); - } - - @Get('test-outgoing-http-external-allowed') - async testOutgoingHttpExternalAllowed() { - return this.appService.testOutgoingHttpExternalAllowed(); - } - - @Get('test-outgoing-http-external-disallowed') - async testOutgoingHttpExternalDisallowed() { - return this.appService.testOutgoingHttpExternalDisallowed(); - } - - @Get('test-span-decorator-async') - async testSpanDecoratorAsync() { - return { result: await this.appService.testSpanDecoratorAsync() }; - } - - @Get('test-span-decorator-sync') - async testSpanDecoratorSync() { - return { result: await this.appService.testSpanDecoratorSync() }; - } - - @Get('kill-test-cron') - async killTestCron() { - this.appService.killTestCron(); - } -} - -@Controller() -export class AppController2 { - constructor(private readonly appService: AppService2) {} - - @Get('external-allowed') - externalAllowed(@Headers() headers) { - return this.appService.externalAllowed(headers); - } - - @Get('external-disallowed') - externalDisallowed(@Headers() headers) { - return this.appService.externalDisallowed(headers); - } -} diff --git a/dev-packages/e2e-tests/test-applications/nestjs/src/app.module.ts b/dev-packages/e2e-tests/test-applications/nestjs/src/app.module.ts deleted file mode 100644 index 932d1af99611..000000000000 --- a/dev-packages/e2e-tests/test-applications/nestjs/src/app.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Module } from '@nestjs/common'; -import { ScheduleModule } from '@nestjs/schedule'; -import { AppController1, AppController2 } from './app.controller'; -import { AppService1, AppService2 } from './app.service'; -import { TestModule } from './test-module/test.module'; - -@Module({ - imports: [ScheduleModule.forRoot(), TestModule], - controllers: [AppController1], - providers: [AppService1], -}) -export class AppModule1 {} - -@Module({ - imports: [], - controllers: [AppController2], - providers: [AppService2], -}) -export class AppModule2 {} diff --git a/dev-packages/e2e-tests/test-applications/nestjs/src/main.ts b/dev-packages/e2e-tests/test-applications/nestjs/src/main.ts deleted file mode 100644 index c2682662154d..000000000000 --- a/dev-packages/e2e-tests/test-applications/nestjs/src/main.ts +++ /dev/null @@ -1,24 +0,0 @@ -// Import this first -import './instrument'; - -// Import other modules -import { BaseExceptionFilter, HttpAdapterHost, NestFactory } from '@nestjs/core'; -import * as Sentry from '@sentry/nestjs'; -import { AppModule1, AppModule2 } from './app.module'; - -const app1Port = 3030; -const app2Port = 3040; - -async function bootstrap() { - const app1 = await NestFactory.create(AppModule1); - - const { httpAdapter } = app1.get(HttpAdapterHost); - Sentry.setupNestErrorHandler(app1, new BaseExceptionFilter(httpAdapter)); - - await app1.listen(app1Port); - - const app2 = await NestFactory.create(AppModule2); - await app2.listen(app2Port); -} - -bootstrap(); diff --git a/dev-packages/e2e-tests/test-applications/nestjs/src/test-module/test.controller.ts b/dev-packages/e2e-tests/test-applications/nestjs/src/test-module/test.controller.ts deleted file mode 100644 index 150fb0e07546..000000000000 --- a/dev-packages/e2e-tests/test-applications/nestjs/src/test-module/test.controller.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Controller, Get } from '@nestjs/common'; -import { TestException } from './test.exception'; - -@Controller('test-module') -export class TestController { - constructor() {} - - @Get() - getTest(): string { - throw new TestException(); - } -} diff --git a/dev-packages/e2e-tests/test-applications/nestjs/src/test-module/test.exception.ts b/dev-packages/e2e-tests/test-applications/nestjs/src/test-module/test.exception.ts deleted file mode 100644 index b736596b6717..000000000000 --- a/dev-packages/e2e-tests/test-applications/nestjs/src/test-module/test.exception.ts +++ /dev/null @@ -1,5 +0,0 @@ -export class TestException extends Error { - constructor() { - super('Something went wrong in the test module!'); - } -} diff --git a/dev-packages/e2e-tests/test-applications/nestjs/src/test-module/test.module.ts b/dev-packages/e2e-tests/test-applications/nestjs/src/test-module/test.module.ts deleted file mode 100644 index 37b6dbe7e819..000000000000 --- a/dev-packages/e2e-tests/test-applications/nestjs/src/test-module/test.module.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Module } from '@nestjs/common'; -import { APP_FILTER } from '@nestjs/core'; -import { TestController } from './test.controller'; -import { TestExceptionFilter } from './test.filter'; - -@Module({ - imports: [], - controllers: [TestController], - providers: [ - { - provide: APP_FILTER, - useClass: TestExceptionFilter, - }, - ], -}) -export class TestModule {} From 1619efcc0614e0948f80fc9a9c623d4927f4b1c7 Mon Sep 17 00:00:00 2001 From: Jaspreet Singh Date: Thu, 18 Jul 2024 17:26:12 +0530 Subject: [PATCH 35/53] fix(feedback): add a missing call of Actor.appendToDom method when DOMContentLoaded event is triggered (#12973) Fixing a missing paranthesis to call `appendToDom` on `DOMContentLoaded` event. Fixes #12970 --- packages/feedback/src/core/integration.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/feedback/src/core/integration.ts b/packages/feedback/src/core/integration.ts index 8917644cebfe..4e8caa85a135 100644 --- a/packages/feedback/src/core/integration.ts +++ b/packages/feedback/src/core/integration.ts @@ -282,7 +282,7 @@ export const buildFeedbackIntegration = ({ } if (DOCUMENT.readyState === 'loading') { - DOCUMENT.addEventListener('DOMContentLoaded', () => _createActor().appendToDom); + DOCUMENT.addEventListener('DOMContentLoaded', () => _createActor().appendToDom()); } else { _createActor().appendToDom(); } From 803220e44bab45c6cb955d910886b5ec5ef5ddc2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 18 Jul 2024 14:29:08 +0200 Subject: [PATCH 36/53] ref: Add external contributor to CHANGELOG.md (#12974) This PR adds the external contributor to the CHANGELOG.md file, so that they are credited for their contribution. See #12973 --------- Co-authored-by: andreiborza <168741329+andreiborza@users.noreply.github.com> Co-authored-by: Andrei Borza --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 336529b9ff23..46d4c95e9603 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ - "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott +Work in this release was contributed by @jaspreet57. Thank you for your contribution! + ## 8.18.0 ### Important Changes From 7500b06481ace968978847ca551c1db415861d8a Mon Sep 17 00:00:00 2001 From: Artur Androsovych Date: Thu, 18 Jul 2024 13:30:55 +0100 Subject: [PATCH 37/53] fix(angular): Remove `afterSendEvent` listener once root injector is destroyed (#12786) Add cleanup logic to handle the removal of afterSendEvent, which is set up within the Angular error handler. This fixes memory leaks that occur when the event is still being handled after the root view is removed --------- Co-authored-by: Lukas Stracke --- packages/angular/src/errorhandler.ts | 28 ++++++++------ packages/angular/test/errorhandler.test.ts | 44 ++++++++++++++++++++++ 2 files changed, 60 insertions(+), 12 deletions(-) diff --git a/packages/angular/src/errorhandler.ts b/packages/angular/src/errorhandler.ts index 28c06e1e6bfd..14ca380ea3ea 100644 --- a/packages/angular/src/errorhandler.ts +++ b/packages/angular/src/errorhandler.ts @@ -1,5 +1,5 @@ import { HttpErrorResponse } from '@angular/common/http'; -import type { ErrorHandler as AngularErrorHandler } from '@angular/core'; +import type { ErrorHandler as AngularErrorHandler, OnDestroy } from '@angular/core'; import { Inject, Injectable } from '@angular/core'; import * as Sentry from '@sentry/browser'; import type { ReportDialogOptions } from '@sentry/browser'; @@ -81,21 +81,28 @@ function isErrorOrErrorLikeObject(value: unknown): value is Error { * Implementation of Angular's ErrorHandler provider that can be used as a drop-in replacement for the stock one. */ @Injectable({ providedIn: 'root' }) -class SentryErrorHandler implements AngularErrorHandler { +class SentryErrorHandler implements AngularErrorHandler, OnDestroy { protected readonly _options: ErrorHandlerOptions; - /* indicates if we already registered our the afterSendEvent handler */ - private _registeredAfterSendEventHandler; + /** The cleanup function is executed when the injector is destroyed. */ + private _removeAfterSendEventListener?: () => void; public constructor(@Inject('errorHandlerOptions') options?: ErrorHandlerOptions) { - this._registeredAfterSendEventHandler = false; - this._options = { logErrors: true, ...options, }; } + /** + * Method executed when the injector is destroyed. + */ + public ngOnDestroy(): void { + if (this._removeAfterSendEventListener) { + this._removeAfterSendEventListener(); + } + } + /** * Method called for every value captured through the ErrorHandler */ @@ -119,17 +126,14 @@ class SentryErrorHandler implements AngularErrorHandler { if (this._options.showDialog) { const client = Sentry.getClient(); - if (client && !this._registeredAfterSendEventHandler) { - client.on('afterSendEvent', (event: Event) => { + if (client && !this._removeAfterSendEventListener) { + this._removeAfterSendEventListener = client.on('afterSendEvent', (event: Event) => { if (!event.type && event.event_id) { runOutsideAngular(() => { - Sentry.showReportDialog({ ...this._options.dialogOptions, eventId: event.event_id! }); + Sentry.showReportDialog({ ...this._options.dialogOptions, eventId: event.event_id }); }); } }); - - // We only want to register this hook once in the lifetime of the error handler - this._registeredAfterSendEventHandler = true; } else if (!client) { runOutsideAngular(() => { Sentry.showReportDialog({ ...this._options.dialogOptions, eventId }); diff --git a/packages/angular/test/errorhandler.test.ts b/packages/angular/test/errorhandler.test.ts index c30a7a87efc9..1ae415c5706d 100644 --- a/packages/angular/test/errorhandler.test.ts +++ b/packages/angular/test/errorhandler.test.ts @@ -546,5 +546,49 @@ describe('SentryErrorHandler', () => { expect(showReportDialogSpy).toBeCalledTimes(1); }); }); + + it('only registers the client "afterSendEvent" listener to open the dialog once', () => { + const unsubScribeSpy = vi.fn(); + const client = { + cbs: [] as ((event: Event) => void)[], + on: vi.fn((_, cb) => { + client.cbs.push(cb); + return unsubScribeSpy; + }), + }; + + vi.spyOn(SentryBrowser, 'getClient').mockImplementation(() => client as unknown as Client); + + const errorhandler = createErrorHandler({ showDialog: true }); + expect(client.cbs).toHaveLength(0); + + errorhandler.handleError(new Error('error 1')); + expect(client.cbs).toHaveLength(1); + + errorhandler.handleError(new Error('error 2')); + errorhandler.handleError(new Error('error 3')); + expect(client.cbs).toHaveLength(1); + }); + + it('cleans up the "afterSendEvent" listener once the ErrorHandler is destroyed', () => { + const unsubScribeSpy = vi.fn(); + const client = { + cbs: [] as ((event: Event) => void)[], + on: vi.fn((_, cb) => { + client.cbs.push(cb); + return unsubScribeSpy; + }), + }; + + vi.spyOn(SentryBrowser, 'getClient').mockImplementation(() => client as unknown as Client); + + const errorhandler = createErrorHandler({ showDialog: true }); + + errorhandler.handleError(new Error('error 1')); + expect(client.cbs).toHaveLength(1); + + errorhandler.ngOnDestroy(); + expect(unsubScribeSpy).toHaveBeenCalledTimes(1); + }); }); }); From 7d7164a43016595b59bb2427abd089dfa6e3f646 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 18 Jul 2024 14:40:42 +0200 Subject: [PATCH 38/53] ref: Add external contributor to CHANGELOG.md (#12975) This PR adds the external contributor to the CHANGELOG.md file, so that they are credited for their contribution. See #12786 --------- Co-authored-by: Lms24 <8420481+Lms24@users.noreply.github.com> Co-authored-by: Andrei Borza --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46d4c95e9603..a894d4ea4f83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ - "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott -Work in this release was contributed by @jaspreet57. Thank you for your contribution! +Work in this release was contributed by @jaspreet57 and @arturovt. Thank you for your contribution! ## 8.18.0 From c7ff1a9d1e768d0af9d21690ba8b4fe5db24965d Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Thu, 18 Jul 2024 14:44:27 +0200 Subject: [PATCH 39/53] meta(changelog): Update changelog for 8.19.0 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a894d4ea4f83..3f6617a2bcc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,13 @@ - "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott +## 8.19.0 + +- feat(core): Align Span interface with OTEL (#12898) +- fix(angular): Remove `afterSendEvent` listener once root injector is destroyed (#12786) +- fix(browser): Fix bug causing unintentional dropping of transactions (#12933) +- fix(feedback): Add a missing call of Actor.appendToDom method when DOMContentLoaded event is triggered (#12973) + Work in this release was contributed by @jaspreet57 and @arturovt. Thank you for your contribution! ## 8.18.0 From f2ef53ecbb7b86fa44e983d07f3c02b65dae404c Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Thu, 18 Jul 2024 08:54:42 -0400 Subject: [PATCH 40/53] test(vue): Switch to using vitest (#12955) Before: `Time: 3.935 s` After: `Duration 1.55s (transform 961ms, setup 0ms, collect 3.56s, tests 127ms, environment 1.73s, prepare 367ms)` If we remove the jsdom based tests it'll probably get even faster. --- packages/vue/jest.config.js | 6 -- packages/vue/package.json | 4 +- packages/vue/test/errorHandler.test.ts | 18 +++-- .../test/integration/VueIntegration.test.ts | 18 +++-- packages/vue/test/integration/init.test.ts | 10 ++- packages/vue/test/router.test.ts | 74 ++++++++++--------- packages/vue/test/vendor/components.test.ts | 2 + packages/vue/tsconfig.test.json | 4 +- packages/vue/vite.config.ts | 5 ++ 9 files changed, 79 insertions(+), 62 deletions(-) delete mode 100644 packages/vue/jest.config.js create mode 100644 packages/vue/vite.config.ts diff --git a/packages/vue/jest.config.js b/packages/vue/jest.config.js deleted file mode 100644 index cd02790794a7..000000000000 --- a/packages/vue/jest.config.js +++ /dev/null @@ -1,6 +0,0 @@ -const baseConfig = require('../../jest/jest.config.js'); - -module.exports = { - ...baseConfig, - testEnvironment: 'jsdom', -}; diff --git a/packages/vue/package.json b/packages/vue/package.json index 0dc72164cdc9..76ae5cf9a90a 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -66,8 +66,8 @@ "clean": "rimraf build coverage sentry-vue-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", - "test": "jest", - "test:watch": "jest --watch", + "test": "vitest run", + "test:watch": "vitest --watch", "yalc:publish": "yalc publish --push --sig" }, "volta": { diff --git a/packages/vue/test/errorHandler.test.ts b/packages/vue/test/errorHandler.test.ts index e6ac911c533c..273d1dfecd0e 100644 --- a/packages/vue/test/errorHandler.test.ts +++ b/packages/vue/test/errorHandler.test.ts @@ -1,3 +1,5 @@ +import { afterEach, describe, expect, test, vi } from 'vitest'; + import { setCurrentClient } from '@sentry/browser'; import { attachErrorHandler } from '../src/errorhandler'; @@ -7,7 +9,7 @@ import { generateComponentTrace } from '../src/vendor/components'; describe('attachErrorHandler', () => { describe('attachProps', () => { afterEach(() => { - jest.resetAllMocks(); + vi.resetAllMocks(); }); describe("given I don't want to `attachProps`", () => { @@ -325,13 +327,13 @@ const testHarness = ({ enableConsole, vm, }: TestHarnessOpts) => { - jest.useFakeTimers(); - const providedErrorHandlerSpy = jest.fn(); - const warnHandlerSpy = jest.fn(); - const consoleErrorSpy = jest.fn(); + vi.useFakeTimers(); + const providedErrorHandlerSpy = vi.fn(); + const warnHandlerSpy = vi.fn(); + const consoleErrorSpy = vi.fn(); const client: any = { - captureException: jest.fn(async () => Promise.resolve()), + captureException: vi.fn(async () => Promise.resolve()), }; setCurrentClient(client); @@ -339,7 +341,7 @@ const testHarness = ({ config: { silent: !!silent, }, - mixin: jest.fn(), + mixin: vi.fn(), }; if (enableErrorHandler) { @@ -380,7 +382,7 @@ const testHarness = ({ app.config.errorHandler(new DummyError(), vm, 'stub-lifecycle-hook'); // and waits for internal timers - jest.runAllTimers(); + vi.runAllTimers(); }, expect: { errorHandlerSpy: expect(providedErrorHandlerSpy), diff --git a/packages/vue/test/integration/VueIntegration.test.ts b/packages/vue/test/integration/VueIntegration.test.ts index 81e3b863a16e..9f0aeecaa722 100644 --- a/packages/vue/test/integration/VueIntegration.test.ts +++ b/packages/vue/test/integration/VueIntegration.test.ts @@ -1,3 +1,9 @@ +/** + * @vitest-environment jsdom + */ + +import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, vi } from 'vitest'; + import type { Client } from '@sentry/types'; import { logger } from '@sentry/utils'; import { createApp } from 'vue'; @@ -15,10 +21,10 @@ describe('Sentry.VueIntegration', () => { const globalRequest = globalThis.Request; beforeAll(() => { - globalThis.fetch = jest.fn(); + globalThis.fetch = vi.fn(); // @ts-expect-error This is a mock - globalThis.Response = jest.fn(); - globalThis.Request = jest.fn(); + globalThis.Response = vi.fn(); + globalThis.Request = vi.fn(); }); afterAll(() => { @@ -31,17 +37,17 @@ describe('Sentry.VueIntegration', () => { warnings = []; loggerWarnings = []; - jest.spyOn(logger, 'warn').mockImplementation((message: unknown) => { + vi.spyOn(logger, 'warn').mockImplementation((message: unknown) => { loggerWarnings.push(message); }); - jest.spyOn(console, 'warn').mockImplementation((message: unknown) => { + vi.spyOn(console, 'warn').mockImplementation((message: unknown) => { warnings.push(message); }); }); afterEach(() => { - jest.resetAllMocks(); + vi.resetAllMocks(); }); it('allows to initialize integration later', () => { diff --git a/packages/vue/test/integration/init.test.ts b/packages/vue/test/integration/init.test.ts index c611900ed3b0..fd9d7c56fc93 100644 --- a/packages/vue/test/integration/init.test.ts +++ b/packages/vue/test/integration/init.test.ts @@ -1,3 +1,9 @@ +/** + * @vitest-environment jsdom + */ + +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; + import { createApp } from 'vue'; import type { Client } from '@sentry/types'; @@ -11,13 +17,13 @@ describe('Sentry.init', () => { beforeEach(() => { warnings = []; - jest.spyOn(console, 'warn').mockImplementation((message: unknown) => { + vi.spyOn(console, 'warn').mockImplementation((message: unknown) => { warnings.push(message); }); }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('does not warn when correctly setup (Vue 3)', () => { diff --git a/packages/vue/test/router.test.ts b/packages/vue/test/router.test.ts index 8c7ca7c73e93..dc69d7ae0fd9 100644 --- a/packages/vue/test/router.test.ts +++ b/packages/vue/test/router.test.ts @@ -1,3 +1,5 @@ +import { afterEach, describe, expect, it, vi } from 'vitest'; + import * as SentryBrowser from '@sentry/browser'; import * as SentryCore from '@sentry/core'; import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '@sentry/core'; @@ -6,21 +8,21 @@ import type { Span, SpanAttributes } from '@sentry/types'; import type { Route } from '../src/router'; import { instrumentVueRouter } from '../src/router'; -const captureExceptionSpy = jest.spyOn(SentryBrowser, 'captureException'); -jest.mock('@sentry/core', () => { - const actual = jest.requireActual('@sentry/core'); +const captureExceptionSpy = vi.spyOn(SentryBrowser, 'captureException'); +vi.mock('@sentry/core', async () => { + const actual = await vi.importActual('@sentry/core'); return { ...actual, - getActiveSpan: jest.fn().mockReturnValue({}), + getActiveSpan: vi.fn().mockReturnValue({}), }; }); const mockVueRouter = { - onError: jest.fn void]>(), - beforeEach: jest.fn void) => void]>(), + onError: vi.fn<[(error: Error) => void]>(), + beforeEach: vi.fn<[(from: Route, to: Route, next?: () => void) => void]>(), }; -const mockNext = jest.fn(); +const mockNext = vi.fn(); const testRoutes: Record = { initialPageloadRoute: { matched: [], params: {}, path: '', query: {} }, @@ -68,11 +70,11 @@ const testRoutes: Record = { describe('instrumentVueRouter()', () => { afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('should return instrumentation that instruments VueRouter.onError', () => { - const mockStartSpan = jest.fn(); + const mockStartSpan = vi.fn(); instrumentVueRouter( mockVueRouter, { routeLabel: 'name', instrumentPageLoad: true, instrumentNavigation: true }, @@ -99,7 +101,7 @@ describe('instrumentVueRouter()', () => { ])( 'should return instrumentation that instruments VueRouter.beforeEach(%s, %s) for navigations', (fromKey, toKey, transactionName, transactionSource) => { - const mockStartSpan = jest.fn(); + const mockStartSpan = vi.fn(); instrumentVueRouter( mockVueRouter, { routeLabel: 'name', instrumentPageLoad: true, instrumentNavigation: true }, @@ -138,15 +140,15 @@ describe('instrumentVueRouter()', () => { 'should return instrumentation that instruments VueRouter.beforeEach(%s, %s) for pageloads', (fromKey, toKey, transactionName, transactionSource) => { const mockRootSpan = { - getSpanJSON: jest.fn().mockReturnValue({ op: 'pageload' }), - updateName: jest.fn(), - setAttribute: jest.fn(), - setAttributes: jest.fn(), + getSpanJSON: vi.fn().mockReturnValue({ op: 'pageload' }), + updateName: vi.fn(), + setAttribute: vi.fn(), + setAttributes: vi.fn(), }; - jest.spyOn(SentryCore, 'getRootSpan').mockImplementation(() => mockRootSpan as unknown as Span); + vi.spyOn(SentryCore, 'getRootSpan').mockImplementation(() => mockRootSpan as unknown as Span); - const mockStartSpan = jest.fn().mockImplementation(_ => { + const mockStartSpan = vi.fn().mockImplementation(_ => { return mockRootSpan; }); instrumentVueRouter( @@ -178,7 +180,7 @@ describe('instrumentVueRouter()', () => { ); it('allows to configure routeLabel=path', () => { - const mockStartSpan = jest.fn(); + const mockStartSpan = vi.fn(); instrumentVueRouter( mockVueRouter, { routeLabel: 'path', instrumentPageLoad: true, instrumentNavigation: true }, @@ -205,7 +207,7 @@ describe('instrumentVueRouter()', () => { }); it('allows to configure routeLabel=name', () => { - const mockStartSpan = jest.fn(); + const mockStartSpan = vi.fn(); instrumentVueRouter( mockVueRouter, { routeLabel: 'name', instrumentPageLoad: true, instrumentNavigation: true }, @@ -233,9 +235,9 @@ describe('instrumentVueRouter()', () => { it("doesn't overwrite a pageload transaction name it was set to custom before the router resolved the route", () => { const mockRootSpan = { - updateName: jest.fn(), - setAttribute: jest.fn(), - setAttributes: jest.fn(), + updateName: vi.fn(), + setAttribute: vi.fn(), + setAttributes: vi.fn(), name: '', getSpanJSON: () => ({ op: 'pageload', @@ -244,10 +246,10 @@ describe('instrumentVueRouter()', () => { }, }), }; - const mockStartSpan = jest.fn().mockImplementation(_ => { + const mockStartSpan = vi.fn().mockImplementation(_ => { return mockRootSpan; }); - jest.spyOn(SentryCore, 'getRootSpan').mockImplementation(() => mockRootSpan as unknown as Span); + vi.spyOn(SentryCore, 'getRootSpan').mockImplementation(() => mockRootSpan as unknown as Span); instrumentVueRouter( mockVueRouter, @@ -287,14 +289,14 @@ describe('instrumentVueRouter()', () => { }); it("updates the scope's `transactionName` when a route is resolved", () => { - const mockStartSpan = jest.fn().mockImplementation(_ => { + const mockStartSpan = vi.fn().mockImplementation(_ => { return {}; }); - const scopeSetTransactionNameSpy = jest.fn(); + const scopeSetTransactionNameSpy = vi.fn(); // @ts-expect-error - only creating a partial scope but that's fine - jest.spyOn(SentryCore, 'getCurrentScope').mockImplementation(() => ({ + vi.spyOn(SentryCore, 'getCurrentScope').mockImplementation(() => ({ setTransactionName: scopeSetTransactionNameSpy, })); @@ -315,17 +317,17 @@ describe('instrumentVueRouter()', () => { expect(scopeSetTransactionNameSpy).toHaveBeenCalledWith('/books/:bookId/chapter/:chapterId'); }); - test.each([ + it.each([ [false, 0], [true, 1], ])( 'should return instrumentation that considers the instrumentPageLoad = %p', (instrumentPageLoad, expectedCallsAmount) => { const mockRootSpan = { - updateName: jest.fn(), - setData: jest.fn(), - setAttribute: jest.fn(), - setAttributes: jest.fn(), + updateName: vi.fn(), + setData: vi.fn(), + setAttribute: vi.fn(), + setAttributes: vi.fn(), name: '', getSpanJSON: () => ({ op: 'pageload', @@ -334,9 +336,9 @@ describe('instrumentVueRouter()', () => { }, }), }; - jest.spyOn(SentryCore, 'getRootSpan').mockImplementation(() => mockRootSpan as unknown as Span); + vi.spyOn(SentryCore, 'getRootSpan').mockImplementation(() => mockRootSpan as unknown as Span); - const mockStartSpan = jest.fn(); + const mockStartSpan = vi.fn(); instrumentVueRouter( mockVueRouter, { routeLabel: 'name', instrumentPageLoad, instrumentNavigation: true }, @@ -354,13 +356,13 @@ describe('instrumentVueRouter()', () => { }, ); - test.each([ + it.each([ [false, 0], [true, 1], ])( 'should return instrumentation that considers the instrumentNavigation = %p', (instrumentNavigation, expectedCallsAmount) => { - const mockStartSpan = jest.fn(); + const mockStartSpan = vi.fn(); instrumentVueRouter( mockVueRouter, { routeLabel: 'name', instrumentPageLoad: true, instrumentNavigation }, @@ -378,7 +380,7 @@ describe('instrumentVueRouter()', () => { ); it("doesn't throw when `next` is not available in the beforeEach callback (Vue Router 4)", () => { - const mockStartSpan = jest.fn(); + const mockStartSpan = vi.fn(); instrumentVueRouter( mockVueRouter, { routeLabel: 'path', instrumentPageLoad: true, instrumentNavigation: true }, diff --git a/packages/vue/test/vendor/components.test.ts b/packages/vue/test/vendor/components.test.ts index 77b54889326a..49d184325ee0 100644 --- a/packages/vue/test/vendor/components.test.ts +++ b/packages/vue/test/vendor/components.test.ts @@ -1,3 +1,5 @@ +import { beforeEach, describe, expect, it } from 'vitest'; + import { formatComponentName } from '../../src/vendor/components'; describe('formatComponentName', () => { diff --git a/packages/vue/tsconfig.test.json b/packages/vue/tsconfig.test.json index af7e36ec0eda..4a990e19513a 100644 --- a/packages/vue/tsconfig.test.json +++ b/packages/vue/tsconfig.test.json @@ -1,11 +1,11 @@ { "extends": "./tsconfig.json", - "include": ["test/**/*"], + "include": ["test/**/*", "vite.config.ts"], "compilerOptions": { // should include all types from `./tsconfig.json` plus types for all test frameworks used - "types": ["jest"] + "types": [] // other package-specific, test-specific options } diff --git a/packages/vue/vite.config.ts b/packages/vue/vite.config.ts new file mode 100644 index 000000000000..0582a58f479a --- /dev/null +++ b/packages/vue/vite.config.ts @@ -0,0 +1,5 @@ +import baseConfig from '../../vite/vite.config'; + +export default { + ...baseConfig, +}; From a17c8c4ca4775559e48ae90839482a092103436a Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Thu, 18 Jul 2024 08:57:18 -0400 Subject: [PATCH 41/53] feat(cloudflare): Add cloudflare sdk scaffolding (#12953) This PR adds basic scaffolding for the cloudflare workers SDK. Most of this is based on `@sentry/vercel-edge`. This adds: 1. A basic cloudflare workers client 2. A set of default integrations for the cloudflare sdk (including a fetch based one) 3. A cloudflare transport that uses the vercel-edge transport 4. An async context strategy powered by AsyncLocalStorage You'll notice that there is no `init` method defined or exported from the SDK. This is on purpose! `init` for cloudflare workers will work a bit differently than the other SDKs, so I wanted to address it differently on purpose. You'll see what that looks like in the next PR! --- packages/cloudflare/package.json | 5 +- packages/cloudflare/src/async.ts | 73 ++++++ packages/cloudflare/src/client.ts | 49 ++++ packages/cloudflare/src/index.ts | 91 +++++++- packages/cloudflare/src/integrations/fetch.ts | 162 ++++++++++++++ packages/cloudflare/src/sdk.ts | 27 +++ packages/cloudflare/src/transport.ts | 104 +++++++++ packages/cloudflare/test/async.test.ts | 163 ++++++++++++++ packages/cloudflare/test/fixtures/worker.mjs | 8 - packages/cloudflare/test/index.test.ts | 17 -- .../test/integrations/fetch.test.ts | 211 ++++++++++++++++++ packages/cloudflare/test/transport.test.ts | 160 +++++++++++++ packages/cloudflare/tsconfig.json | 3 +- yarn.lock | 16 +- 14 files changed, 1052 insertions(+), 37 deletions(-) create mode 100644 packages/cloudflare/src/async.ts create mode 100644 packages/cloudflare/src/client.ts create mode 100644 packages/cloudflare/src/integrations/fetch.ts create mode 100644 packages/cloudflare/src/sdk.ts create mode 100644 packages/cloudflare/src/transport.ts create mode 100644 packages/cloudflare/test/async.test.ts delete mode 100644 packages/cloudflare/test/fixtures/worker.mjs delete mode 100644 packages/cloudflare/test/index.test.ts create mode 100644 packages/cloudflare/test/integrations/fetch.test.ts create mode 100644 packages/cloudflare/test/transport.test.ts diff --git a/packages/cloudflare/package.json b/packages/cloudflare/package.json index 21cf38ccfbb2..db4d281833af 100644 --- a/packages/cloudflare/package.json +++ b/packages/cloudflare/package.json @@ -44,9 +44,10 @@ "@sentry/utils": "8.18.0" }, "devDependencies": { - "@cloudflare/workers-types": "^4.20240620.0", + "@cloudflare/workers-types": "^4.20240712.0", + "@types/node": "^14.18.0", "miniflare": "^3.20240701.0", - "wrangler": "^3.63.2" + "wrangler": "^3.64.0" }, "scripts": { "build": "run-p build:transpile build:types", diff --git a/packages/cloudflare/src/async.ts b/packages/cloudflare/src/async.ts new file mode 100644 index 000000000000..9662fc340a7e --- /dev/null +++ b/packages/cloudflare/src/async.ts @@ -0,0 +1,73 @@ +import { getDefaultCurrentScope, getDefaultIsolationScope, setAsyncContextStrategy } from '@sentry/core'; +import type { Scope } from '@sentry/types'; + +// Need to use node: prefix for cloudflare workers compatibility +// Note: Because we are using node:async_hooks, we need to set `node_compat` in the wrangler.toml +import { AsyncLocalStorage } from 'node:async_hooks'; + +/** + * Sets the async context strategy to use AsyncLocalStorage. + * + * AsyncLocalStorage is only avalaible in the cloudflare workers runtime if you set + * compatibility_flags = ["nodejs_compat"] or compatibility_flags = ["nodejs_als"] + */ +export function setAsyncLocalStorageAsyncContextStrategy(): void { + const asyncStorage = new AsyncLocalStorage<{ + scope: Scope; + isolationScope: Scope; + }>(); + + function getScopes(): { scope: Scope; isolationScope: Scope } { + const scopes = asyncStorage.getStore(); + + if (scopes) { + return scopes; + } + + // fallback behavior: + // if, for whatever reason, we can't find scopes on the context here, we have to fix this somehow + return { + scope: getDefaultCurrentScope(), + isolationScope: getDefaultIsolationScope(), + }; + } + + function withScope(callback: (scope: Scope) => T): T { + const scope = getScopes().scope.clone(); + const isolationScope = getScopes().isolationScope; + return asyncStorage.run({ scope, isolationScope }, () => { + return callback(scope); + }); + } + + function withSetScope(scope: Scope, callback: (scope: Scope) => T): T { + const isolationScope = getScopes().isolationScope.clone(); + return asyncStorage.run({ scope, isolationScope }, () => { + return callback(scope); + }); + } + + function withIsolationScope(callback: (isolationScope: Scope) => T): T { + const scope = getScopes().scope; + const isolationScope = getScopes().isolationScope.clone(); + return asyncStorage.run({ scope, isolationScope }, () => { + return callback(isolationScope); + }); + } + + function withSetIsolationScope(isolationScope: Scope, callback: (isolationScope: Scope) => T): T { + const scope = getScopes().scope; + return asyncStorage.run({ scope, isolationScope }, () => { + return callback(isolationScope); + }); + } + + setAsyncContextStrategy({ + withScope, + withSetScope, + withIsolationScope, + withSetIsolationScope, + getCurrentScope: () => getScopes().scope, + getIsolationScope: () => getScopes().isolationScope, + }); +} diff --git a/packages/cloudflare/src/client.ts b/packages/cloudflare/src/client.ts new file mode 100644 index 000000000000..8b25d8ae6f87 --- /dev/null +++ b/packages/cloudflare/src/client.ts @@ -0,0 +1,49 @@ +import type { ServerRuntimeClientOptions } from '@sentry/core'; +import { ServerRuntimeClient, applySdkMetadata } from '@sentry/core'; +import type { ClientOptions, Options } from '@sentry/types'; + +import type { CloudflareTransportOptions } from './transport'; + +/** + * The Sentry Cloudflare SDK Client. + * + * @see CloudflareClientOptions for documentation on configuration options. + * @see ServerRuntimeClient for usage documentation. + */ +export class CloudflareClient extends ServerRuntimeClient { + /** + * Creates a new Cloudflare SDK instance. + * @param options Configuration options for this SDK. + */ + public constructor(options: CloudflareClientOptions) { + applySdkMetadata(options, 'options'); + options._metadata = options._metadata || {}; + + const clientOptions: ServerRuntimeClientOptions = { + ...options, + platform: 'javascript', + // TODO: Grab version information + runtime: { name: 'cloudflare' }, + // TODO: Add server name + }; + + super(clientOptions); + } +} + +// eslint-disable-next-line @typescript-eslint/no-empty-interface +interface BaseCloudflareOptions {} + +/** + * Configuration options for the Sentry Cloudflare SDK + * + * @see @sentry/types Options for more information. + */ +export interface CloudflareOptions extends Options, BaseCloudflareOptions {} + +/** + * Configuration options for the Sentry Cloudflare SDK Client class + * + * @see CloudflareClient for more information. + */ +export interface CloudflareClientOptions extends ClientOptions, BaseCloudflareOptions {} diff --git a/packages/cloudflare/src/index.ts b/packages/cloudflare/src/index.ts index cb0ff5c3b541..46c0b9920314 100644 --- a/packages/cloudflare/src/index.ts +++ b/packages/cloudflare/src/index.ts @@ -1 +1,90 @@ -export {}; +export type { + Breadcrumb, + BreadcrumbHint, + PolymorphicRequest, + Request, + SdkInfo, + Event, + EventHint, + ErrorEvent, + Exception, + Session, + SeverityLevel, + Span, + StackFrame, + Stacktrace, + Thread, + User, +} from '@sentry/types'; +export type { AddRequestDataToEventOptions } from '@sentry/utils'; + +export type { CloudflareOptions } from './client'; + +export { + addEventProcessor, + addBreadcrumb, + addIntegration, + captureException, + captureEvent, + captureMessage, + captureFeedback, + close, + createTransport, + lastEventId, + flush, + getClient, + isInitialized, + getCurrentScope, + getGlobalScope, + getIsolationScope, + setCurrentClient, + Scope, + SDK_VERSION, + setContext, + setExtra, + setExtras, + setTag, + setTags, + setUser, + getSpanStatusFromHttpCode, + setHttpStatus, + withScope, + withIsolationScope, + captureCheckIn, + withMonitor, + setMeasurement, + getActiveSpan, + getRootSpan, + startSpan, + startInactiveSpan, + startSpanManual, + startNewTrace, + withActiveSpan, + getSpanDescendants, + continueTrace, + metrics, + functionToStringIntegration, + inboundFiltersIntegration, + linkedErrorsIntegration, + requestDataIntegration, + extraErrorDataIntegration, + debugIntegration, + dedupeIntegration, + rewriteFramesIntegration, + captureConsoleIntegration, + moduleMetadataIntegration, + zodErrorsIntegration, + SEMANTIC_ATTRIBUTE_SENTRY_OP, + SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, + SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, + SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, + trpcMiddleware, + spanToJSON, + spanToTraceHeader, + spanToBaggageHeader, +} from '@sentry/core'; + +export { CloudflareClient } from './client'; +export { getDefaultIntegrations } from './sdk'; + +export { fetchIntegration } from './integrations/fetch'; diff --git a/packages/cloudflare/src/integrations/fetch.ts b/packages/cloudflare/src/integrations/fetch.ts new file mode 100644 index 000000000000..121445448f03 --- /dev/null +++ b/packages/cloudflare/src/integrations/fetch.ts @@ -0,0 +1,162 @@ +import { addBreadcrumb, defineIntegration, getClient, instrumentFetchRequest, isSentryRequestUrl } from '@sentry/core'; +import type { + Client, + FetchBreadcrumbData, + FetchBreadcrumbHint, + HandlerDataFetch, + IntegrationFn, + Span, +} from '@sentry/types'; +import { LRUMap, addFetchInstrumentationHandler, stringMatchesSomePattern } from '@sentry/utils'; + +const INTEGRATION_NAME = 'Fetch'; + +const HAS_CLIENT_MAP = new WeakMap(); + +export interface Options { + /** + * Whether breadcrumbs should be recorded for requests + * Defaults to true + */ + breadcrumbs: boolean; + + /** + * Function determining whether or not to create spans to track outgoing requests to the given URL. + * By default, spans will be created for all outgoing requests. + */ + shouldCreateSpanForRequest?: (url: string) => boolean; +} + +const _fetchIntegration = ((options: Partial = {}) => { + const breadcrumbs = options.breadcrumbs === undefined ? true : options.breadcrumbs; + const shouldCreateSpanForRequest = options.shouldCreateSpanForRequest; + + const _createSpanUrlMap = new LRUMap(100); + const _headersUrlMap = new LRUMap(100); + + const spans: Record = {}; + + /** Decides whether to attach trace data to the outgoing fetch request */ + function _shouldAttachTraceData(url: string): boolean { + const client = getClient(); + + if (!client) { + return false; + } + + const clientOptions = client.getOptions(); + + if (clientOptions.tracePropagationTargets === undefined) { + return true; + } + + const cachedDecision = _headersUrlMap.get(url); + if (cachedDecision !== undefined) { + return cachedDecision; + } + + const decision = stringMatchesSomePattern(url, clientOptions.tracePropagationTargets); + _headersUrlMap.set(url, decision); + return decision; + } + + /** Helper that wraps shouldCreateSpanForRequest option */ + function _shouldCreateSpan(url: string): boolean { + if (shouldCreateSpanForRequest === undefined) { + return true; + } + + const cachedDecision = _createSpanUrlMap.get(url); + if (cachedDecision !== undefined) { + return cachedDecision; + } + + const decision = shouldCreateSpanForRequest(url); + _createSpanUrlMap.set(url, decision); + return decision; + } + + return { + name: INTEGRATION_NAME, + setupOnce() { + addFetchInstrumentationHandler(handlerData => { + const client = getClient(); + if (!client || !HAS_CLIENT_MAP.get(client)) { + return; + } + + if (isSentryRequestUrl(handlerData.fetchData.url, client)) { + return; + } + + instrumentFetchRequest( + handlerData, + _shouldCreateSpan, + _shouldAttachTraceData, + spans, + 'auto.http.wintercg_fetch', + ); + + if (breadcrumbs) { + createBreadcrumb(handlerData); + } + }); + }, + setup(client) { + HAS_CLIENT_MAP.set(client, true); + }, + }; +}) satisfies IntegrationFn; + +/** + * Creates spans and attaches tracing headers to fetch requests. + */ +export const fetchIntegration = defineIntegration(_fetchIntegration); + +function createBreadcrumb(handlerData: HandlerDataFetch): void { + const { startTimestamp, endTimestamp } = handlerData; + + // We only capture complete fetch requests + if (!endTimestamp) { + return; + } + + if (handlerData.error) { + const data = handlerData.fetchData; + const hint: FetchBreadcrumbHint = { + data: handlerData.error, + input: handlerData.args, + startTimestamp, + endTimestamp, + }; + + addBreadcrumb( + { + category: 'fetch', + data, + level: 'error', + type: 'http', + }, + hint, + ); + } else { + const data: FetchBreadcrumbData = { + ...handlerData.fetchData, + status_code: handlerData.response && handlerData.response.status, + }; + const hint: FetchBreadcrumbHint = { + input: handlerData.args, + response: handlerData.response, + startTimestamp, + endTimestamp, + }; + addBreadcrumb( + { + category: 'fetch', + data, + type: 'http', + }, + hint, + ); + } +} diff --git a/packages/cloudflare/src/sdk.ts b/packages/cloudflare/src/sdk.ts new file mode 100644 index 000000000000..a6eaa4aa9360 --- /dev/null +++ b/packages/cloudflare/src/sdk.ts @@ -0,0 +1,27 @@ +import { + dedupeIntegration, + functionToStringIntegration, + inboundFiltersIntegration, + linkedErrorsIntegration, + requestDataIntegration, +} from '@sentry/core'; +import type { Integration, Options } from '@sentry/types'; + +import { fetchIntegration } from './integrations/fetch'; + +/** Get the default integrations for the Cloudflare SDK. */ +export function getDefaultIntegrations(options: Options): Integration[] { + const integrations = [ + dedupeIntegration(), + inboundFiltersIntegration(), + functionToStringIntegration(), + linkedErrorsIntegration(), + fetchIntegration(), + ]; + + if (options.sendDefaultPii) { + integrations.push(requestDataIntegration()); + } + + return integrations; +} diff --git a/packages/cloudflare/src/transport.ts b/packages/cloudflare/src/transport.ts new file mode 100644 index 000000000000..fd26b217c367 --- /dev/null +++ b/packages/cloudflare/src/transport.ts @@ -0,0 +1,104 @@ +import { createTransport } from '@sentry/core'; +import type { BaseTransportOptions, Transport, TransportMakeRequestResponse, TransportRequest } from '@sentry/types'; +import { SentryError } from '@sentry/utils'; + +export interface CloudflareTransportOptions extends BaseTransportOptions { + /** Fetch API init parameters. */ + fetchOptions?: RequestInit; + /** Custom headers for the transport. */ + headers?: { [key: string]: string }; +} + +const DEFAULT_TRANSPORT_BUFFER_SIZE = 30; + +/** + * This is a modified promise buffer that collects tasks until drain is called. + * We need this in the edge runtime because edge function invocations may not share I/O objects, like fetch requests + * and responses, and the normal PromiseBuffer inherently buffers stuff inbetween incoming requests. + * + * A limitation we need to be aware of is that DEFAULT_TRANSPORT_BUFFER_SIZE is the maximum amount of payloads the + * SDK can send for a given edge function invocation. + */ +export class IsolatedPromiseBuffer { + // We just have this field because the promise buffer interface requires it. + // If we ever remove it from the interface we should also remove it here. + public $: Array>; + + private _taskProducers: (() => PromiseLike)[]; + + private readonly _bufferSize: number; + + public constructor(_bufferSize = DEFAULT_TRANSPORT_BUFFER_SIZE) { + this.$ = []; + this._taskProducers = []; + this._bufferSize = _bufferSize; + } + + /** + * @inheritdoc + */ + public add(taskProducer: () => PromiseLike): PromiseLike { + if (this._taskProducers.length >= this._bufferSize) { + return Promise.reject(new SentryError('Not adding Promise because buffer limit was reached.')); + } + + this._taskProducers.push(taskProducer); + return Promise.resolve({}); + } + + /** + * @inheritdoc + */ + public drain(timeout?: number): PromiseLike { + const oldTaskProducers = [...this._taskProducers]; + this._taskProducers = []; + + return new Promise(resolve => { + const timer = setTimeout(() => { + if (timeout && timeout > 0) { + resolve(false); + } + }, timeout); + + // This cannot reject + // eslint-disable-next-line @typescript-eslint/no-floating-promises + Promise.all( + oldTaskProducers.map(taskProducer => + taskProducer().then(null, () => { + // catch all failed requests + }), + ), + ).then(() => { + // resolve to true if all fetch requests settled + clearTimeout(timer); + resolve(true); + }); + }); + } +} + +/** + * Creates a Transport that uses the native fetch API to send events to Sentry. + */ +export function makeCloudflareTransport(options: CloudflareTransportOptions): Transport { + function makeRequest(request: TransportRequest): PromiseLike { + const requestOptions: RequestInit = { + body: request.body, + method: 'POST', + headers: options.headers, + ...options.fetchOptions, + }; + + return fetch(options.url, requestOptions).then(response => { + return { + statusCode: response.status, + headers: { + 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'), + 'retry-after': response.headers.get('Retry-After'), + }, + }; + }); + } + + return createTransport(options, makeRequest, new IsolatedPromiseBuffer(options.bufferSize)); +} diff --git a/packages/cloudflare/test/async.test.ts b/packages/cloudflare/test/async.test.ts new file mode 100644 index 000000000000..a4423e0ca434 --- /dev/null +++ b/packages/cloudflare/test/async.test.ts @@ -0,0 +1,163 @@ +import { Scope, getCurrentScope, getGlobalScope, getIsolationScope, withIsolationScope, withScope } from '@sentry/core'; +import { GLOBAL_OBJ } from '@sentry/utils'; +import { AsyncLocalStorage } from 'async_hooks'; +import { beforeEach, describe, expect, it } from 'vitest'; +import { setAsyncLocalStorageAsyncContextStrategy } from '../src/async'; + +describe('withScope()', () => { + beforeEach(() => { + getIsolationScope().clear(); + getCurrentScope().clear(); + getGlobalScope().clear(); + + (GLOBAL_OBJ as any).AsyncLocalStorage = AsyncLocalStorage; + setAsyncLocalStorageAsyncContextStrategy(); + }); + + it('will make the passed scope the active scope within the callback', () => + new Promise(done => { + withScope(scope => { + expect(getCurrentScope()).toBe(scope); + done(); + }); + })); + + it('will pass a scope that is different from the current active isolation scope', () => + new Promise(done => { + withScope(scope => { + expect(getIsolationScope()).not.toBe(scope); + done(); + }); + })); + + it('will always make the inner most passed scope the current scope when nesting calls', () => + new Promise(done => { + withIsolationScope(_scope1 => { + withIsolationScope(scope2 => { + expect(getIsolationScope()).toBe(scope2); + done(); + }); + }); + })); + + it('forks the scope when not passing any scope', () => + new Promise(done => { + const initialScope = getCurrentScope(); + initialScope.setTag('aa', 'aa'); + + withScope(scope => { + expect(getCurrentScope()).toBe(scope); + scope.setTag('bb', 'bb'); + expect(scope).not.toBe(initialScope); + expect(scope.getScopeData().tags).toEqual({ aa: 'aa', bb: 'bb' }); + done(); + }); + })); + + it('forks the scope when passing undefined', () => + new Promise(done => { + const initialScope = getCurrentScope(); + initialScope.setTag('aa', 'aa'); + + withScope(undefined, scope => { + expect(getCurrentScope()).toBe(scope); + scope.setTag('bb', 'bb'); + expect(scope).not.toBe(initialScope); + expect(scope.getScopeData().tags).toEqual({ aa: 'aa', bb: 'bb' }); + done(); + }); + })); + + it('sets the passed in scope as active scope', () => + new Promise(done => { + const initialScope = getCurrentScope(); + initialScope.setTag('aa', 'aa'); + + const customScope = new Scope(); + + withScope(customScope, scope => { + expect(getCurrentScope()).toBe(customScope); + expect(scope).toBe(customScope); + done(); + }); + })); +}); + +describe('withIsolationScope()', () => { + beforeEach(() => { + getIsolationScope().clear(); + getCurrentScope().clear(); + getGlobalScope().clear(); + (GLOBAL_OBJ as any).AsyncLocalStorage = AsyncLocalStorage; + + setAsyncLocalStorageAsyncContextStrategy(); + }); + + it('will make the passed isolation scope the active isolation scope within the callback', () => + new Promise(done => { + withIsolationScope(scope => { + expect(getIsolationScope()).toBe(scope); + done(); + }); + })); + + it('will pass an isolation scope that is different from the current active scope', () => + new Promise(done => { + withIsolationScope(scope => { + expect(getCurrentScope()).not.toBe(scope); + done(); + }); + })); + + it('will always make the inner most passed scope the current scope when nesting calls', () => + new Promise(done => { + withIsolationScope(_scope1 => { + withIsolationScope(scope2 => { + expect(getIsolationScope()).toBe(scope2); + done(); + }); + }); + })); + + it('forks the isolation scope when not passing any isolation scope', () => + new Promise(done => { + const initialScope = getIsolationScope(); + initialScope.setTag('aa', 'aa'); + + withIsolationScope(scope => { + expect(getIsolationScope()).toBe(scope); + scope.setTag('bb', 'bb'); + expect(scope).not.toBe(initialScope); + expect(scope.getScopeData().tags).toEqual({ aa: 'aa', bb: 'bb' }); + done(); + }); + })); + + it('forks the isolation scope when passing undefined', () => + new Promise(done => { + const initialScope = getIsolationScope(); + initialScope.setTag('aa', 'aa'); + + withIsolationScope(undefined, scope => { + expect(getIsolationScope()).toBe(scope); + scope.setTag('bb', 'bb'); + expect(scope).not.toBe(initialScope); + expect(scope.getScopeData().tags).toEqual({ aa: 'aa', bb: 'bb' }); + done(); + }); + })); + + it('sets the passed in isolation scope as active isolation scope', () => + new Promise(done => { + const initialScope = getIsolationScope(); + initialScope.setTag('aa', 'aa'); + + const customScope = new Scope(); + + withIsolationScope(customScope, scope => { + expect(getIsolationScope()).toBe(customScope); + expect(scope).toBe(customScope); + done(); + }); + })); +}); diff --git a/packages/cloudflare/test/fixtures/worker.mjs b/packages/cloudflare/test/fixtures/worker.mjs deleted file mode 100644 index 2023f7471c43..000000000000 --- a/packages/cloudflare/test/fixtures/worker.mjs +++ /dev/null @@ -1,8 +0,0 @@ -/** - * @type {import('@cloudflare/workers-types').ExportedHandler} - */ -export default { - async fetch(_request, _env, _ctx) { - return new Response('Hello Sentry!'); - }, -}; diff --git a/packages/cloudflare/test/index.test.ts b/packages/cloudflare/test/index.test.ts deleted file mode 100644 index 30bd1f0962f6..000000000000 --- a/packages/cloudflare/test/index.test.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { describe, expect, test } from 'vitest'; - -import { Miniflare } from 'miniflare'; - -describe('index', () => { - test('simple test', async () => { - const mf = new Miniflare({ - scriptPath: './test/fixtures/worker.mjs', - modules: true, - port: 8787, - }); - - const res = await mf.dispatchFetch('http://localhost:8787/'); - expect(await res.text()).toBe('Hello Sentry!'); - await mf.dispose(); - }); -}); diff --git a/packages/cloudflare/test/integrations/fetch.test.ts b/packages/cloudflare/test/integrations/fetch.test.ts new file mode 100644 index 000000000000..e4f25be8f110 --- /dev/null +++ b/packages/cloudflare/test/integrations/fetch.test.ts @@ -0,0 +1,211 @@ +import { beforeEach, describe, expect, it, vi } from 'vitest'; + +import * as sentryCore from '@sentry/core'; +import type { HandlerDataFetch, Integration } from '@sentry/types'; +import * as sentryUtils from '@sentry/utils'; +import { createStackParser } from '@sentry/utils'; + +import { CloudflareClient } from '../../src/client'; +import { fetchIntegration } from '../../src/integrations/fetch'; + +class FakeClient extends CloudflareClient { + public getIntegrationByName(name: string): T | undefined { + return name === 'Fetch' ? (fetchIntegration() as Integration as T) : undefined; + } +} + +const addFetchInstrumentationHandlerSpy = vi.spyOn(sentryUtils, 'addFetchInstrumentationHandler'); +const instrumentFetchRequestSpy = vi.spyOn(sentryCore, 'instrumentFetchRequest'); +const addBreadcrumbSpy = vi.spyOn(sentryCore, 'addBreadcrumb'); + +describe('WinterCGFetch instrumentation', () => { + let client: FakeClient; + + beforeEach(() => { + vi.clearAllMocks(); + + client = new FakeClient({ + dsn: 'https://public@dsn.ingest.sentry.io/1337', + enableTracing: true, + tracesSampleRate: 1, + integrations: [], + transport: () => ({ + send: () => Promise.resolve({}), + flush: () => Promise.resolve(true), + }), + tracePropagationTargets: ['http://my-website.com/'], + stackParser: createStackParser(), + }); + + vi.spyOn(sentryCore, 'getClient').mockImplementation(() => client); + }); + + it('should call `instrumentFetchRequest` for outgoing fetch requests', () => { + addFetchInstrumentationHandlerSpy.mockImplementationOnce(() => undefined); + + const integration = fetchIntegration(); + integration.setupOnce!(); + integration.setup!(client); + + const [fetchInstrumentationHandlerCallback] = addFetchInstrumentationHandlerSpy.mock.calls[0]!; + expect(fetchInstrumentationHandlerCallback).toBeDefined(); + + const startHandlerData: HandlerDataFetch = { + fetchData: { url: 'http://my-website.com/', method: 'POST' }, + args: ['http://my-website.com/'], + startTimestamp: Date.now(), + }; + fetchInstrumentationHandlerCallback(startHandlerData); + + expect(instrumentFetchRequestSpy).toHaveBeenCalledWith( + startHandlerData, + expect.any(Function), + expect.any(Function), + expect.any(Object), + 'auto.http.wintercg_fetch', + ); + + const [, shouldCreateSpan, shouldAttachTraceData] = instrumentFetchRequestSpy.mock.calls[0]!; + + expect(shouldAttachTraceData('http://my-website.com/')).toBe(true); + expect(shouldAttachTraceData('https://www.3rd-party-website.at/')).toBe(false); + + expect(shouldCreateSpan('http://my-website.com/')).toBe(true); + expect(shouldCreateSpan('https://www.3rd-party-website.at/')).toBe(true); + }); + + it('should not instrument if client is not setup', () => { + addFetchInstrumentationHandlerSpy.mockImplementationOnce(() => undefined); + + const integration = fetchIntegration(); + integration.setupOnce!(); + // integration.setup!(client) is not called! + + const [fetchInstrumentationHandlerCallback] = addFetchInstrumentationHandlerSpy.mock.calls[0]!; + expect(fetchInstrumentationHandlerCallback).toBeDefined(); + + const startHandlerData: HandlerDataFetch = { + fetchData: { url: 'http://my-website.com/', method: 'POST' }, + args: ['http://my-website.com/'], + startTimestamp: Date.now(), + }; + fetchInstrumentationHandlerCallback(startHandlerData); + + expect(instrumentFetchRequestSpy).not.toHaveBeenCalled(); + }); + + it('should call `instrumentFetchRequest` for outgoing fetch requests to Sentry', () => { + addFetchInstrumentationHandlerSpy.mockImplementationOnce(() => undefined); + + const integration = fetchIntegration(); + integration.setupOnce!(); + integration.setup!(client); + + const [fetchInstrumentationHandlerCallback] = addFetchInstrumentationHandlerSpy.mock.calls[0]!; + expect(fetchInstrumentationHandlerCallback).toBeDefined(); + + const startHandlerData: HandlerDataFetch = { + fetchData: { url: 'https://dsn.ingest.sentry.io/1337', method: 'POST' }, + args: ['https://dsn.ingest.sentry.io/1337'], + startTimestamp: Date.now(), + }; + fetchInstrumentationHandlerCallback(startHandlerData); + + expect(instrumentFetchRequestSpy).not.toHaveBeenCalled(); + }); + + it('should properly apply the `shouldCreateSpanForRequest` option', () => { + addFetchInstrumentationHandlerSpy.mockImplementationOnce(() => undefined); + + const integration = fetchIntegration({ + shouldCreateSpanForRequest(url) { + return url === 'http://only-acceptable-url.com/'; + }, + }); + integration.setupOnce!(); + integration.setup!(client); + + const [fetchInstrumentationHandlerCallback] = addFetchInstrumentationHandlerSpy.mock.calls[0]!; + expect(fetchInstrumentationHandlerCallback).toBeDefined(); + + const startHandlerData: HandlerDataFetch = { + fetchData: { url: 'http://my-website.com/', method: 'POST' }, + args: ['http://my-website.com/'], + startTimestamp: Date.now(), + }; + fetchInstrumentationHandlerCallback(startHandlerData); + + const [, shouldCreateSpan] = instrumentFetchRequestSpy.mock.calls[0]!; + + expect(shouldCreateSpan('http://only-acceptable-url.com/')).toBe(true); + expect(shouldCreateSpan('http://my-website.com/')).toBe(false); + expect(shouldCreateSpan('https://www.3rd-party-website.at/')).toBe(false); + }); + + it('should create a breadcrumb for an outgoing request', () => { + addFetchInstrumentationHandlerSpy.mockImplementationOnce(() => undefined); + + const integration = fetchIntegration(); + integration.setupOnce!(); + integration.setup!(client); + + const [fetchInstrumentationHandlerCallback] = addFetchInstrumentationHandlerSpy.mock.calls[0]!; + expect(fetchInstrumentationHandlerCallback).toBeDefined(); + + const startTimestamp = Date.now(); + const endTimestamp = Date.now() + 100; + + const startHandlerData: HandlerDataFetch = { + fetchData: { url: 'http://my-website.com/', method: 'POST' }, + args: ['http://my-website.com/'], + response: { ok: true, status: 201, url: 'http://my-website.com/' } as Response, + startTimestamp, + endTimestamp, + }; + fetchInstrumentationHandlerCallback(startHandlerData); + + expect(addBreadcrumbSpy).toBeCalledWith( + { + category: 'fetch', + data: { + method: 'POST', + status_code: 201, + url: 'http://my-website.com/', + __span: expect.any(String), + }, + type: 'http', + }, + { + endTimestamp, + input: ['http://my-website.com/'], + response: { ok: true, status: 201, url: 'http://my-website.com/' }, + startTimestamp, + }, + ); + }); + + it('should not create a breadcrumb for an outgoing request if `breadcrumbs: false` is set', () => { + addFetchInstrumentationHandlerSpy.mockImplementationOnce(() => undefined); + + const integration = fetchIntegration({ breadcrumbs: false }); + integration.setupOnce!(); + integration.setup!(client); + + const [fetchInstrumentationHandlerCallback] = addFetchInstrumentationHandlerSpy.mock.calls[0]!; + expect(fetchInstrumentationHandlerCallback).toBeDefined(); + + const startTimestamp = Date.now(); + const endTimestamp = Date.now() + 100; + + const startHandlerData: HandlerDataFetch = { + fetchData: { url: 'http://my-website.com/', method: 'POST' }, + args: ['http://my-website.com/'], + response: { ok: true, status: 201, url: 'http://my-website.com/' } as Response, + startTimestamp, + endTimestamp, + }; + fetchInstrumentationHandlerCallback(startHandlerData); + + expect(addBreadcrumbSpy).not.toHaveBeenCalled(); + }); +}); diff --git a/packages/cloudflare/test/transport.test.ts b/packages/cloudflare/test/transport.test.ts new file mode 100644 index 000000000000..788785de8216 --- /dev/null +++ b/packages/cloudflare/test/transport.test.ts @@ -0,0 +1,160 @@ +import type { EventEnvelope, EventItem } from '@sentry/types'; +import { createEnvelope, serializeEnvelope } from '@sentry/utils'; +import { afterAll, describe, expect, it, vi } from 'vitest'; + +import type { CloudflareTransportOptions } from '../src/transport'; +import { IsolatedPromiseBuffer, makeCloudflareTransport } from '../src/transport'; + +const DEFAULT_EDGE_TRANSPORT_OPTIONS: CloudflareTransportOptions = { + url: 'https://sentry.io/api/42/store/?sentry_key=123&sentry_version=7', + recordDroppedEvent: () => undefined, +}; + +const ERROR_ENVELOPE = createEnvelope({ event_id: 'aa3ff046696b4bc6b609ce6d28fde9e2', sent_at: '123' }, [ + [{ type: 'event' }, { event_id: 'aa3ff046696b4bc6b609ce6d28fde9e2' }] as EventItem, +]); + +class Headers { + headers: { [key: string]: string } = {}; + get(key: string) { + return this.headers[key] || null; + } + set(key: string, value: string) { + this.headers[key] = value; + } +} + +const mockFetch = vi.fn(); + +const oldFetch = global.fetch; +global.fetch = mockFetch; + +afterAll(() => { + global.fetch = oldFetch; +}); + +describe('Edge Transport', () => { + it('calls fetch with the given URL', async () => { + mockFetch.mockImplementationOnce(() => + Promise.resolve({ + headers: new Headers(), + status: 200, + text: () => Promise.resolve({}), + }), + ); + + const transport = makeCloudflareTransport(DEFAULT_EDGE_TRANSPORT_OPTIONS); + + expect(mockFetch).toHaveBeenCalledTimes(0); + await transport.send(ERROR_ENVELOPE); + await transport.flush(); + expect(mockFetch).toHaveBeenCalledTimes(1); + + expect(mockFetch).toHaveBeenLastCalledWith(DEFAULT_EDGE_TRANSPORT_OPTIONS.url, { + body: serializeEnvelope(ERROR_ENVELOPE), + method: 'POST', + }); + }); + + it('sets rate limit headers', async () => { + const headers = { + get: vi.fn(), + }; + + mockFetch.mockImplementationOnce(() => + Promise.resolve({ + headers, + status: 200, + text: () => Promise.resolve({}), + }), + ); + + const transport = makeCloudflareTransport(DEFAULT_EDGE_TRANSPORT_OPTIONS); + + expect(headers.get).toHaveBeenCalledTimes(0); + await transport.send(ERROR_ENVELOPE); + await transport.flush(); + + expect(headers.get).toHaveBeenCalledTimes(2); + expect(headers.get).toHaveBeenCalledWith('X-Sentry-Rate-Limits'); + expect(headers.get).toHaveBeenCalledWith('Retry-After'); + }); + + it('allows for custom options to be passed in', async () => { + mockFetch.mockImplementationOnce(() => + Promise.resolve({ + headers: new Headers(), + status: 200, + text: () => Promise.resolve({}), + }), + ); + + const REQUEST_OPTIONS: RequestInit = { + cf: { + minify: { + javascript: true, + }, + }, + }; + + const transport = makeCloudflareTransport({ ...DEFAULT_EDGE_TRANSPORT_OPTIONS, fetchOptions: REQUEST_OPTIONS }); + + await transport.send(ERROR_ENVELOPE); + await transport.flush(); + expect(mockFetch).toHaveBeenLastCalledWith(DEFAULT_EDGE_TRANSPORT_OPTIONS.url, { + body: serializeEnvelope(ERROR_ENVELOPE), + method: 'POST', + ...REQUEST_OPTIONS, + }); + }); +}); + +describe('IsolatedPromiseBuffer', () => { + it('should not call tasks until drained', async () => { + const ipb = new IsolatedPromiseBuffer(); + + const task1 = vi.fn(() => Promise.resolve({})); + const task2 = vi.fn(() => Promise.resolve({})); + + await ipb.add(task1); + await ipb.add(task2); + + expect(task1).not.toHaveBeenCalled(); + expect(task2).not.toHaveBeenCalled(); + + await ipb.drain(); + + expect(task1).toHaveBeenCalled(); + expect(task2).toHaveBeenCalled(); + }); + + it('should not allow adding more items than the specified limit', async () => { + const ipb = new IsolatedPromiseBuffer(3); + + const task1 = vi.fn(() => Promise.resolve({})); + const task2 = vi.fn(() => Promise.resolve({})); + const task3 = vi.fn(() => Promise.resolve({})); + const task4 = vi.fn(() => Promise.resolve({})); + + await ipb.add(task1); + await ipb.add(task2); + await ipb.add(task3); + + await expect(ipb.add(task4)).rejects.toThrowError('Not adding Promise because buffer limit was reached.'); + }); + + it('should not throw when one of the tasks throws when drained', async () => { + const ipb = new IsolatedPromiseBuffer(); + + const task1 = vi.fn(() => Promise.resolve({})); + const task2 = vi.fn(() => Promise.reject(new Error())); + + await ipb.add(task1); + await ipb.add(task2); + + await expect(ipb.drain()).resolves.toEqual(true); + + expect(task1).toHaveBeenCalled(); + expect(task2).toHaveBeenCalled(); + }); +}); diff --git a/packages/cloudflare/tsconfig.json b/packages/cloudflare/tsconfig.json index 18b3ec720bfe..ff89f0feaa23 100644 --- a/packages/cloudflare/tsconfig.json +++ b/packages/cloudflare/tsconfig.json @@ -4,6 +4,7 @@ "include": ["src/**/*"], "compilerOptions": { - "types": ["@cloudflare/workers-types"] + "module": "esnext", + "types": ["node", "@cloudflare/workers-types"] } } diff --git a/yarn.lock b/yarn.lock index e1afaa9a9f1f..230c44f8a68a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3864,10 +3864,10 @@ resolved "https://registry.yarnpkg.com/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20240701.0.tgz#710583329e7fef26092fdccf021e669434cc6acb" integrity sha512-6IPGITRAeS67j3BH1rN4iwYWDt47SqJG7KlZJ5bB4UaNAia4mvMBSy/p2p4vA89bbXoDRjMtEvRu7Robu6O7hQ== -"@cloudflare/workers-types@^4.20240620.0": - version "4.20240620.0" - resolved "https://registry.yarnpkg.com/@cloudflare/workers-types/-/workers-types-4.20240620.0.tgz#1e996c0b81a1dab392f0292bea036fd7bb3b73f3" - integrity sha512-CQD8YS6evRob7LChvIX3gE3zYo0KVgaLDOu1SwNP1BVIS2Sa0b+FC8S1e1hhrNN8/E4chYlVN+FDAgA4KRDUEQ== +"@cloudflare/workers-types@^4.20240712.0": + version "4.20240712.0" + resolved "https://registry.yarnpkg.com/@cloudflare/workers-types/-/workers-types-4.20240712.0.tgz#c3d512eec5f72343ba95a9acee16787d9e184ed4" + integrity sha512-C+C0ZnkRrxR2tPkZKAXwBsWEse7bWaA7iMbaG6IKaxaPTo/5ilx7Ei3BkI2izxmOJMsC05VS1eFUf95urXzhmw== "@cnakazawa/watch@^1.0.3": version "1.0.4" @@ -34888,10 +34888,10 @@ workerpool@^6.4.0: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.4.0.tgz#f8d5cfb45fde32fa3b7af72ad617c3369567a462" integrity sha512-i3KR1mQMNwY2wx20ozq2EjISGtQWDIfV56We+yGJ5yDs8jTwQiLLaqHlkBHITlCuJnYlVRmXegxFxZg7gqI++A== -wrangler@^3.63.2: - version "3.63.2" - resolved "https://registry.yarnpkg.com/wrangler/-/wrangler-3.63.2.tgz#f09ec6f26eb83bdb95a32519df2faec9f1d4c578" - integrity sha512-c7F46JtBGTIQehTOgfGbxfDMYgO9AjC70CXVSohxHiF9ajHz56HEV2k3aowhJJiP3MBB8sJMm8rdG10f5zUs+w== +wrangler@^3.64.0: + version "3.64.0" + resolved "https://registry.yarnpkg.com/wrangler/-/wrangler-3.64.0.tgz#2f2922ab6a382d9416d35c0fd9797aa61c8572e1" + integrity sha512-q2VQADJXzuOkXs9KIfPSx7UCZHBoxsqSNbJDLkc2pHpGmsyNQXsJRqjMoTg/Kls7O3K9A7EGnzGr7+Io2vE6AQ== dependencies: "@cloudflare/kv-asset-handler" "0.3.4" "@esbuild-plugins/node-globals-polyfill" "^0.2.3" From 27b3a3e22681d79fb8fd94898e656e3da3b280a9 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Thu, 18 Jul 2024 08:57:29 -0400 Subject: [PATCH 42/53] chore: Add changelog entries for 7.118.0 and 7.117.0 (#12963) Sync with https://github.com/getsentry/sentry-javascript/edit/develop/docs/changelog/v7.md Just keeping everything up to date. --- docs/changelog/v7.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/changelog/v7.md b/docs/changelog/v7.md index 4b575a7c0ab7..16072a8f8121 100644 --- a/docs/changelog/v7.md +++ b/docs/changelog/v7.md @@ -3,6 +3,15 @@ Support for Sentry SDK v7 will be dropped soon. We recommend migrating to the latest version of the SDK. You can migrate from `v7` to `v8 of the SDK by following the [migration guide](../../MIGRATION.md). +## 7.118.0 + +- fix(v7/bundle): Ensure CDN bundles do not overwrite `window.Sentry` (#12579) + +## 7.117.0 + +- feat(browser/v7): Publish browserprofling CDN bundle (#12224) +- fix(v7/publish): Add `v7` tag to `@sentry/replay` (#12304) + ## 7.116.0 - build(craft): Publish lambda layer under its own name for v7 (#12098) (#12099) From 44e803809609ea61b83d1277bd01c57a979c8803 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Thu, 18 Jul 2024 08:57:46 -0400 Subject: [PATCH 43/53] test(sveltekit): Switch to explicit vitest imports (#12960) As per https://vitest.dev/config/#globals > By default, vitest does not provide global APIs for explicitness I think we should follow vitest defaults here and explicitly import in the APIs that we need. This refactors our SvelteKit SDK tests to do so. This change also removes `environment: 'jsdom'` from the sveltekit global vite config in favour of explicitly adding jsdom environment via the `@vitest-environment` pragma to the specific test file that needs it. This should means that our server tests are not polluted with jsdom globals, and that future writers have to explicitly opt-in to the behaviour. --- .../test/client/browserTracingIntegration.test.ts | 7 ++++++- packages/sveltekit/test/client/fetch.test.ts | 6 ++++++ packages/sveltekit/test/client/handleError.test.ts | 3 ++- packages/sveltekit/test/client/load.test.ts | 3 ++- packages/sveltekit/test/client/sdk.test.ts | 3 ++- packages/sveltekit/test/common/utils.test.ts | 2 ++ packages/sveltekit/test/index.test.ts | 2 ++ packages/sveltekit/test/server/handle.test.ts | 2 ++ packages/sveltekit/test/server/handleError.test.ts | 3 ++- packages/sveltekit/test/server/load.test.ts | 3 ++- packages/sveltekit/test/server/sdk.test.ts | 3 ++- packages/sveltekit/test/server/utils.test.ts | 2 ++ packages/sveltekit/test/vite/autoInstrument.test.ts | 3 +-- packages/sveltekit/test/vite/detectAdapter.test.ts | 4 ++-- packages/sveltekit/test/vite/injectGlobalValues.test.ts | 2 ++ .../sveltekit/test/vite/sentrySvelteKitPlugins.test.ts | 3 +-- packages/sveltekit/test/vite/sourceMaps.test.ts | 2 +- packages/sveltekit/test/vite/svelteConfig.test.ts | 8 ++++---- packages/sveltekit/tsconfig.test.json | 2 +- packages/sveltekit/vite.config.ts | 1 - 20 files changed, 44 insertions(+), 20 deletions(-) diff --git a/packages/sveltekit/test/client/browserTracingIntegration.test.ts b/packages/sveltekit/test/client/browserTracingIntegration.test.ts index a76f0e187c35..a8fbaa815af2 100644 --- a/packages/sveltekit/test/client/browserTracingIntegration.test.ts +++ b/packages/sveltekit/test/client/browserTracingIntegration.test.ts @@ -1,7 +1,12 @@ +/** + * @vitest-environment jsdom + */ + /* eslint-disable @typescript-eslint/unbound-method */ +import { beforeEach, describe, expect, it, vi } from 'vitest'; + import type { Span } from '@sentry/types'; import { writable } from 'svelte/store'; -import { vi } from 'vitest'; import { navigating, page } from '$app/stores'; diff --git a/packages/sveltekit/test/client/fetch.test.ts b/packages/sveltekit/test/client/fetch.test.ts index a97478cc86e8..1dbadaf78cda 100644 --- a/packages/sveltekit/test/client/fetch.test.ts +++ b/packages/sveltekit/test/client/fetch.test.ts @@ -1,3 +1,9 @@ +/** + * @vitest-environment jsdom + */ + +import { beforeEach, describe, expect, it } from 'vitest'; + import { init } from '../../src/client/index'; describe('instruments fetch', () => { diff --git a/packages/sveltekit/test/client/handleError.test.ts b/packages/sveltekit/test/client/handleError.test.ts index b4eba9ff56e9..077872db90ab 100644 --- a/packages/sveltekit/test/client/handleError.test.ts +++ b/packages/sveltekit/test/client/handleError.test.ts @@ -1,6 +1,7 @@ +import { beforeEach, describe, expect, it, vi } from 'vitest'; + import * as SentrySvelte from '@sentry/svelte'; import type { HandleClientError, NavigationEvent } from '@sveltejs/kit'; -import { vi } from 'vitest'; import { handleErrorWithSentry } from '../../src/client/handleError'; diff --git a/packages/sveltekit/test/client/load.test.ts b/packages/sveltekit/test/client/load.test.ts index 087eada60b47..81454bc62d60 100644 --- a/packages/sveltekit/test/client/load.test.ts +++ b/packages/sveltekit/test/client/load.test.ts @@ -1,7 +1,8 @@ +import { beforeEach, describe, expect, it, vi } from 'vitest'; + import * as SentrySvelte from '@sentry/svelte'; import type { Load } from '@sveltejs/kit'; import { redirect } from '@sveltejs/kit'; -import { vi } from 'vitest'; import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '@sentry/core'; import { wrapLoadWithSentry } from '../../src/client/load'; diff --git a/packages/sveltekit/test/client/sdk.test.ts b/packages/sveltekit/test/client/sdk.test.ts index 340a3852d04b..46cab7400d12 100644 --- a/packages/sveltekit/test/client/sdk.test.ts +++ b/packages/sveltekit/test/client/sdk.test.ts @@ -1,7 +1,8 @@ +import { afterEach, describe, expect, it, vi } from 'vitest'; + import type { BrowserClient } from '@sentry/svelte'; import * as SentrySvelte from '@sentry/svelte'; import { SDK_VERSION, getClient, getCurrentScope, getGlobalScope, getIsolationScope } from '@sentry/svelte'; -import { vi } from 'vitest'; import { init } from '../../src/client'; diff --git a/packages/sveltekit/test/common/utils.test.ts b/packages/sveltekit/test/common/utils.test.ts index 0b0352042164..32181a746e07 100644 --- a/packages/sveltekit/test/common/utils.test.ts +++ b/packages/sveltekit/test/common/utils.test.ts @@ -1,3 +1,5 @@ +import { describe, expect, it } from 'vitest'; + import { isHttpError, isRedirect } from '../../src/common/utils'; describe('isRedirect', () => { diff --git a/packages/sveltekit/test/index.test.ts b/packages/sveltekit/test/index.test.ts index 6bc0e7072028..c70524327d31 100644 --- a/packages/sveltekit/test/index.test.ts +++ b/packages/sveltekit/test/index.test.ts @@ -1,3 +1,5 @@ +import { describe, expect, it } from 'vitest'; + import * as SentryClient from '../src/client'; import * as SentryServer from '../src/server'; diff --git a/packages/sveltekit/test/server/handle.test.ts b/packages/sveltekit/test/server/handle.test.ts index e34f507af047..ad49e9a16ef8 100644 --- a/packages/sveltekit/test/server/handle.test.ts +++ b/packages/sveltekit/test/server/handle.test.ts @@ -1,3 +1,5 @@ +import { beforeEach, describe, expect, it } from 'vitest'; + import { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, getRootSpan, diff --git a/packages/sveltekit/test/server/handleError.test.ts b/packages/sveltekit/test/server/handleError.test.ts index 611fac1f9a4d..b9a91a0b0e1d 100644 --- a/packages/sveltekit/test/server/handleError.test.ts +++ b/packages/sveltekit/test/server/handleError.test.ts @@ -1,6 +1,7 @@ +import { beforeEach, describe, expect, it, vi } from 'vitest'; + import * as SentryNode from '@sentry/node'; import type { HandleServerError, RequestEvent } from '@sveltejs/kit'; -import { vi } from 'vitest'; import { handleErrorWithSentry } from '../../src/server/handleError'; diff --git a/packages/sveltekit/test/server/load.test.ts b/packages/sveltekit/test/server/load.test.ts index 28e7fc342308..c2ee2b2943a3 100644 --- a/packages/sveltekit/test/server/load.test.ts +++ b/packages/sveltekit/test/server/load.test.ts @@ -1,3 +1,5 @@ +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; + import { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, @@ -8,7 +10,6 @@ import * as SentryNode from '@sentry/node'; import type { Event } from '@sentry/types'; import type { Load, ServerLoad } from '@sveltejs/kit'; import { error, redirect } from '@sveltejs/kit'; -import { vi } from 'vitest'; import { wrapLoadWithSentry, wrapServerLoadWithSentry } from '../../src/server/load'; import { getDefaultNodeClientOptions } from '../utils'; diff --git a/packages/sveltekit/test/server/sdk.test.ts b/packages/sveltekit/test/server/sdk.test.ts index 131e4185a3c7..aa7dbc560e1a 100644 --- a/packages/sveltekit/test/server/sdk.test.ts +++ b/packages/sveltekit/test/server/sdk.test.ts @@ -1,8 +1,9 @@ +import { afterEach, describe, expect, it, vi } from 'vitest'; + import * as SentryNode from '@sentry/node'; import type { NodeClient } from '@sentry/node'; import { SDK_VERSION, getClient } from '@sentry/node'; -import { vi } from 'vitest'; import { init } from '../../src/server/sdk'; const nodeInit = vi.spyOn(SentryNode, 'init'); diff --git a/packages/sveltekit/test/server/utils.test.ts b/packages/sveltekit/test/server/utils.test.ts index f3cac3eb47a0..5e8b9b2b99a3 100644 --- a/packages/sveltekit/test/server/utils.test.ts +++ b/packages/sveltekit/test/server/utils.test.ts @@ -1,3 +1,5 @@ +import { describe, expect, it } from 'vitest'; + import { getTracePropagationData } from '../../src/server/utils'; const MOCK_REQUEST_EVENT: any = { diff --git a/packages/sveltekit/test/vite/autoInstrument.test.ts b/packages/sveltekit/test/vite/autoInstrument.test.ts index f10c828b48c3..37f6be4f9700 100644 --- a/packages/sveltekit/test/vite/autoInstrument.test.ts +++ b/packages/sveltekit/test/vite/autoInstrument.test.ts @@ -1,4 +1,4 @@ -import { vi } from 'vitest'; +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import { canWrapLoad, makeAutoInstrumentationPlugin } from '../../src/vite/autoInstrument'; @@ -12,7 +12,6 @@ let fileContent: string | undefined; vi.mock('fs', async () => { const actual = await vi.importActual('fs'); return { - // @ts-expect-error this exists, I promise! ...actual, promises: { // @ts-expect-error this also exists, I promise! diff --git a/packages/sveltekit/test/vite/detectAdapter.test.ts b/packages/sveltekit/test/vite/detectAdapter.test.ts index 7f4e05a1a44b..a934a9ee06e6 100644 --- a/packages/sveltekit/test/vite/detectAdapter.test.ts +++ b/packages/sveltekit/test/vite/detectAdapter.test.ts @@ -1,10 +1,10 @@ -import { vi } from 'vitest'; +import { beforeEach, describe, expect, it, vi } from 'vitest'; import { detectAdapter } from '../../src/vite/detectAdapter'; let existsFile = true; const pkgJson = { - dependencies: {}, + dependencies: {} as Record, }; describe('detectAdapter', () => { beforeEach(() => { diff --git a/packages/sveltekit/test/vite/injectGlobalValues.test.ts b/packages/sveltekit/test/vite/injectGlobalValues.test.ts index 7250cfb07d80..999ee497a2cc 100644 --- a/packages/sveltekit/test/vite/injectGlobalValues.test.ts +++ b/packages/sveltekit/test/vite/injectGlobalValues.test.ts @@ -1,3 +1,5 @@ +import { describe, expect, it } from 'vitest'; + import { getGlobalValueInjectionCode } from '../../src/vite/injectGlobalValues'; describe('getGlobalValueInjectionCode', () => { diff --git a/packages/sveltekit/test/vite/sentrySvelteKitPlugins.test.ts b/packages/sveltekit/test/vite/sentrySvelteKitPlugins.test.ts index f2916cb33020..796b4aa4957b 100644 --- a/packages/sveltekit/test/vite/sentrySvelteKitPlugins.test.ts +++ b/packages/sveltekit/test/vite/sentrySvelteKitPlugins.test.ts @@ -1,4 +1,4 @@ -import { vi } from 'vitest'; +import { describe, expect, it, vi } from 'vitest'; import type { Plugin } from 'vite'; import * as autoInstrument from '../../src/vite/autoInstrument'; @@ -8,7 +8,6 @@ import * as sourceMaps from '../../src/vite/sourceMaps'; vi.mock('fs', async () => { const actual = await vi.importActual('fs'); return { - // @ts-expect-error this exists, I promise! ...actual, promises: { // @ts-expect-error this also exists, I promise! diff --git a/packages/sveltekit/test/vite/sourceMaps.test.ts b/packages/sveltekit/test/vite/sourceMaps.test.ts index 77cc80807cda..c25ec48a53cb 100644 --- a/packages/sveltekit/test/vite/sourceMaps.test.ts +++ b/packages/sveltekit/test/vite/sourceMaps.test.ts @@ -1,4 +1,4 @@ -import { vi } from 'vitest'; +import { beforeEach, describe, expect, it, vi } from 'vitest'; import type { Plugin } from 'vite'; import { makeCustomSentryVitePlugins } from '../../src/vite/sourceMaps'; diff --git a/packages/sveltekit/test/vite/svelteConfig.test.ts b/packages/sveltekit/test/vite/svelteConfig.test.ts index 5f079deb7c1a..35e32ce8ac4d 100644 --- a/packages/sveltekit/test/vite/svelteConfig.test.ts +++ b/packages/sveltekit/test/vite/svelteConfig.test.ts @@ -1,9 +1,9 @@ -import { vi } from 'vitest'; +import { beforeEach, describe, expect, it, vi } from 'vitest'; import type { SupportedSvelteKitAdapters } from '../../src/vite/detectAdapter'; import { getAdapterOutputDir, getHooksFileName, loadSvelteConfig } from '../../src/vite/svelteConfig'; -let existsFile; +let existsFile: any; describe('loadSvelteConfig', () => { vi.mock('fs', () => { @@ -25,7 +25,7 @@ describe('loadSvelteConfig', () => { // url apparently doesn't exist in the test environment, therefore we mock it: vi.mock('url', () => { return { - pathToFileURL: path => { + pathToFileURL: (path: string) => { return { href: path, }; @@ -58,7 +58,7 @@ describe('loadSvelteConfig', () => { describe('getAdapterOutputDir', () => { const mockedAdapter = { name: 'mocked-adapter', - adapt(builder) { + adapt(builder: any) { builder.writeClient('customBuildDir'); }, }; diff --git a/packages/sveltekit/tsconfig.test.json b/packages/sveltekit/tsconfig.test.json index 3fbe012384ee..c41efeacd92f 100644 --- a/packages/sveltekit/tsconfig.test.json +++ b/packages/sveltekit/tsconfig.test.json @@ -5,6 +5,6 @@ "compilerOptions": { // should include all types from `./tsconfig.json` plus types for all test frameworks used - "types": ["node", "vitest/globals"] + "types": ["node"] } } diff --git a/packages/sveltekit/vite.config.ts b/packages/sveltekit/vite.config.ts index a6d9835700ec..d6cbc4cce230 100644 --- a/packages/sveltekit/vite.config.ts +++ b/packages/sveltekit/vite.config.ts @@ -11,7 +11,6 @@ export default { // test exists, no idea why TS doesn't recognize it // eslint-disable-next-line @typescript-eslint/no-explicit-any ...(baseConfig as UserConfig & { test: any }).test, - environment: 'jsdom', setupFiles: ['./test/vitest.setup.ts'], alias: [ { From 4549263ff46bf83b5d861812b6d0386cc391cd65 Mon Sep 17 00:00:00 2001 From: Nicolas Hrubec Date: Thu, 18 Jul 2024 15:22:48 +0200 Subject: [PATCH 44/53] docs(nestjs): Add nestjs to supported plattforms (#12977) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e032726dc221..f164af08538a 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,7 @@ package. Please refer to the README and instructions of those SDKs for more deta - [`@sentry/vue`](https://github.com/getsentry/sentry-javascript/tree/master/packages/vue): Browser SDK for Vue - [`@sentry/solid`](https://github.com/getsentry/sentry-javascript/tree/master/packages/solid): Browser SDK for Solid - [`@sentry/gatsby`](https://github.com/getsentry/sentry-javascript/tree/master/packages/gatsby): SDK for Gatsby +- [`@sentry/nestjs`](https://github.com/getsentry/sentry-javascript/tree/master/packages/nestjs): SDK for NestJS - [`@sentry/nextjs`](https://github.com/getsentry/sentry-javascript/tree/master/packages/nextjs): SDK for Next.js - [`@sentry/remix`](https://github.com/getsentry/sentry-javascript/tree/master/packages/remix): SDK for Remix - [`@sentry/aws-serverless`](https://github.com/getsentry/sentry-javascript/tree/master/packages/aws-serverless): SDK From ac6e2f1ec94b7564809b3c0c214ff3cde832ab9a Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Thu, 18 Jul 2024 15:42:25 +0200 Subject: [PATCH 45/53] fix(node): Pass inferred name & attributes to `tracesSampler` (#12945) Previously, we passed the span name directly to the `tracesSampler` as-is. However, this is not ideal because this does not match the name we actually send to sentry later, making this confusing. The reason is that we infer the name from the attributes for some types of spans, but we do that at export-time. This PR adjust this so that we send the inferred name & attributes to the `tracesSampler`. This works reasonably enough. However, there is a big caveat: This still only has access to the initial attributes that a span has at creation time. This means that we'll never have e.g. the `http.route` correctly there, because all `http.server` spans originate from the http instrumentation where they do not have a route yet, and then more specific instrumentation (e.g. express or fastify) add the `http.route` to that span later. So the name will never be parametrized, for example, for `http.server` spans, which is not ideal (as it will still not match the final span exactly) but should still be better than what we had so far (where the name would always just be e.g. `GET`). Fixes https://github.com/getsentry/sentry-javascript/issues/12944 --- .../express/tracing/tracesSampler/server.js | 40 +++++++++++++++++++ .../express/tracing/tracesSampler/test.ts | 24 +++++++++++ packages/opentelemetry/src/sampler.ts | 34 +++++++++++++--- packages/opentelemetry/src/trace.ts | 23 ++++------- .../src/utils/parseSpanDescription.ts | 26 +++++++----- packages/opentelemetry/test/trace.test.ts | 23 +++++++---- 6 files changed, 131 insertions(+), 39 deletions(-) create mode 100644 dev-packages/node-integration-tests/suites/express/tracing/tracesSampler/server.js create mode 100644 dev-packages/node-integration-tests/suites/express/tracing/tracesSampler/test.ts diff --git a/dev-packages/node-integration-tests/suites/express/tracing/tracesSampler/server.js b/dev-packages/node-integration-tests/suites/express/tracing/tracesSampler/server.js new file mode 100644 index 000000000000..bfe39fc89ee5 --- /dev/null +++ b/dev-packages/node-integration-tests/suites/express/tracing/tracesSampler/server.js @@ -0,0 +1,40 @@ +const { loggingTransport } = require('@sentry-internal/node-integration-tests'); +const Sentry = require('@sentry/node'); + +Sentry.init({ + dsn: 'https://public@dsn.ingest.sentry.io/1337', + release: '1.0', + transport: loggingTransport, + tracesSampler: samplingContext => { + // The name we get here is inferred at span creation time + // At this point, we sadly do not have a http.route attribute yet, + // so we infer the name from the unparametrized route instead + return ( + samplingContext.name === 'GET /test/123' && + samplingContext.attributes['sentry.op'] === 'http.server' && + samplingContext.attributes['http.method'] === 'GET' + ); + }, + debug: true, +}); + +// express must be required after Sentry is initialized +const express = require('express'); +const cors = require('cors'); +const { startExpressServerAndSendPortToRunner } = require('@sentry-internal/node-integration-tests'); + +const app = express(); + +app.use(cors()); + +app.get('/test/:id', (_req, res) => { + res.send('Success'); +}); + +app.get('/test2', (_req, res) => { + res.send('Success'); +}); + +Sentry.setupExpressErrorHandler(app); + +startExpressServerAndSendPortToRunner(app); diff --git a/dev-packages/node-integration-tests/suites/express/tracing/tracesSampler/test.ts b/dev-packages/node-integration-tests/suites/express/tracing/tracesSampler/test.ts new file mode 100644 index 000000000000..a19299787f91 --- /dev/null +++ b/dev-packages/node-integration-tests/suites/express/tracing/tracesSampler/test.ts @@ -0,0 +1,24 @@ +import { cleanupChildProcesses, createRunner } from '../../../../utils/runner'; + +describe('express tracesSampler', () => { + afterAll(() => { + cleanupChildProcesses(); + }); + + describe('CJS', () => { + test('correctly samples & passes data to tracesSampler', done => { + const runner = createRunner(__dirname, 'server.js') + .expect({ + transaction: { + transaction: 'GET /test/:id', + }, + }) + .start(done); + + // This is not sampled + runner.makeRequest('get', '/test2?q=1'); + // This is sampled + runner.makeRequest('get', '/test/123?q=1'); + }); + }); +}); diff --git a/packages/opentelemetry/src/sampler.ts b/packages/opentelemetry/src/sampler.ts index 0a7d2f9af972..446c325f3ac7 100644 --- a/packages/opentelemetry/src/sampler.ts +++ b/packages/opentelemetry/src/sampler.ts @@ -4,7 +4,12 @@ import { isSpanContextValid, trace } from '@opentelemetry/api'; import { TraceState } from '@opentelemetry/core'; import type { Sampler, SamplingResult } from '@opentelemetry/sdk-trace-base'; import { SamplingDecision } from '@opentelemetry/sdk-trace-base'; -import { SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, hasTracingEnabled, sampleSpan } from '@sentry/core'; +import { + SEMANTIC_ATTRIBUTE_SENTRY_OP, + SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, + hasTracingEnabled, + sampleSpan, +} from '@sentry/core'; import type { Client, SpanAttributes } from '@sentry/types'; import { logger } from '@sentry/utils'; import { SENTRY_TRACE_STATE_SAMPLED_NOT_RECORDING, SENTRY_TRACE_STATE_URL } from './constants'; @@ -13,6 +18,7 @@ import { SEMATTRS_HTTP_METHOD, SEMATTRS_HTTP_URL } from '@opentelemetry/semantic import { DEBUG_BUILD } from './debug-build'; import { getPropagationContextFromSpan } from './propagator'; import { getSamplingDecision } from './utils/getSamplingDecision'; +import { inferSpanData } from './utils/parseSpanDescription'; import { setIsSetup } from './utils/setupCheck'; /** @@ -56,12 +62,28 @@ export class SentrySampler implements Sampler { const parentSampled = parentSpan ? getParentSampled(parentSpan, traceId, spanName) : undefined; + // We want to pass the inferred name & attributes to the sampler method + const { + description: inferredSpanName, + data: inferredAttributes, + op, + } = inferSpanData(spanName, spanAttributes, spanKind); + + const mergedAttributes = { + ...inferredAttributes, + ...spanAttributes, + }; + + if (op) { + mergedAttributes[SEMANTIC_ATTRIBUTE_SENTRY_OP] = op; + } + const mutableSamplingDecision = { decision: true }; this._client.emit( 'beforeSampling', { - spanAttributes: spanAttributes, - spanName: spanName, + spanAttributes: mergedAttributes, + spanName: inferredSpanName, parentSampled: parentSampled, parentContext: parentContext, }, @@ -72,10 +94,10 @@ export class SentrySampler implements Sampler { } const [sampled, sampleRate] = sampleSpan(options, { - name: spanName, - attributes: spanAttributes, + name: inferredSpanName, + attributes: mergedAttributes, transactionContext: { - name: spanName, + name: inferredSpanName, parentSampled, }, parentSampled, diff --git a/packages/opentelemetry/src/trace.ts b/packages/opentelemetry/src/trace.ts index 6a2acd874e67..356ba9a2688e 100644 --- a/packages/opentelemetry/src/trace.ts +++ b/packages/opentelemetry/src/trace.ts @@ -45,8 +45,6 @@ export function startSpan(options: OpenTelemetrySpanContext, callback: (span: const spanOptions = getSpanOptions(options); return tracer.startActiveSpan(name, spanOptions, ctx, span => { - _applySentryAttributesToSpan(span, options); - return handleCallbackErrors( () => callback(span), () => { @@ -90,8 +88,6 @@ export function startSpanManual( const spanOptions = getSpanOptions(options); return tracer.startActiveSpan(name, spanOptions, ctx, span => { - _applySentryAttributesToSpan(span, options); - return handleCallbackErrors( () => callback(span, () => span.end()), () => { @@ -131,8 +127,6 @@ export function startInactiveSpan(options: OpenTelemetrySpanContext): Span { const span = tracer.startSpan(name, spanOptions, ctx); - _applySentryAttributesToSpan(span, options); - return span; }); } @@ -156,22 +150,19 @@ function getTracer(): Tracer { return (client && client.tracer) || trace.getTracer('@sentry/opentelemetry', SDK_VERSION); } -function _applySentryAttributesToSpan(span: Span, options: OpenTelemetrySpanContext): void { - const { op } = options; - - if (op) { - span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, op); - } -} - function getSpanOptions(options: OpenTelemetrySpanContext): SpanOptions { - const { startTime, attributes, kind } = options; + const { startTime, attributes, kind, op } = options; // OTEL expects timestamps in ms, not seconds const fixedStartTime = typeof startTime === 'number' ? ensureTimestampInMilliseconds(startTime) : startTime; return { - attributes, + attributes: op + ? { + [SEMANTIC_ATTRIBUTE_SENTRY_OP]: op, + ...attributes, + } + : attributes, kind, startTime: fixedStartTime, }; diff --git a/packages/opentelemetry/src/utils/parseSpanDescription.ts b/packages/opentelemetry/src/utils/parseSpanDescription.ts index c9e732683c38..a9d99aa91b8a 100644 --- a/packages/opentelemetry/src/utils/parseSpanDescription.ts +++ b/packages/opentelemetry/src/utils/parseSpanDescription.ts @@ -11,7 +11,7 @@ import { SEMATTRS_MESSAGING_SYSTEM, SEMATTRS_RPC_SERVICE, } from '@opentelemetry/semantic-conventions'; -import type { TransactionSource } from '@sentry/types'; +import type { SpanAttributes, TransactionSource } from '@sentry/types'; import { getSanitizedUrlString, parseUrl, stripUrlQueryAndFragment } from '@sentry/utils'; import { SEMANTIC_ATTRIBUTE_SENTRY_OP } from '@sentry/core'; @@ -27,14 +27,9 @@ interface SpanDescription { } /** - * Extract better op/description from an otel span. - * - * Based on https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/7422ce2a06337f68a59b552b8c5a2ac125d6bae5/exporter/sentryexporter/sentry_exporter.go#L306 + * Infer the op & description for a set of name, attributes and kind of a span. */ -export function parseSpanDescription(span: AbstractSpan): SpanDescription { - const attributes = spanHasAttributes(span) ? span.attributes : {}; - const name = spanHasName(span) ? span.name : ''; - +export function inferSpanData(name: string, attributes: SpanAttributes, kind: SpanKind): SpanDescription { // This attribute is intentionally exported as a SEMATTR constant because it should stay intimite API if (attributes['sentry.skip_span_data_inference']) { return { @@ -54,7 +49,7 @@ export function parseSpanDescription(span: AbstractSpan): SpanDescription { // conventions export an attribute key for it. const httpMethod = attributes['http.request.method'] || attributes[SEMATTRS_HTTP_METHOD]; if (httpMethod) { - return descriptionForHttpMethod({ attributes, name, kind: getSpanKind(span) }, httpMethod); + return descriptionForHttpMethod({ attributes, name, kind }, httpMethod); } const dbSystem = attributes[SEMATTRS_DB_SYSTEM]; @@ -97,6 +92,19 @@ export function parseSpanDescription(span: AbstractSpan): SpanDescription { return { op: undefined, description: name, source: 'custom' }; } +/** + * Extract better op/description from an otel span. + * + * Based on https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/7422ce2a06337f68a59b552b8c5a2ac125d6bae5/exporter/sentryexporter/sentry_exporter.go#L306 + */ +export function parseSpanDescription(span: AbstractSpan): SpanDescription { + const attributes = spanHasAttributes(span) ? span.attributes : {}; + const name = spanHasName(span) ? span.name : ''; + const kind = getSpanKind(span); + + return inferSpanData(name, attributes, kind); +} + function descriptionForDbSystem({ attributes, name }: { attributes: Attributes; name: string }): SpanDescription { // Use DB statement (Ex "SELECT * FROM table") if possible as description. const statement = attributes[SEMATTRS_DB_STATEMENT]; diff --git a/packages/opentelemetry/test/trace.test.ts b/packages/opentelemetry/test/trace.test.ts index 2332fd1ced05..5d9329650969 100644 --- a/packages/opentelemetry/test/trace.test.ts +++ b/packages/opentelemetry/test/trace.test.ts @@ -1320,9 +1320,7 @@ describe('trace (sampling)', () => { expect(tracesSampler).toHaveBeenLastCalledWith({ parentSampled: undefined, name: 'outer', - attributes: { - [SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: 1, - }, + attributes: {}, transactionContext: { name: 'outer', parentSampled: undefined }, }); @@ -1357,16 +1355,25 @@ describe('trace (sampling)', () => { mockSdkInit({ tracesSampler }); - startSpan({ name: 'outer' }, outerSpan => { - expect(outerSpan).toBeDefined(); - }); + startSpan( + { + name: 'outer', + op: 'test.op', + attributes: { attr1: 'yes', attr2: 1 }, + }, + outerSpan => { + expect(outerSpan).toBeDefined(); + }, + ); - expect(tracesSampler).toBeCalledTimes(1); + expect(tracesSampler).toHaveBeenCalledTimes(1); expect(tracesSampler).toHaveBeenLastCalledWith({ parentSampled: undefined, name: 'outer', attributes: { - [SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: 1, + attr1: 'yes', + attr2: 1, + 'sentry.op': 'test.op', }, transactionContext: { name: 'outer', parentSampled: undefined }, }); From edf4ac43cc740cd6437ed4c17b9c0d3f21a49250 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Thu, 18 Jul 2024 13:08:34 -0400 Subject: [PATCH 46/53] build: Pin to Node 22.4 (#12980) Let's pin to Node `22.4` - there's a regression with `22.5` that affects us. We can revert this pin after they do a Node.js release. --- .github/workflows/build.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4cf711bd42ff..e061c246d124 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -519,7 +519,7 @@ jobs: strategy: fail-fast: false matrix: - node: [14, 16, 18, 20, 22] + node: [14, 16, 18, 20, 22.4] steps: - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) uses: actions/checkout@v4 @@ -579,7 +579,7 @@ jobs: strategy: fail-fast: false matrix: - node: [14, 16, 18, 20, 22] + node: [14, 16, 18, 20, 22.4] steps: - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) uses: actions/checkout@v4 @@ -843,12 +843,12 @@ jobs: strategy: fail-fast: false matrix: - node: [14, 16, 18, 20, 22] + node: [14, 16, 18, 20, 22.4] typescript: - false include: # Only check typescript for latest version (to streamline CI) - - node: 22 + - node: 22.4 typescript: '3.8' steps: - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) @@ -885,7 +885,7 @@ jobs: strategy: fail-fast: false matrix: - node: [18, 20, 22] + node: [18, 20, 22.4] remix: [1, 2] # Remix v2 only supports Node 18+, so run 16 tests separately include: @@ -1409,7 +1409,7 @@ jobs: - os: ubuntu-20.04 node: 20 - os: ubuntu-20.04 - node: 22 + node: 22.4 # x64 musl - os: ubuntu-20.04 @@ -1423,7 +1423,7 @@ jobs: node: 20 - os: ubuntu-20.04 container: node:22-alpine3.18 - node: 22 + node: 22.4 # arm64 glibc - os: ubuntu-20.04 @@ -1437,7 +1437,7 @@ jobs: node: 20 - os: ubuntu-20.04 arch: arm64 - node: 22 + node: 22.4 # arm64 musl - os: ubuntu-20.04 @@ -1455,7 +1455,7 @@ jobs: - os: ubuntu-20.04 arch: arm64 container: node:22-alpine3.18 - node: 22 + node: 22.4 # macos x64 - os: macos-13 @@ -1468,7 +1468,7 @@ jobs: node: 20 arch: x64 - os: macos-13 - node: 22 + node: 22.4 arch: x64 # macos arm64 @@ -1486,7 +1486,7 @@ jobs: target_platform: darwin - os: macos-13 arch: arm64 - node: 22 + node: 22.4 target_platform: darwin # windows x64 @@ -1500,7 +1500,7 @@ jobs: node: 20 arch: x64 - os: windows-2022 - node: 22 + node: 22.4 arch: x64 steps: From 602703652959b581304a7849cb97117f296493bc Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Thu, 18 Jul 2024 13:09:22 -0400 Subject: [PATCH 47/53] feat(vercel-edge): Add dedupe as default integration (#12957) Add the dedupe integration as a default integration to `vercel-edge`. Saw this discrepancy while working on the cloudflare sdk. --- packages/vercel-edge/src/sdk.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/vercel-edge/src/sdk.ts b/packages/vercel-edge/src/sdk.ts index 537990ecda13..4e1bed208c34 100644 --- a/packages/vercel-edge/src/sdk.ts +++ b/packages/vercel-edge/src/sdk.ts @@ -1,4 +1,5 @@ import { + dedupeIntegration, functionToStringIntegration, getIntegrationsToSetup, inboundFiltersIntegration, @@ -25,6 +26,7 @@ const nodeStackParser = createStackParser(nodeStackLineParser()); /** Get the default integrations for the browser SDK. */ export function getDefaultIntegrations(options: Options): Integration[] { return [ + dedupeIntegration(), inboundFiltersIntegration(), functionToStringIntegration(), linkedErrorsIntegration(), From 789231c58a30dc15d993421788280f33f0605b5a Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Thu, 18 Jul 2024 14:15:01 -0400 Subject: [PATCH 48/53] test(browser): Remove webpack build tests (#12967) Removes `packages/browser/test/package/npm-build.js`. `packages/browser/test/package/npm-build.js` contained three tests: 1. Test against `tslib_1__default` appearing in the bundle. I added a browser integration test to replicate this 2. Test that adding a bundled package would work, our integration + e2e tests pretty much cover this 3. Test that you can add bundle packages multiple times - our integration + e2e tests also cover this I also migrated `packages/utils/test/types/index.js` to use jest instead of a plain script. --- .github/workflows/build.yml | 28 - .../public-api/init/built-pkg/subject.js | 18 - .../suites/public-api/init/built-pkg/test.ts | 19 + packages/browser/package.json | 4 +- packages/browser/test/package/npm-build.js | 69 - packages/utils/package.json | 1 - packages/utils/test/types/index.js | 27 - packages/utils/test/types/typedef.test.ts | 25 + yarn.lock | 1125 +---------------- 9 files changed, 89 insertions(+), 1227 deletions(-) rename packages/browser/test/package/test-code.js => dev-packages/browser-integration-tests/suites/public-api/init/built-pkg/subject.js (78%) create mode 100644 dev-packages/browser-integration-tests/suites/public-api/init/built-pkg/test.ts delete mode 100644 packages/browser/test/package/npm-build.js delete mode 100644 packages/utils/test/types/index.js create mode 100644 packages/utils/test/types/typedef.test.ts diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e061c246d124..3f8cd2ac44ac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -779,33 +779,6 @@ jobs: name: playwright-traces path: dev-packages/browser-integration-tests/test-results - job_browser_build_tests: - name: Browser Build Tests - needs: [job_get_metadata, job_build] - runs-on: ubuntu-20.04 - timeout-minutes: 5 - steps: - - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) - uses: actions/checkout@v4 - with: - ref: ${{ env.HEAD_COMMIT }} - - name: Set up Node - uses: actions/setup-node@v4 - with: - node-version-file: 'package.json' - - name: Restore caches - uses: ./.github/actions/restore-cache - env: - DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }} - - name: Run browser build tests - run: | - cd packages/browser - yarn test:package - - name: Run utils build tests - run: | - cd packages/utils - yarn test:package - job_check_for_faulty_dts: name: Check for faulty .d.ts files needs: [job_get_metadata, job_build] @@ -1317,7 +1290,6 @@ jobs: [ job_build, job_compile_bindings_profiling_node, - job_browser_build_tests, job_browser_unit_tests, job_bun_unit_tests, job_deno_unit_tests, diff --git a/packages/browser/test/package/test-code.js b/dev-packages/browser-integration-tests/suites/public-api/init/built-pkg/subject.js similarity index 78% rename from packages/browser/test/package/test-code.js rename to dev-packages/browser-integration-tests/suites/public-api/init/built-pkg/subject.js index 72d0a494caa8..2f7d65ffd921 100644 --- a/packages/browser/test/package/test-code.js +++ b/dev-packages/browser-integration-tests/suites/public-api/init/built-pkg/subject.js @@ -1,20 +1,3 @@ -/* eslint-disable no-console */ -const Sentry = require('../../build/npm/cjs/index.js'); - -// Init -Sentry.init({ - dsn: 'https://completelyrandom@dsn.asdf/42', - beforeSend(_event) { - console.log('Got an event'); - return null; - }, - beforeBreadcrumb(crumb) { - console.log(`Got a breadcrumb: ${crumb.category}`); - return crumb; - }, -}); - -// Configure const scope = Sentry.getCurrentScope(); scope.setExtra('foo', 'bar'); scope.setFingerprint('foo'); @@ -75,6 +58,5 @@ Sentry.withScope(scope => { var xhr = new XMLHttpRequest(); xhr.onload = () => console.log('loaded'); // This throws error -// xhr.addEventListener("load", () => console.log('loaded')); This does not throw error xhr.open('GET', 'https://httpbin.org/get'); xhr.send(); diff --git a/dev-packages/browser-integration-tests/suites/public-api/init/built-pkg/test.ts b/dev-packages/browser-integration-tests/suites/public-api/init/built-pkg/test.ts new file mode 100644 index 000000000000..82b08fad52b6 --- /dev/null +++ b/dev-packages/browser-integration-tests/suites/public-api/init/built-pkg/test.ts @@ -0,0 +1,19 @@ +import * as fs from 'node:fs'; +import * as path from 'node:path'; + +import { expect } from '@playwright/test'; + +import { sentryTest } from '../../../../utils/fixtures'; + +// Regression test against https://github.com/getsentry/sentry-javascript/pull/1896 +sentryTest('should not contain tslib_1__default', async ({ getLocalTestPath }) => { + await getLocalTestPath({ testDir: __dirname }); + + const initBundle = fs.readFileSync(path.join(__dirname, 'dist', 'init.bundle.js'), 'utf-8'); + expect(initBundle.length).toBeGreaterThan(0); + expect(initBundle).not.toContain('tslib_1__default'); + + const subjectBundle = fs.readFileSync(path.join(__dirname, 'dist', 'subject.bundle.js'), 'utf-8'); + expect(subjectBundle.length).toBeGreaterThan(0); + expect(subjectBundle).not.toContain('tslib_1__default'); +}); diff --git a/packages/browser/package.json b/packages/browser/package.json index f5347bc45996..26daf728372b 100644 --- a/packages/browser/package.json +++ b/packages/browser/package.json @@ -49,8 +49,7 @@ }, "devDependencies": { "@sentry-internal/integration-shims": "8.18.0", - "fake-indexeddb": "^4.0.1", - "webpack": "^4.47.0" + "fake-indexeddb": "^4.0.1" }, "scripts": { "build": "run-p build:transpile build:bundle build:types", @@ -73,7 +72,6 @@ "size:check": "cat build/bundles/bundle.min.js | gzip -9 | wc -c | awk '{$1=$1/1024; print \"ES2017: \",$1,\"kB\";}'", "test": "yarn test:unit", "test:unit": "jest", - "test:package": "node test/package/npm-build.js && rm test/package/tmp.js", "test:unit:watch": "jest --watch", "yalc:publish": "yalc publish --push --sig" }, diff --git a/packages/browser/test/package/npm-build.js b/packages/browser/test/package/npm-build.js deleted file mode 100644 index c74fb5ba9831..000000000000 --- a/packages/browser/test/package/npm-build.js +++ /dev/null @@ -1,69 +0,0 @@ -/* eslint-disable no-console */ -const fs = require('fs'); -const path = require('path'); - -const webpack = require('webpack'); -const { JSDOM } = require('jsdom'); - -webpack( - { - entry: path.join(__dirname, 'test-code.js'), - output: { - path: __dirname, - filename: 'tmp.js', - }, - mode: 'development', - }, - (err, stats) => { - if (err) { - console.error(err.stack || err); - if (err.details) { - console.error(err.details); - } - return; - } - - const info = stats.toJson(); - - if (stats.hasErrors()) { - console.error(info.errors); - process.exit(1); - } - - if (stats.hasWarnings()) { - console.warn(info.warnings); - process.exit(1); - } - - runTests(); - }, -); - -function runTests() { - const bundlePath = path.join(__dirname, 'tmp.js'); - const { window } = new JSDOM('', { runScripts: 'dangerously' }); - - window.onerror = function () { - console.error('ERROR thrown in manual test:'); - console.error(arguments); - console.error('------------------'); - process.exit(1); - }; - - const myLibrary = fs.readFileSync(bundlePath, { encoding: 'utf-8' }); - - if (myLibrary.indexOf('tslib_1__default') !== -1) { - console.log('"tslib_1__default" reappeared...'); - process.exit(1); - } - - const scriptEl = window.document.createElement('script'); - scriptEl.textContent = myLibrary; - window.document.body.appendChild(scriptEl); - - // Testing https://github.com/getsentry/sentry-javascript/issues/2043 - const scriptEl2 = window.document.createElement('script'); - scriptEl2.textContent = myLibrary; - window.document.body.appendChild(scriptEl2); - // ------------------------------------------------------------------ -} diff --git a/packages/utils/package.json b/packages/utils/package.json index f5d59a17ce0e..0c3fcbbd5865 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -63,7 +63,6 @@ "lint": "eslint . --format stylish", "test": "jest", "test:watch": "jest --watch", - "test:package": "node test/types/index.js", "version": "node ../../scripts/versionbump.js src/version.ts", "yalc:publish": "yalc publish --push --sig" }, diff --git a/packages/utils/test/types/index.js b/packages/utils/test/types/index.js deleted file mode 100644 index 7b6936691197..000000000000 --- a/packages/utils/test/types/index.js +++ /dev/null @@ -1,27 +0,0 @@ -const fs = require('fs'); -const path = require('path'); - -const testStrings = ['/// ']; - -const paths = [path.join('./build/cjs'), path.join('./build/esm')]; - -paths.forEach(dir => { - if (!fs.existsSync(dir)) { - // eslint-disable-next-line no-console - console.error(`${dir} doesn't exist please build first`); - process.exit(1); - } - const files = fs.readdirSync(dir); - files.forEach(file => { - if (file.includes('.d.ts')) { - testStrings.forEach(testString => { - const filePath = path.join(dir, file); - if (fs.readFileSync(filePath, 'utf8').includes(testString)) { - // eslint-disable-next-line no-console - console.error(`${filePath} contains types`); - process.exit(1); - } - }); - } - }); -}); diff --git a/packages/utils/test/types/typedef.test.ts b/packages/utils/test/types/typedef.test.ts new file mode 100644 index 000000000000..45719e13181c --- /dev/null +++ b/packages/utils/test/types/typedef.test.ts @@ -0,0 +1,25 @@ +import * as fs from 'node:fs'; +import * as path from 'node:path'; + +const testStrings = ['/// ']; + +const paths = [path.join('./build/cjs'), path.join('./build/esm')]; + +test('typedef', () => { + paths.forEach(dir => { + if (!fs.existsSync(dir)) { + throw new Error(`${dir} doesn't exist please build first`); + } + const files = fs.readdirSync(dir); + files.forEach(file => { + if (file.includes('.d.ts')) { + testStrings.forEach(testString => { + const filePath = path.join(dir, file); + if (fs.readFileSync(filePath, 'utf8').includes(testString)) { + throw new Error(`${filePath} contains types`); + } + }); + } + }); + }); +}); diff --git a/yarn.lock b/yarn.lock index 230c44f8a68a..ebb196a902b2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10792,15 +10792,6 @@ "@webassemblyjs/helper-numbers" "1.11.6" "@webassemblyjs/helper-wasm-bytecode" "1.11.6" -"@webassemblyjs/ast@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964" - integrity sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA== - dependencies: - "@webassemblyjs/helper-module-context" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/wast-parser" "1.9.0" - "@webassemblyjs/floating-point-hex-parser@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz#f6c61a705f0fd7a6aecaa4e8198f23d9dc179e4f" @@ -10811,11 +10802,6 @@ resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz#dacbcb95aff135c8260f77fa3b4c5fea600a6431" integrity sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw== -"@webassemblyjs/floating-point-hex-parser@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz#3c3d3b271bddfc84deb00f71344438311d52ffb4" - integrity sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA== - "@webassemblyjs/helper-api-error@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz#1a63192d8788e5c012800ba6a7a46c705288fd16" @@ -10826,11 +10812,6 @@ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz#6132f68c4acd59dcd141c44b18cbebbd9f2fa768" integrity sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q== -"@webassemblyjs/helper-api-error@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz#203f676e333b96c9da2eeab3ccef33c45928b6a2" - integrity sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw== - "@webassemblyjs/helper-buffer@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz#832a900eb444884cde9a7cad467f81500f5e5ab5" @@ -10846,30 +10827,6 @@ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz#6df20d272ea5439bf20ab3492b7fb70e9bfcb3f6" integrity sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw== -"@webassemblyjs/helper-buffer@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz#a1442d269c5feb23fcbc9ef759dac3547f29de00" - integrity sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA== - -"@webassemblyjs/helper-code-frame@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz#647f8892cd2043a82ac0c8c5e75c36f1d9159f27" - integrity sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA== - dependencies: - "@webassemblyjs/wast-printer" "1.9.0" - -"@webassemblyjs/helper-fsm@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz#c05256b71244214671f4b08ec108ad63b70eddb8" - integrity sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw== - -"@webassemblyjs/helper-module-context@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz#25d8884b76839871a08a6c6f806c3979ef712f07" - integrity sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-numbers@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz#64d81da219fbbba1e3bd1bfc74f6e8c4e10a62ae" @@ -10898,11 +10855,6 @@ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz#bb2ebdb3b83aa26d9baad4c46d4315283acd51e9" integrity sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA== -"@webassemblyjs/helper-wasm-bytecode@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz#4fed8beac9b8c14f8c58b70d124d549dd1fe5790" - integrity sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw== - "@webassemblyjs/helper-wasm-section@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz#21ee065a7b635f319e738f0dd73bfbda281c097a" @@ -10933,16 +10885,6 @@ "@webassemblyjs/helper-wasm-bytecode" "1.11.6" "@webassemblyjs/wasm-gen" "1.12.1" -"@webassemblyjs/helper-wasm-section@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz#5a4138d5a6292ba18b04c5ae49717e4167965346" - integrity sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-buffer" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/wasm-gen" "1.9.0" - "@webassemblyjs/ieee754@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz#963929e9bbd05709e7e12243a099180812992614" @@ -10957,13 +10899,6 @@ dependencies: "@xtuc/ieee754" "^1.2.0" -"@webassemblyjs/ieee754@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz#15c7a0fbaae83fb26143bbacf6d6df1702ad39e4" - integrity sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg== - dependencies: - "@xtuc/ieee754" "^1.2.0" - "@webassemblyjs/leb128@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.1.tgz#ce814b45574e93d76bae1fb2644ab9cdd9527aa5" @@ -10978,13 +10913,6 @@ dependencies: "@xtuc/long" "4.2.2" -"@webassemblyjs/leb128@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.9.0.tgz#f19ca0b76a6dc55623a09cffa769e838fa1e1c95" - integrity sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw== - dependencies: - "@xtuc/long" "4.2.2" - "@webassemblyjs/utf8@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.1.tgz#d1f8b764369e7c6e6bae350e854dec9a59f0a3ff" @@ -10995,11 +10923,6 @@ resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.6.tgz#90f8bc34c561595fe156603be7253cdbcd0fab5a" integrity sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA== -"@webassemblyjs/utf8@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.9.0.tgz#04d33b636f78e6a6813227e82402f7637b6229ab" - integrity sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w== - "@webassemblyjs/wasm-edit@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz#ad206ebf4bf95a058ce9880a8c092c5dec8193d6" @@ -11014,20 +10937,6 @@ "@webassemblyjs/wasm-parser" "1.11.1" "@webassemblyjs/wast-printer" "1.11.1" -"@webassemblyjs/wasm-edit@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz#3fe6d79d3f0f922183aa86002c42dd256cfee9cf" - integrity sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-buffer" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/helper-wasm-section" "1.9.0" - "@webassemblyjs/wasm-gen" "1.9.0" - "@webassemblyjs/wasm-opt" "1.9.0" - "@webassemblyjs/wasm-parser" "1.9.0" - "@webassemblyjs/wast-printer" "1.9.0" - "@webassemblyjs/wasm-edit@^1.11.5": version "1.11.6" resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz#c72fa8220524c9b416249f3d94c2958dfe70ceab" @@ -11089,17 +10998,6 @@ "@webassemblyjs/leb128" "1.11.6" "@webassemblyjs/utf8" "1.11.6" -"@webassemblyjs/wasm-gen@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz#50bc70ec68ded8e2763b01a1418bf43491a7a49c" - integrity sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/ieee754" "1.9.0" - "@webassemblyjs/leb128" "1.9.0" - "@webassemblyjs/utf8" "1.9.0" - "@webassemblyjs/wasm-opt@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz#657b4c2202f4cf3b345f8a4c6461c8c2418985f2" @@ -11130,16 +11028,6 @@ "@webassemblyjs/wasm-gen" "1.12.1" "@webassemblyjs/wasm-parser" "1.12.1" -"@webassemblyjs/wasm-opt@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz#2211181e5b31326443cc8112eb9f0b9028721a61" - integrity sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-buffer" "1.9.0" - "@webassemblyjs/wasm-gen" "1.9.0" - "@webassemblyjs/wasm-parser" "1.9.0" - "@webassemblyjs/wasm-parser@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz#86ca734534f417e9bd3c67c7a1c75d8be41fb199" @@ -11176,30 +11064,6 @@ "@webassemblyjs/leb128" "1.11.6" "@webassemblyjs/utf8" "1.11.6" -"@webassemblyjs/wasm-parser@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz#9d48e44826df4a6598294aa6c87469d642fff65e" - integrity sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-api-error" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/ieee754" "1.9.0" - "@webassemblyjs/leb128" "1.9.0" - "@webassemblyjs/utf8" "1.9.0" - -"@webassemblyjs/wast-parser@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz#3031115d79ac5bd261556cecc3fa90a3ef451914" - integrity sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/floating-point-hex-parser" "1.9.0" - "@webassemblyjs/helper-api-error" "1.9.0" - "@webassemblyjs/helper-code-frame" "1.9.0" - "@webassemblyjs/helper-fsm" "1.9.0" - "@xtuc/long" "4.2.2" - "@webassemblyjs/wast-printer@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz#d0c73beda8eec5426f10ae8ef55cee5e7084c2f0" @@ -11224,15 +11088,6 @@ "@webassemblyjs/ast" "1.12.1" "@xtuc/long" "4.2.2" -"@webassemblyjs/wast-printer@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz#4935d54c85fef637b00ce9f52377451d00d47899" - integrity sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/wast-parser" "1.9.0" - "@xtuc/long" "4.2.2" - "@xmldom/xmldom@^0.8.0": version "0.8.3" resolved "https://registry.yarnpkg.com/@xmldom/xmldom/-/xmldom-0.8.3.tgz#beaf980612532aa9a3004aff7e428943aeaa0711" @@ -11401,11 +11256,6 @@ acorn@8.12.0, acorn@^8.11.0, acorn@^8.6.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.0.tgz#1627bfa2e058148036133b8d9b51a700663c294c" integrity sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw== -acorn@^6.4.1: - version "6.4.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" - integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== - acorn@^7.1.1, acorn@^7.4.0: version "7.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" @@ -11485,11 +11335,6 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv-errors@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" - integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ== - ajv-formats@2.1.1, ajv-formats@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" @@ -11497,7 +11342,7 @@ ajv-formats@2.1.1, ajv-formats@^2.1.1: dependencies: ajv "^8.0.0" -ajv-keywords@^3.1.0, ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: +ajv-keywords@^3.5.2: version "3.5.2" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== @@ -11519,7 +11364,7 @@ ajv@8.11.0, ajv@^8.0.0, ajv@^8.0.1, ajv@^8.8.0: require-from-string "^2.0.2" uri-js "^4.2.2" -ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.11.0, ajv@^6.12.4, ajv@^6.12.5: +ajv@^6.10.0, ajv@^6.11.0, ajv@^6.12.4, ajv@^6.12.5: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -11825,11 +11670,6 @@ append-field@^1.0.0: resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== -aproba@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== - archiver-utils@^5.0.0, archiver-utils@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/archiver-utils/-/archiver-utils-5.0.2.tgz#63bc719d951803efc72cf961a56ef810760dd14d" @@ -12062,29 +11902,11 @@ asap@~2.0.3: resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= -asn1.js@^5.2.0: - version "5.4.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" - integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== - dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - safer-buffer "^2.1.0" - assert-never@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/assert-never/-/assert-never-1.2.1.tgz#11f0e363bf146205fb08193b5c7b90f4d1cf44fe" integrity sha512-TaTivMB6pYI1kXwrFlEhLeGfOqoDNdTxjCdwRfFFkEA30Eu+k48W34nlok2EYWJfFFzqaEmichdNM7th6M5HNw== -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" @@ -12256,11 +12078,6 @@ async-disk-cache@^2.0.0: rsvp "^4.8.5" username-sync "^1.0.2" -async-each@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" - integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== - async-mutex@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/async-mutex/-/async-mutex-0.3.2.tgz#1485eda5bda1b0ec7c8df1ac2e815757ad1831df" @@ -12715,7 +12532,7 @@ base64-arraybuffer@^1.0.1: resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz#1c37589a7c4b0746e34bd1feb951da2df01c1bdc" integrity sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ== -base64-js@^1.0.2, base64-js@^1.2.0, base64-js@^1.3.0, base64-js@^1.3.1: +base64-js@^1.2.0, base64-js@^1.3.0, base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== @@ -12785,11 +12602,6 @@ bignumber.js@^9.0.0: resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.1.tgz#8d7ba124c882bfd8e43260c67475518d0689e4e5" integrity sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA== -binary-extensions@^1.0.0: - version "1.13.1" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" - integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== - binary-extensions@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" @@ -12800,7 +12612,7 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binaryextensions/-/binaryextensions-2.3.0.tgz#1d269cbf7e6243ea886aa41453c3651ccbe13c22" integrity sha512-nAihlQsYGyc5Bwq6+EsubvANYGExeJKHDO3RjnvwU042fawQTQfM3Kxn7IHUXQOz4bzfwsGYYHGSvXyW4zOGLg== -bindings@^1.4.0, bindings@^1.5.0: +bindings@^1.4.0: version "1.5.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== @@ -12853,26 +12665,11 @@ bluebird@3.5.1: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" integrity sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA== -bluebird@^3.4.6, bluebird@^3.5.5, bluebird@^3.7.2: +bluebird@^3.4.6, bluebird@^3.7.2: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9: - version "4.12.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" - integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== - -bn.js@^5.0.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" - integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== - -bn.js@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" - integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== - body-parser@1.20.1, body-parser@^1.18.3, body-parser@^1.19.0: version "1.20.1" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668" @@ -13009,7 +12806,7 @@ brace-expansion@^2.0.1: dependencies: balanced-match "^1.0.0" -braces@^2.3.1, braces@^2.3.2: +braces@^2.3.1: version "2.3.2" resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== @@ -13522,77 +13319,11 @@ broccoli@^3.5.2: underscore.string "^3.2.2" watch-detector "^1.0.0" -brorand@^1.0.1, brorand@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= - browser-process-hrtime@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== -browserify-aes@^1.0.0, browserify-aes@^1.0.4: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -browserify-cipher@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" - integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" - integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -browserify-rsa@^4.0.0, browserify-rsa@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.0.tgz#b2fd06b5b75ae297f7ce2dc651f918f5be158c8d" - integrity sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== - dependencies: - bn.js "^5.0.0" - randombytes "^2.0.1" - -browserify-sign@^4.0.0: - version "4.2.2" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.2.tgz#e78d4b69816d6e3dd1c747e64e9947f9ad79bc7e" - integrity sha512-1rudGyeYY42Dk6texmv7c4VcQ0EsvVbLwZkA+AQB7SxvXxmcD93jcHie8bzecJ+ChDlmAm2Qyu0+Ccg5uhZXCg== - dependencies: - bn.js "^5.2.1" - browserify-rsa "^4.1.0" - create-hash "^1.2.0" - create-hmac "^1.1.7" - elliptic "^6.5.4" - inherits "^2.0.4" - parse-asn1 "^5.1.6" - readable-stream "^3.6.2" - safe-buffer "^5.2.1" - -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.0.0, browserslist@^4.23.1: version "4.23.1" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.1.tgz#ce4af0534b3d37db5c1a4ca98b9080f985041e96" @@ -13684,20 +13415,6 @@ buffer-writer@2.0.0: resolved "https://registry.yarnpkg.com/buffer-writer/-/buffer-writer-2.0.0.tgz#ce7eb81a38f7829db09c873f2fbb792c0c98ec04" integrity sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw== -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= - -buffer@^4.3.0: - version "4.9.2" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.2.tgz#230ead344002988644841ab0244af8c44bbe3ef8" - integrity sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg== - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - isarray "^1.0.0" - buffer@^5.5.0, buffer@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" @@ -13719,11 +13436,6 @@ builtin-modules@^3.3.0: resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== -builtin-status-codes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" - integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= - builtins@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" @@ -13834,27 +13546,6 @@ cacache@16.1.2: tar "^6.1.11" unique-filename "^1.1.1" -cacache@^12.0.2: - version "12.0.4" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.4.tgz#668bcbd105aeb5f1d92fe25570ec9525c8faa40c" - integrity sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ== - dependencies: - bluebird "^3.5.5" - chownr "^1.1.1" - figgy-pudding "^3.5.1" - glob "^7.1.4" - graceful-fs "^4.1.15" - infer-owner "^1.0.3" - lru-cache "^5.1.1" - mississippi "^3.0.0" - mkdirp "^0.5.1" - move-concurrently "^1.0.1" - promise-inflight "^1.0.1" - rimraf "^2.6.3" - ssri "^6.0.1" - unique-filename "^1.1.1" - y18n "^4.0.0" - cacache@^16.0.0, cacache@^16.1.0: version "16.1.3" resolved "https://registry.yarnpkg.com/cacache/-/cacache-16.1.3.tgz#a02b9f34ecfaf9a78c9f4bc16fceb94d5d67a38e" @@ -14180,7 +13871,7 @@ check-error@^1.0.3: dependencies: get-func-name "^2.0.2" -"chokidar@>=3.0.0 <4.0.0", chokidar@^3.0.0, chokidar@^3.4.1, chokidar@^3.5.2, chokidar@^3.5.3: +"chokidar@>=3.0.0 <4.0.0", chokidar@^3.0.0, chokidar@^3.5.2, chokidar@^3.5.3: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== @@ -14195,25 +13886,6 @@ check-error@^1.0.3: optionalDependencies: fsevents "~2.3.2" -chokidar@^2.1.8: - version "2.1.8" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" - integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== - dependencies: - anymatch "^2.0.0" - async-each "^1.0.1" - braces "^2.3.2" - glob-parent "^3.1.0" - inherits "^2.0.3" - is-binary-path "^1.0.0" - is-glob "^4.0.0" - normalize-path "^3.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.2.1" - upath "^1.1.1" - optionalDependencies: - fsevents "^1.2.7" - chokidar@^3.5.1, chokidar@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" @@ -14271,14 +13943,6 @@ ci-info@^4.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-4.0.0.tgz#65466f8b280fc019b9f50a5388115d17a63a44f2" integrity sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg== -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - citty@^0.1.2, citty@^0.1.5, citty@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/citty/-/citty-0.1.6.tgz#0f7904da1ed4625e1a9ea7e0fa780981aab7c5e4" @@ -14729,7 +14393,7 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concat-stream@^1.5.0, concat-stream@^1.5.2: +concat-stream@^1.5.2: version "1.6.2" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== @@ -14791,11 +14455,6 @@ consola@^3.2.3: resolved "https://registry.yarnpkg.com/consola/-/consola-3.2.3.tgz#0741857aa88cfa0d6fd53f1cff0375136e98502f" integrity sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ== -console-browserify@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" - integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== - console-control-strings@^1.0.0, console-control-strings@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" @@ -14819,11 +14478,6 @@ consolidate@^0.16.0: dependencies: bluebird "^3.7.2" -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= - contains-path@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" @@ -14980,18 +14634,6 @@ copy-anything@^3.0.2: dependencies: is-what "^4.1.8" -copy-concurrently@^1.0.0: - version "1.0.5" - resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" - integrity sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A== - dependencies: - aproba "^1.1.1" - fs-write-stream-atomic "^1.0.8" - iferr "^0.1.5" - mkdirp "^0.5.1" - rimraf "^2.5.4" - run-queue "^1.0.0" - copy-dereference@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/copy-dereference/-/copy-dereference-1.0.0.tgz#6b131865420fd81b413ba994b44d3655311152b6" @@ -15099,37 +14741,6 @@ crc32-stream@^6.0.0: crc-32 "^1.2.0" readable-stream "^4.0.0" -create-ecdh@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" - integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== - dependencies: - bn.js "^4.1.0" - elliptic "^6.5.3" - -create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - create-react-class@^15.5.1: version "15.7.0" resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.7.0.tgz#7499d7ca2e69bb51d13faf59bd04f0c65a1d6c1e" @@ -15220,23 +14831,6 @@ crossws@^0.2.0, crossws@^0.2.4: resolved "https://registry.yarnpkg.com/crossws/-/crossws-0.2.4.tgz#82a8b518bff1018ab1d21ced9e35ffbe1681ad03" integrity sha512-DAxroI2uSOgUKLz00NX6A8U/8EE3SZHmIND+10jkVSaypvyt57J5JEOxAQOL6lQxyzi/wZbTIwssU1uy69h5Vg== -crypto-browserify@^3.11.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== - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" - crypto-random-string@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" @@ -15475,11 +15069,6 @@ cuint@^0.2.2: resolved "https://registry.yarnpkg.com/cuint/-/cuint-0.2.2.tgz#408086d409550c2631155619e9fa7bcadc3b991b" integrity sha1-QICG1AlVDCYxFVYZ6fp7ytw7mRs= -cyclist@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" - integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk= - dag-map@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/dag-map/-/dag-map-2.0.2.tgz#9714b472de82a1843de2fba9b6876938cab44c68" @@ -15851,14 +15440,6 @@ dequal@^2.0.0, dequal@^2.0.3: resolved "https://registry.yarnpkg.com/dequal/-/dequal-2.0.3.tgz#2644214f1997d39ed0ee0ece72335490a7ac67be" integrity sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA== -des.js@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" - integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - destr@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/destr/-/destr-2.0.3.tgz#7f9e97cb3d16dbdca7be52aca1644ce402cfe449" @@ -16021,15 +15602,6 @@ diff@^5.2.0: resolved "https://registry.yarnpkg.com/diff/-/diff-5.2.0.tgz#26ded047cd1179b78b9537d5ef725503ce1ae531" integrity sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A== -diffie-hellman@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" - integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -16106,11 +15678,6 @@ dom-serializer@^2.0.0: domhandler "^5.0.2" entities "^4.2.0" -domain-browser@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" - integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== - domelementtype@^2.0.1, domelementtype@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.2.0.tgz#9a0b6c2782ed6a1c7323d42267183df9bd8b1d57" @@ -16247,16 +15814,6 @@ duplexer@^0.1.1, duplexer@^0.1.2: resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== -duplexify@^3.4.2, duplexify@^3.6.0: - version "3.7.1" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" - integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== - dependencies: - end-of-stream "^1.0.0" - inherits "^2.0.1" - readable-stream "^2.0.0" - stream-shift "^1.0.0" - duplexify@^4.0.0, duplexify@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-4.1.1.tgz#7027dc374f157b122a8ae08c2d3ea4d2d953aa61" @@ -16324,19 +15881,6 @@ electron-to-chromium@^1.4.796: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.807.tgz#4d6c5ea1516f0164ac5bfd487ccd4ee9507c8f01" integrity sha512-kSmJl2ZwhNf/bcIuCH/imtNOKlpkLDn2jqT5FJ+/0CXjhnFaOa9cOe9gHKKy71eM49izwuQjZhKk+lWQ1JxB7A== -elliptic@^6.5.3, elliptic@^6.5.4: - version "6.5.4" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" - integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== - dependencies: - bn.js "^4.11.9" - brorand "^1.1.0" - hash.js "^1.0.0" - hmac-drbg "^1.0.1" - inherits "^2.0.4" - minimalistic-assert "^1.0.1" - minimalistic-crypto-utils "^1.0.1" - ember-auto-import@^2.4.1, ember-auto-import@^2.4.2, ember-auto-import@^2.6.1: version "2.6.3" resolved "https://registry.yarnpkg.com/ember-auto-import/-/ember-auto-import-2.6.3.tgz#f18d1b93dd10b08ba5496518436f9d56dd4e000a" @@ -17119,7 +16663,7 @@ encoding@^0.1.11, encoding@^0.1.13: dependencies: iconv-lite "^0.6.2" -end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: +end-of-stream@^1.1.0, end-of-stream@^1.4.1: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== @@ -17149,15 +16693,6 @@ engine.io@~6.2.0: engine.io-parser "~5.0.3" ws "~8.2.3" -enhanced-resolve@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz#2f3cfd84dbe3b487f18f2db2ef1e064a571ca5ec" - integrity sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg== - dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.5.0" - tapable "^1.0.0" - enhanced-resolve@^5.10.0: version "5.16.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz#65ec88778083056cb32487faa9aef82ed0864787" @@ -17247,7 +16782,7 @@ errlop@^2.0.0: resolved "https://registry.yarnpkg.com/errlop/-/errlop-2.2.0.tgz#1ff383f8f917ae328bebb802d6ca69666a42d21b" integrity sha512-e64Qj9+4aZzjzzFpZC7p5kmm/ccCrbLhAJplhsDXQFs87XTsXwOpH4s1Io2s90Tau/8r2j9f4l/thhDevRjzxw== -errno@^0.1.1, errno@^0.1.3, errno@~0.1.7: +errno@^0.1.1: version "0.1.8" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== @@ -18053,14 +17588,6 @@ eslint-scope@5.1.1, eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-scope@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" - integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== - dependencies: - esrecurse "^4.1.0" - estraverse "^4.1.1" - eslint-utils@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" @@ -18177,7 +17704,7 @@ esquery@^1.4.0: dependencies: estraverse "^5.1.0" -esrecurse@^4.1.0, esrecurse@^4.3.0: +esrecurse@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== @@ -18251,19 +17778,11 @@ events-to-array@^1.0.1: resolved "https://registry.yarnpkg.com/events-to-array/-/events-to-array-1.1.2.tgz#2d41f563e1fe400ed4962fe1a4d5c6a7539df7f6" integrity sha1-LUH1Y+H+QA7Uli/hpNXGp1Od9/Y= -events@^3.0.0, events@^3.2.0, events@^3.3.0: +events@^3.2.0, events@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== -evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - exec-sh@^0.3.2, exec-sh@^0.3.4: version "0.3.6" resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.6.tgz#ff264f9e325519a60cb5e273692943483cca63bc" @@ -18534,9 +18053,9 @@ extract-zip@^2.0.1: "@types/yauzl" "^2.9.1" fake-indexeddb@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/fake-indexeddb/-/fake-indexeddb-4.0.1.tgz#09bb2468e21d0832b2177e894765fb109edac8fb" - integrity sha512-hFRyPmvEZILYgdcLBxVdHLik4Tj3gDTu/g7s9ZDOiU3sTNiGx+vEu1ri/AMsFJUZ/1sdRbAVrEcKndh3sViBcA== + version "4.0.2" + resolved "https://registry.yarnpkg.com/fake-indexeddb/-/fake-indexeddb-4.0.2.tgz#e7a884158fa576e00f03e973b9874619947013e4" + integrity sha512-SdTwEhnakbgazc7W3WUXOJfGmhH0YfG4d+dRPOFoYDRTL6U5t8tvrmkf2W/C3W1jk2ylV7Wrnj44RASqpX/lEw== dependencies: realistic-structured-clone "^3.0.0" @@ -18710,11 +18229,6 @@ fflate@^0.4.4: resolved "https://registry.yarnpkg.com/fflate/-/fflate-0.4.8.tgz#f90b82aefbd8ac174213abb338bd7ef848f0f5ae" integrity sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA== -figgy-pudding@^3.5.1: - version "3.5.2" - resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" - integrity sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw== - figures@3.2.0, figures@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" @@ -18835,15 +18349,6 @@ find-babel-config@^2.1.1: json5 "^2.2.3" path-exists "^4.0.0" -find-cache-dir@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" - integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== - dependencies: - commondir "^1.0.1" - make-dir "^2.0.0" - pkg-dir "^3.0.0" - find-cache-dir@^3.3.1, find-cache-dir@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b" @@ -19003,14 +18508,6 @@ flatted@^3.3.1: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== -flush-write-stream@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" - integrity sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w== - dependencies: - inherits "^2.0.3" - readable-stream "^2.3.6" - focus-trap@^7.5.4: version "7.5.4" resolved "https://registry.yarnpkg.com/focus-trap/-/focus-trap-7.5.4.tgz#6c4e342fe1dae6add9c2aa332a6e7a0bbd495ba2" @@ -19093,7 +18590,7 @@ fresh@0.5.2: resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= -from2@^2.1.0, from2@^2.1.1: +from2@^2.1.1: version "2.3.0" resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= @@ -19260,16 +18757,6 @@ fs-updater@^1.0.4: heimdalljs-logger "^0.1.9" rimraf "^2.6.2" -fs-write-stream-atomic@^1.0.8: - version "1.0.10" - resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" - integrity sha1-tH31NJPvkR33VzHnCp3tAYnbQMk= - dependencies: - graceful-fs "^4.1.2" - iferr "^0.1.5" - imurmurhash "^0.1.4" - readable-stream "1 || 2" - fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -19280,14 +18767,6 @@ fsevents@2.3.2, fsevents@^2.3.2, fsevents@~2.3.2: resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== -fsevents@^1.2.7: - version "1.2.13" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" - integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw== - dependencies: - bindings "^1.5.0" - nan "^2.12.1" - fsevents@~2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" @@ -19631,14 +19110,6 @@ glob-parent@5.1.2, glob-parent@^5.1.2, glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" -glob-parent@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" - integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= - dependencies: - is-glob "^3.1.0" - path-dirname "^1.0.0" - glob-parent@^6.0.1: version "6.0.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" @@ -20241,15 +19712,6 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -hash-base@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" - integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== - dependencies: - inherits "^2.0.4" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - hash-for-dep@^1.0.2, hash-for-dep@^1.4.7, hash-for-dep@^1.5.0, hash-for-dep@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/hash-for-dep/-/hash-for-dep-1.5.1.tgz#497754b39bee2f1c4ade4521bfd2af0a7c1196e3" @@ -20267,14 +19729,6 @@ hash-sum@^2.0.0: resolved "https://registry.yarnpkg.com/hash-sum/-/hash-sum-2.0.0.tgz#81d01bb5de8ea4a214ad5d6ead1b523460b0b45a" integrity sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg== -hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - hasown@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" @@ -20565,15 +20019,6 @@ history@^5.2.0, history@^5.3.0: dependencies: "@babel/runtime" "^7.7.6" -hmac-drbg@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - hoist-non-react-statics@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz#aa448cf0986d55cc40773b17174b7dd066cb7cfb" @@ -20854,11 +20299,6 @@ http-terminator@^3.2.0: roarr "^7.0.4" type-fest "^2.3.3" -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= - https-proxy-agent@5.0.1, https-proxy-agent@^5.0.0, https-proxy-agent@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" @@ -20931,16 +20371,11 @@ icss-utils@^5.0.0, icss-utils@^5.1.0: resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae" integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== -ieee754@^1.1.13, ieee754@^1.1.4, ieee754@^1.2.1: +ieee754@^1.1.13, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== -iferr@^0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" - integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= - ignore-by-default@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" @@ -21075,7 +20510,7 @@ indent-string@^4.0.0: resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== -infer-owner@^1.0.3, infer-owner@^1.0.4: +infer-owner@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== @@ -21098,11 +20533,6 @@ inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, i resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -inherits@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" - integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= - inherits@2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -21372,13 +20802,6 @@ is-bigint@^1.0.1: resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.1.tgz#6923051dfcbc764278540b9ce0e6b3213aa5ebc2" integrity sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg== -is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= - dependencies: - binary-extensions "^1.0.0" - is-binary-path@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" @@ -21516,7 +20939,7 @@ is-extendable@^1.0.1: dependencies: is-plain-object "^2.0.4" -is-extglob@^2.1.0, is-extglob@^2.1.1: +is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= @@ -21546,13 +20969,6 @@ is-git-url@^1.0.0: resolved "https://registry.yarnpkg.com/is-git-url/-/is-git-url-1.0.0.tgz#53f684cd143285b52c3244b4e6f28253527af66b" integrity sha1-U/aEzRQyhbUsMkS05vKCU1J69ms= -is-glob@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" - integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= - dependencies: - is-extglob "^2.1.0" - is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" @@ -21902,11 +21318,6 @@ is-windows@^1.0.1, is-windows@^1.0.2: resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== -is-wsl@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" - integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= - is-wsl@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" @@ -22734,7 +22145,7 @@ json-buffer@3.0.0: resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= -json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: +json-parse-better-errors@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== @@ -23276,11 +22687,6 @@ load-yaml-file@^0.2.0: pify "^4.0.1" strip-bom "^3.0.0" -loader-runner@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" - integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== - loader-runner@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.2.0.tgz#d7022380d66d14c5fb1d496b89864ebcfd478384" @@ -23291,7 +22697,7 @@ loader-utils@3.2.1: resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-3.2.1.tgz#4fb104b599daafd82ef3e1a41fb9265f87e1f576" integrity sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw== -loader-utils@^1.2.3, loader-utils@^1.4.0: +loader-utils@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA== @@ -23895,7 +23301,7 @@ make-dir@3.1.0, make-dir@^3.0.0, make-dir@^3.0.2, make-dir@^3.1.0, make-dir@~3.1 dependencies: semver "^6.0.0" -make-dir@^2.0.0, make-dir@^2.1.0: +make-dir@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== @@ -24068,15 +23474,6 @@ md5-file@^5.0.0: resolved "https://registry.yarnpkg.com/md5-file/-/md5-file-5.0.0.tgz#e519f631feca9c39e7f9ea1780b63c4745012e20" integrity sha512-xbEFXCYVWrSx/gEKS1VPlg84h/4L20znVIulKw6kMfmBUAZNAnF00eczz9ICMl+/hjQGo5KSXRxbL/47X3rmMw== -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - mdast-util-definitions@^5.0.0: version "5.1.2" resolved "https://registry.yarnpkg.com/mdast-util-definitions/-/mdast-util-definitions-5.1.2.tgz#9910abb60ac5d7115d6819b57ae0bcef07a3f7a7" @@ -24265,22 +23662,6 @@ memfs@^3.4.3: dependencies: fs-monkey "^1.0.4" -memory-fs@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" - integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - -memory-fs@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.5.0.tgz#324c01288b88652966d161db77838720845a8e3c" - integrity sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA== - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - memory-pager@^1.0.2: version "1.5.0" resolved "https://registry.yarnpkg.com/memory-pager/-/memory-pager-1.5.0.tgz#d8751655d22d384682741c972f2c3d6dfa3e66b5" @@ -24655,7 +24036,7 @@ micromark@^3.0.0: micromark-util-types "^1.0.1" uvu "^0.5.0" -micromatch@^3.1.10, micromatch@^3.1.4: +micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -24682,14 +24063,6 @@ micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5: braces "^3.0.2" picomatch "^2.3.1" -miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" - integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - mime-db@1.52.0, "mime-db@>= 1.43.0 < 2", mime-db@^1.52.0: version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" @@ -24777,16 +24150,11 @@ miniflare@3.20240701.0, miniflare@^3.20240701.0: youch "^3.2.2" zod "^3.22.3" -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: +minimalistic-assert@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== -minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= - "minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -24973,22 +24341,6 @@ minizlib@^2.1.1, minizlib@^2.1.2: minipass "^3.0.0" yallist "^4.0.0" -mississippi@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" - integrity sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA== - dependencies: - concat-stream "^1.5.0" - duplexify "^3.4.2" - end-of-stream "^1.1.0" - flush-write-stream "^1.0.0" - from2 "^2.1.0" - parallel-transform "^1.1.0" - pump "^3.0.0" - pumpify "^1.3.3" - stream-each "^1.1.0" - through2 "^2.0.0" - mitt@^1.1.3: version "1.2.0" resolved "https://registry.yarnpkg.com/mitt/-/mitt-1.2.0.tgz#cb24e6569c806e31bd4e3995787fe38a04fdf90d" @@ -25017,7 +24369,7 @@ mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== -mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.4, mkdirp@^0.5.5, mkdirp@^0.5.6: +mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.4, mkdirp@^0.5.5, mkdirp@^0.5.6: version "0.5.6" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== @@ -25212,18 +24564,6 @@ mout@^1.0.0: resolved "https://registry.yarnpkg.com/mout/-/mout-1.2.3.tgz#bd1477d8c7f2db5fcf43c91de30b6cc746b78e10" integrity sha512-vtE+eZcSj/sBkIp6gxB87MznryWP+gHIp0XX9SKrzA5TAkvz6y7VTuNruBjYdJozd8NY5i9XVIsn8cn3SwNjzg== -move-concurrently@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" - integrity sha1-viwAX9oy4LKa8fBdfEszIUxwH5I= - dependencies: - aproba "^1.1.1" - copy-concurrently "^1.0.0" - fs-write-stream-atomic "^1.0.8" - mkdirp "^0.5.1" - rimraf "^2.5.4" - run-queue "^1.0.3" - mpath@0.8.4: version "0.8.4" resolved "https://registry.yarnpkg.com/mpath/-/mpath-0.8.4.tgz#6b566d9581621d9e931dd3b142ed3618e7599313" @@ -25372,11 +24712,6 @@ named-placeholders@^1.1.3: dependencies: lru-cache "^7.14.1" -nan@^2.12.1: - version "2.14.2" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19" - integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ== - nanoid@^3.3.3, nanoid@^3.3.4, nanoid@^3.3.7: version "3.3.7" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" @@ -25464,7 +24799,7 @@ negotiator@0.6.3, negotiator@^0.6.3: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== -neo-async@^2.5.0, neo-async@^2.6.0, neo-async@^2.6.1, neo-async@^2.6.2: +neo-async@^2.6.0, neo-async@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== @@ -25791,35 +25126,6 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= -node-libs-browser@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425" - integrity sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q== - dependencies: - assert "^1.1.1" - browserify-zlib "^0.2.0" - buffer "^4.3.0" - console-browserify "^1.1.0" - constants-browserify "^1.0.0" - crypto-browserify "^3.11.0" - domain-browser "^1.1.1" - events "^3.0.0" - https-browserify "^1.0.0" - os-browserify "^0.3.0" - path-browserify "0.0.1" - process "^0.11.10" - punycode "^1.2.4" - querystring-es3 "^0.2.0" - readable-stream "^2.3.3" - stream-browserify "^2.0.1" - stream-http "^2.7.2" - string_decoder "^1.0.0" - timers-browserify "^2.0.4" - tty-browserify "0.0.0" - url "^0.11.0" - util "^0.11.0" - vm-browserify "^1.0.1" - node-modules-path@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/node-modules-path/-/node-modules-path-1.0.2.tgz#e3acede9b7baf4bc336e3496b58e5b40d517056e" @@ -26790,11 +26096,6 @@ ora@^7.0.1: string-width "^6.1.0" strip-ansi "^7.1.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= - os-homedir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" @@ -27113,7 +26414,7 @@ pacote@^18.0.6: ssri "^10.0.0" tar "^6.1.11" -pako@^1.0.3, pako@~1.0.5: +pako@^1.0.3: version "1.0.11" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== @@ -27123,15 +26424,6 @@ pako@^2.1.0: resolved "https://registry.yarnpkg.com/pako/-/pako-2.1.0.tgz#266cc37f98c7d883545d11335c00fbd4062c9a86" integrity sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug== -parallel-transform@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.2.0.tgz#9049ca37d6cb2182c3b1d2c720be94d14a5814fc" - integrity sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg== - dependencies: - cyclist "^1.0.1" - inherits "^2.0.3" - readable-stream "^2.1.5" - param-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz#7d17fe4aa12bde34d4a77d91acfb6219caad01c5" @@ -27147,17 +26439,6 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-asn1@^5.0.0, parse-asn1@^5.1.6: - version "5.1.6" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.6.tgz#385080a3ec13cb62a62d39409cb3e88844cdaed4" - integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== - dependencies: - asn1.js "^5.2.0" - browserify-aes "^1.0.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - safe-buffer "^5.1.1" - parse-git-config@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/parse-git-config/-/parse-git-config-3.0.0.tgz#4a2de08c7b74a2555efa5ae94d40cd44302a6132" @@ -27286,16 +26567,6 @@ pascalcase@^0.1.1: resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= -path-browserify@0.0.1: - version "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-dirname@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" - integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= - path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" @@ -27451,17 +26722,6 @@ pathval@^1.1.1: resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== -pbkdf2@^3.0.3: - version "3.1.1" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.1.tgz#cb8724b0fada984596856d1a6ebafd3584654b94" - integrity sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg== - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - pend@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" @@ -27635,13 +26895,6 @@ pkg-dir@^2.0.0: dependencies: find-up "^2.1.0" -pkg-dir@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" - integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== - dependencies: - find-up "^3.0.0" - pkg-dir@^4.1.0, pkg-dir@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" @@ -28771,26 +28024,6 @@ pstree.remy@^1.1.8: resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a" integrity sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w== -public-encrypt@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" - integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - safe-buffer "^5.1.2" - -pump@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" - integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" @@ -28799,25 +28032,6 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" -pumpify@^1.3.3: - version "1.5.1" - resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" - integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== - dependencies: - duplexify "^3.6.0" - inherits "^2.0.3" - pump "^2.0.0" - -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= - -punycode@^1.2.4: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= - punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" @@ -28859,16 +28073,6 @@ query-string@^5.0.1: object-assign "^4.1.0" strict-uri-encode "^1.0.0" -querystring-es3@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" - integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= - querystringify@^2.1.1: version "2.2.0" resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" @@ -28927,21 +28131,13 @@ radix3@^1.1.0, radix3@^1.1.2: resolved "https://registry.yarnpkg.com/radix3/-/radix3-1.1.2.tgz#fd27d2af3896c6bf4bcdfab6427c69c2afc69ec0" integrity sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA== -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: +randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== dependencies: safe-buffer "^5.1.0" -randomfill@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" - integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - range-parser@^1.2.1, range-parser@~1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" @@ -29209,7 +28405,16 @@ read@^2.0.0: dependencies: mute-stream "~1.0.0" -"readable-stream@1 || 2", readable-stream@2.3.7, readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: +"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== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readable-stream@2.3.7, readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.2.2, readable-stream@^2.3.5, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -29222,15 +28427,6 @@ 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.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== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - readable-stream@^2.0.5: version "2.3.8" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" @@ -29244,15 +28440,6 @@ readable-stream@^2.0.5: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^3.6.2: - version "3.6.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" - integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - readable-stream@^4.0.0: version "4.5.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.5.2.tgz#9e7fc4c45099baeed934bff6eb97ba6cf2729e09" @@ -29281,15 +28468,6 @@ readdir-glob@^1.1.2: dependencies: minimatch "^5.1.0" -readdirp@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" - integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== - dependencies: - graceful-fs "^4.1.11" - micromatch "^3.1.10" - readable-stream "^2.0.2" - readdirp@~3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" @@ -30035,14 +29213,6 @@ rimraf@~2.6.2: dependencies: glob "^7.1.3" -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - roarr@^7.0.4: version "7.15.0" resolved "https://registry.yarnpkg.com/roarr/-/roarr-7.15.0.tgz#09b792f0cd31b4a7f91030bb1c47550ceec98ee4" @@ -30262,13 +29432,6 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -run-queue@^1.0.0, run-queue@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" - integrity sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec= - dependencies: - aproba "^1.1.1" - rxjs@6.6.7, rxjs@^6.4.0, rxjs@^6.6.0: version "6.6.7" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" @@ -30302,7 +29465,7 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: +safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -30338,7 +29501,7 @@ safe-stable-stringify@^2.4.1: resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz#138c84b6f6edb3db5f8ef3ef7115b8f55ccbf886" integrity sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g== -"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.1.0: +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -30449,15 +29612,6 @@ scheduler@^0.23.2: dependencies: loose-envify "^1.1.0" -schema-utils@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770" - integrity sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g== - dependencies: - ajv "^6.1.0" - ajv-errors "^1.0.0" - ajv-keywords "^3.1.0" - schema-utils@^2.6.5: version "2.7.1" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.1.tgz#1ca4f32d1b24c590c203b8e7a50bf0ea4cd394d7" @@ -30579,13 +29733,6 @@ seq-queue@^0.0.5: resolved "https://registry.yarnpkg.com/seq-queue/-/seq-queue-0.0.5.tgz#d56812e1c017a6e4e7c3e3a37a1da6d78dd3c93e" integrity sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q== -serialize-javascript@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" - integrity sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw== - dependencies: - randombytes "^2.1.0" - serialize-javascript@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" @@ -30692,7 +29839,7 @@ set-value@^2.0.0, set-value@^2.0.1: is-plain-object "^2.0.3" split-string "^3.0.1" -setimmediate@^1.0.4, setimmediate@^1.0.5: +setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= @@ -30707,7 +29854,7 @@ setprototypeof@1.2.0: resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== -sha.js@^2.4.0, sha.js@^2.4.11, sha.js@^2.4.8: +sha.js@^2.4.11: version "2.4.11" resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== @@ -31182,11 +30329,6 @@ sorted-array-functions@^1.3.0: resolved "https://registry.yarnpkg.com/sorted-array-functions/-/sorted-array-functions-1.3.0.tgz#8605695563294dffb2c9796d602bd8459f7a0dd5" integrity sha512-2sqgzeFlid6N4Z2fUQ1cvFmTOLRi/sEDzSQ0OKYchqgoPmQBVyM3959qYx3fpS6Esef80KjmpgPeEr028dP3OA== -source-list-map@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" - integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== - "source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.1, source-map-js@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" @@ -31230,7 +30372,7 @@ source-map-resolve@^0.6.0: atob "^2.1.2" decode-uri-component "^0.2.0" -source-map-support@0.5.21, source-map-support@^0.5.21, source-map-support@^0.5.5, source-map-support@^0.5.6, source-map-support@~0.5.12, source-map-support@~0.5.20: +source-map-support@0.5.21, source-map-support@^0.5.21, source-map-support@^0.5.5, source-map-support@^0.5.6, source-map-support@~0.5.20: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== @@ -31466,13 +30608,6 @@ ssri@^10.0.0, ssri@^10.0.1: dependencies: minipass "^5.0.0" -ssri@^6.0.1: - version "6.0.2" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.2.tgz#157939134f20464e7301ddba3e90ffa8f7728ac5" - integrity sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q== - dependencies: - figgy-pudding "^3.5.1" - ssri@^9.0.0, ssri@^9.0.1: version "9.0.1" resolved "https://registry.yarnpkg.com/ssri/-/ssri-9.0.1.tgz#544d4c357a8d7b71a19700074b6883fcb4eae057" @@ -31566,22 +30701,6 @@ stoppable@^1.1.0: resolved "https://registry.yarnpkg.com/stoppable/-/stoppable-1.1.0.tgz#32da568e83ea488b08e4d7ea2c3bcc9d75015d5b" integrity sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw== -stream-browserify@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b" - integrity sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg== - dependencies: - inherits "~2.0.1" - readable-stream "^2.0.2" - -stream-each@^1.1.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae" - integrity sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw== - dependencies: - end-of-stream "^1.1.0" - stream-shift "^1.0.0" - stream-events@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/stream-events/-/stream-events-1.0.5.tgz#bbc898ec4df33a4902d892333d47da9bf1c406d5" @@ -31589,17 +30708,6 @@ stream-events@^1.0.5: dependencies: stubs "^3.0.0" -stream-http@^2.7.2: - version "2.8.3" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" - integrity sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw== - dependencies: - builtin-status-codes "^3.0.0" - inherits "^2.0.1" - readable-stream "^2.3.6" - to-arraybuffer "^1.0.0" - xtend "^4.0.0" - stream-parser@~0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/stream-parser/-/stream-parser-0.3.1.tgz#1618548694420021a1182ff0af1911c129761773" @@ -31750,7 +30858,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.0.0, string_decoder@^1.1.1, string_decoder@^1.3.0: +string_decoder@^1.1.1, string_decoder@^1.3.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== @@ -32149,11 +31257,6 @@ tap-parser@^7.0.0: js-yaml "^3.2.7" minipass "^2.2.0" -tapable@^1.0.0, tapable@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" - integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== - tapable@^2.0.0, tapable@^2.1.1, tapable@^2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" @@ -32282,21 +31385,6 @@ terracotta@^1.0.4: dependencies: solid-use "^0.8.0" -terser-webpack-plugin@^1.4.3: - version "1.4.5" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz#a217aefaea330e734ffacb6120ec1fa312d6040b" - integrity sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw== - dependencies: - cacache "^12.0.2" - find-cache-dir "^2.1.0" - is-wsl "^1.1.0" - schema-utils "^1.0.0" - serialize-javascript "^4.0.0" - source-map "^0.6.1" - terser "^4.1.2" - webpack-sources "^1.4.0" - worker-farm "^1.7.0" - terser-webpack-plugin@^5.1.3: version "5.2.5" resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.2.5.tgz#ce65b9880a0c36872555c4874f45bbdb02ee32c9" @@ -32329,15 +31417,6 @@ terser@5.14.2: commander "^2.20.0" source-map-support "~0.5.20" -terser@^4.1.2: - version "4.8.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.1.tgz#a00e5634562de2239fd404c649051bf6fc21144f" - integrity sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw== - dependencies: - commander "^2.20.0" - source-map "~0.6.1" - source-map-support "~0.5.12" - terser@^5.10.0, terser@^5.7.2: version "5.10.0" resolved "https://registry.yarnpkg.com/terser/-/terser-5.10.0.tgz#b86390809c0389105eb0a0b62397563096ddafcc" @@ -32476,13 +31555,6 @@ 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.4: - version "2.0.12" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.12.tgz#44a45c11fbf407f34f97bccd1577c652361b00ee" - integrity sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ== - dependencies: - setimmediate "^1.0.4" - tiny-glob@0.2.9, tiny-glob@^0.2.9: version "0.2.9" resolved "https://registry.yarnpkg.com/tiny-glob/-/tiny-glob-0.2.9.tgz#2212d441ac17928033b110f8b3640683129d31e2" @@ -32583,11 +31655,6 @@ tmpl@1.0.x: resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE= -to-arraybuffer@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" - integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= - to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" @@ -32852,11 +31919,6 @@ tsutils@^3.21.0: dependencies: tslib "^1.8.1" -tty-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" - integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= - tuf-js@^1.1.3: version "1.1.7" resolved "https://registry.yarnpkg.com/tuf-js/-/tuf-js-1.1.7.tgz#21b7ae92a9373015be77dfe0cb282a80ec3bbe43" @@ -33574,11 +32636,6 @@ upath@2.0.1, upath@^2.0.1: resolved "https://registry.yarnpkg.com/upath/-/upath-2.0.1.tgz#50c73dea68d6f6b990f51d279ce6081665d61a8b" integrity sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w== -upath@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" - integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== - update-browserslist-db@^1.0.13: version "1.0.13" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" @@ -33660,14 +32717,6 @@ url-to-options@^1.0.1: resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= -url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= - dependencies: - punycode "1.3.2" - querystring "0.2.0" - urlpattern-polyfill@8.0.2: version "8.0.2" resolved "https://registry.yarnpkg.com/urlpattern-polyfill/-/urlpattern-polyfill-8.0.2.tgz#99f096e35eff8bf4b5a2aa7d58a1523d6ebc7ce5" @@ -33699,20 +32748,6 @@ util.promisify@^1.0.0: has-symbols "^1.0.1" object.getownpropertydescriptors "^2.1.1" -util@0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" - integrity sha1-evsa/lCAUkZInj23/g7TeTNqwPk= - dependencies: - inherits "2.0.1" - -util@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/util/-/util-0.11.1.tgz#3236733720ec64bb27f6e26f421aaa2e1b588d61" - integrity sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ== - dependencies: - inherits "2.0.3" - util@^0.12.0, util@^0.12.3: version "0.12.4" resolved "https://registry.yarnpkg.com/util/-/util-0.12.4.tgz#66121a31420df8f01ca0c464be15dfa1d1850253" @@ -34105,11 +33140,6 @@ vitest@^1.6.0: vite-node "1.6.0" why-is-node-running "^2.2.2" -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== - vscode-jsonrpc@6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz#108bdb09b4400705176b957ceca9e0880e9b6d4e" @@ -34313,24 +33343,6 @@ watch-detector@^1.0.0, watch-detector@^1.0.2: silent-error "^1.1.1" tmp "^0.1.0" -watchpack-chokidar2@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz#38500072ee6ece66f3769936950ea1771be1c957" - integrity sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww== - dependencies: - chokidar "^2.1.8" - -watchpack@^1.7.4: - version "1.7.5" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.7.5.tgz#1267e6c55e0b9b5be44c2023aed5437a2c26c453" - integrity sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ== - dependencies: - graceful-fs "^4.1.2" - neo-async "^2.5.0" - optionalDependencies: - chokidar "^3.4.1" - watchpack-chokidar2 "^2.0.1" - watchpack@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" @@ -34477,14 +33489,6 @@ webpack-merge@5.8.0: clone-deep "^4.0.1" wildcard "^2.0.0" -webpack-sources@^1.4.0, webpack-sources@^1.4.1: - version "1.4.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" - integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ== - dependencies: - source-list-map "^2.0.0" - source-map "~0.6.1" - webpack-sources@^3.0.0, webpack-sources@^3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" @@ -34537,35 +33541,6 @@ webpack@5.76.1: watchpack "^2.4.0" webpack-sources "^3.2.3" -webpack@^4.47.0: - version "4.47.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.47.0.tgz#8b8a02152d7076aeb03b61b47dad2eeed9810ebc" - integrity sha512-td7fYwgLSrky3fI1EuU5cneU4+pbH6GgOfuKNS1tNPcfdGinGELAqsb/BP4nnvZyKSG2i/xFGU7+n2PvZA8HJQ== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-module-context" "1.9.0" - "@webassemblyjs/wasm-edit" "1.9.0" - "@webassemblyjs/wasm-parser" "1.9.0" - acorn "^6.4.1" - ajv "^6.10.2" - ajv-keywords "^3.4.1" - chrome-trace-event "^1.0.2" - enhanced-resolve "^4.5.0" - eslint-scope "^4.0.3" - json-parse-better-errors "^1.0.2" - loader-runner "^2.4.0" - loader-utils "^1.2.3" - memory-fs "^0.4.1" - micromatch "^3.1.10" - mkdirp "^0.5.3" - neo-async "^2.6.1" - node-libs-browser "^2.2.1" - schema-utils "^1.0.0" - tapable "^1.1.3" - terser-webpack-plugin "^1.4.3" - watchpack "^1.7.4" - webpack-sources "^1.4.1" - webpack@^5.90.3, webpack@~5.90.3: version "5.90.3" resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.90.3.tgz#37b8f74d3ded061ba789bb22b31e82eed75bd9ac" @@ -34846,13 +33821,6 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= -worker-farm@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8" - integrity sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw== - dependencies: - errno "~0.1.7" - workerd@1.20240701.0: version "1.20240701.0" resolved "https://registry.yarnpkg.com/workerd/-/workerd-1.20240701.0.tgz#aaed23a54158bae4faf313c6ed48aefe4b87cd5e" @@ -35072,11 +34040,6 @@ xxhashjs@~0.2.2: dependencies: cuint "^0.2.2" -y18n@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4" - integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ== - y18n@^5.0.5: version "5.0.8" resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" From cf6eb010f712cea0c016fb6701ab8a75b253988f Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Thu, 18 Jul 2024 14:18:39 -0400 Subject: [PATCH 49/53] test: Remove explict casting of baseconfig in vite configs (#12979) Something I noticed while doing my jest -> vitest conversions, we don't need this anymore. --- packages/astro/vite.config.ts | 6 +----- packages/nestjs/vite.config.ts | 5 +---- packages/replay-internal/vitest.config.ts | 3 +-- packages/solid/vite.config.ts | 5 +---- packages/solidstart/vite.config.ts | 5 +---- packages/svelte/vite.config.ts | 5 +---- packages/sveltekit/vite.config.ts | 6 +----- 7 files changed, 7 insertions(+), 28 deletions(-) diff --git a/packages/astro/vite.config.ts b/packages/astro/vite.config.ts index 6a035a7635e7..1094fe0d79da 100644 --- a/packages/astro/vite.config.ts +++ b/packages/astro/vite.config.ts @@ -1,13 +1,9 @@ -import type { UserConfig } from 'vitest'; - import baseConfig from '../../vite/vite.config'; export default { ...baseConfig, test: { - // test exists, no idea why TS doesn't recognize it - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ...(baseConfig as UserConfig & { test: any }).test, + ...baseConfig.test, environment: 'jsdom', }, }; diff --git a/packages/nestjs/vite.config.ts b/packages/nestjs/vite.config.ts index d82e61610307..ff64487a9265 100644 --- a/packages/nestjs/vite.config.ts +++ b/packages/nestjs/vite.config.ts @@ -1,13 +1,10 @@ -import type { UserConfig } from 'vitest'; import { defineConfig } from 'vitest/config'; import baseConfig from '../../vite/vite.config'; export default defineConfig({ ...baseConfig, test: { - // test exists, no idea why TS doesn't recognize it - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ...(baseConfig as UserConfig & { test: any }).test, + ...baseConfig.test, environment: 'node', }, }); diff --git a/packages/replay-internal/vitest.config.ts b/packages/replay-internal/vitest.config.ts index 9b4a2451c0c4..cd592247ba07 100644 --- a/packages/replay-internal/vitest.config.ts +++ b/packages/replay-internal/vitest.config.ts @@ -1,4 +1,3 @@ -import type { UserConfig } from 'vitest'; import { defineConfig } from 'vitest/config'; import baseConfig from '../../vite/vite.config'; @@ -6,7 +5,7 @@ import baseConfig from '../../vite/vite.config'; export default defineConfig({ ...baseConfig, test: { - ...(baseConfig as UserConfig & { test: any }).test, + ...baseConfig.test, coverage: {}, globals: true, setupFiles: ['./test.setup.ts'], diff --git a/packages/solid/vite.config.ts b/packages/solid/vite.config.ts index 1dfe27d70c66..416c98e877b3 100644 --- a/packages/solid/vite.config.ts +++ b/packages/solid/vite.config.ts @@ -1,14 +1,11 @@ import solidPlugin from 'vite-plugin-solid'; -import type { UserConfig } from 'vitest'; import baseConfig from '../../vite/vite.config'; export default { ...baseConfig, plugins: [solidPlugin({ hot: !process.env.VITEST })], test: { - // test exists, no idea why TS doesn't recognize it - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ...(baseConfig as UserConfig & { test: any }).test, + ...baseConfig.test, environment: 'jsdom', }, }; diff --git a/packages/solidstart/vite.config.ts b/packages/solidstart/vite.config.ts index 1dfe27d70c66..416c98e877b3 100644 --- a/packages/solidstart/vite.config.ts +++ b/packages/solidstart/vite.config.ts @@ -1,14 +1,11 @@ import solidPlugin from 'vite-plugin-solid'; -import type { UserConfig } from 'vitest'; import baseConfig from '../../vite/vite.config'; export default { ...baseConfig, plugins: [solidPlugin({ hot: !process.env.VITEST })], test: { - // test exists, no idea why TS doesn't recognize it - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ...(baseConfig as UserConfig & { test: any }).test, + ...baseConfig.test, environment: 'jsdom', }, }; diff --git a/packages/svelte/vite.config.ts b/packages/svelte/vite.config.ts index 50b07efd9b71..e9d974325af1 100644 --- a/packages/svelte/vite.config.ts +++ b/packages/svelte/vite.config.ts @@ -1,14 +1,11 @@ import { svelte } from '@sveltejs/vite-plugin-svelte'; -import type { UserConfig } from 'vitest'; import baseConfig from '../../vite/vite.config'; export default { ...baseConfig, plugins: [svelte({ hot: !process.env.VITEST })], test: { - // test exists, no idea why TS doesn't recognize it - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ...(baseConfig as UserConfig & { test: any }).test, + ...baseConfig.test, environment: 'jsdom', alias: [{ find: /^svelte$/, replacement: 'svelte/internal' }], }, diff --git a/packages/sveltekit/vite.config.ts b/packages/sveltekit/vite.config.ts index d6cbc4cce230..4f8ead0177f9 100644 --- a/packages/sveltekit/vite.config.ts +++ b/packages/sveltekit/vite.config.ts @@ -1,16 +1,12 @@ import { dirname, resolve } from 'path'; import { fileURLToPath } from 'url'; -import type { UserConfig } from 'vitest'; - import baseConfig from '../../vite/vite.config'; export default { ...baseConfig, test: { - // test exists, no idea why TS doesn't recognize it - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ...(baseConfig as UserConfig & { test: any }).test, + ...baseConfig.test, setupFiles: ['./test/vitest.setup.ts'], alias: [ { From 231fc006d3d2aeda38570ab606b1443197242751 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Fri, 19 Jul 2024 10:28:23 +0200 Subject: [PATCH 50/53] feat(express): Allow to pass options to `setupExpressErrorHandler` (#12952) Allows to pass this through to the underlying `expressErrorHandler`. See https://github.com/getsentry/sentry-javascript/discussions/12715#discussioncomment-9965427 --- .../setupExpressErrorHandler/server.js | 33 +++++++++++++++++++ .../express/setupExpressErrorHandler/test.ts | 30 +++++++++++++++++ .../express/tracing/withError/server.js | 2 +- .../node/src/integrations/tracing/express.ts | 19 +++++++---- 4 files changed, 76 insertions(+), 8 deletions(-) create mode 100644 dev-packages/node-integration-tests/suites/express/setupExpressErrorHandler/server.js create mode 100644 dev-packages/node-integration-tests/suites/express/setupExpressErrorHandler/test.ts diff --git a/dev-packages/node-integration-tests/suites/express/setupExpressErrorHandler/server.js b/dev-packages/node-integration-tests/suites/express/setupExpressErrorHandler/server.js new file mode 100644 index 000000000000..0e73923cf88a --- /dev/null +++ b/dev-packages/node-integration-tests/suites/express/setupExpressErrorHandler/server.js @@ -0,0 +1,33 @@ +const { loggingTransport } = require('@sentry-internal/node-integration-tests'); +const Sentry = require('@sentry/node'); + +Sentry.init({ + dsn: 'https://public@dsn.ingest.sentry.io/1337', + release: '1.0', + transport: loggingTransport, +}); + +// express must be required after Sentry is initialized +const express = require('express'); +const cors = require('cors'); +const { startExpressServerAndSendPortToRunner } = require('@sentry-internal/node-integration-tests'); + +const app = express(); + +app.use(cors()); + +app.get('/test1', (_req, _res) => { + throw new Error('error_1'); +}); + +app.get('/test2', (_req, _res) => { + throw new Error('error_2'); +}); + +Sentry.setupExpressErrorHandler(app, { + shouldHandleError: error => { + return error.message === 'error_2'; + }, +}); + +startExpressServerAndSendPortToRunner(app); diff --git a/dev-packages/node-integration-tests/suites/express/setupExpressErrorHandler/test.ts b/dev-packages/node-integration-tests/suites/express/setupExpressErrorHandler/test.ts new file mode 100644 index 000000000000..97ff6e3fa769 --- /dev/null +++ b/dev-packages/node-integration-tests/suites/express/setupExpressErrorHandler/test.ts @@ -0,0 +1,30 @@ +import { cleanupChildProcesses, createRunner } from '../../../utils/runner'; + +describe('express setupExpressErrorHandler', () => { + afterAll(() => { + cleanupChildProcesses(); + }); + + describe('CJS', () => { + test('allows to pass options to setupExpressErrorHandler', done => { + const runner = createRunner(__dirname, 'server.js') + .expect({ + event: { + exception: { + values: [ + { + value: 'error_2', + }, + ], + }, + }, + }) + .start(done); + + // this error is filtered & ignored + expect(() => runner.makeRequest('get', '/test1')).rejects.toThrow(); + // this error is actually captured + expect(() => runner.makeRequest('get', '/test2')).rejects.toThrow(); + }); + }); +}); diff --git a/dev-packages/node-integration-tests/suites/express/tracing/withError/server.js b/dev-packages/node-integration-tests/suites/express/tracing/withError/server.js index 3b45591ec4df..890d26cda044 100644 --- a/dev-packages/node-integration-tests/suites/express/tracing/withError/server.js +++ b/dev-packages/node-integration-tests/suites/express/tracing/withError/server.js @@ -20,7 +20,7 @@ const app = express(); app.use(cors()); app.get('/test/:id1/:id2', (_req, res) => { - Sentry.captureMessage(new Error('error_1')); + Sentry.captureException(new Error('error_1')); res.send('Success'); }); diff --git a/packages/node/src/integrations/tracing/express.ts b/packages/node/src/integrations/tracing/express.ts index 00c5735207d4..b8c50e0eb621 100644 --- a/packages/node/src/integrations/tracing/express.ts +++ b/packages/node/src/integrations/tracing/express.ts @@ -83,16 +83,18 @@ type ExpressMiddleware = ( next: (error: MiddlewareError) => void, ) => void; -/** - * An Express-compatible error handler. - */ -export function expressErrorHandler(options?: { +interface ExpressHandlerOptions { /** * Callback method deciding whether error should be captured and sent to Sentry * @param error Captured middleware error */ shouldHandleError?(this: void, error: MiddlewareError): boolean; -}): ExpressMiddleware { +} + +/** + * An Express-compatible error handler. + */ +export function expressErrorHandler(options?: ExpressHandlerOptions): ExpressMiddleware { return function sentryErrorMiddleware( error: MiddlewareError, _req: http.IncomingMessage, @@ -135,8 +137,11 @@ export function expressErrorHandler(options?: { * Setup an error handler for Express. * The error handler must be before any other middleware and after all controllers. */ -export function setupExpressErrorHandler(app: { use: (middleware: ExpressMiddleware) => unknown }): void { - app.use(expressErrorHandler()); +export function setupExpressErrorHandler( + app: { use: (middleware: ExpressMiddleware) => unknown }, + options?: ExpressHandlerOptions, +): void { + app.use(expressErrorHandler(options)); ensureIsWrapped(app.use, 'express'); } From 6e562ea618d44c7f3efe5832668d6db1a6babb00 Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Fri, 19 Jul 2024 10:29:32 +0200 Subject: [PATCH 51/53] meta(changelog): Update changelog for 8.19.0 --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f6617a2bcc0..68f09f7f8167 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ - fix(angular): Remove `afterSendEvent` listener once root injector is destroyed (#12786) - fix(browser): Fix bug causing unintentional dropping of transactions (#12933) - fix(feedback): Add a missing call of Actor.appendToDom method when DOMContentLoaded event is triggered (#12973) +- feat(vercel-edge): Add dedupe as default integration (#12957) +- fix(node): Pass inferred name & attributes to `tracesSampler` (#12945) +- feat(express): Allow to pass options to `setupExpressErrorHandler` (#12952) Work in this release was contributed by @jaspreet57 and @arturovt. Thank you for your contribution! From ebd7a92d67a5ea436dfcc9e93f088fc2e99d9d6f Mon Sep 17 00:00:00 2001 From: getsentry-bot Date: Fri, 19 Jul 2024 08:42:58 +0000 Subject: [PATCH 52/53] release: 8.19.0 --- .../browser-integration-tests/package.json | 4 ++-- .../bundle-analyzer-scenarios/package.json | 2 +- dev-packages/e2e-tests/package.json | 2 +- .../package.json | 2 +- .../node-integration-tests/package.json | 6 +++--- dev-packages/overhead-metrics/package.json | 2 +- dev-packages/rollup-utils/package.json | 2 +- dev-packages/size-limit-gh-action/package.json | 2 +- dev-packages/test-utils/package.json | 6 +++--- lerna.json | 2 +- packages/angular/package.json | 10 +++++----- packages/astro/package.json | 12 ++++++------ packages/aws-serverless/package.json | 10 +++++----- packages/browser-utils/package.json | 8 ++++---- packages/browser/package.json | 18 +++++++++--------- packages/bun/package.json | 12 ++++++------ packages/cloudflare/package.json | 8 ++++---- packages/core/package.json | 6 +++--- packages/deno/package.json | 8 ++++---- packages/ember/package.json | 10 +++++----- packages/eslint-config-sdk/package.json | 6 +++--- packages/eslint-plugin-sdk/package.json | 2 +- packages/feedback/package.json | 8 ++++---- packages/gatsby/package.json | 10 +++++----- packages/google-cloud-serverless/package.json | 10 +++++----- packages/integration-shims/package.json | 8 ++++---- packages/nestjs/package.json | 6 +++--- packages/nextjs/package.json | 16 ++++++++-------- packages/node/package.json | 10 +++++----- packages/nuxt/package.json | 16 ++++++++-------- packages/opentelemetry/package.json | 8 ++++---- packages/profiling-node/package.json | 10 +++++----- packages/react/package.json | 10 +++++----- packages/remix/package.json | 14 +++++++------- packages/replay-canvas/package.json | 10 +++++----- packages/replay-internal/package.json | 12 ++++++------ packages/replay-worker/package.json | 2 +- packages/solid/package.json | 10 +++++----- packages/solidstart/package.json | 14 +++++++------- packages/svelte/package.json | 10 +++++----- packages/sveltekit/package.json | 14 +++++++------- packages/types/package.json | 2 +- packages/typescript/package.json | 2 +- packages/utils/package.json | 4 ++-- packages/utils/src/version.ts | 2 +- packages/vercel-edge/package.json | 8 ++++---- packages/vue/package.json | 10 +++++----- packages/wasm/package.json | 10 +++++----- 48 files changed, 188 insertions(+), 188 deletions(-) diff --git a/dev-packages/browser-integration-tests/package.json b/dev-packages/browser-integration-tests/package.json index c575f75c88b3..4cb7a1e07cbd 100644 --- a/dev-packages/browser-integration-tests/package.json +++ b/dev-packages/browser-integration-tests/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/browser-integration-tests", - "version": "8.18.0", + "version": "8.19.0", "main": "index.js", "license": "MIT", "engines": { @@ -43,7 +43,7 @@ "@babel/preset-typescript": "^7.16.7", "@playwright/test": "^1.44.1", "@sentry-internal/rrweb": "2.11.0", - "@sentry/browser": "8.18.0", + "@sentry/browser": "8.19.0", "axios": "1.6.7", "babel-loader": "^8.2.2", "html-webpack-plugin": "^5.5.0", diff --git a/dev-packages/bundle-analyzer-scenarios/package.json b/dev-packages/bundle-analyzer-scenarios/package.json index 071bae35d7ae..f090d068b784 100644 --- a/dev-packages/bundle-analyzer-scenarios/package.json +++ b/dev-packages/bundle-analyzer-scenarios/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/bundle-analyzer-scenarios", - "version": "8.18.0", + "version": "8.19.0", "description": "Scenarios to test bundle analysis with", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/dev-packages/bundle-analyzer-scenarios", diff --git a/dev-packages/e2e-tests/package.json b/dev-packages/e2e-tests/package.json index 3be47b27a0ea..3c78e08e2e06 100644 --- a/dev-packages/e2e-tests/package.json +++ b/dev-packages/e2e-tests/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/e2e-tests", - "version": "8.18.0", + "version": "8.19.0", "license": "MIT", "private": true, "scripts": { diff --git a/dev-packages/external-contributor-gh-action/package.json b/dev-packages/external-contributor-gh-action/package.json index f541b62433da..d8b2261eeae0 100644 --- a/dev-packages/external-contributor-gh-action/package.json +++ b/dev-packages/external-contributor-gh-action/package.json @@ -1,7 +1,7 @@ { "name": "@sentry-internal/external-contributor-gh-action", "description": "An internal Github Action to add external contributors to the CHANGELOG.md file.", - "version": "8.18.0", + "version": "8.19.0", "license": "MIT", "engines": { "node": ">=18" diff --git a/dev-packages/node-integration-tests/package.json b/dev-packages/node-integration-tests/package.json index e3f569427a41..e77ad1a2f1e4 100644 --- a/dev-packages/node-integration-tests/package.json +++ b/dev-packages/node-integration-tests/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/node-integration-tests", - "version": "8.18.0", + "version": "8.19.0", "license": "MIT", "engines": { "node": ">=14.18" @@ -31,8 +31,8 @@ "@nestjs/core": "^10.3.3", "@nestjs/platform-express": "^10.3.3", "@prisma/client": "5.9.1", - "@sentry/node": "8.18.0", - "@sentry/types": "8.18.0", + "@sentry/node": "8.19.0", + "@sentry/types": "8.19.0", "@types/mongodb": "^3.6.20", "@types/mysql": "^2.15.21", "@types/pg": "^8.6.5", diff --git a/dev-packages/overhead-metrics/package.json b/dev-packages/overhead-metrics/package.json index 3c87ec7f50cf..988f275170b5 100644 --- a/dev-packages/overhead-metrics/package.json +++ b/dev-packages/overhead-metrics/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "8.18.0", + "version": "8.19.0", "name": "@sentry-internal/overhead-metrics", "main": "index.js", "author": "Sentry", diff --git a/dev-packages/rollup-utils/package.json b/dev-packages/rollup-utils/package.json index 16a3ef4a4461..89eb152fd743 100644 --- a/dev-packages/rollup-utils/package.json +++ b/dev-packages/rollup-utils/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/rollup-utils", - "version": "8.18.0", + "version": "8.19.0", "description": "Rollup utilities used at Sentry for the Sentry JavaScript SDK", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/rollup-utils", diff --git a/dev-packages/size-limit-gh-action/package.json b/dev-packages/size-limit-gh-action/package.json index ceadc99f4933..a5986c8e5f33 100644 --- a/dev-packages/size-limit-gh-action/package.json +++ b/dev-packages/size-limit-gh-action/package.json @@ -1,7 +1,7 @@ { "name": "@sentry-internal/size-limit-gh-action", "description": "An internal Github Action to compare the current size of a PR against the one on develop.", - "version": "8.18.0", + "version": "8.19.0", "license": "MIT", "engines": { "node": ">=18" diff --git a/dev-packages/test-utils/package.json b/dev-packages/test-utils/package.json index 6a2e3207217d..8d6afc2613d4 100644 --- a/dev-packages/test-utils/package.json +++ b/dev-packages/test-utils/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "8.18.0", + "version": "8.19.0", "name": "@sentry-internal/test-utils", "author": "Sentry", "license": "MIT", @@ -45,8 +45,8 @@ }, "devDependencies": { "@playwright/test": "^1.44.1", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0" + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0" }, "volta": { "extends": "../../package.json" diff --git a/lerna.json b/lerna.json index fb0c3e961499..bde24337b737 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "version": "8.18.0", + "version": "8.19.0", "npmClient": "yarn" } diff --git a/packages/angular/package.json b/packages/angular/package.json index 5a6e8918a255..2b06c3d1aa44 100644 --- a/packages/angular/package.json +++ b/packages/angular/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/angular", - "version": "8.18.0", + "version": "8.19.0", "description": "Official Sentry SDK for Angular", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/angular", @@ -21,10 +21,10 @@ "rxjs": "^6.5.5 || ^7.x" }, "dependencies": { - "@sentry/browser": "8.18.0", - "@sentry/core": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0", + "@sentry/browser": "8.19.0", + "@sentry/core": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0", "tslib": "^2.4.1" }, "devDependencies": { diff --git a/packages/astro/package.json b/packages/astro/package.json index dff9e897c785..4a9d9b2d0ac3 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/astro", - "version": "8.18.0", + "version": "8.19.0", "description": "Official Sentry SDK for Astro", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/astro", @@ -56,11 +56,11 @@ "astro": ">=3.x || >=4.0.0-beta" }, "dependencies": { - "@sentry/browser": "8.18.0", - "@sentry/core": "8.18.0", - "@sentry/node": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0", + "@sentry/browser": "8.19.0", + "@sentry/core": "8.19.0", + "@sentry/node": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0", "@sentry/vite-plugin": "^2.20.1" }, "devDependencies": { diff --git a/packages/aws-serverless/package.json b/packages/aws-serverless/package.json index 9d89e4f2a327..ca5a135a485d 100644 --- a/packages/aws-serverless/package.json +++ b/packages/aws-serverless/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/aws-serverless", - "version": "8.18.0", + "version": "8.19.0", "description": "Official Sentry SDK for AWS Lambda and AWS Serverless Environments", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/serverless", @@ -66,10 +66,10 @@ "dependencies": { "@opentelemetry/instrumentation-aws-lambda": "0.43.0", "@opentelemetry/instrumentation-aws-sdk": "0.43.0", - "@sentry/core": "8.18.0", - "@sentry/node": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0", + "@sentry/core": "8.19.0", + "@sentry/node": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0", "@types/aws-lambda": "^8.10.62" }, "devDependencies": { diff --git a/packages/browser-utils/package.json b/packages/browser-utils/package.json index 7b24398d2c79..4381147e79f4 100644 --- a/packages/browser-utils/package.json +++ b/packages/browser-utils/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/browser-utils", - "version": "8.18.0", + "version": "8.19.0", "description": "Browser Utilities for all Sentry JavaScript SDKs", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/browser-utils", @@ -39,9 +39,9 @@ "access": "public" }, "dependencies": { - "@sentry/core": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0" + "@sentry/core": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0" }, "scripts": { "build": "run-p build:transpile build:types", diff --git a/packages/browser/package.json b/packages/browser/package.json index 26daf728372b..08d463d64501 100644 --- a/packages/browser/package.json +++ b/packages/browser/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/browser", - "version": "8.18.0", + "version": "8.19.0", "description": "Official Sentry SDK for browsers", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/browser", @@ -39,16 +39,16 @@ "access": "public" }, "dependencies": { - "@sentry-internal/browser-utils": "8.18.0", - "@sentry-internal/feedback": "8.18.0", - "@sentry-internal/replay": "8.18.0", - "@sentry-internal/replay-canvas": "8.18.0", - "@sentry/core": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0" + "@sentry-internal/browser-utils": "8.19.0", + "@sentry-internal/feedback": "8.19.0", + "@sentry-internal/replay": "8.19.0", + "@sentry-internal/replay-canvas": "8.19.0", + "@sentry/core": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0" }, "devDependencies": { - "@sentry-internal/integration-shims": "8.18.0", + "@sentry-internal/integration-shims": "8.19.0", "fake-indexeddb": "^4.0.1" }, "scripts": { diff --git a/packages/bun/package.json b/packages/bun/package.json index 5e276d268fe8..27cb94191232 100644 --- a/packages/bun/package.json +++ b/packages/bun/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/bun", - "version": "8.18.0", + "version": "8.19.0", "description": "Official Sentry SDK for bun", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/bun", @@ -39,11 +39,11 @@ "access": "public" }, "dependencies": { - "@sentry/core": "8.18.0", - "@sentry/node": "8.18.0", - "@sentry/opentelemetry": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0" + "@sentry/core": "8.19.0", + "@sentry/node": "8.19.0", + "@sentry/opentelemetry": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0" }, "devDependencies": { "bun-types": "latest" diff --git a/packages/cloudflare/package.json b/packages/cloudflare/package.json index db4d281833af..188e7ce38402 100644 --- a/packages/cloudflare/package.json +++ b/packages/cloudflare/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/cloudflare", - "version": "8.18.0", + "version": "8.19.0", "description": "Offical Sentry SDK for Cloudflare Workers and Pages", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/cloudflare", @@ -39,9 +39,9 @@ "access": "public" }, "dependencies": { - "@sentry/core": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0" + "@sentry/core": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0" }, "devDependencies": { "@cloudflare/workers-types": "^4.20240712.0", diff --git a/packages/core/package.json b/packages/core/package.json index eb650843a1fb..4c0b5d8bb802 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/core", - "version": "8.18.0", + "version": "8.19.0", "description": "Base implementation for all Sentry JavaScript SDKs", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/core", @@ -39,8 +39,8 @@ "access": "public" }, "dependencies": { - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0" + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0" }, "scripts": { "build": "run-p build:transpile build:types", diff --git a/packages/deno/package.json b/packages/deno/package.json index 70dbcc347930..449c852eaca6 100644 --- a/packages/deno/package.json +++ b/packages/deno/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/deno", - "version": "8.18.0", + "version": "8.19.0", "description": "Official Sentry SDK for Deno", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/deno", @@ -24,9 +24,9 @@ "/build" ], "dependencies": { - "@sentry/core": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0" + "@sentry/core": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0" }, "devDependencies": { "@rollup/plugin-typescript": "^11.1.5", diff --git a/packages/ember/package.json b/packages/ember/package.json index 96f1e63ddd28..6dfe4b307d0d 100644 --- a/packages/ember/package.json +++ b/packages/ember/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/ember", - "version": "8.18.0", + "version": "8.19.0", "description": "Official Sentry SDK for Ember.js", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/ember", @@ -33,10 +33,10 @@ "dependencies": { "@babel/core": "^7.24.4", "@embroider/macros": "^1.16.0", - "@sentry/browser": "8.18.0", - "@sentry/core": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0", + "@sentry/browser": "8.19.0", + "@sentry/core": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0", "ember-auto-import": "^2.7.2", "ember-cli-babel": "^8.2.0", "ember-cli-htmlbars": "^6.1.1", diff --git a/packages/eslint-config-sdk/package.json b/packages/eslint-config-sdk/package.json index d5c47cb33f66..6b0eea6b3cf2 100644 --- a/packages/eslint-config-sdk/package.json +++ b/packages/eslint-config-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/eslint-config-sdk", - "version": "8.18.0", + "version": "8.19.0", "description": "Official Sentry SDK eslint config", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/eslint-config-sdk", @@ -22,8 +22,8 @@ "access": "public" }, "dependencies": { - "@sentry-internal/eslint-plugin-sdk": "8.18.0", - "@sentry-internal/typescript": "8.18.0", + "@sentry-internal/eslint-plugin-sdk": "8.19.0", + "@sentry-internal/typescript": "8.19.0", "@typescript-eslint/eslint-plugin": "^5.48.0", "@typescript-eslint/parser": "^5.48.0", "eslint-config-prettier": "^6.11.0", diff --git a/packages/eslint-plugin-sdk/package.json b/packages/eslint-plugin-sdk/package.json index 0e23f0cda1ca..17b7dc2deee9 100644 --- a/packages/eslint-plugin-sdk/package.json +++ b/packages/eslint-plugin-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/eslint-plugin-sdk", - "version": "8.18.0", + "version": "8.19.0", "description": "Official Sentry SDK eslint plugin", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/eslint-plugin-sdk", diff --git a/packages/feedback/package.json b/packages/feedback/package.json index 1eaec6eb4225..bf46c6b8d364 100644 --- a/packages/feedback/package.json +++ b/packages/feedback/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/feedback", - "version": "8.18.0", + "version": "8.19.0", "description": "Sentry SDK integration for user feedback", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/feedback", @@ -39,9 +39,9 @@ "access": "public" }, "dependencies": { - "@sentry/core": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0" + "@sentry/core": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0" }, "devDependencies": { "preact": "^10.19.4" diff --git a/packages/gatsby/package.json b/packages/gatsby/package.json index 84da430bc18b..d4c78868b547 100644 --- a/packages/gatsby/package.json +++ b/packages/gatsby/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/gatsby", - "version": "8.18.0", + "version": "8.19.0", "description": "Official Sentry SDK for Gatsby.js", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/gatsby", @@ -45,10 +45,10 @@ "access": "public" }, "dependencies": { - "@sentry/core": "8.18.0", - "@sentry/react": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0", + "@sentry/core": "8.19.0", + "@sentry/react": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0", "@sentry/webpack-plugin": "2.16.0" }, "peerDependencies": { diff --git a/packages/google-cloud-serverless/package.json b/packages/google-cloud-serverless/package.json index 7d4d95f230ce..49efb31396be 100644 --- a/packages/google-cloud-serverless/package.json +++ b/packages/google-cloud-serverless/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/google-cloud-serverless", - "version": "8.18.0", + "version": "8.19.0", "description": "Official Sentry SDK for Google Cloud Functions", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/google-cloud", @@ -48,10 +48,10 @@ "access": "public" }, "dependencies": { - "@sentry/core": "8.18.0", - "@sentry/node": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0", + "@sentry/core": "8.19.0", + "@sentry/node": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0", "@types/express": "^4.17.14" }, "devDependencies": { diff --git a/packages/integration-shims/package.json b/packages/integration-shims/package.json index 1ce32c40c32d..1b2c0e589c17 100644 --- a/packages/integration-shims/package.json +++ b/packages/integration-shims/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/integration-shims", - "version": "8.18.0", + "version": "8.19.0", "description": "Shims for integrations in Sentry SDK.", "main": "build/cjs/index.js", "module": "build/esm/index.js", @@ -55,9 +55,9 @@ "url": "https://github.com/getsentry/sentry-javascript/issues" }, "dependencies": { - "@sentry/core": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0" + "@sentry/core": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0" }, "engines": { "node": ">=14.18" diff --git a/packages/nestjs/package.json b/packages/nestjs/package.json index ba00995126be..7a8de8e14c47 100644 --- a/packages/nestjs/package.json +++ b/packages/nestjs/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/nestjs", - "version": "8.18.0", + "version": "8.19.0", "description": "Official Sentry SDK for NestJS", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/nestjs", @@ -39,8 +39,8 @@ "access": "public" }, "dependencies": { - "@sentry/core": "8.18.0", - "@sentry/node": "8.18.0" + "@sentry/core": "8.19.0", + "@sentry/node": "8.19.0" }, "scripts": { "build": "run-p build:transpile build:types", diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index 7685bbfb5f8d..18a6d5193d06 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/nextjs", - "version": "8.18.0", + "version": "8.19.0", "description": "Official Sentry SDK for Next.js", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/nextjs", @@ -71,13 +71,13 @@ "@opentelemetry/instrumentation-http": "0.52.1", "@opentelemetry/semantic-conventions": "^1.25.1", "@rollup/plugin-commonjs": "26.0.1", - "@sentry/core": "8.18.0", - "@sentry/node": "8.18.0", - "@sentry/opentelemetry": "8.18.0", - "@sentry/react": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0", - "@sentry/vercel-edge": "8.18.0", + "@sentry/core": "8.19.0", + "@sentry/node": "8.19.0", + "@sentry/opentelemetry": "8.19.0", + "@sentry/react": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0", + "@sentry/vercel-edge": "8.19.0", "@sentry/webpack-plugin": "2.20.1", "chalk": "3.0.0", "resolve": "1.22.8", diff --git a/packages/node/package.json b/packages/node/package.json index 68dec88cf54c..2ef2e1499b9c 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/node", - "version": "8.18.0", + "version": "8.19.0", "description": "Sentry Node SDK using OpenTelemetry for performance instrumentation", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/node", @@ -88,10 +88,10 @@ "@opentelemetry/sdk-trace-base": "^1.25.1", "@opentelemetry/semantic-conventions": "^1.25.1", "@prisma/instrumentation": "5.17.0", - "@sentry/core": "8.18.0", - "@sentry/opentelemetry": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0" + "@sentry/core": "8.19.0", + "@sentry/opentelemetry": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0" }, "devDependencies": { "@types/node": "^14.18.0" diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index e72d20fc91de..d1e3149a0ec9 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/nuxt", - "version": "8.18.0", + "version": "8.19.0", "description": "Official Sentry SDK for Nuxt (EXPERIMENTAL)", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/nuxt", @@ -43,14 +43,14 @@ }, "dependencies": { "@nuxt/kit": "^3.12.2", - "@sentry/browser": "8.18.0", - "@sentry/core": "8.18.0", - "@sentry/node": "8.18.0", - "@sentry/opentelemetry": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0", + "@sentry/browser": "8.19.0", + "@sentry/core": "8.19.0", + "@sentry/node": "8.19.0", + "@sentry/opentelemetry": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0", "@sentry/vite-plugin": "2.20.1", - "@sentry/vue": "8.18.0" + "@sentry/vue": "8.19.0" }, "devDependencies": { "@nuxt/module-builder": "0.8.0", diff --git a/packages/opentelemetry/package.json b/packages/opentelemetry/package.json index 181501ec7820..fdf6f880a30e 100644 --- a/packages/opentelemetry/package.json +++ b/packages/opentelemetry/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/opentelemetry", - "version": "8.18.0", + "version": "8.19.0", "description": "Official Sentry utilities for OpenTelemetry", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/opentelemetry", @@ -39,9 +39,9 @@ "access": "public" }, "dependencies": { - "@sentry/core": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0" + "@sentry/core": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0" }, "peerDependencies": { "@opentelemetry/api": "^1.9.0", diff --git a/packages/profiling-node/package.json b/packages/profiling-node/package.json index 6c850cd4c426..baa199bb3fd0 100644 --- a/packages/profiling-node/package.json +++ b/packages/profiling-node/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/profiling-node", - "version": "8.18.0", + "version": "8.19.0", "description": "Official Sentry SDK for Node.js Profiling", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/profiling-node", @@ -75,10 +75,10 @@ "test": "cross-env SENTRY_PROFILER_BINARY_DIR=lib jest --config jest.config.js" }, "dependencies": { - "@sentry/core": "8.18.0", - "@sentry/node": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0", + "@sentry/core": "8.19.0", + "@sentry/node": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0", "detect-libc": "^2.0.2", "node-abi": "^3.61.0" }, diff --git a/packages/react/package.json b/packages/react/package.json index 42a364179340..6085314da635 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/react", - "version": "8.18.0", + "version": "8.19.0", "description": "Official Sentry SDK for React.js", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/react", @@ -39,10 +39,10 @@ "access": "public" }, "dependencies": { - "@sentry/browser": "8.18.0", - "@sentry/core": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0", + "@sentry/browser": "8.19.0", + "@sentry/core": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0", "hoist-non-react-statics": "^3.3.2" }, "peerDependencies": { diff --git a/packages/remix/package.json b/packages/remix/package.json index 7fb23dbce78d..e8717de83bd9 100644 --- a/packages/remix/package.json +++ b/packages/remix/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/remix", - "version": "8.18.0", + "version": "8.19.0", "description": "Official Sentry SDK for Remix", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/remix", @@ -55,12 +55,12 @@ "@opentelemetry/instrumentation-http": "0.52.1", "@remix-run/router": "1.x", "@sentry/cli": "^2.32.2", - "@sentry/core": "8.18.0", - "@sentry/node": "8.18.0", - "@sentry/opentelemetry": "8.18.0", - "@sentry/react": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0", + "@sentry/core": "8.19.0", + "@sentry/node": "8.19.0", + "@sentry/opentelemetry": "8.19.0", + "@sentry/react": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0", "glob": "^10.3.4", "opentelemetry-instrumentation-remix": "0.7.1", "yargs": "^17.6.0" diff --git a/packages/replay-canvas/package.json b/packages/replay-canvas/package.json index 014342ac2482..3000152d0fea 100644 --- a/packages/replay-canvas/package.json +++ b/packages/replay-canvas/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/replay-canvas", - "version": "8.18.0", + "version": "8.19.0", "description": "Replay canvas integration", "main": "build/npm/cjs/index.js", "module": "build/npm/esm/index.js", @@ -68,10 +68,10 @@ "@sentry-internal/rrweb": "2.25.0" }, "dependencies": { - "@sentry-internal/replay": "8.18.0", - "@sentry/core": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0" + "@sentry-internal/replay": "8.19.0", + "@sentry/core": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0" }, "engines": { "node": ">=14.18" diff --git a/packages/replay-internal/package.json b/packages/replay-internal/package.json index 38dc581d0353..3eb9bfe4d5d7 100644 --- a/packages/replay-internal/package.json +++ b/packages/replay-internal/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/replay", - "version": "8.18.0", + "version": "8.19.0", "description": "User replays for Sentry", "main": "build/npm/cjs/index.js", "module": "build/npm/esm/index.js", @@ -68,7 +68,7 @@ "homepage": "https://docs.sentry.io/platforms/javascript/session-replay/", "devDependencies": { "@babel/core": "^7.17.5", - "@sentry-internal/replay-worker": "8.18.0", + "@sentry-internal/replay-worker": "8.19.0", "@sentry-internal/rrweb": "2.25.0", "@sentry-internal/rrweb-snapshot": "2.25.0", "fflate": "^0.8.1", @@ -76,10 +76,10 @@ "jsdom-worker": "^0.2.1" }, "dependencies": { - "@sentry-internal/browser-utils": "8.18.0", - "@sentry/core": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0" + "@sentry-internal/browser-utils": "8.19.0", + "@sentry/core": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0" }, "engines": { "node": ">=14.18" diff --git a/packages/replay-worker/package.json b/packages/replay-worker/package.json index 597e44329f33..946c9240162b 100644 --- a/packages/replay-worker/package.json +++ b/packages/replay-worker/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/replay-worker", - "version": "8.18.0", + "version": "8.19.0", "description": "Worker for @sentry-internal/replay", "main": "build/esm/index.js", "module": "build/esm/index.js", diff --git a/packages/solid/package.json b/packages/solid/package.json index 1c7a44d14d00..e33a4ac3ebe6 100644 --- a/packages/solid/package.json +++ b/packages/solid/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/solid", - "version": "8.18.0", + "version": "8.19.0", "description": "Official Sentry SDK for Solid", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/solid", @@ -44,10 +44,10 @@ "access": "public" }, "dependencies": { - "@sentry/browser": "8.18.0", - "@sentry/core": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0" + "@sentry/browser": "8.19.0", + "@sentry/core": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0" }, "peerDependencies": { "@solidjs/router": "^0.13.4", diff --git a/packages/solidstart/package.json b/packages/solidstart/package.json index 962dff72965e..3de651097c15 100644 --- a/packages/solidstart/package.json +++ b/packages/solidstart/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/solidstart", - "version": "8.18.0", + "version": "8.19.0", "description": "Official Sentry SDK for Solid Start", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/solidstart", @@ -66,12 +66,12 @@ } }, "dependencies": { - "@sentry/core": "8.18.0", - "@sentry/node": "8.18.0", - "@sentry/opentelemetry": "8.18.0", - "@sentry/solid": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0", + "@sentry/core": "8.19.0", + "@sentry/node": "8.19.0", + "@sentry/opentelemetry": "8.19.0", + "@sentry/solid": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0", "@sentry/vite-plugin": "2.19.0" }, "devDependencies": { diff --git a/packages/svelte/package.json b/packages/svelte/package.json index e1a50af38a64..7c840131a3b0 100644 --- a/packages/svelte/package.json +++ b/packages/svelte/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/svelte", - "version": "8.18.0", + "version": "8.19.0", "description": "Official Sentry SDK for Svelte", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/svelte", @@ -39,10 +39,10 @@ "access": "public" }, "dependencies": { - "@sentry/browser": "8.18.0", - "@sentry/core": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0", + "@sentry/browser": "8.19.0", + "@sentry/core": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0", "magic-string": "^0.30.0" }, "peerDependencies": { diff --git a/packages/sveltekit/package.json b/packages/sveltekit/package.json index 373f2c5503b1..8c31b2b32140 100644 --- a/packages/sveltekit/package.json +++ b/packages/sveltekit/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/sveltekit", - "version": "8.18.0", + "version": "8.19.0", "description": "Official Sentry SDK for SvelteKit", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/sveltekit", @@ -40,12 +40,12 @@ } }, "dependencies": { - "@sentry/core": "8.18.0", - "@sentry/node": "8.18.0", - "@sentry/opentelemetry": "8.18.0", - "@sentry/svelte": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0", + "@sentry/core": "8.19.0", + "@sentry/node": "8.19.0", + "@sentry/opentelemetry": "8.19.0", + "@sentry/svelte": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0", "@sentry/vite-plugin": "2.20.1", "magic-string": "0.30.7", "magicast": "0.2.8", diff --git a/packages/types/package.json b/packages/types/package.json index 968639b72d5e..736e6e8f2cae 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/types", - "version": "8.18.0", + "version": "8.19.0", "description": "Types for all Sentry JavaScript SDKs", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/types", diff --git a/packages/typescript/package.json b/packages/typescript/package.json index c9f3af3f1769..105f78d2e25a 100644 --- a/packages/typescript/package.json +++ b/packages/typescript/package.json @@ -1,6 +1,6 @@ { "name": "@sentry-internal/typescript", - "version": "8.18.0", + "version": "8.19.0", "description": "Typescript configuration used at Sentry", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/typescript", diff --git a/packages/utils/package.json b/packages/utils/package.json index 0c3fcbbd5865..70e1fcc3dd6d 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/utils", - "version": "8.18.0", + "version": "8.19.0", "description": "Utilities for all Sentry JavaScript SDKs", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/utils", @@ -39,7 +39,7 @@ "access": "public" }, "dependencies": { - "@sentry/types": "8.18.0" + "@sentry/types": "8.19.0" }, "devDependencies": { "@types/array.prototype.flat": "^1.2.1", diff --git a/packages/utils/src/version.ts b/packages/utils/src/version.ts index d0c41d3c905b..ba1c4af75db5 100644 --- a/packages/utils/src/version.ts +++ b/packages/utils/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = '8.18.0'; +export const SDK_VERSION = '8.19.0'; diff --git a/packages/vercel-edge/package.json b/packages/vercel-edge/package.json index f9dbdc7789e9..8ea5dd2e7d6c 100644 --- a/packages/vercel-edge/package.json +++ b/packages/vercel-edge/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/vercel-edge", - "version": "8.18.0", + "version": "8.19.0", "description": "Offical Sentry SDK for the Vercel Edge Runtime", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/vercel-edge", @@ -39,9 +39,9 @@ "access": "public" }, "dependencies": { - "@sentry/core": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0" + "@sentry/core": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0" }, "devDependencies": { "@edge-runtime/types": "3.0.1" diff --git a/packages/vue/package.json b/packages/vue/package.json index 76ae5cf9a90a..ddbd4ba2423f 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/vue", - "version": "8.18.0", + "version": "8.19.0", "description": "Official Sentry SDK for Vue.js", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/vue", @@ -39,10 +39,10 @@ "access": "public" }, "dependencies": { - "@sentry/browser": "8.18.0", - "@sentry/core": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0" + "@sentry/browser": "8.19.0", + "@sentry/core": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0" }, "peerDependencies": { "vue": "2.x || 3.x" diff --git a/packages/wasm/package.json b/packages/wasm/package.json index c1e36fd79a02..65cf761393b4 100644 --- a/packages/wasm/package.json +++ b/packages/wasm/package.json @@ -1,6 +1,6 @@ { "name": "@sentry/wasm", - "version": "8.18.0", + "version": "8.19.0", "description": "Support for WASM.", "repository": "git://github.com/getsentry/sentry-javascript.git", "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/wasm", @@ -39,10 +39,10 @@ "access": "public" }, "dependencies": { - "@sentry/browser": "8.18.0", - "@sentry/core": "8.18.0", - "@sentry/types": "8.18.0", - "@sentry/utils": "8.18.0" + "@sentry/browser": "8.19.0", + "@sentry/core": "8.19.0", + "@sentry/types": "8.19.0", + "@sentry/utils": "8.19.0" }, "scripts": { "build": "run-p build:transpile build:bundle build:types", From a49b2b9754b4576dbe40cbd9bed508029bb00263 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Fri, 19 Jul 2024 11:22:59 +0200 Subject: [PATCH 53/53] chore(repo): Add internal blank issue template (#12986) With the new issues UI (beta), our previous way of skipping issue templates for internally created issues doesn't work anymore. So we add a new template that essentially mimics a blank issue. --- .github/ISSUE_TEMPLATE/internal.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/internal.yml diff --git a/.github/ISSUE_TEMPLATE/internal.yml b/.github/ISSUE_TEMPLATE/internal.yml new file mode 100644 index 000000000000..bd5b1d1f1970 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/internal.yml @@ -0,0 +1,9 @@ +name: 💡 [Internal] Blank Issue +description: Only for Sentry Employees! Create an issue without a template. +body: + - type: textarea + id: description + attributes: + label: Description + validations: + required: true