diff --git a/.craft.yml b/.craft.yml index 66fc8fca329c..2ee55c49d35d 100644 --- a/.craft.yml +++ b/.craft.yml @@ -97,6 +97,9 @@ targets: - name: npm id: '@sentry/bun' includeNames: /^sentry-bun-\d.*\.tgz$/ + - name: npm + id: '@sentry/nestjs' + includeNames: /^sentry-nestjs-\d.*\.tgz$/ ## 6. Fullstack/Meta Frameworks (depending on Node and Browser or Framework SDKs) - name: npm diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c8505ab3a022..445c57284056 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1067,7 +1067,7 @@ jobs: 'generic-ts3.8', 'node-fastify', 'node-hapi', - 'node-nestjs', + 'nestjs', 'node-exports-test-app', 'node-koa', 'node-connect', diff --git a/.size-limit.js b/.size-limit.js index ac2b8591254a..636b9c64413a 100644 --- a/.size-limit.js +++ b/.size-limit.js @@ -211,7 +211,7 @@ module.exports = [ import: createImport('init'), ignore: [...builtinModules, ...nodePrefixedBuiltinModules], gzip: true, - limit: '135 KB', + limit: '140 KB', }, { name: '@sentry/node - without tracing', @@ -237,7 +237,7 @@ module.exports = [ import: createImport('init'), ignore: [...builtinModules, ...nodePrefixedBuiltinModules], gzip: true, - limit: '125 KB', + limit: '130 KB', }, ]; diff --git a/CHANGELOG.md b/CHANGELOG.md index 027b13f56901..46cc4f96f2c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,23 @@ - "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott +## 8.13.0 + +### Important Changes + +- **feat(nestjs): Add Nest SDK** This release adds a dedicated SDK for [NestJS](https://nestjs.com/) (`@sentry/nestjs`) + in alpha state. The SDK is a drop-in replacement for the Sentry Node SDK (`@sentry/node`) supporting the same set of + features. See the [docs](https://docs.sentry.io/platforms/javascript/guides/nestjs/) for how to use the SDK. + +### Other Changes + +- deps: Bump bundler plugins to `2.20.1` (#12641) +- deps(nextjs): Remove react peer dep and allow rc (#12670) +- feat: Update OTEL deps (#12635) +- feat(deps): bump @prisma/instrumentation from 5.15.0 to 5.15.1 (#12627) +- feat(node): Add context info for missing instrumentation (#12639) +- fix(feedback): Improve feedback error message (#12647) + ## 8.12.0 ### Important Changes diff --git a/README.md b/README.md index 2836512119cb..e032726dc221 100644 --- a/README.md +++ b/README.md @@ -118,3 +118,11 @@ Our program is currently running on an invitation basis. If you're interested in to security@sentry.io and tell us, that you are interested in auditing this repository. For more details, please have a look at https://sentry.io/security/#vulnerability-disclosure. + +## Contributors + +Thanks to everyone who contributed to the Sentry JavaScript SDK! + + + + diff --git a/dev-packages/e2e-tests/test-applications/node-nestjs/.gitignore b/dev-packages/e2e-tests/test-applications/nestjs/.gitignore similarity index 100% rename from dev-packages/e2e-tests/test-applications/node-nestjs/.gitignore rename to dev-packages/e2e-tests/test-applications/nestjs/.gitignore diff --git a/dev-packages/e2e-tests/test-applications/node-nestjs/.npmrc b/dev-packages/e2e-tests/test-applications/nestjs/.npmrc similarity index 100% rename from dev-packages/e2e-tests/test-applications/node-nestjs/.npmrc rename to dev-packages/e2e-tests/test-applications/nestjs/.npmrc diff --git a/dev-packages/e2e-tests/test-applications/node-nestjs/nest-cli.json b/dev-packages/e2e-tests/test-applications/nestjs/nest-cli.json similarity index 100% rename from dev-packages/e2e-tests/test-applications/node-nestjs/nest-cli.json rename to dev-packages/e2e-tests/test-applications/nestjs/nest-cli.json diff --git a/dev-packages/e2e-tests/test-applications/node-nestjs/package.json b/dev-packages/e2e-tests/test-applications/nestjs/package.json similarity index 95% rename from dev-packages/e2e-tests/test-applications/node-nestjs/package.json rename to dev-packages/e2e-tests/test-applications/nestjs/package.json index c21b312d1c13..6ad2576fc3cc 100644 --- a/dev-packages/e2e-tests/test-applications/node-nestjs/package.json +++ b/dev-packages/e2e-tests/test-applications/nestjs/package.json @@ -1,5 +1,5 @@ { - "name": "node-nestjs", + "name": "nestjs", "version": "0.0.1", "private": true, "scripts": { @@ -18,7 +18,7 @@ "@nestjs/common": "^10.0.0", "@nestjs/core": "^10.0.0", "@nestjs/platform-express": "^10.0.0", - "@sentry/node": "latest || *", + "@sentry/nestjs": "latest || *", "@sentry/types": "latest || *", "reflect-metadata": "^0.2.0", "rxjs": "^7.8.1" diff --git a/dev-packages/e2e-tests/test-applications/node-nestjs/playwright.config.mjs b/dev-packages/e2e-tests/test-applications/nestjs/playwright.config.mjs similarity index 100% rename from dev-packages/e2e-tests/test-applications/node-nestjs/playwright.config.mjs rename to dev-packages/e2e-tests/test-applications/nestjs/playwright.config.mjs diff --git a/dev-packages/e2e-tests/test-applications/node-nestjs/src/app.controller.ts b/dev-packages/e2e-tests/test-applications/nestjs/src/app.controller.ts similarity index 100% rename from dev-packages/e2e-tests/test-applications/node-nestjs/src/app.controller.ts rename to dev-packages/e2e-tests/test-applications/nestjs/src/app.controller.ts diff --git a/dev-packages/e2e-tests/test-applications/node-nestjs/src/app.module.ts b/dev-packages/e2e-tests/test-applications/nestjs/src/app.module.ts similarity index 100% rename from dev-packages/e2e-tests/test-applications/node-nestjs/src/app.module.ts rename to dev-packages/e2e-tests/test-applications/nestjs/src/app.module.ts diff --git a/dev-packages/e2e-tests/test-applications/node-nestjs/src/app.service.ts b/dev-packages/e2e-tests/test-applications/nestjs/src/app.service.ts similarity index 97% rename from dev-packages/e2e-tests/test-applications/node-nestjs/src/app.service.ts rename to dev-packages/e2e-tests/test-applications/nestjs/src/app.service.ts index 79b01f26f51c..01a96549546b 100644 --- a/dev-packages/e2e-tests/test-applications/node-nestjs/src/app.service.ts +++ b/dev-packages/e2e-tests/test-applications/nestjs/src/app.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@nestjs/common'; -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nestjs'; import { makeHttpRequest } from './utils'; @Injectable() diff --git a/dev-packages/e2e-tests/test-applications/node-nestjs/src/instrument.ts b/dev-packages/e2e-tests/test-applications/nestjs/src/instrument.ts similarity index 86% rename from dev-packages/e2e-tests/test-applications/node-nestjs/src/instrument.ts rename to dev-packages/e2e-tests/test-applications/nestjs/src/instrument.ts index 09376810454f..b5ca047e497c 100644 --- a/dev-packages/e2e-tests/test-applications/node-nestjs/src/instrument.ts +++ b/dev-packages/e2e-tests/test-applications/nestjs/src/instrument.ts @@ -1,4 +1,4 @@ -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nestjs'; Sentry.init({ environment: 'qa', // dynamic sampling bias to keep transactions diff --git a/dev-packages/e2e-tests/test-applications/node-nestjs/src/main.ts b/dev-packages/e2e-tests/test-applications/nestjs/src/main.ts similarity index 93% rename from dev-packages/e2e-tests/test-applications/node-nestjs/src/main.ts rename to dev-packages/e2e-tests/test-applications/nestjs/src/main.ts index 39bfec94b507..c2682662154d 100644 --- a/dev-packages/e2e-tests/test-applications/node-nestjs/src/main.ts +++ b/dev-packages/e2e-tests/test-applications/nestjs/src/main.ts @@ -3,7 +3,7 @@ import './instrument'; // Import other modules import { BaseExceptionFilter, HttpAdapterHost, NestFactory } from '@nestjs/core'; -import * as Sentry from '@sentry/node'; +import * as Sentry from '@sentry/nestjs'; import { AppModule1, AppModule2 } from './app.module'; const app1Port = 3030; diff --git a/dev-packages/e2e-tests/test-applications/node-nestjs/src/utils.ts b/dev-packages/e2e-tests/test-applications/nestjs/src/utils.ts similarity index 100% rename from dev-packages/e2e-tests/test-applications/node-nestjs/src/utils.ts rename to dev-packages/e2e-tests/test-applications/nestjs/src/utils.ts diff --git a/dev-packages/e2e-tests/test-applications/node-nestjs/start-event-proxy.mjs b/dev-packages/e2e-tests/test-applications/nestjs/start-event-proxy.mjs similarity index 76% rename from dev-packages/e2e-tests/test-applications/node-nestjs/start-event-proxy.mjs rename to dev-packages/e2e-tests/test-applications/nestjs/start-event-proxy.mjs index 3714932358a5..e9917b9273da 100644 --- a/dev-packages/e2e-tests/test-applications/node-nestjs/start-event-proxy.mjs +++ b/dev-packages/e2e-tests/test-applications/nestjs/start-event-proxy.mjs @@ -2,5 +2,5 @@ import { startEventProxyServer } from '@sentry-internal/test-utils'; startEventProxyServer({ port: 3031, - proxyServerName: 'node-nestjs', + proxyServerName: 'nestjs', }); diff --git a/dev-packages/e2e-tests/test-applications/node-nestjs/tests/errors.test.ts b/dev-packages/e2e-tests/test-applications/nestjs/tests/errors.test.ts similarity index 93% rename from dev-packages/e2e-tests/test-applications/node-nestjs/tests/errors.test.ts rename to dev-packages/e2e-tests/test-applications/nestjs/tests/errors.test.ts index 40ed8e49718a..aa46f77815d4 100644 --- a/dev-packages/e2e-tests/test-applications/node-nestjs/tests/errors.test.ts +++ b/dev-packages/e2e-tests/test-applications/nestjs/tests/errors.test.ts @@ -2,7 +2,7 @@ import { expect, test } from '@playwright/test'; import { waitForError } from '@sentry-internal/test-utils'; test('Sends exception to Sentry', async ({ baseURL }) => { - const errorEventPromise = waitForError('node-nestjs', event => { + const errorEventPromise = waitForError('nestjs', event => { return !event.type && event.exception?.values?.[0]?.value === 'This is an exception with id 123'; }); diff --git a/dev-packages/e2e-tests/test-applications/node-nestjs/tests/propagation.test.ts b/dev-packages/e2e-tests/test-applications/nestjs/tests/propagation.test.ts similarity index 94% rename from dev-packages/e2e-tests/test-applications/node-nestjs/tests/propagation.test.ts rename to dev-packages/e2e-tests/test-applications/nestjs/tests/propagation.test.ts index d100b725283f..2922435c542b 100644 --- a/dev-packages/e2e-tests/test-applications/node-nestjs/tests/propagation.test.ts +++ b/dev-packages/e2e-tests/test-applications/nestjs/tests/propagation.test.ts @@ -6,14 +6,14 @@ import { SpanJSON } from '@sentry/types'; test('Propagates trace for outgoing http requests', async ({ baseURL }) => { const id = crypto.randomUUID(); - const inboundTransactionPromise = waitForTransaction('node-nestjs', transactionEvent => { + const inboundTransactionPromise = waitForTransaction('nestjs', transactionEvent => { return ( transactionEvent.contexts?.trace?.op === 'http.server' && transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-inbound-headers/${id}` ); }); - const outboundTransactionPromise = waitForTransaction('node-nestjs', transactionEvent => { + const outboundTransactionPromise = waitForTransaction('nestjs', transactionEvent => { return ( transactionEvent.contexts?.trace?.op === 'http.server' && transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-outgoing-http/${id}` @@ -121,14 +121,14 @@ test('Propagates trace for outgoing http requests', async ({ baseURL }) => { test('Propagates trace for outgoing fetch requests', async ({ baseURL }) => { const id = crypto.randomUUID(); - const inboundTransactionPromise = waitForTransaction('node-nestjs', transactionEvent => { + const inboundTransactionPromise = waitForTransaction('nestjs', transactionEvent => { return ( transactionEvent?.contexts?.trace?.op === 'http.server' && transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-inbound-headers/${id}` ); }); - const outboundTransactionPromise = waitForTransaction('node-nestjs', transactionEvent => { + const outboundTransactionPromise = waitForTransaction('nestjs', transactionEvent => { return ( transactionEvent?.contexts?.trace?.op === 'http.server' && transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-outgoing-fetch/${id}` @@ -234,7 +234,7 @@ test('Propagates trace for outgoing fetch requests', async ({ baseURL }) => { }); test('Propagates trace for outgoing external http requests', async ({ baseURL }) => { - const inboundTransactionPromise = waitForTransaction('node-nestjs', transactionEvent => { + const inboundTransactionPromise = waitForTransaction('nestjs', transactionEvent => { return ( transactionEvent?.contexts?.trace?.op === 'http.server' && transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-outgoing-http-external-allowed` @@ -271,7 +271,7 @@ test('Propagates trace for outgoing external http requests', async ({ baseURL }) }); test('Does not propagate outgoing http requests not covered by tracePropagationTargets', async ({ baseURL }) => { - const inboundTransactionPromise = waitForTransaction('node-nestjs', transactionEvent => { + const inboundTransactionPromise = waitForTransaction('nestjs', transactionEvent => { return ( transactionEvent?.contexts?.trace?.op === 'http.server' && transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-outgoing-http-external-disallowed` @@ -295,7 +295,7 @@ test('Does not propagate outgoing http requests not covered by tracePropagationT }); test('Propagates trace for outgoing external fetch requests', async ({ baseURL }) => { - const inboundTransactionPromise = waitForTransaction('node-nestjs', transactionEvent => { + const inboundTransactionPromise = waitForTransaction('nestjs', transactionEvent => { return ( transactionEvent?.contexts?.trace?.op === 'http.server' && transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-outgoing-fetch-external-allowed` @@ -332,7 +332,7 @@ test('Propagates trace for outgoing external fetch requests', async ({ baseURL } }); test('Does not propagate outgoing fetch requests not covered by tracePropagationTargets', async ({ baseURL }) => { - const inboundTransactionPromise = waitForTransaction('node-nestjs', transactionEvent => { + const inboundTransactionPromise = waitForTransaction('nestjs', transactionEvent => { return ( transactionEvent?.contexts?.trace?.op === 'http.server' && transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-outgoing-fetch-external-disallowed` diff --git a/dev-packages/e2e-tests/test-applications/node-nestjs/tests/transactions.test.ts b/dev-packages/e2e-tests/test-applications/nestjs/tests/transactions.test.ts similarity index 97% rename from dev-packages/e2e-tests/test-applications/node-nestjs/tests/transactions.test.ts rename to dev-packages/e2e-tests/test-applications/nestjs/tests/transactions.test.ts index 593c5e383f2b..22cb0f8e6a8c 100644 --- a/dev-packages/e2e-tests/test-applications/node-nestjs/tests/transactions.test.ts +++ b/dev-packages/e2e-tests/test-applications/nestjs/tests/transactions.test.ts @@ -2,7 +2,7 @@ import { expect, test } from '@playwright/test'; import { waitForTransaction } from '@sentry-internal/test-utils'; test('Sends an API route transaction', async ({ baseURL }) => { - const pageloadTransactionEventPromise = waitForTransaction('node-nestjs', transactionEvent => { + const pageloadTransactionEventPromise = waitForTransaction('nestjs', transactionEvent => { return ( transactionEvent?.contexts?.trace?.op === 'http.server' && transactionEvent?.transaction === 'GET /test-transaction' diff --git a/dev-packages/e2e-tests/test-applications/node-nestjs/tsconfig.build.json b/dev-packages/e2e-tests/test-applications/nestjs/tsconfig.build.json similarity index 100% rename from dev-packages/e2e-tests/test-applications/node-nestjs/tsconfig.build.json rename to dev-packages/e2e-tests/test-applications/nestjs/tsconfig.build.json diff --git a/dev-packages/e2e-tests/test-applications/node-nestjs/tsconfig.json b/dev-packages/e2e-tests/test-applications/nestjs/tsconfig.json similarity index 100% rename from dev-packages/e2e-tests/test-applications/node-nestjs/tsconfig.json rename to dev-packages/e2e-tests/test-applications/nestjs/tsconfig.json diff --git a/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/.gitignore b/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/.gitignore new file mode 100644 index 000000000000..1521c8b7652b --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/.gitignore @@ -0,0 +1 @@ +dist diff --git a/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/.npmrc b/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/.npmrc new file mode 100644 index 000000000000..070f80f05092 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/.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/node-express-incorrect-instrumentation/package.json b/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/package.json new file mode 100644 index 000000000000..3df947bb58c5 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/package.json @@ -0,0 +1,32 @@ +{ + "name": "node-express-incorrect-instrumentation", + "version": "1.0.0", + "private": true, + "scripts": { + "build": "tsc", + "start": "node dist/app.js", + "test": "playwright test", + "clean": "npx rimraf node_modules pnpm-lock.yaml", + "test:build": "pnpm install && pnpm build", + "test:assert": "pnpm test" + }, + "dependencies": { + "@sentry/core": "latest || *", + "@sentry/node": "latest || *", + "@sentry/types": "latest || *", + "@trpc/server": "10.45.2", + "@trpc/client": "10.45.2", + "@types/express": "4.17.17", + "@types/node": "18.15.1", + "express": "4.19.2", + "typescript": "4.9.5", + "zod": "~3.22.4" + }, + "devDependencies": { + "@playwright/test": "^1.44.1", + "@sentry-internal/test-utils": "link:../../../test-utils" + }, + "volta": { + "extends": "../../package.json" + } +} diff --git a/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/playwright.config.mjs b/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/playwright.config.mjs new file mode 100644 index 000000000000..31f2b913b58b --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/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/node-express-incorrect-instrumentation/src/app.ts b/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/src/app.ts new file mode 100644 index 000000000000..2ab5d1ace5a0 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/src/app.ts @@ -0,0 +1,39 @@ +declare global { + namespace globalThis { + var transactionIds: string[]; + } +} + +import express from 'express'; + +const app = express(); +const port = 3030; + +// import and init sentry last for missing instrumentation +import * as Sentry from '@sentry/node'; +Sentry.init({ + environment: 'qa', // dynamic sampling bias to keep transactions + dsn: process.env.E2E_TEST_DSN, + includeLocalVariables: true, + debug: !!process.env.DEBUG, + tunnel: `http://localhost:3031/`, // proxy server + tracesSampleRate: 1, +}); + +app.get('/test-exception/:id', function (req, _res) { + throw new Error(`This is an exception with id ${req.params.id}`); +}); + +Sentry.setupExpressErrorHandler(app); + +// @ts-ignore +app.use(function onError(err, req, res, next) { + // The error id is attached to `res.sentry` to be returned + // and optionally displayed to the user for support. + res.statusCode = 500; + res.end(res.sentry + '\n'); +}); + +app.listen(port, () => { + console.log(`Example app listening on port ${port}`); +}); diff --git a/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/start-event-proxy.mjs b/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/start-event-proxy.mjs new file mode 100644 index 000000000000..3276781a442a --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/start-event-proxy.mjs @@ -0,0 +1,6 @@ +import { startEventProxyServer } from '@sentry-internal/test-utils'; + +startEventProxyServer({ + port: 3031, + proxyServerName: 'node-express', +}); diff --git a/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/tests/instrumentation.test.ts b/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/tests/instrumentation.test.ts new file mode 100644 index 000000000000..f562cb3a5837 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/tests/instrumentation.test.ts @@ -0,0 +1,20 @@ +import { expect, test } from '@playwright/test'; +import { waitForError } from '@sentry-internal/test-utils'; + +test('Sends correct context when instrumentation was set up incorrectly', async ({ baseURL }) => { + const errorEventPromise = waitForError('node-express', event => { + return !event.type && event.exception?.values?.[0]?.value === 'This is an exception with id 123'; + }); + + await fetch(`${baseURL}/test-exception/123`); + + const errorEvent = await errorEventPromise; + + expect(errorEvent.exception?.values).toHaveLength(1); + expect(errorEvent.exception?.values?.[0]?.value).toBe('This is an exception with id 123'); + + expect(errorEvent.contexts?.missing_instrumentation).toEqual({ + package: 'express', + 'javascript.is_cjs': true, + }); +}); diff --git a/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/tsconfig.json b/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/tsconfig.json new file mode 100644 index 000000000000..8cb64e989ed9 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "types": ["node"], + "esModuleInterop": true, + "lib": ["es2018"], + "strict": true, + "outDir": "dist" + }, + "include": ["src/**/*.ts"] +} 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 c554c47d8dde..39e07b89c0ee 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 @@ -1,5 +1,5 @@ import { expect, test } from '@playwright/test'; -import { waitForTransaction } from '@sentry-internal/test-utils'; +import { waitForEnvelopeItem, waitForTransaction } from '@sentry-internal/test-utils'; test('sends a pageload transaction with a parameterized URL', async ({ page }) => { const transactionPromise = waitForTransaction('react-router-6', async transactionEvent => { @@ -54,3 +54,45 @@ test('sends a navigation transaction with a parameterized URL', async ({ page }) }, }); }); + +test('sends an INP span', async ({ page }) => { + const inpSpanPromise = waitForEnvelopeItem('react-router-6', item => { + return item[0].type === 'span'; + }); + + await page.goto(`/`); + + await page.click('#exception-button'); + + await page.waitForTimeout(500); + + // Page hide to trigger INP + await page.evaluate(() => { + window.dispatchEvent(new Event('pagehide')); + }); + + const inpSpan = await inpSpanPromise; + + expect(inpSpan[1]).toEqual({ + data: { + 'sentry.origin': 'auto.http.browser.inp', + 'sentry.op': 'ui.interaction.click', + release: 'e2e-test', + environment: 'qa', + transaction: '/', + 'sentry.exclusive_time': expect.any(Number), + replay_id: expect.any(String), + }, + description: 'body > div#root > input#exception-button[type="button"]', + op: 'ui.interaction.click', + parent_span_id: expect.any(String), + span_id: expect.any(String), + start_timestamp: expect.any(Number), + timestamp: expect.any(Number), + trace_id: expect.any(String), + origin: 'auto.http.browser.inp', + exclusive_time: expect.any(Number), + measurements: { inp: { unit: 'millisecond', value: expect.any(Number) } }, + segment_id: expect.any(String), + }); +}); diff --git a/dev-packages/e2e-tests/test-applications/solid-solidrouter/.gitignore b/dev-packages/e2e-tests/test-applications/solid-solidrouter/.gitignore new file mode 100644 index 000000000000..84634c973eeb --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/solid-solidrouter/.gitignore @@ -0,0 +1,29 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +/test-results/ +/playwright-report/ +/playwright/.cache/ + +!*.d.ts diff --git a/dev-packages/e2e-tests/test-applications/solid-solidrouter/.npmrc b/dev-packages/e2e-tests/test-applications/solid-solidrouter/.npmrc new file mode 100644 index 000000000000..070f80f05092 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/solid-solidrouter/.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/solid-solidrouter/README.md b/dev-packages/e2e-tests/test-applications/solid-solidrouter/README.md new file mode 100644 index 000000000000..81e5eb6c2d40 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/solid-solidrouter/README.md @@ -0,0 +1,40 @@ +## Usage + +Those templates dependencies are maintained via [pnpm](https://pnpm.io) via `pnpm up -Lri`. + +This is the reason you see a `pnpm-lock.yaml`. That being said, any package manager will work. This file can be safely +be removed once you clone a template. + +```bash +$ npm install # or pnpm install or yarn install +``` + +## Exploring the template + +This template's goal is to showcase the routing features of Solid. It also showcase how the router and Suspense work +together to parallelize data fetching tied to a route via the `.data.ts` pattern. + +You can learn more about it on the [`@solidjs/router` repository](https://github.com/solidjs/solid-router) + +### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs) + +## Available Scripts + +In the project directory, you can run: + +### `npm run dev` or `npm start` + +Runs the app in the development mode.
Open [http://localhost:3000](http://localhost:3000) to view it in the browser. + +The page will reload if you make edits.
+ +### `npm run build` + +Builds the app for production to the `dist` folder.
It correctly bundles Solid in production mode and optimizes the +build for the best performance. + +The build is minified and the filenames include the hashes.
Your app is ready to be deployed! + +## Deployment + +You can deploy the `dist` folder to any static host provider (netlify, surge, now, etc.) diff --git a/dev-packages/e2e-tests/test-applications/solid-solidrouter/index.html b/dev-packages/e2e-tests/test-applications/solid-solidrouter/index.html new file mode 100644 index 000000000000..1905a0429019 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/solid-solidrouter/index.html @@ -0,0 +1,15 @@ + + + + + + + Solid App + + + +
+ + + + diff --git a/dev-packages/e2e-tests/test-applications/solid-solidrouter/package.json b/dev-packages/e2e-tests/test-applications/solid-solidrouter/package.json new file mode 100644 index 000000000000..3f0d7ca13fce --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/solid-solidrouter/package.json @@ -0,0 +1,33 @@ +{ + "name": "solid-solidrouter", + "version": "0.0.0", + "description": "", + "scripts": { + "build": "vite build", + "clean": "npx rimraf node_modules pnpm-lock.yaml dist", + "dev": "vite", + "preview": "vite preview", + "start": "vite", + "test:prod": "TEST_ENV=production playwright test", + "test:build": "pnpm install && npx playwright install && pnpm build", + "test:assert": "pnpm test:prod" + }, + "license": "MIT", + "devDependencies": { + "@playwright/test": "^1.44.1", + "@sentry-internal/test-utils": "link:../../../test-utils", + "@sentry/types": "latest || *", + "@sentry/utils": "latest || *", + "autoprefixer": "^10.4.17", + "postcss": "^8.4.33", + "solid-devtools": "^0.29.2", + "tailwindcss": "^3.4.1", + "vite": "^5.0.11", + "vite-plugin-solid": "^2.8.2" + }, + "dependencies": { + "@solidjs/router": "^0.13.5", + "solid-js": "^1.8.11", + "@sentry/solid": "latest || *" + } +} diff --git a/dev-packages/e2e-tests/test-applications/solid-solidrouter/playwright.config.mjs b/dev-packages/e2e-tests/test-applications/solid-solidrouter/playwright.config.mjs new file mode 100644 index 000000000000..0c468af7d879 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/solid-solidrouter/playwright.config.mjs @@ -0,0 +1,8 @@ +import { getPlaywrightConfig } from '@sentry-internal/test-utils'; + +const config = getPlaywrightConfig({ + startCommand: 'pnpm preview --port 3030', + port: 3030, +}); + +export default config; diff --git a/dev-packages/e2e-tests/test-applications/solid-solidrouter/postcss.config.js b/dev-packages/e2e-tests/test-applications/solid-solidrouter/postcss.config.js new file mode 100644 index 000000000000..12a703d900da --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/solid-solidrouter/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/dev-packages/e2e-tests/test-applications/solid/src/errors/404.tsx b/dev-packages/e2e-tests/test-applications/solid-solidrouter/src/errors/404.tsx similarity index 100% rename from dev-packages/e2e-tests/test-applications/solid/src/errors/404.tsx rename to dev-packages/e2e-tests/test-applications/solid-solidrouter/src/errors/404.tsx diff --git a/dev-packages/e2e-tests/test-applications/solid-solidrouter/src/index.css b/dev-packages/e2e-tests/test-applications/solid-solidrouter/src/index.css new file mode 100644 index 000000000000..b5c61c956711 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/solid-solidrouter/src/index.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/dev-packages/e2e-tests/test-applications/solid-solidrouter/src/index.tsx b/dev-packages/e2e-tests/test-applications/solid-solidrouter/src/index.tsx new file mode 100644 index 000000000000..66773f009d1e --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/solid-solidrouter/src/index.tsx @@ -0,0 +1,22 @@ +/* @refresh reload */ +import * as Sentry from '@sentry/solid'; +import { solidRouterBrowserTracingIntegration, withSentryRouterRouting } from '@sentry/solid/solidrouter'; +import { Router } from '@solidjs/router'; +import { render } from 'solid-js/web'; +import './index.css'; +import PageRoot from './pageroot'; +import { routes } from './routes'; + +Sentry.init({ + dsn: import.meta.env.PUBLIC_E2E_TEST_DSN, + debug: true, + environment: 'qa', // dynamic sampling bias to keep transactions + integrations: [solidRouterBrowserTracingIntegration()], + release: 'e2e-test', + tunnel: 'http://localhost:3031/', // proxy server + tracesSampleRate: 1.0, +}); + +const SentryRouter = withSentryRouterRouting(Router); + +render(() => {routes}, document.getElementById('root')); diff --git a/dev-packages/e2e-tests/test-applications/solid-solidrouter/src/pageroot.tsx b/dev-packages/e2e-tests/test-applications/solid-solidrouter/src/pageroot.tsx new file mode 100644 index 000000000000..0919c0e362db --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/solid-solidrouter/src/pageroot.tsx @@ -0,0 +1,28 @@ +import { A } from '@solidjs/router'; + +export default function PageRoot(props) { + return ( + <> + +
{props.children}
+ + ); +} diff --git a/dev-packages/e2e-tests/test-applications/solid/src/pages/errorboundaryexample.tsx b/dev-packages/e2e-tests/test-applications/solid-solidrouter/src/pages/errorboundaryexample.tsx similarity index 100% rename from dev-packages/e2e-tests/test-applications/solid/src/pages/errorboundaryexample.tsx rename to dev-packages/e2e-tests/test-applications/solid-solidrouter/src/pages/errorboundaryexample.tsx diff --git a/dev-packages/e2e-tests/test-applications/solid/src/pages/home.tsx b/dev-packages/e2e-tests/test-applications/solid-solidrouter/src/pages/home.tsx similarity index 100% rename from dev-packages/e2e-tests/test-applications/solid/src/pages/home.tsx rename to dev-packages/e2e-tests/test-applications/solid-solidrouter/src/pages/home.tsx diff --git a/dev-packages/e2e-tests/test-applications/solid/src/pages/user.tsx b/dev-packages/e2e-tests/test-applications/solid-solidrouter/src/pages/user.tsx similarity index 100% rename from dev-packages/e2e-tests/test-applications/solid/src/pages/user.tsx rename to dev-packages/e2e-tests/test-applications/solid-solidrouter/src/pages/user.tsx diff --git a/dev-packages/e2e-tests/test-applications/solid-solidrouter/src/routes.ts b/dev-packages/e2e-tests/test-applications/solid-solidrouter/src/routes.ts new file mode 100644 index 000000000000..96b78e113ef5 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/solid-solidrouter/src/routes.ts @@ -0,0 +1,23 @@ +import { lazy } from 'solid-js'; + +import ErrorBoundaryExample from './pages/errorboundaryexample'; +import Home from './pages/home'; + +export const routes = [ + { + path: '/', + component: Home, + }, + { + path: '/user/:id', + component: lazy(() => import('./pages/user')), + }, + { + path: '/error-boundary-example', + component: ErrorBoundaryExample, + }, + { + path: '**', + component: lazy(() => import('./errors/404')), + }, +]; diff --git a/dev-packages/e2e-tests/test-applications/solid-solidrouter/start-event-proxy.mjs b/dev-packages/e2e-tests/test-applications/solid-solidrouter/start-event-proxy.mjs new file mode 100644 index 000000000000..075d4dcb5cf5 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/solid-solidrouter/start-event-proxy.mjs @@ -0,0 +1,6 @@ +import { startEventProxyServer } from '@sentry-internal/test-utils'; + +startEventProxyServer({ + port: 3031, + proxyServerName: 'solid', +}); diff --git a/dev-packages/e2e-tests/test-applications/solid-solidrouter/tailwind.config.ts b/dev-packages/e2e-tests/test-applications/solid-solidrouter/tailwind.config.ts new file mode 100644 index 000000000000..f69a95185570 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/solid-solidrouter/tailwind.config.ts @@ -0,0 +1,11 @@ +import type { Config } from 'tailwindcss'; + +const config: Config = { + content: ['./src/**/*.{js,jsx,ts,tsx}'], + theme: { + extend: {}, + }, + plugins: [], +}; + +export default config; diff --git a/dev-packages/e2e-tests/test-applications/solid-solidrouter/tests/errorboundary.test.ts b/dev-packages/e2e-tests/test-applications/solid-solidrouter/tests/errorboundary.test.ts new file mode 100644 index 000000000000..287642424850 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/solid-solidrouter/tests/errorboundary.test.ts @@ -0,0 +1,75 @@ +import { expect, test } from '@playwright/test'; +import { waitForError } from '@sentry-internal/test-utils'; + +test('captures an exception', async ({ page }) => { + const errorEventPromise = waitForError('solid', errorEvent => { + return !errorEvent.type && errorEvent.transaction === '/error-boundary-example'; + }); + + const [, errorEvent] = await Promise.all([page.goto('/error-boundary-example'), errorEventPromise]); + + expect(errorEvent).toMatchObject({ + exception: { + values: [ + { + type: 'ReferenceError', + value: 'NonExistentComponent is not defined', + mechanism: { + type: 'generic', + handled: true, + }, + }, + ], + }, + transaction: '/error-boundary-example', + }); +}); + +test('captures a second exception after resetting the boundary', async ({ page }) => { + const firstErrorEventPromise = waitForError('solid', errorEvent => { + return !errorEvent.type && errorEvent.transaction === '/error-boundary-example'; + }); + + const [, firstErrorEvent] = await Promise.all([page.goto('/error-boundary-example'), firstErrorEventPromise]); + + expect(firstErrorEvent).toMatchObject({ + exception: { + values: [ + { + type: 'ReferenceError', + value: 'NonExistentComponent is not defined', + mechanism: { + type: 'generic', + handled: true, + }, + }, + ], + }, + transaction: '/error-boundary-example', + }); + + const secondErrorEventPromise = waitForError('solid', errorEvent => { + return !errorEvent.type && errorEvent.transaction === '/error-boundary-example'; + }); + + const [, secondErrorEvent] = await Promise.all([ + page.locator('#errorBoundaryResetBtn').click(), + await secondErrorEventPromise, + ]); + + expect(secondErrorEvent).toMatchObject({ + exception: { + values: [ + { + type: 'ReferenceError', + value: 'NonExistentComponent is not defined', + mechanism: { + type: 'generic', + handled: true, + }, + }, + ], + }, + transaction: '/error-boundary-example', + }); +}); diff --git a/dev-packages/e2e-tests/test-applications/solid-solidrouter/tests/errors.test.ts b/dev-packages/e2e-tests/test-applications/solid-solidrouter/tests/errors.test.ts new file mode 100644 index 000000000000..b8e2a759886a --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/solid-solidrouter/tests/errors.test.ts @@ -0,0 +1,28 @@ +import { expect, test } from '@playwright/test'; +import { waitForError } from '@sentry-internal/test-utils'; + +test('sends an error', async ({ page }) => { + const errorPromise = waitForError('solid', async errorEvent => { + return !errorEvent.type && errorEvent.exception?.values?.[0]?.value === 'Error thrown from Solid E2E test app'; + }); + + await Promise.all([page.goto(`/`), page.locator('#errorBtn').click()]); + + const error = await errorPromise; + + expect(error).toMatchObject({ + exception: { + values: [ + { + type: 'Error', + value: 'Error thrown from Solid E2E test app', + mechanism: { + type: 'onerror', + handled: false, + }, + }, + ], + }, + transaction: '/', + }); +}); diff --git a/dev-packages/e2e-tests/test-applications/solid-solidrouter/tests/performance.test.ts b/dev-packages/e2e-tests/test-applications/solid-solidrouter/tests/performance.test.ts new file mode 100644 index 000000000000..f73ff4940527 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/solid-solidrouter/tests/performance.test.ts @@ -0,0 +1,91 @@ +import { expect, test } from '@playwright/test'; +import { waitForTransaction } from '@sentry-internal/test-utils'; + +test('sends a pageload transaction', async ({ page }) => { + const transactionPromise = waitForTransaction('solid', async transactionEvent => { + return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'pageload'; + }); + + const [, pageloadTransaction] = await Promise.all([page.goto('/'), transactionPromise]); + + expect(pageloadTransaction).toMatchObject({ + contexts: { + trace: { + op: 'pageload', + origin: 'auto.pageload.browser', + }, + }, + transaction: '/', + transaction_info: { + source: 'url', + }, + }); +}); + +test('sends a navigation transaction', async ({ page }) => { + const transactionPromise = waitForTransaction('solid', async transactionEvent => { + return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'navigation'; + }); + + await page.goto(`/`); + + const [, navigationTransaction] = await Promise.all([page.locator('#navLink').click(), transactionPromise]); + + expect(navigationTransaction).toMatchObject({ + contexts: { + trace: { + op: 'navigation', + origin: 'auto.navigation.solid.solidrouter', + }, + }, + transaction: '/user/5', + transaction_info: { + source: 'url', + }, + }); +}); + +test('updates the transaction when using the back button', async ({ page }) => { + // Solid Router sends a `-1` navigation when using the back button. + // The sentry solidRouterBrowserTracingIntegration tries to update such + // transactions with the proper name once the `useLocation` hook triggers. + const navigationTxnPromise = waitForTransaction('solid', async transactionEvent => { + return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'navigation'; + }); + + await page.goto(`/`); + + const [, navigationTxn] = await Promise.all([page.locator('#navLink').click(), navigationTxnPromise]); + + expect(navigationTxn).toMatchObject({ + contexts: { + trace: { + op: 'navigation', + origin: 'auto.navigation.solid.solidrouter', + }, + }, + transaction: '/user/5', + transaction_info: { + source: 'url', + }, + }); + + const backNavigationTxnPromise = waitForTransaction('solid', async transactionEvent => { + return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'navigation'; + }); + + const [, backNavigationTxn] = await Promise.all([page.goBack(), backNavigationTxnPromise]); + + expect(backNavigationTxn).toMatchObject({ + contexts: { + trace: { + op: 'navigation', + origin: 'auto.navigation.solid.solidrouter', + }, + }, + transaction: '/', + transaction_info: { + source: 'url', + }, + }); +}); diff --git a/dev-packages/e2e-tests/test-applications/solid-solidrouter/tsconfig.json b/dev-packages/e2e-tests/test-applications/solid-solidrouter/tsconfig.json new file mode 100644 index 000000000000..ba12e96f069a --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/solid-solidrouter/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "target": "ESNext", + "module": "ESNext", + "moduleResolution": "node", + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "jsx": "preserve", + "jsxImportSource": "solid-js", + "types": ["vite/client"], + "noEmit": true, + "isolatedModules": true, + }, +} diff --git a/dev-packages/e2e-tests/test-applications/solid-solidrouter/vite.config.ts b/dev-packages/e2e-tests/test-applications/solid-solidrouter/vite.config.ts new file mode 100644 index 000000000000..d1835ee1b8ff --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/solid-solidrouter/vite.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from 'vite'; +import solidPlugin from 'vite-plugin-solid'; + +export default defineConfig({ + plugins: [solidPlugin()], + build: { + target: 'esnext', + }, + envPrefix: 'PUBLIC_', +}); diff --git a/dev-packages/e2e-tests/test-applications/solid/package.json b/dev-packages/e2e-tests/test-applications/solid/package.json index c63d3080748f..ebfde066e6ef 100644 --- a/dev-packages/e2e-tests/test-applications/solid/package.json +++ b/dev-packages/e2e-tests/test-applications/solid/package.json @@ -26,7 +26,6 @@ "vite-plugin-solid": "^2.8.2" }, "dependencies": { - "@solidjs/router": "^0.13.5", "solid-js": "^1.8.11", "@sentry/solid": "latest || *" } diff --git a/dev-packages/e2e-tests/test-applications/solid/src/app.tsx b/dev-packages/e2e-tests/test-applications/solid/src/app.tsx new file mode 100644 index 000000000000..0b83d62ff655 --- /dev/null +++ b/dev-packages/e2e-tests/test-applications/solid/src/app.tsx @@ -0,0 +1,72 @@ +import * as Sentry from '@sentry/solid'; +import { ErrorBoundary, createSignal, onMount } from 'solid-js'; + +const SentryErrorBoundary = Sentry.withSentryErrorBoundary(ErrorBoundary); + +const [count, setCount] = createSignal(1); +const [caughtError, setCaughtError] = createSignal(false); + +export default function App() { + return ( + + {caughtError() && } +
+
+ +
+
+ +
+
+
+ ); +} + +function Throw(props) { + onMount(() => { + throw new Error(props.error); + }); + return null; +} + +function SampleErrorBoundary(props) { + return ( + ( +
+

Error Boundary Fallback

+
+ {error.message} +
+ +
+ )} + > + {props.children} +
+ ); +} diff --git a/dev-packages/e2e-tests/test-applications/solid/src/index.tsx b/dev-packages/e2e-tests/test-applications/solid/src/index.tsx index 66773f009d1e..df121347daeb 100644 --- a/dev-packages/e2e-tests/test-applications/solid/src/index.tsx +++ b/dev-packages/e2e-tests/test-applications/solid/src/index.tsx @@ -1,22 +1,19 @@ /* @refresh reload */ import * as Sentry from '@sentry/solid'; -import { solidRouterBrowserTracingIntegration, withSentryRouterRouting } from '@sentry/solid/solidrouter'; -import { Router } from '@solidjs/router'; import { render } from 'solid-js/web'; +import App from './app'; import './index.css'; -import PageRoot from './pageroot'; -import { routes } from './routes'; Sentry.init({ - dsn: import.meta.env.PUBLIC_E2E_TEST_DSN, + dsn: + import.meta.env.PUBLIC_E2E_TEST_DSN || + 'https://3b6c388182fb435097f41d181be2b2ba@o4504321058471936.ingest.sentry.io/4504321066008576', debug: true, environment: 'qa', // dynamic sampling bias to keep transactions - integrations: [solidRouterBrowserTracingIntegration()], + integrations: [Sentry.browserTracingIntegration()], release: 'e2e-test', tunnel: 'http://localhost:3031/', // proxy server tracesSampleRate: 1.0, }); -const SentryRouter = withSentryRouterRouting(Router); - -render(() => {routes}, document.getElementById('root')); +render(() => , document.getElementById('root')); diff --git a/dev-packages/e2e-tests/test-applications/solid/tests/errorboundary.test.ts b/dev-packages/e2e-tests/test-applications/solid/tests/errorboundary.test.ts index 287642424850..d192ed9cfcfd 100644 --- a/dev-packages/e2e-tests/test-applications/solid/tests/errorboundary.test.ts +++ b/dev-packages/e2e-tests/test-applications/solid/tests/errorboundary.test.ts @@ -3,17 +3,24 @@ import { waitForError } from '@sentry-internal/test-utils'; test('captures an exception', async ({ page }) => { const errorEventPromise = waitForError('solid', errorEvent => { - return !errorEvent.type && errorEvent.transaction === '/error-boundary-example'; + return ( + !errorEvent.type && + errorEvent.exception?.values?.[0]?.value === 'Error 1 thrown from Sentry ErrorBoundary in Solid E2E test app' + ); }); - const [, errorEvent] = await Promise.all([page.goto('/error-boundary-example'), errorEventPromise]); + const [, , errorEvent] = await Promise.all([ + page.goto('/'), + page.locator('#caughtErrorBtn').click(), + errorEventPromise, + ]); expect(errorEvent).toMatchObject({ exception: { values: [ { - type: 'ReferenceError', - value: 'NonExistentComponent is not defined', + type: 'Error', + value: 'Error 1 thrown from Sentry ErrorBoundary in Solid E2E test app', mechanism: { type: 'generic', handled: true, @@ -21,23 +28,30 @@ test('captures an exception', async ({ page }) => { }, ], }, - transaction: '/error-boundary-example', + transaction: '/', }); }); test('captures a second exception after resetting the boundary', async ({ page }) => { const firstErrorEventPromise = waitForError('solid', errorEvent => { - return !errorEvent.type && errorEvent.transaction === '/error-boundary-example'; + return ( + !errorEvent.type && + errorEvent.exception?.values?.[0]?.value === 'Error 1 thrown from Sentry ErrorBoundary in Solid E2E test app' + ); }); - const [, firstErrorEvent] = await Promise.all([page.goto('/error-boundary-example'), firstErrorEventPromise]); + const [, , firstErrorEvent] = await Promise.all([ + page.goto('/'), + page.locator('#caughtErrorBtn').click(), + firstErrorEventPromise, + ]); expect(firstErrorEvent).toMatchObject({ exception: { values: [ { - type: 'ReferenceError', - value: 'NonExistentComponent is not defined', + type: 'Error', + value: 'Error 1 thrown from Sentry ErrorBoundary in Solid E2E test app', mechanism: { type: 'generic', handled: true, @@ -45,15 +59,19 @@ test('captures a second exception after resetting the boundary', async ({ page } }, ], }, - transaction: '/error-boundary-example', + transaction: '/', }); const secondErrorEventPromise = waitForError('solid', errorEvent => { - return !errorEvent.type && errorEvent.transaction === '/error-boundary-example'; + return ( + !errorEvent.type && + errorEvent.exception?.values?.[0]?.value === 'Error 2 thrown from Sentry ErrorBoundary in Solid E2E test app' + ); }); - const [, secondErrorEvent] = await Promise.all([ + const [, , secondErrorEvent] = await Promise.all([ page.locator('#errorBoundaryResetBtn').click(), + page.locator('#caughtErrorBtn').click(), await secondErrorEventPromise, ]); @@ -61,8 +79,8 @@ test('captures a second exception after resetting the boundary', async ({ page } exception: { values: [ { - type: 'ReferenceError', - value: 'NonExistentComponent is not defined', + type: 'Error', + value: 'Error 2 thrown from Sentry ErrorBoundary in Solid E2E test app', mechanism: { type: 'generic', handled: true, @@ -70,6 +88,6 @@ test('captures a second exception after resetting the boundary', async ({ page } }, ], }, - transaction: '/error-boundary-example', + transaction: '/', }); }); diff --git a/dev-packages/e2e-tests/test-applications/solid/tests/errors.test.ts b/dev-packages/e2e-tests/test-applications/solid/tests/errors.test.ts index 8fb9d3d2513a..b8e2a759886a 100644 --- a/dev-packages/e2e-tests/test-applications/solid/tests/errors.test.ts +++ b/dev-packages/e2e-tests/test-applications/solid/tests/errors.test.ts @@ -3,7 +3,7 @@ import { waitForError } from '@sentry-internal/test-utils'; test('sends an error', async ({ page }) => { const errorPromise = waitForError('solid', async errorEvent => { - return !errorEvent.type && errorEvent.transaction === '/'; + return !errorEvent.type && errorEvent.exception?.values?.[0]?.value === 'Error thrown from Solid E2E test app'; }); await Promise.all([page.goto(`/`), page.locator('#errorBtn').click()]); diff --git a/dev-packages/e2e-tests/test-applications/solid/tests/performance.test.ts b/dev-packages/e2e-tests/test-applications/solid/tests/performance.test.ts index f73ff4940527..a9bfbea82fb2 100644 --- a/dev-packages/e2e-tests/test-applications/solid/tests/performance.test.ts +++ b/dev-packages/e2e-tests/test-applications/solid/tests/performance.test.ts @@ -21,71 +21,3 @@ test('sends a pageload transaction', async ({ page }) => { }, }); }); - -test('sends a navigation transaction', async ({ page }) => { - const transactionPromise = waitForTransaction('solid', async transactionEvent => { - return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'navigation'; - }); - - await page.goto(`/`); - - const [, navigationTransaction] = await Promise.all([page.locator('#navLink').click(), transactionPromise]); - - expect(navigationTransaction).toMatchObject({ - contexts: { - trace: { - op: 'navigation', - origin: 'auto.navigation.solid.solidrouter', - }, - }, - transaction: '/user/5', - transaction_info: { - source: 'url', - }, - }); -}); - -test('updates the transaction when using the back button', async ({ page }) => { - // Solid Router sends a `-1` navigation when using the back button. - // The sentry solidRouterBrowserTracingIntegration tries to update such - // transactions with the proper name once the `useLocation` hook triggers. - const navigationTxnPromise = waitForTransaction('solid', async transactionEvent => { - return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'navigation'; - }); - - await page.goto(`/`); - - const [, navigationTxn] = await Promise.all([page.locator('#navLink').click(), navigationTxnPromise]); - - expect(navigationTxn).toMatchObject({ - contexts: { - trace: { - op: 'navigation', - origin: 'auto.navigation.solid.solidrouter', - }, - }, - transaction: '/user/5', - transaction_info: { - source: 'url', - }, - }); - - const backNavigationTxnPromise = waitForTransaction('solid', async transactionEvent => { - return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'navigation'; - }); - - const [, backNavigationTxn] = await Promise.all([page.goBack(), backNavigationTxnPromise]); - - expect(backNavigationTxn).toMatchObject({ - contexts: { - trace: { - op: 'navigation', - origin: 'auto.navigation.solid.solidrouter', - }, - }, - transaction: '/', - transaction_info: { - source: 'url', - }, - }); -}); diff --git a/dev-packages/e2e-tests/verdaccio-config/config.yaml b/dev-packages/e2e-tests/verdaccio-config/config.yaml index 26dfeb85e506..5f77ba7cccea 100644 --- a/dev-packages/e2e-tests/verdaccio-config/config.yaml +++ b/dev-packages/e2e-tests/verdaccio-config/config.yaml @@ -80,6 +80,12 @@ packages: unpublish: $all # proxy: npmjs # Don't proxy for E2E tests! + '@sentry/nestjs': + access: $all + publish: $all + unpublish: $all + # proxy: npmjs # Don't proxy for E2E tests! + '@sentry/nextjs': access: $all publish: $all diff --git a/dev-packages/test-utils/src/event-proxy-server.ts b/dev-packages/test-utils/src/event-proxy-server.ts index 25ddbfe94966..82693bf4af89 100644 --- a/dev-packages/test-utils/src/event-proxy-server.ts +++ b/dev-packages/test-utils/src/event-proxy-server.ts @@ -115,14 +115,28 @@ export async function startEventProxyServer(options: EventProxyServerOptions): P eventCallbackListeners.forEach(listener => { const rawSentryResponseBody = Buffer.concat(sentryResponseChunks).toString(); - const data: SentryRequestCallbackData = { - envelope: parseEnvelope(proxyRequestBody), - rawProxyRequestBody: proxyRequestBody, - rawSentryResponseBody, - sentryResponseStatusCode: sentryResponse.statusCode, - }; - - listener(Buffer.from(JSON.stringify(data)).toString('base64')); + try { + const data: SentryRequestCallbackData = { + envelope: parseEnvelope(proxyRequestBody), + rawProxyRequestBody: proxyRequestBody, + rawSentryResponseBody, + sentryResponseStatusCode: sentryResponse.statusCode, + }; + + listener(Buffer.from(JSON.stringify(data)).toString('base64')); + } catch (error) { + if (`${error}`.includes('Unexpected token') && proxyRequestBody.includes('{"type":"replay_event"}')) { + // eslint-disable-next-line no-console + console.log('[event-proxy-server] Info: Received replay event, skipping...'); + } else { + // eslint-disable-next-line no-console + console.error( + '[event-proxy-server] Error: Failed to parse Sentry request envelope', + error, + proxyRequestBody, + ); + } + } }); proxyResponse.end(); }); diff --git a/docs/creating-a-new-sdk.md b/docs/creating-a-new-sdk.md new file mode 100644 index 000000000000..f33a33170dc4 --- /dev/null +++ b/docs/creating-a-new-sdk.md @@ -0,0 +1,146 @@ +# Creating a new SDK + +While each SDK (e.g. `@sentry/react` or `@sentry/nextjs`) is somewhat unique, we try to follow some general themes when +creating a new SDK. + +## Types of SDKs + +Broadly speaking, there are three types of SDKs: + +1. Browser SDKs (e.g. `@sentry/react` or `@sentry/angular`) +2. Server SDKs (e.g. `@sentry/bun` or `@sentry/node`) +3. Meta SDKs (e.g. `@sentry/nextjs` or `@sentry/sveltekit`) - which cover both Browser & Server + +Depending on what type of SDK you are creating, you'll have to include different things. + +## General Guidelines + +As a rule of thumb, we should follow these two ideas: + +1. Whenever possible, instrumentation should work without (or with as little as possible) user configuration. +2. Instrumentation should follow common patterns for a specific platform. No config is always preferred, but if config + is unavoidable, it should feel as native as possible to users of the given framework. + +## 1. Browser SDKs + +A purely browser SDK generally should cover the following things: + +### 1a. Error Monitoring + +We have global error handlers out of the box. However, in many frameworks there are ways for users to capture errors +too, which may lead to them not bubble up to our global handlers. Generally, the goal is that all errors are captured by +Sentry. + +Either we should use some hook (e.g. `app.on('error')`) to capture exceptions, or provide composables (e.g. an error +boundary component in React) that users can use in their app to ensure all errors are captured by Sentry. + +### 1b. Performance Monitoring + +#### Routing Instrumentation + +At a minimum, each browser SDK should have **Routing Instrumentation**. + +While we have a default `browserTracingIntegration`, this has no access to a router, and is thus only based on URLs. We +should strive to provide a custom `browserTracingIntegration` for SDKs that can leverage the router & routing +information. + +Ideally, this means that we can emit pageload & navigation spans with parametrized route names instead of full URLs. + +Some of the following concepts may be relevant to your SDK: + +- **Redirects**: If possible, we want to skip redirects. This means that if a user navigates to `/`, and this redirects + the user internally to `/dashboard`, we only want to capture a single `/` navigation/pageload. +- **Route Params**: Routes should be parametrized, which means that instead of `/users/123` we want to capture + `/users/:id` or simmilar. +- **Query Params**: Query params should generally be removed from the route. + +#### Component Tracking + +Additionally, depending on the framework we may also have **Component Tracking**. We may track the duration of component +renders and similar things. These are stretch goals, though, and do not need to be part of an MVP. + +## 2. Server SDKs + +A purely server SDK generally should cover the following things: + +### 2a. Error Monitoring + +We have global error handlers out of the box. However, in many frameworks there are ways for users to capture errors +too, which may lead to them not bubbling up to our global handlers. Generally, the goal is that all errors are captured +by Sentry. + +Either we should use some hook (e.g. `app.on('error')`) to capture exceptions, or provide composables (e.g. +`setupFastifyErrorHandler(app)`) that user can call. + +### 2b. Performance Monitoring + +#### Routing Instrumentation + +At a minimum, each Node SDK should have **Routing Instrumentation**. + +Most SDKs that build on top of `@sentry/node` should automatically have basic `http.server` spans emitted for incoming +requests by the `httpIntegration`. However, these spans do not contain any routing information (e.g. a `http.route` +attribute). A server SDK should make sure to add route information to these spans. + +If there are things that should be captured in spans that are not covered by `httpIntegration`, we may need to write our +own instrumentation to capture `http.server` spans. + +Some of the following concepts may be relevant to your SDK: + +- **Route Params**: Routes should be parametrized, which means that instead of `/users/123` we want to capture + `/users/:id` or simmilar. +- **Query Params**: Query params should generally be removed from the route. + +#### Middleware Tracking + +Additionally, Node SDKs may also do **Middleware Tracking**. If possible, we may want to instrument middlewares, and +create spans for them. These are stretch goals, though, and do not need to be part of an MVP. + +### 2c. OPTIONAL: Additional features + +We may also want to instrument additional features, if applicable, including: + +- Automatic cron instrumentation +- [Cache module](https://docs.sentry.io/product/insights/caches/) - See + [Instrument Caches](https://docs.sentry.io/platforms/javascript/guides/connect/tracing/instrumentation/custom-instrumentation/caches-module/) +- [Queue module](https://docs.sentry.io/product/insights/queue-monitoring/) - See + [Instrument Queues](https://docs.sentry.io/platforms/javascript/guides/connect/tracing/instrumentation/custom-instrumentation/queues-module/) + +## 3. Meta SDKs + +Meta SDKs should contain both the things pointed out in 1. and 2, _PLUS_: + +### 3a. Connected Traces + +Traces from SSR (server side) should be continued in the client side (browser). Usually this means that we have to +inject the trace data as `` tags into the rendered HTML pages. If possible, we should do that automatically. If +there is no way to do that automatically, we should provide a utility for users to do it themselves. + +### 3b. Instrumented Server Components / API Routes / etc. + +Depending on the framework, we should instrument all the pieces that exist in this framework. This includes capturing +errors & spans for things like: + +- Server Components +- API Routes +- Layouts +- etc. + +When possible, we should auto-capture this. If not possible, we should provide utilities for users to do this +themselves. + +### 3c. Bundler Integration / Source Maps + +When possible, Meta SDKs should integrate with the used bundler. For example, SvelteKit uses Vite, so we should +automatically set up `@sentry/vite-plugin` for the user. At a minimum, we want to enable source maps upload for the meta +SDK, but this may also include automated release creation and other bundler features. + +We _should not_ expose the bundler plugin config directly, because this means that we cannot bump the underlying bundler +plugin version in a major way (because the bundler plugin config becomes public API of the meta SDK). Instead, we should +provide an abstraction layer of options that we expose on top of that. + +### 3d. Alternate JS Runtimes + +We generally want to support Node runtimes for the server. However, sometimes there may be alternate runtimes that may +be supported, e.g. Cloudflare Workers or Vercel Edge Functions. We generally do not need to support these in an MVP, but +may decide to support them later. diff --git a/docs/new-sdk-release-checklist.md b/docs/new-sdk-release-checklist.md index a6e0f60e8235..1292c5363fb0 100644 --- a/docs/new-sdk-release-checklist.md +++ b/docs/new-sdk-release-checklist.md @@ -29,22 +29,18 @@ differ slightly for other SDKs depending on how they are structured and how they - [ ] Make sure that the tarball (`yarn build:tarball`) has all the necessary contents - For basic SDKs, this means that the tarball has at least these files: + For basic SDKs, this means that the tarball has at least these files - you can configure what is included in the + tarball via the `files` field in `package.json`: - - [ ] `cjs/.js` - - [ ] `esm/.js` - - [ ] `types/` + - [ ] `build/cjs/.js` (or `build/npm/cjs/.js`) + - [ ] `build/esm/.js` (or `build/npm/esm/.js`) + - [ ] `build/types/` (or `build/npm/types/.js`) - [ ] `package.json` - [ ] Entry points registered in this file match the file structure above - [ ] `LICENSE` - [ ] `README.md` - - [ ] If your tarball should contain additional files outside `esm`, `cjs`, and `types` that are not listed above - (e.g. like Gatsby or Remix), be sure to add a package-specific `prepack.ts` script. In this script, you can copy - these additional files and make other adjustments.\ - Check out the - [Gatsby script](https://github.com/getsentry/sentry-javascript/blob/acd7fbb56ed1859ce48f06a76143075108631c25/packages/gatsby/scripts/prepack.ts#L1) - as an example.\ - It’s recommended to build and pack a tarball and then `yarn add path/to/tarball.tar.gz` it to your test app(s) + - [ ] Any additional files that should be part of the tarball + - [ ] It’s recommended to build and pack a tarball and then `yarn add path/to/tarball.tar.gz` it to your test app(s) to ensure that it has all the correct files. - [ ] Make sure `build.yml` CI script is correctly set up to cover tests for the new package diff --git a/docs/triaging.md b/docs/triaging.md index cd0b1ea1aa65..31a8f4fd1f35 100644 --- a/docs/triaging.md +++ b/docs/triaging.md @@ -43,6 +43,17 @@ categorize the issue as soon as possible. If an issue is hard to fix, an edge ca reply and put the issue in backlog. You may also encourage the user to contribute a PR themselves if we are unlikely to find time to resolve the issue ourselves anytime soon. +Additionally, triaging does not have to happen in one sitting. If you've invested a reasonable amount of time into +triaging an issue, but have not yet found the root cause/a solution, you can always post an update in the issue about +what you've tried so far (and what worked/didn't work), and continue looking into the issue later/on another day. This +depends on the severity of the issue, of course — if something appears to be a critical issue potentially affecting lots +of users, we should prioritise fixing it even if it takes longer. + +If a ticket is in the Web SDK triaging queue, but should be handled by another team (e.g. Replay, Feedback, Profiling), +feel free to ping members of that team in a respective Slack channel to please take a look at the issue. You should also +make sure to apply the correct package labels (e.g. `Package: Replay`, `Package: User Feedback`, +`Package: profiling-node`) to indicate what an issue is about. + ### (Sentry Employees) How & when should I triage issues? Ideally, you can take some time every day in the morning to look over the triage queue and identify issues that you can diff --git a/package.json b/package.json index 43891c4ef0cf..eab00cafbd18 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "packages/gatsby", "packages/google-cloud-serverless", "packages/integration-shims", + "packages/nestjs", "packages/nextjs", "packages/node", "packages/nuxt", diff --git a/packages/angular/ng-package.json b/packages/angular/ng-package.json index 64304f12de15..0bbbbdcdef14 100644 --- a/packages/angular/ng-package.json +++ b/packages/angular/ng-package.json @@ -5,5 +5,5 @@ "entryFile": "src/index.ts" }, "allowedNonPeerDependencies": ["@sentry/browser", "@sentry/core", "@sentry/utils", "@sentry/types", "tslib"], - "assets": ["README.md", "LICENSE"] + "assets": [] } diff --git a/packages/angular/package.json b/packages/angular/package.json index c1cd1d9e8a92..8a6453ca6cca 100644 --- a/packages/angular/package.json +++ b/packages/angular/package.json @@ -57,7 +57,7 @@ "test": "yarn test:unit", "test:unit": "vitest run", "test:unit:watch": "vitest --watch", - "yalc:publish": "yalc publish build --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "volta": { "extends": "../../package.json" @@ -73,8 +73,8 @@ "outputs": [ "{projectRoot}/build/esm2015", "{projectRoot}/build/fesm2015", - "{projectRoot}/build/*.{md,json}", - "{projectRoot}/build/LICENCE" + "{projectRoot}/build/fesm2020", + "{projectRoot}/build/*.d.ts" ] } } diff --git a/packages/astro/package.json b/packages/astro/package.json index baec52659ca7..6c6edb7ea39f 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -18,12 +18,7 @@ }, "type": "module", "files": [ - "cjs", - "esm", - "types", - "types-ts3.8", - "import-hook.mjs", - "loader-hook.mjs" + "/build" ], "main": "build/cjs/index.client.js", "module": "build/esm/index.server.js", @@ -66,7 +61,7 @@ "@sentry/node": "8.12.0", "@sentry/types": "8.12.0", "@sentry/utils": "8.12.0", - "@sentry/vite-plugin": "^2.19.0" + "@sentry/vite-plugin": "^2.20.1" }, "devDependencies": { "astro": "^3.5.0", @@ -81,7 +76,7 @@ "build:dev:watch": "yarn build:watch", "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build", + "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts", "clean": "rimraf build coverage sentry-astro-*.tgz", "fix": "eslint . --format stylish --fix", @@ -89,7 +84,7 @@ "test": "yarn test:unit", "test:unit": "vitest run", "test:watch": "vitest --watch", - "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "volta": { "extends": "../../package.json" diff --git a/packages/astro/src/integration/index.ts b/packages/astro/src/integration/index.ts index 15e48cb49f12..9baee4d9dc39 100644 --- a/packages/astro/src/integration/index.ts +++ b/packages/astro/src/integration/index.ts @@ -48,6 +48,11 @@ export const sentryAstro = (options: SentryOptions = {}): AstroIntegration => { sourcemaps: { assets: uploadOptions.assets ?? [getSourcemapsAssetsGlob(config)], }, + _metaOptions: { + telemetry: { + metaFramework: 'astro', + }, + }, debug: options.debug ?? false, }), ], diff --git a/packages/astro/test/integration/index.test.ts b/packages/astro/test/integration/index.test.ts index cda2d3b1aa8c..886e77ada2dd 100644 --- a/packages/astro/test/integration/index.test.ts +++ b/packages/astro/test/integration/index.test.ts @@ -60,6 +60,11 @@ describe('sentryAstro integration', () => { sourcemaps: { assets: ['out/**/*'], }, + _metaOptions: { + telemetry: { + metaFramework: 'astro', + }, + }, }); }); @@ -80,6 +85,11 @@ describe('sentryAstro integration', () => { sourcemaps: { assets: ['dist/**/*'], }, + _metaOptions: { + telemetry: { + metaFramework: 'astro', + }, + }, }); }); @@ -107,6 +117,11 @@ describe('sentryAstro integration', () => { sourcemaps: { assets: ['{.vercel,dist}/**/*'], }, + _metaOptions: { + telemetry: { + metaFramework: 'astro', + }, + }, }); }); @@ -139,6 +154,11 @@ describe('sentryAstro integration', () => { sourcemaps: { assets: ['dist/server/**/*, dist/client/**/*'], }, + _metaOptions: { + telemetry: { + metaFramework: 'astro', + }, + }, }); }); diff --git a/packages/aws-serverless/package.json b/packages/aws-serverless/package.json index db5bf42fbd6b..4d864b0f6b54 100644 --- a/packages/aws-serverless/package.json +++ b/packages/aws-serverless/package.json @@ -10,12 +10,9 @@ "node": ">=14.18" }, "files": [ - "cjs", - "esm", - "types", - "types-ts3.8", - "import-hook.mjs", - "loader-hook.mjs" + "/build/npm", + "/build/import-hook.mjs", + "/build/loader-hook.mjs" ], "main": "build/npm/cjs/index.js", "types": "build/npm/types/index.d.ts", @@ -88,14 +85,14 @@ "build:dev:watch": "yarn build:watch", "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:tarball": "ts-node ../../scripts/prepack.ts --bundles && npm pack ./build/npm", + "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build dist-awslambda-layer coverage sentry-serverless-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", "test": "jest", "test:watch": "jest --watch", - "yalc:publish": "ts-node ../../scripts/prepack.ts --bundles && yalc publish ./build/npm --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "volta": { "extends": "../../package.json" diff --git a/packages/browser-utils/package.json b/packages/browser-utils/package.json index a73e87b2477d..53a5a765874c 100644 --- a/packages/browser-utils/package.json +++ b/packages/browser-utils/package.json @@ -10,10 +10,7 @@ "node": ">=14.18" }, "files": [ - "cjs", - "esm", - "types", - "types-ts3.8" + "/build" ], "main": "build/cjs/index.js", "module": "build/esm/index.js", @@ -57,14 +54,14 @@ "build:dev:watch": "run-p build:transpile:watch build:types:watch", "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build", + "build:tarball": "npm pack", "clean": "rimraf build coverage sentry-internal-browser-utils-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", "test:unit": "jest", "test": "jest", "test:watch": "jest --watch", - "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "volta": { "extends": "../../package.json" diff --git a/packages/browser/package.json b/packages/browser/package.json index 55cc3144a723..0e5a21767baa 100644 --- a/packages/browser/package.json +++ b/packages/browser/package.json @@ -10,10 +10,7 @@ "node": ">=14.18" }, "files": [ - "cjs", - "esm", - "types", - "types-ts3.8" + "/build/npm" ], "main": "build/npm/cjs/index.js", "module": "build/npm/esm/index.js", @@ -68,7 +65,7 @@ "build:bundle:watch": "rollup -c rollup.bundle.config.mjs --watch", "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:tarball": "ts-node ../../scripts/prepack.ts --bundles && npm pack ./build/npm", + "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage .rpt2_cache sentry-browser-*.tgz", "fix": "eslint . --format stylish --fix", @@ -78,7 +75,7 @@ "test:unit": "jest", "test:package": "node test/package/npm-build.js && rm test/package/tmp.js", "test:unit:watch": "jest --watch", - "yalc:publish": "ts-node ../../scripts/prepack.ts --bundles && yalc publish ./build/npm --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "volta": { "extends": "../../package.json" diff --git a/packages/bun/package.json b/packages/bun/package.json index 295faadd6511..ba0e6205845c 100644 --- a/packages/bun/package.json +++ b/packages/bun/package.json @@ -10,10 +10,7 @@ "node": ">=14.18" }, "files": [ - "cjs", - "esm", - "types", - "types-ts3.8" + "/build" ], "main": "build/cjs/index.js", "module": "build/esm/index.js", @@ -62,7 +59,7 @@ "build:dev:watch": "yarn build:watch", "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build", + "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-bun-*.tgz", "fix": "eslint . --format stylish --fix", @@ -71,7 +68,7 @@ "test": "run-s install:bun test:bun", "test:bun": "bun test", "test:watch": "bun test --watch", - "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "volta": { "extends": "../../package.json" diff --git a/packages/core/package.json b/packages/core/package.json index 432aaeb7b62d..f549088161b8 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -10,10 +10,7 @@ "node": ">=14.18" }, "files": [ - "cjs", - "esm", - "types", - "types-ts3.8" + "/build" ], "main": "build/cjs/index.js", "module": "build/esm/index.js", @@ -56,14 +53,14 @@ "build:dev:watch": "yarn build:watch", "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build", + "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-core-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", "test": "jest", "test:watch": "jest --watch", - "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "volta": { "extends": "../../package.json" diff --git a/packages/deno/package.json b/packages/deno/package.json index 111682c9925d..eefb8ea4d340 100644 --- a/packages/deno/package.json +++ b/packages/deno/package.json @@ -21,9 +21,7 @@ "access": "public" }, "files": [ - "index.mjs", - "index.mjs.map", - "index.d.ts" + "/build" ], "dependencies": { "@sentry/core": "8.12.0", @@ -43,7 +41,7 @@ "build:types": "run-s deno-types build:types:tsc build:types:bundle", "build:types:tsc": "tsc -p tsconfig.types.json", "build:types:bundle": "rollup -c rollup.types.config.mjs", - "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build", + "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build build-types build-test coverage", "prefix": "yarn deno-types", @@ -57,7 +55,7 @@ "test:types": "deno check ./build/index.mjs", "test:unit": "deno test --allow-read --allow-run", "test:unit:update": "deno test --allow-read --allow-write --allow-run -- --update", - "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "volta": { "extends": "../../package.json" diff --git a/packages/eslint-config-sdk/package.json b/packages/eslint-config-sdk/package.json index 180827521667..de7380692e5b 100644 --- a/packages/eslint-config-sdk/package.json +++ b/packages/eslint-config-sdk/package.json @@ -15,7 +15,7 @@ "node": ">=14.18" }, "files": [ - "src" + "/src" ], "main": "src/index.js", "publishConfig": { diff --git a/packages/eslint-plugin-sdk/package.json b/packages/eslint-plugin-sdk/package.json index a72a3c3a0d15..d96ece7a35b1 100644 --- a/packages/eslint-plugin-sdk/package.json +++ b/packages/eslint-plugin-sdk/package.json @@ -15,7 +15,7 @@ "node": ">=14.18" }, "files": [ - "src" + "/src" ], "main": "src/index.js", "publishConfig": { diff --git a/packages/feedback/package.json b/packages/feedback/package.json index 7f3898f59f99..bcd5b2a69cd8 100644 --- a/packages/feedback/package.json +++ b/packages/feedback/package.json @@ -10,10 +10,7 @@ "node": ">=14.18" }, "files": [ - "cjs", - "esm", - "types", - "types-ts3.8" + "/build/npm" ], "main": "build/npm/cjs/index.js", "module": "build/npm/esm/index.js", @@ -62,14 +59,14 @@ "build:transpile:watch": "yarn build:transpile --watch", "build:bundle:watch": "yarn build:bundle --watch", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:tarball": "ts-node ../../scripts/prepack.ts --bundles && npm pack ./build/npm", + "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build sentry-internal-feedback-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", "test": "jest", "test:watch": "jest --watch", - "yalc:publish": "ts-node ../../scripts/prepack.ts --bundles && yalc publish ./build/npm --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "volta": { "extends": "../../package.json" diff --git a/packages/feedback/src/core/sendFeedback.test.ts b/packages/feedback/src/core/sendFeedback.test.ts index 195c208b448a..96df79828ac8 100644 --- a/packages/feedback/src/core/sendFeedback.test.ts +++ b/packages/feedback/src/core/sendFeedback.test.ts @@ -275,7 +275,9 @@ describe('sendFeedback', () => { email: 're@example.org', message: 'mi', }), - ).rejects.toMatch('Unable to send Feedback. Invalid response from server.'); + ).rejects.toMatch( + 'Unable to send Feedback. This could be because of network issues, or because you are using an ad-blocker', + ); }); it('handles 0 transport error', async () => { diff --git a/packages/feedback/src/core/sendFeedback.ts b/packages/feedback/src/core/sendFeedback.ts index a046111cc9ad..3f8c08a51ee3 100644 --- a/packages/feedback/src/core/sendFeedback.ts +++ b/packages/feedback/src/core/sendFeedback.ts @@ -63,7 +63,9 @@ export const sendFeedback: SendFeedback = ( ); } - return reject('Unable to send Feedback. Invalid response from server.'); + return reject( + 'Unable to send Feedback. This could be because of network issues, or because you are using an ad-blocker', + ); }); }); }; diff --git a/packages/feedback/src/modal/components/Dialog.css.ts b/packages/feedback/src/modal/components/Dialog.css.ts index a9d1f4331606..48e2a05716c2 100644 --- a/packages/feedback/src/modal/components/Dialog.css.ts +++ b/packages/feedback/src/modal/components/Dialog.css.ts @@ -122,8 +122,8 @@ const FORM = ` } .form__error-container { - color: var(--error-foreground); - fill: var(--error-foreground); + color: var(--error-color); + fill: var(--error-color); } .form__label { diff --git a/packages/gatsby/package.json b/packages/gatsby/package.json index 446459d9a591..237397ed8eb6 100644 --- a/packages/gatsby/package.json +++ b/packages/gatsby/package.json @@ -14,10 +14,7 @@ "node": ">=14.18" }, "files": [ - "cjs", - "esm", - "types", - "types-ts3.8", + "/build", "gatsby-node.js", "gatsby-node.d.ts" ], @@ -75,14 +72,14 @@ "build:dev:watch": "yarn build:watch", "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build", + "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage *.d.ts sentry-gatsby-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", "test": "yarn ts-node scripts/pretest.ts && yarn jest", "test:watch": "yarn ts-node scripts/pretest.ts && yarn jest --watch", - "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "volta": { "extends": "../../package.json" diff --git a/packages/gatsby/scripts/prepack.ts b/packages/gatsby/scripts/prepack.ts deleted file mode 100644 index f6bf056fcfa3..000000000000 --- a/packages/gatsby/scripts/prepack.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* eslint-disable no-console */ - -// DO NOT RUN this script yourself! -// This is invoked from the main `prepack.ts` script in `sentry-javascript/scripts/prepack.ts`. - -import * as fs from 'fs'; -import * as path from 'path'; - -const PACKAGE_ASSETS = ['gatsby-node.js', 'gatsby-node.d.ts']; - -export function prepack(buildDir: string): boolean { - // copy package-specific assets to build dir - return PACKAGE_ASSETS.every(asset => { - const assetPath = path.resolve(asset); - const destinationPath = path.resolve(buildDir, asset); - try { - if (!fs.existsSync(assetPath)) { - console.error(`\nERROR: Asset '${asset}' does not exist.`); - return false; - } - console.log(`Copying ${path.basename(asset)} to ${path.relative('../..', destinationPath)}.`); - fs.copyFileSync(assetPath, destinationPath); - } catch (error) { - console.error( - `\nERROR: Error while copying ${path.basename(asset)} to ${path.relative('../..', destinationPath)}:\n`, - error, - ); - return false; - } - return true; - }); -} diff --git a/packages/google-cloud-serverless/package.json b/packages/google-cloud-serverless/package.json index b0c2fab0ce82..9bb4376fd11b 100644 --- a/packages/google-cloud-serverless/package.json +++ b/packages/google-cloud-serverless/package.json @@ -10,12 +10,7 @@ "node": ">=14.18" }, "files": [ - "cjs", - "esm", - "types", - "types-ts3.8", - "import-hook.mjs", - "loader-hook.mjs" + "/build" ], "main": "build/cjs/index.js", "types": "build/types/index.d.ts", @@ -79,14 +74,14 @@ "build:dev:watch": "yarn build:watch", "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build", + "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-google-cloud-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", "test": "jest", "test:watch": "jest --watch", - "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "volta": { "extends": "../../package.json" diff --git a/packages/integration-shims/package.json b/packages/integration-shims/package.json index 00711c4a21bc..15024e78660e 100644 --- a/packages/integration-shims/package.json +++ b/packages/integration-shims/package.json @@ -5,6 +5,9 @@ "main": "build/cjs/index.js", "module": "build/esm/index.js", "types": "build/types/index.d.ts", + "files": [ + "/build" + ], "exports": { "./package.json": "./package.json", ".": { diff --git a/packages/nestjs/.eslintrc.js b/packages/nestjs/.eslintrc.js new file mode 100644 index 000000000000..fdb9952bae52 --- /dev/null +++ b/packages/nestjs/.eslintrc.js @@ -0,0 +1,6 @@ +module.exports = { + env: { + node: true, + }, + extends: ['../../.eslintrc.js'], +}; diff --git a/packages/nestjs/LICENSE b/packages/nestjs/LICENSE new file mode 100644 index 000000000000..63e7eb28e19c --- /dev/null +++ b/packages/nestjs/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Functional Software, Inc. dba Sentry + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/nestjs/README.md b/packages/nestjs/README.md new file mode 100644 index 000000000000..58ab6bc95372 --- /dev/null +++ b/packages/nestjs/README.md @@ -0,0 +1,43 @@ +

+ + Sentry + +

+ +# Official Sentry SDK for NestJS (EXPERIMENTAL) + +[![npm version](https://img.shields.io/npm/v/@sentry/nestjs.svg)](https://www.npmjs.com/package/@sentry/nestjs) +[![npm dm](https://img.shields.io/npm/dm/@sentry/nestjs.svg)](https://www.npmjs.com/package/@sentry/nestjs) +[![npm dt](https://img.shields.io/npm/dt/@sentry/nestjs.svg)](https://www.npmjs.com/package/@sentry/nestjs) + +This SDK is considered **experimental and in an alpha state**. It may experience breaking changes. Please reach out on +[GitHub](https://github.com/getsentry/sentry-javascript/issues/new/choose) if you have any feedback or concerns. + +## Installation + +```bash +npm install @sentry/nestjs + +# Or yarn +yarn add @sentry/nestjs +``` + +## Usage + +```js +// CJS Syntax +const Sentry = require('@sentry/nestjs'); +// ESM Syntax +import * as Sentry from '@sentry/nestjs'; + +Sentry.init({ + dsn: '__DSN__', + // ... +}); +``` + +Note that it is necessary to initialize Sentry **before you import any package that may be instrumented by us**. + +## Links + +- [Official SDK Docs](https://docs.sentry.io/platforms/javascript/guides/nestjs/) diff --git a/packages/nestjs/package.json b/packages/nestjs/package.json new file mode 100644 index 000000000000..50fc6b8180a3 --- /dev/null +++ b/packages/nestjs/package.json @@ -0,0 +1,69 @@ +{ + "name": "@sentry/nestjs", + "version": "8.12.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", + "author": "Sentry", + "license": "MIT", + "engines": { + "node": ">=16" + }, + "files": [ + "/build" + ], + "main": "build/cjs/nestjs/index.js", + "module": "build/esm/nestjs/index.js", + "types": "build/types/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./build/types/index.d.ts", + "default": "./build/esm/index.js" + }, + "require": { + "types": "./build/types/index.d.ts", + "default": "./build/cjs/index.js" + } + } + }, + "typesVersions": { + "<4.9": { + "build/types/index.d.ts": [ + "build/types-ts3.8/index.d.ts" + ] + } + }, + "publishConfig": { + "access": "public" + }, + "dependencies": { + "@sentry/core": "8.12.0", + "@sentry/node": "8.12.0" + }, + "scripts": { + "build": "run-p build:transpile build:types", + "build:dev": "yarn build", + "build:transpile": "rollup -c rollup.npm.config.mjs", + "build:types": "run-s build:types:core build:types:downlevel", + "build:types:core": "tsc -p tsconfig.types.json", + "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", + "build:watch": "run-p build:transpile:watch build:types:watch", + "build:dev:watch": "yarn build:watch", + "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", + "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:tarball": "npm pack", + "circularDepCheck": "madge --circular src/index.ts", + "clean": "rimraf build coverage sentry-node-*.tgz", + "fix": "eslint . --format stylish --fix", + "lint": "eslint . --format stylish", + "test": "vitest run", + "test:watch": "vitest --watch", + "yalc:publish": "yalc publish --push --sig" + }, + "volta": { + "extends": "../../package.json" + }, + "sideEffects": false +} diff --git a/packages/nestjs/rollup.npm.config.mjs b/packages/nestjs/rollup.npm.config.mjs new file mode 100644 index 000000000000..84a06f2fb64a --- /dev/null +++ b/packages/nestjs/rollup.npm.config.mjs @@ -0,0 +1,3 @@ +import { makeBaseNPMConfig, makeNPMConfigVariants } from '@sentry-internal/rollup-utils'; + +export default makeNPMConfigVariants(makeBaseNPMConfig()); diff --git a/packages/nestjs/src/index.ts b/packages/nestjs/src/index.ts new file mode 100644 index 000000000000..6ac8d97b4241 --- /dev/null +++ b/packages/nestjs/src/index.ts @@ -0,0 +1,3 @@ +export * from '@sentry/node'; + +export { init } from './sdk'; diff --git a/packages/nestjs/src/sdk.ts b/packages/nestjs/src/sdk.ts new file mode 100644 index 000000000000..8d5ca21b1706 --- /dev/null +++ b/packages/nestjs/src/sdk.ts @@ -0,0 +1,16 @@ +import { applySdkMetadata } from '@sentry/core'; +import type { NodeClient, NodeOptions } from '@sentry/node'; +import { init as nodeInit } from '@sentry/node'; + +/** + * Initializes the NestJS SDK + */ +export function init(options: NodeOptions | undefined = {}): NodeClient | undefined { + const opts: NodeOptions = { + ...options, + }; + + applySdkMetadata(opts, 'nestjs'); + + return nodeInit(opts); +} diff --git a/packages/nestjs/test/sdk.test.ts b/packages/nestjs/test/sdk.test.ts new file mode 100644 index 000000000000..c6bf7166444d --- /dev/null +++ b/packages/nestjs/test/sdk.test.ts @@ -0,0 +1,34 @@ +import * as SentryNode from '@sentry/node'; +import { SDK_VERSION } from '@sentry/utils'; + +import { vi } from 'vitest'; +import { init as nestInit } from '../src/sdk'; + +const nodeInit = vi.spyOn(SentryNode, 'init'); +const PUBLIC_DSN = 'https://username@domain/123'; + +describe('Initialize Nest SDK', () => { + beforeEach(() => { + vi.clearAllMocks(); + }); + + it('has the correct metadata', () => { + const client = nestInit({ + dsn: PUBLIC_DSN, + }); + + const expectedMetadata = { + _metadata: { + sdk: { + name: 'sentry.javascript.nestjs', + packages: [{ name: 'npm:@sentry/nestjs', version: SDK_VERSION }], + version: SDK_VERSION, + }, + }, + }; + + expect(client).not.toBeUndefined(); + expect(nodeInit).toHaveBeenCalledTimes(1); + expect(nodeInit).toHaveBeenLastCalledWith(expect.objectContaining(expectedMetadata)); + }); +}); diff --git a/packages/nestjs/tsconfig.json b/packages/nestjs/tsconfig.json new file mode 100644 index 000000000000..b0eb9ecb6476 --- /dev/null +++ b/packages/nestjs/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.json", + + "include": ["src/**/*"], + + "compilerOptions": {} +} diff --git a/packages/nestjs/tsconfig.test.json b/packages/nestjs/tsconfig.test.json new file mode 100644 index 000000000000..fc9e549d35ce --- /dev/null +++ b/packages/nestjs/tsconfig.test.json @@ -0,0 +1,12 @@ +{ + "extends": "./tsconfig.json", + + "include": ["test/**/*", "vite.config.ts"], + + "compilerOptions": { + // should include all types from `./tsconfig.json` plus types for all test frameworks used + "types": ["vitest/globals"] + + // other package-specific, test-specific options + } +} diff --git a/packages/nestjs/tsconfig.types.json b/packages/nestjs/tsconfig.types.json new file mode 100644 index 000000000000..65455f66bd75 --- /dev/null +++ b/packages/nestjs/tsconfig.types.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "build/types" + } +} diff --git a/packages/nestjs/vite.config.ts b/packages/nestjs/vite.config.ts new file mode 100644 index 000000000000..d82e61610307 --- /dev/null +++ b/packages/nestjs/vite.config.ts @@ -0,0 +1,13 @@ +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, + environment: 'node', + }, +}); diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index 4007ac1b735e..a895b6657c5f 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -12,6 +12,9 @@ "main": "build/cjs/index.server.js", "module": "build/esm/index.server.js", "types": "build/types/index.types.d.ts", + "files": [ + "/build" + ], "exports": { "./package.json": "./package.json", ".": { @@ -65,7 +68,7 @@ "access": "public" }, "dependencies": { - "@opentelemetry/instrumentation-http": "0.52.0", + "@opentelemetry/instrumentation-http": "0.52.1", "@rollup/plugin-commonjs": "26.0.1", "@sentry/core": "8.12.0", "@sentry/node": "8.12.0", @@ -74,7 +77,7 @@ "@sentry/types": "8.12.0", "@sentry/utils": "8.12.0", "@sentry/vercel-edge": "8.12.0", - "@sentry/webpack-plugin": "2.19.0", + "@sentry/webpack-plugin": "2.20.1", "chalk": "3.0.0", "resolve": "1.22.8", "rollup": "3.29.4", @@ -86,8 +89,7 @@ "next": "13.2.0" }, "peerDependencies": { - "next": "^13.2.0 || ^14.0", - "react": "16.x || 17.x || 18.x", + "next": "^13.2.0 || ^14.0 || ^15.0.0-rc.0", "webpack": ">= 5.0.0" }, "peerDependenciesMeta": { @@ -106,7 +108,7 @@ "build:dev:watch": "yarn build:watch", "build:transpile:watch": "nodemon --ext ts --watch src scripts/buildRollup.ts", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build", + "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/edge/index.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts", "clean": "rimraf build coverage sentry-nextjs-*.tgz", "fix": "eslint . --format stylish --fix", @@ -122,7 +124,7 @@ "test:watch": "jest --watch", "vercel:branch": "source vercel/set-up-branch-for-test-app-use.sh", "vercel:project": "source vercel/make-project-use-current-branch.sh", - "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "volta": { "extends": "../../package.json" diff --git a/packages/nextjs/src/config/webpackPluginOptions.ts b/packages/nextjs/src/config/webpackPluginOptions.ts index 05ddb24c9172..6b755cf2c839 100644 --- a/packages/nextjs/src/config/webpackPluginOptions.ts +++ b/packages/nextjs/src/config/webpackPluginOptions.ts @@ -96,6 +96,9 @@ export function getWebpackPluginOptions( }, _metaOptions: { loggerPrefixOverride: `[@sentry/nextjs - ${prefixInsert}]`, + telemetry: { + metaFramework: 'nextjs', + }, }, ...sentryBuildOptions.unstable_sentryWebpackPluginOptions, }; diff --git a/packages/nextjs/src/config/withSentryConfig.ts b/packages/nextjs/src/config/withSentryConfig.ts index d5fc6ee56304..78df524c88c0 100644 --- a/packages/nextjs/src/config/withSentryConfig.ts +++ b/packages/nextjs/src/config/withSentryConfig.ts @@ -16,7 +16,6 @@ let showedExportModeTunnelWarning = false; * Modifies the passed in Next.js configuration with automatic build-time instrumentation and source map upload. * * @param nextConfig A Next.js configuration object, as usually exported in `next.config.js` or `next.config.mjs`. - * @param sentryWebpackPluginOptions Options to configure the automatically included Sentry Webpack Plugin for source maps and release management in Sentry. * @param sentryBuildOptions Additional options to configure instrumentation and * @returns The modified config to be exported */ diff --git a/packages/node/package.json b/packages/node/package.json index 22fbda4975ca..b576dd2b32e2 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -10,12 +10,7 @@ "node": ">=14.18" }, "files": [ - "cjs", - "esm", - "types", - "types-ts3.8", - "import-hook.mjs", - "loader-hook.mjs" + "/build" ], "main": "build/cjs/index.js", "module": "build/esm/index.js", @@ -71,15 +66,15 @@ }, "dependencies": { "@opentelemetry/api": "^1.9.0", - "@opentelemetry/context-async-hooks": "^1.25.0", - "@opentelemetry/core": "^1.25.0", - "@opentelemetry/instrumentation": "^0.52.0", + "@opentelemetry/context-async-hooks": "^1.25.1", + "@opentelemetry/core": "^1.25.1", + "@opentelemetry/instrumentation": "^0.52.1", "@opentelemetry/instrumentation-connect": "0.37.0", "@opentelemetry/instrumentation-express": "0.40.1", "@opentelemetry/instrumentation-fastify": "0.37.0", "@opentelemetry/instrumentation-graphql": "0.41.0", "@opentelemetry/instrumentation-hapi": "0.39.0", - "@opentelemetry/instrumentation-http": "0.52.0", + "@opentelemetry/instrumentation-http": "0.52.1", "@opentelemetry/instrumentation-ioredis": "0.41.0", "@opentelemetry/instrumentation-koa": "0.41.0", "@opentelemetry/instrumentation-mongodb": "0.45.0", @@ -89,10 +84,10 @@ "@opentelemetry/instrumentation-nestjs-core": "0.38.0", "@opentelemetry/instrumentation-pg": "0.42.0", "@opentelemetry/instrumentation-redis-4": "0.40.0", - "@opentelemetry/resources": "^1.25.0", - "@opentelemetry/sdk-trace-base": "^1.25.0", - "@opentelemetry/semantic-conventions": "^1.25.0", - "@prisma/instrumentation": "5.15.0", + "@opentelemetry/resources": "^1.25.1", + "@opentelemetry/sdk-trace-base": "^1.25.1", + "@opentelemetry/semantic-conventions": "^1.25.1", + "@prisma/instrumentation": "5.16.0", "@sentry/core": "8.12.0", "@sentry/opentelemetry": "8.12.0", "@sentry/types": "8.12.0", @@ -115,7 +110,7 @@ "build:dev:watch": "yarn build:watch", "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build", + "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-node-*.tgz", "fix": "eslint . --format stylish --fix", @@ -123,7 +118,7 @@ "test": "yarn test:jest", "test:jest": "jest", "test:watch": "jest --watch", - "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "volta": { "extends": "../../package.json" diff --git a/packages/node/src/proxy/base.ts b/packages/node/src/proxy/base.ts index 4787538c17bb..6e374160b16a 100644 --- a/packages/node/src/proxy/base.ts +++ b/packages/node/src/proxy/base.ts @@ -1,6 +1,6 @@ /** * This code was originally forked from https://github.com/TooTallNate/proxy-agents/tree/b133295fd16f6475578b6b15bd9b4e33ecb0d0b7 - * With the following licence: + * With the following LICENSE: * * (The MIT License) * diff --git a/packages/node/src/proxy/helpers.ts b/packages/node/src/proxy/helpers.ts index cb9a37b13305..4a131c47b4ac 100644 --- a/packages/node/src/proxy/helpers.ts +++ b/packages/node/src/proxy/helpers.ts @@ -1,6 +1,6 @@ /** * This code was originally forked from https://github.com/TooTallNate/proxy-agents/tree/b133295fd16f6475578b6b15bd9b4e33ecb0d0b7 - * With the following licence: + * With the following LICENSE: * * (The MIT License) * diff --git a/packages/node/src/proxy/index.ts b/packages/node/src/proxy/index.ts index 07674895379e..b5e289729607 100644 --- a/packages/node/src/proxy/index.ts +++ b/packages/node/src/proxy/index.ts @@ -1,6 +1,6 @@ /** * This code was originally forked from https://github.com/TooTallNate/proxy-agents/tree/b133295fd16f6475578b6b15bd9b4e33ecb0d0b7 - * With the following licence: + * With the following LICENSE: * * (The MIT License) * diff --git a/packages/node/src/proxy/parse-proxy-response.ts b/packages/node/src/proxy/parse-proxy-response.ts index da29fa52c747..f1878a4e377b 100644 --- a/packages/node/src/proxy/parse-proxy-response.ts +++ b/packages/node/src/proxy/parse-proxy-response.ts @@ -1,6 +1,6 @@ /** * This code was originally forked from https://github.com/TooTallNate/proxy-agents/tree/b133295fd16f6475578b6b15bd9b4e33ecb0d0b7 - * With the following licence: + * With the following LICENSE: * * (The MIT License) * diff --git a/packages/node/src/utils/createMissingInstrumentationContext.ts b/packages/node/src/utils/createMissingInstrumentationContext.ts new file mode 100644 index 000000000000..849e49e8b8e2 --- /dev/null +++ b/packages/node/src/utils/createMissingInstrumentationContext.ts @@ -0,0 +1,7 @@ +import type { MissingInstrumentationContext } from '@sentry/types'; +import { isCjs } from './commonjs'; + +export const createMissingInstrumentationContext = (pkg: string): MissingInstrumentationContext => ({ + package: pkg, + 'javascript.is_cjs': isCjs(), +}); diff --git a/packages/node/src/utils/ensureIsWrapped.ts b/packages/node/src/utils/ensureIsWrapped.ts index 8cf85b39d545..05185a293bed 100644 --- a/packages/node/src/utils/ensureIsWrapped.ts +++ b/packages/node/src/utils/ensureIsWrapped.ts @@ -1,7 +1,8 @@ import { isWrapped } from '@opentelemetry/core'; -import { hasTracingEnabled, isEnabled } from '@sentry/core'; +import { getGlobalScope, hasTracingEnabled, isEnabled } from '@sentry/core'; import { consoleSandbox } from '@sentry/utils'; import { isCjs } from './commonjs'; +import { createMissingInstrumentationContext } from './createMissingInstrumentationContext'; /** * Checks and warns if a framework isn't wrapped by opentelemetry. @@ -24,5 +25,7 @@ export function ensureIsWrapped( ); } }); + + getGlobalScope().setContext('missing_instrumentation', createMissingInstrumentationContext(name)); } } diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index cddeade07f0c..99dc76cd8f87 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -10,7 +10,7 @@ "node": ">=16" }, "files": [ - "build" + "/build" ], "main": "build/module.cjs", "module": "build/module.mjs", @@ -36,7 +36,7 @@ "@sentry/opentelemetry": "8.12.0", "@sentry/types": "8.12.0", "@sentry/utils": "8.12.0", - "@sentry/vite-plugin": "2.19.0", + "@sentry/vite-plugin": "2.20.1", "@sentry/vue": "8.12.0" }, "devDependencies": { @@ -51,7 +51,7 @@ "build:dev:watch": "yarn build:watch", "build:transpile:watch": "nuxt-module-build build --outDir build --watch", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build", + "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts", "clean": "rimraf build coverage sentry-nuxt-*.tgz", "fix": "eslint . --format stylish --fix", @@ -59,7 +59,7 @@ "test": "yarn test:unit", "test:unit": "vitest run", "test:watch": "vitest --watch", - "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "volta": { "extends": "../../package.json" diff --git a/packages/opentelemetry/package.json b/packages/opentelemetry/package.json index 1e2bc5b321c7..83fd1b81267d 100644 --- a/packages/opentelemetry/package.json +++ b/packages/opentelemetry/package.json @@ -10,10 +10,7 @@ "node": ">=14.18" }, "files": [ - "cjs", - "esm", - "types", - "types-ts3.8" + "/build" ], "main": "build/cjs/index.js", "module": "build/esm/index.js", @@ -48,17 +45,17 @@ }, "peerDependencies": { "@opentelemetry/api": "^1.9.0", - "@opentelemetry/core": "^1.25.0", - "@opentelemetry/instrumentation": "^0.52.0", - "@opentelemetry/sdk-trace-base": "^1.25.0", - "@opentelemetry/semantic-conventions": "^1.25.0" + "@opentelemetry/core": "^1.25.1", + "@opentelemetry/instrumentation": "^0.52.1", + "@opentelemetry/sdk-trace-base": "^1.25.1", + "@opentelemetry/semantic-conventions": "^1.25.1" }, "devDependencies": { "@opentelemetry/api": "^1.9.0", - "@opentelemetry/context-async-hooks": "^1.25.0", - "@opentelemetry/core": "^1.25.0", - "@opentelemetry/sdk-trace-base": "^1.25.0", - "@opentelemetry/semantic-conventions": "^1.25.0" + "@opentelemetry/context-async-hooks": "^1.25.1", + "@opentelemetry/core": "^1.25.1", + "@opentelemetry/sdk-trace-base": "^1.25.1", + "@opentelemetry/semantic-conventions": "^1.25.1" }, "scripts": { "build": "run-p build:transpile build:types", @@ -71,7 +68,7 @@ "build:dev:watch": "yarn build:watch", "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build", + "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-opentelemetry-*.tgz", "fix": "eslint . --format stylish --fix", @@ -79,7 +76,7 @@ "test": "yarn test:jest", "test:jest": "jest", "test:watch": "jest --watch", - "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "volta": { "extends": "../../package.json" diff --git a/packages/profiling-node/package.json b/packages/profiling-node/package.json index 5eebb18947e0..b24316abffb8 100644 --- a/packages/profiling-node/package.json +++ b/packages/profiling-node/package.json @@ -38,16 +38,14 @@ "access": "public" }, "files": [ - "lib", - "bindings", - "binding.gyp", - "LICENSE", - "README.md", + "/lib", + "/bindings", + "/binding.gyp", "package.json", - "scripts/binaries.js", - "scripts/check-build.js", - "scripts/copy-target.js", - "scripts/prune-profiler-binaries.js" + "/scripts/binaries.js", + "/scripts/check-build.js", + "/scripts/copy-target.js", + "/scripts/prune-profiler-binaries.js" ], "scripts": { "install": "node scripts/check-build.js", diff --git a/packages/react/package.json b/packages/react/package.json index ae39ffe95c10..14b0d5940b58 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -10,10 +10,7 @@ "node": ">=14.18" }, "files": [ - "cjs", - "esm", - "types", - "types-ts3.8" + "/build" ], "main": "build/cjs/index.js", "module": "build/esm/index.js", @@ -87,14 +84,14 @@ "build:dev:watch": "yarn build:watch", "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build", + "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-react-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", "test": "jest", "test:watch": "jest --watch", - "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "volta": { "extends": "../../package.json" diff --git a/packages/remix/package.json b/packages/remix/package.json index 063465494b06..5609be867958 100644 --- a/packages/remix/package.json +++ b/packages/remix/package.json @@ -13,13 +13,8 @@ "node": ">=14.18" }, "files": [ - "cjs", - "esm", - "types", - "types-ts3.8", - "scripts", - "import-hook.mjs", - "loader-hook.mjs" + "/build", + "/scripts" ], "main": "build/cjs/index.server.js", "module": "build/esm/index.server.js", @@ -57,7 +52,7 @@ "access": "public" }, "dependencies": { - "@opentelemetry/instrumentation-http": "0.52.0", + "@opentelemetry/instrumentation-http": "0.52.1", "@remix-run/router": "1.x", "@sentry/cli": "^2.32.1", "@sentry/core": "8.12.0", @@ -67,7 +62,7 @@ "@sentry/types": "8.12.0", "@sentry/utils": "8.12.0", "glob": "^10.3.4", - "opentelemetry-instrumentation-remix": "0.7.0", + "opentelemetry-instrumentation-remix": "0.7.1", "yargs": "^17.6.0" }, "devDependencies": { @@ -93,7 +88,7 @@ "build:dev:watch": "yarn build:watch", "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build", + "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.server.ts", "clean": "rimraf build coverage sentry-remix-*.tgz", "fix": "eslint . --format stylish --fix", @@ -112,7 +107,7 @@ "test:integration:server": "export NODE_OPTIONS='--stack-trace-limit=25' && vitest run", "test:unit": "jest", "test:watch": "jest --watch", - "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "volta": { "extends": "../../package.json" diff --git a/packages/remix/scripts/prepack.ts b/packages/remix/scripts/prepack.ts deleted file mode 100644 index bd32f6fe094e..000000000000 --- a/packages/remix/scripts/prepack.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* eslint-disable no-console */ - -import * as fs from 'fs'; -import * as path from 'path'; - -const PACKAGE_ASSETS = [ - 'scripts/sentry-upload-sourcemaps.js', - 'scripts/createRelease.js', - 'scripts/deleteSourcemaps.js', - 'scripts/injectDebugId.js', -]; - -export function prepack(buildDir: string): boolean { - // copy package-specific assets to build dir - return PACKAGE_ASSETS.every(asset => { - const assetPath = path.resolve(asset); - const destinationPath = path.resolve(buildDir, asset); - try { - if (!fs.existsSync(assetPath)) { - console.error(`\nERROR: Asset '${asset}' does not exist.`); - return false; - } - const scriptsDir = path.resolve(buildDir, 'scripts'); - if (!fs.existsSync(scriptsDir)) { - console.log('Creating missing directory', scriptsDir); - fs.mkdirSync(scriptsDir); - } - console.log(`Copying ${path.basename(asset)} to ${path.relative('../..', destinationPath)}.`); - fs.copyFileSync(assetPath, destinationPath); - } catch (error) { - console.error( - `\nERROR: Error while copying ${path.basename(asset)} to ${path.relative('../..', destinationPath)}:\n`, - error, - ); - return false; - } - return true; - }); -} diff --git a/packages/replay-canvas/package.json b/packages/replay-canvas/package.json index 3cbe1f4c84cd..cc36812fdb84 100644 --- a/packages/replay-canvas/package.json +++ b/packages/replay-canvas/package.json @@ -26,10 +26,7 @@ } }, "files": [ - "cjs", - "esm", - "types", - "types-ts3.8" + "/build/npm" ], "sideEffects": false, "scripts": { @@ -45,14 +42,14 @@ "build:transpile:watch": "yarn build:transpile --watch", "build:bundle:watch": "yarn build:bundle --watch", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:tarball": "ts-node ../../scripts/prepack.ts --bundles && npm pack ./build/npm", + "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build sentry-replay-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", "test": "jest", "test:watch": "jest --watch", - "yalc:publish": "ts-node ../../scripts/prepack.ts --bundles && yalc publish ./build/npm --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "publishConfig": { "access": "public" diff --git a/packages/replay-internal/package.json b/packages/replay-internal/package.json index eb00efc66b9b..fee3439777c5 100644 --- a/packages/replay-internal/package.json +++ b/packages/replay-internal/package.json @@ -26,10 +26,7 @@ } }, "files": [ - "cjs", - "esm", - "types", - "types-ts3.8" + "/build/npm" ], "sideEffects": false, "publishConfig": { @@ -48,7 +45,7 @@ "build:transpile:watch": "yarn build:transpile --watch", "build:bundle:watch": "yarn build:bundle --watch", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:tarball": "ts-node ../../scripts/prepack.ts --bundles && npm pack ./build/npm", + "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build sentry-replay-*.tgz", "fix": "run-s fix:biome fix:eslint", @@ -57,7 +54,7 @@ "lint": "eslint . --format stylish", "test": "vitest", "test:watch": "vitest --watch", - "yalc:publish": "ts-node ../../scripts/prepack.ts --bundles && yalc publish ./build/npm --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "repository": { "type": "git", diff --git a/packages/replay-worker/package.json b/packages/replay-worker/package.json index 755353814e2d..367d007dcd04 100644 --- a/packages/replay-worker/package.json +++ b/packages/replay-worker/package.json @@ -2,21 +2,18 @@ "name": "@sentry-internal/replay-worker", "version": "8.12.0", "description": "Worker for @sentry-internal/replay", - "main": "build/npm/esm/index.js", - "module": "build/npm/esm/index.js", - "types": "build/npm/types/index.d.ts", + "main": "build/esm/index.js", + "module": "build/esm/index.js", + "types": "build/types/index.d.ts", "typesVersions": { "<4.9": { - "build/npm/types/index.d.ts": [ - "build/npm/types-ts3.8/index.d.ts" + "build/types/index.d.ts": [ + "build/types-ts3.8/index.d.ts" ] } }, "files": [ - "cjs", - "esm", - "types", - "types-ts3.8" + "/build" ], "sideEffects": false, "private": true, @@ -26,7 +23,7 @@ "build:examples": "rollup -c rollup.examples.config.mjs", "build:types": "run-s build:types:core build:types:downlevel", "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/npm/types build/npm/types-ts3.8 --to ts3.8", + "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", "build:dev": "yarn build", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", diff --git a/packages/replay-worker/rollup.worker.config.mjs b/packages/replay-worker/rollup.worker.config.mjs index 48d3f5d41080..fd22c54298dc 100644 --- a/packages/replay-worker/rollup.worker.config.mjs +++ b/packages/replay-worker/rollup.worker.config.mjs @@ -11,7 +11,7 @@ const config = defineConfig([ input: ['./src/index.ts'], treeshake: 'smallest', output: { - dir: './build/npm/esm', + dir: './build/esm', format: 'esm', }, external: ['./worker'], @@ -27,7 +27,7 @@ const config = defineConfig([ { input: ['./src/_worker.ts'], output: { - file: './build/npm/esm/worker.ts', + file: './build/esm/worker.ts', format: 'esm', }, treeshake: 'smallest', diff --git a/packages/replay-worker/tsconfig.types.json b/packages/replay-worker/tsconfig.types.json index 58b6f60a32b1..1a83cadfebcd 100644 --- a/packages/replay-worker/tsconfig.types.json +++ b/packages/replay-worker/tsconfig.types.json @@ -5,6 +5,6 @@ "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, - "outDir": "build/npm/types" + "outDir": "build/types" } } diff --git a/packages/solid/.eslintignore b/packages/solid/.eslintignore new file mode 100644 index 000000000000..3e89751310a5 --- /dev/null +++ b/packages/solid/.eslintignore @@ -0,0 +1,2 @@ +/*.d.ts +/*.d.ts.map diff --git a/packages/solid/.gitignore b/packages/solid/.gitignore new file mode 100644 index 000000000000..3e89751310a5 --- /dev/null +++ b/packages/solid/.gitignore @@ -0,0 +1,2 @@ +/*.d.ts +/*.d.ts.map diff --git a/packages/solid/package.json b/packages/solid/package.json index b7e713ce2c61..8822467e4fdf 100644 --- a/packages/solid/package.json +++ b/packages/solid/package.json @@ -10,35 +10,32 @@ "node": ">=14.18" }, "files": [ - "cjs", - "esm", - "index.d.ts", - "index.d.ts.map", - "solidrouter.d.ts", - "solidrouter.d.ts.map" + "/build", + "/*.d.ts", + "/*.d.ts.map" ], "main": "build/cjs/index.js", "module": "build/esm/index.js", - "types": "build/index.d.ts", + "types": "build/types/index.d.ts", "exports": { "./package.json": "./package.json", ".": { "import": { - "types": "./build/index.d.ts", + "types": "./build/types/index.d.ts", "default": "./build/esm/index.js" }, "require": { - "types": "./build/index.d.ts", + "types": "./build/types/index.d.ts", "default": "./build/cjs/index.js" } }, "./solidrouter": { "import": { - "types": "./build/solidrouter.d.ts", + "types": "./solidrouter.d.ts", "default": "./build/esm/solidrouter.js" }, "require": { - "types": "./build/solidrouter.d.ts", + "types": "./solidrouter.d.ts", "default": "./build/cjs/solidrouter.js" } } @@ -73,23 +70,35 @@ "build": "run-p build:transpile build:types", "build:dev": "yarn build", "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "run-s build:types:core", + "build:types": "run-s build:types:core build:types:solidrouter", "build:types:core": "tsc -p tsconfig.types.json", + "build:types:solidrouter": "tsc -p tsconfig.solidrouter-types.json", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build", + "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", - "clean": "rimraf build coverage sentry-solid-*.tgz", + "clean": "rimraf build coverage sentry-solid-*.tgz ./*.d.ts ./*.d.ts.map", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", "test": "vitest run", "test:watch": "vitest --watch", - "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "volta": { "extends": "../../package.json" }, + "nx": { + "targets": { + "build:types": { + "outputs": [ + "{projectRoot}/build/types", + "{projectRoot}/*.d.ts", + "{projectRoot}/*.d.ts.map" + ] + } + } + }, "sideEffects": false } diff --git a/packages/solid/tsconfig.solidrouter-types.json b/packages/solid/tsconfig.solidrouter-types.json new file mode 100644 index 000000000000..055ad82a187a --- /dev/null +++ b/packages/solid/tsconfig.solidrouter-types.json @@ -0,0 +1,15 @@ +{ + "extends": "./tsconfig.json", + + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "./" + }, + + "//": "This type is built separately because it is for a subpath export, which has problems if it is not in the root", + "include": ["src/solidrouter.ts"], + "//": "Without this, we cannot output into the root dir", + "exclude": [] +} diff --git a/packages/solid/tsconfig.types.json b/packages/solid/tsconfig.types.json index 49a8c984fcc6..fa96a3ccc08b 100644 --- a/packages/solid/tsconfig.types.json +++ b/packages/solid/tsconfig.types.json @@ -5,6 +5,9 @@ "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, - "outDir": "build" - } + "outDir": "build/types" + }, + + "//": "This is built separately in tsconfig.solidrouter-types.json", + "exclude": ["src/solidrouter.ts"] } diff --git a/packages/svelte/package.json b/packages/svelte/package.json index fa1cb9eefcab..2a1161f1d26d 100644 --- a/packages/svelte/package.json +++ b/packages/svelte/package.json @@ -10,10 +10,7 @@ "node": ">=14.18" }, "files": [ - "cjs", - "esm", - "types", - "types-ts3.8" + "/build" ], "main": "build/cjs/index.js", "module": "build/esm/index.js", @@ -67,14 +64,14 @@ "build:dev:watch": "yarn build:watch", "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build", + "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-svelte-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", "test": "vitest run", "test:watch": "vitest --watch", - "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "volta": { "extends": "../../package.json" diff --git a/packages/sveltekit/package.json b/packages/sveltekit/package.json index 2816752edd05..1762d059ef6a 100644 --- a/packages/sveltekit/package.json +++ b/packages/sveltekit/package.json @@ -10,10 +10,7 @@ "node": ">=16" }, "files": [ - "cjs", - "esm", - "types", - "types-ts3.8" + "/build" ], "main": "build/cjs/index.server.js", "module": "build/esm/index.server.js", @@ -43,7 +40,7 @@ "@sentry/svelte": "8.12.0", "@sentry/types": "8.12.0", "@sentry/utils": "8.12.0", - "@sentry/vite-plugin": "2.19.0", + "@sentry/vite-plugin": "2.20.1", "magic-string": "0.30.7", "magicast": "0.2.8", "sorcery": "0.11.0" @@ -63,7 +60,7 @@ "build:dev:watch": "yarn build:watch", "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build", + "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts", "clean": "rimraf build coverage sentry-sveltekit-*.tgz", "fix": "eslint . --format stylish --fix", @@ -71,7 +68,7 @@ "test": "yarn test:unit", "test:unit": "vitest run", "test:watch": "vitest --watch", - "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "volta": { "extends": "../../package.json" diff --git a/packages/sveltekit/src/vite/sourceMaps.ts b/packages/sveltekit/src/vite/sourceMaps.ts index 5b9e2d355cfa..4eda112eed31 100644 --- a/packages/sveltekit/src/vite/sourceMaps.ts +++ b/packages/sveltekit/src/vite/sourceMaps.ts @@ -59,6 +59,11 @@ export async function makeCustomSentryVitePlugins(options?: CustomSentryVitePlug release: { name: releaseName, }, + _metaOptions: { + telemetry: { + metaFramework: 'sveltekit', + }, + }, }; const mergedOptions = { diff --git a/packages/types/package.json b/packages/types/package.json index 71040ddc47e6..7e820b2b9fa6 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -10,10 +10,7 @@ "node": ">=14.18" }, "files": [ - "cjs", - "esm", - "types", - "types-ts3.8" + "/build" ], "main": "build/cjs/index.js", "module": "build/esm/index.js", @@ -52,11 +49,11 @@ "build:dev:watch": "yarn build:watch", "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build", + "build:tarball": "npm pack", "clean": "rimraf build sentry-types-*.tgz", "lint": "eslint . --format stylish", "fix": "eslint . --format stylish --fix", - "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "volta": { "extends": "../../package.json" diff --git a/packages/types/src/context.ts b/packages/types/src/context.ts index 0344dd179787..10fc61420e25 100644 --- a/packages/types/src/context.ts +++ b/packages/types/src/context.ts @@ -119,3 +119,8 @@ export interface CloudResourceContext extends Record { export interface ProfileContext extends Record { profile_id: string; } + +export interface MissingInstrumentationContext extends Record { + package: string; + ['javascript.is_cjs']?: boolean; +} diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index a7cf18056eb6..8f7fdce74c33 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -18,6 +18,7 @@ export type { CultureContext, TraceContext, CloudResourceContext, + MissingInstrumentationContext, } from './context'; export type { DataCategory } from './datacategory'; export type { DsnComponents, DsnLike, DsnProtocol } from './dsn'; diff --git a/packages/utils/package.json b/packages/utils/package.json index 0088c13d3167..7cbf46ffc3a1 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -10,10 +10,7 @@ "node": ">=14.18" }, "files": [ - "cjs", - "esm", - "types", - "types-ts3.8" + "/build" ], "main": "build/cjs/index.js", "module": "build/esm/index.js", @@ -59,7 +56,7 @@ "build:dev:watch": "yarn build:watch", "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build", + "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage cjs esm sentry-utils-*.tgz", "fix": "eslint . --format stylish --fix", @@ -68,7 +65,7 @@ "test:watch": "jest --watch", "test:package": "node test/types/index.js", "version": "node ../../scripts/versionbump.js src/version.ts", - "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "volta": { "extends": "../../package.json" diff --git a/packages/vercel-edge/package.json b/packages/vercel-edge/package.json index 26393f35e4f5..e91d65abace4 100644 --- a/packages/vercel-edge/package.json +++ b/packages/vercel-edge/package.json @@ -10,10 +10,7 @@ "node": ">=14.18" }, "files": [ - "cjs", - "esm", - "types", - "types-ts3.8" + "/build" ], "main": "build/cjs/index.js", "module": "build/esm/index.js", @@ -61,14 +58,14 @@ "build:dev:watch": "yarn build:watch", "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build", + "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-vercel-edge-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", "test": "jest", "test:watch": "jest --watch", - "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "volta": { "extends": "../../package.json" diff --git a/packages/vue/package.json b/packages/vue/package.json index f11a77677f81..b70ee8d8e100 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -10,10 +10,7 @@ "node": ">=14.18" }, "files": [ - "cjs", - "esm", - "types", - "types-ts3.8" + "/build" ], "main": "build/cjs/index.js", "module": "build/esm/index.js", @@ -64,14 +61,14 @@ "build:dev:watch": "run-p build:transpile:watch build:types:watch", "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build", + "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-vue-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", "test": "jest", "test:watch": "jest --watch", - "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "volta": { "extends": "../../package.json" diff --git a/packages/wasm/package.json b/packages/wasm/package.json index ef004b28c9a1..b1b86738cd45 100644 --- a/packages/wasm/package.json +++ b/packages/wasm/package.json @@ -10,10 +10,7 @@ "node": ">=14.18" }, "files": [ - "cjs", - "esm", - "types", - "types-ts3.8" + "/build/npm" ], "main": "build/npm/cjs/index.js", "module": "build/npm/esm/index.js", @@ -60,12 +57,12 @@ "build:dev:watch": "run-p build:transpile:watch build:types:watch", "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:tarball": "ts-node ../../scripts/prepack.ts --bundles && npm pack ./build/npm", + "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-wasm-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", - "yalc:publish": "ts-node ../../scripts/prepack.ts --bundles && yalc publish ./build/npm --push --sig" + "yalc:publish": "yalc publish --push --sig" }, "volta": { "extends": "../../package.json" diff --git a/scripts/node-unit-tests.ts b/scripts/node-unit-tests.ts index b896be9c73f1..705a8370743f 100644 --- a/scripts/node-unit-tests.ts +++ b/scripts/node-unit-tests.ts @@ -30,7 +30,7 @@ const DEFAULT_SKIP_TESTS_PACKAGES = [ const SKIP_TEST_PACKAGES: Record = { '14': { - ignoredPackages: ['@sentry/sveltekit', '@sentry/vercel-edge', '@sentry/astro', '@sentry/nuxt'], + ignoredPackages: ['@sentry/sveltekit', '@sentry/vercel-edge', '@sentry/astro', '@sentry/nuxt', '@sentry/nestjs'], }, '16': { ignoredPackages: ['@sentry/vercel-edge', '@sentry/astro'], diff --git a/scripts/prepack.ts b/scripts/prepack.ts deleted file mode 100644 index fd3d12e52d60..000000000000 --- a/scripts/prepack.ts +++ /dev/null @@ -1,157 +0,0 @@ -/* eslint-disable no-console */ -/* - This script prepares the central `build` directory for NPM package creation. - It first copies all non-code files into the `build` directory, including `package.json`, which - is edited to adjust entry point paths. These corrections are performed so that the paths align with - the directory structure inside `build`. -*/ - -import * as fs from 'fs'; -import * as path from 'path'; - -const NPM_BUILD_DIR = 'build/npm'; -const BUILD_DIR = 'build'; - -const ASSETS = ['README.md', 'LICENSE', 'package.json', '.npmignore']; - -const ENTRY_POINTS = ['main', 'module', 'types', 'browser'] as const; -const CONDITIONAL_EXPORT_ENTRY_POINTS = ['import', 'require', ...ENTRY_POINTS] as const; -const EXPORT_MAP_ENTRY_POINT = 'exports'; -const TYPES_VERSIONS_ENTRY_POINT = 'typesVersions'; - -const packageWithBundles = process.argv.includes('--bundles'); -const buildDir = packageWithBundles ? NPM_BUILD_DIR : BUILD_DIR; - -type PackageJsonEntryPoints = Record<(typeof ENTRY_POINTS)[number], string>; -type ConditionalExportEntryPoints = Record<(typeof CONDITIONAL_EXPORT_ENTRY_POINTS)[number], string>; - -interface TypeVersions { - [key: string]: { - [key: string]: string[]; - }; -} - -type PackageJsonExports = Partial & { - [key: string]: Partial; -}; - -interface PackageJson extends Record, PackageJsonEntryPoints { - [EXPORT_MAP_ENTRY_POINT]: PackageJsonExports; - [TYPES_VERSIONS_ENTRY_POINT]: TypeVersions; -} - -// eslint-disable-next-line @typescript-eslint/no-var-requires -const pkgJson: PackageJson = require(path.resolve('package.json')); - -// check if build dir exists -if (!fs.existsSync(path.resolve(buildDir))) { - console.error(`\nERROR: Directory '${buildDir}' does not exist in ${pkgJson.name}.`); - console.error("This script should only be executed after you've run `yarn build`."); - process.exit(1); -} - -// copy non-code assets to build dir -ASSETS.forEach(asset => { - const assetPath = path.resolve(asset); - if (fs.existsSync(assetPath)) { - const destinationPath = path.resolve(buildDir, path.basename(asset)); - console.log(`Copying ${path.basename(asset)} to ${path.relative('../..', destinationPath)}.`); - fs.copyFileSync(assetPath, destinationPath); - } -}); - -// package.json modifications -const newPackageJsonPath = path.resolve(buildDir, 'package.json'); -// eslint-disable-next-line @typescript-eslint/no-var-requires -const newPkgJson: PackageJson = require(newPackageJsonPath); - -// modify entry points to point to correct paths (i.e. strip out the build directory) -ENTRY_POINTS.filter(entryPoint => newPkgJson[entryPoint]).forEach(entryPoint => { - newPkgJson[entryPoint] = newPkgJson[entryPoint].replace(`${buildDir}/`, ''); -}); - -/** - * Recursively traverses the exports object and rewrites all string values to remove the build directory. - */ -function rewriteConditionalExportEntryPoint( - exportsObject: Record>, - key: string, -): void { - const exportsField = exportsObject[key]; - if (!exportsField) { - return; - } - - if (typeof exportsField === 'string') { - exportsObject[key] = exportsField.replace(`${buildDir}/`, ''); - return; - } - Object.keys(exportsField).forEach(subfieldKey => { - rewriteConditionalExportEntryPoint(exportsField, subfieldKey); - }); -} - -if (newPkgJson[EXPORT_MAP_ENTRY_POINT]) { - Object.keys(newPkgJson[EXPORT_MAP_ENTRY_POINT]).forEach(key => { - rewriteConditionalExportEntryPoint(newPkgJson[EXPORT_MAP_ENTRY_POINT], key); - }); -} - -if (newPkgJson[TYPES_VERSIONS_ENTRY_POINT]) { - Object.entries(newPkgJson[TYPES_VERSIONS_ENTRY_POINT]).forEach(([key, val]) => { - newPkgJson[TYPES_VERSIONS_ENTRY_POINT][key] = Object.entries(val).reduce( - (acc, [key, val]) => { - const newKey = key.replace(`${buildDir}/`, ''); - acc[newKey] = val.map(v => v.replace(`${buildDir}/`, '')); - return acc; - }, - {} as Record, - ); - }); -} - -delete newPkgJson.scripts; -delete newPkgJson.volta; -delete newPkgJson.jest; - -// write modified package.json to file (pretty-printed with 2 spaces) -try { - fs.writeFileSync(newPackageJsonPath, JSON.stringify(newPkgJson, null, 2)); -} catch (error) { - console.error(`\nERROR: Error while writing modified 'package.json' to disk in ${pkgJson.name}:\n`, error); - process.exit(1); -} - -async function runPackagePrepack(packagePrepackPath: string): Promise { - const { prepack } = await import(packagePrepackPath); - if (prepack && typeof prepack === 'function') { - const isSuccess = prepack(buildDir); - if (!isSuccess) { - process.exit(1); - } - } else { - console.error(`\nERROR: Could not find a \`prepack\` function in './scripts/prepack.ts' in ${pkgJson.name}.`); - console.error( - 'Make sure your package-specific prepack script exports `function prepack(buildDir: string): boolean`.', - ); - process.exit(1); - } -} - -// execute package specific settings -// 1. check if a script called `/scripts/prepack.ts` exists -// if yes, 2.) execute that script for things that are package-specific -async function runPackageSpecificScripts(): Promise { - const packagePrepackPath = path.resolve('scripts', 'prepack.ts'); - try { - if (fs.existsSync(packagePrepackPath)) { - await runPackagePrepack(packagePrepackPath); - } - } catch (error) { - console.error(`\nERROR: Error while trying to load and run ./scripts/prepack.ts in ${pkgJson.name}:\n`, error); - process.exit(1); - } - console.log(`\nSuccessfully finished prepack commands for ${pkgJson.name}\n`); -} - -void runPackageSpecificScripts(); diff --git a/yarn.lock b/yarn.lock index e1fc4cb3cf5f..0461250144d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6803,17 +6803,10 @@ dependencies: "@opentelemetry/api" "^1.0.0" -"@opentelemetry/api-logs@0.51.1": - version "0.51.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/api-logs/-/api-logs-0.51.1.tgz#ded1874c04516c2b8cb24828eef3d6c3d1f75343" - integrity sha512-E3skn949Pk1z2XtXu/lxf6QAZpawuTM/IUEXcAzpiUkTd73Hmvw26FiN3cJuTmkpM5hZzHwkomVdtrh/n/zzwA== - dependencies: - "@opentelemetry/api" "^1.0.0" - -"@opentelemetry/api-logs@0.52.0": - version "0.52.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/api-logs/-/api-logs-0.52.0.tgz#b117c1fc6fc457249739bbe21571cefc55e5092c" - integrity sha512-HxjD7xH9iAE4OyhNaaSec65i1H6QZYBWSwWkowFfsc5YAcDvJG30/J1sRKXEQqdmUcKTXEAnA66UciqZha/4+Q== +"@opentelemetry/api-logs@0.52.1": + version "0.52.1" + resolved "https://registry.yarnpkg.com/@opentelemetry/api-logs/-/api-logs-0.52.1.tgz#52906375da4d64c206b0c4cb8ffa209214654ecc" + integrity sha512-qnSqB2DQ9TPP96dl8cDubDvrUyWc0/sK81xHTK8eSUspzDM3bsewX903qclQFvVhgStjRWdC5bLb3kQqMkfV5A== dependencies: "@opentelemetry/api" "^1.0.0" @@ -6824,20 +6817,15 @@ dependencies: "@opentelemetry/context-base" "^0.12.0" -"@opentelemetry/api@^1.0.0", "@opentelemetry/api@^1.6.0", "@opentelemetry/api@^1.8": - version "1.8.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.8.0.tgz#5aa7abb48f23f693068ed2999ae627d2f7d902ec" - integrity sha512-I/s6F7yKUDdtMsoBWXJe8Qz40Tui5vsuKCWJEWVL+5q9sSWRzzx6v2KeNsOBEwd94j0eWkpWCH4yB6rZg9Mf0w== - -"@opentelemetry/api@^1.9.0": +"@opentelemetry/api@^1.0.0", "@opentelemetry/api@^1.6.0", "@opentelemetry/api@^1.8", "@opentelemetry/api@^1.9.0": version "1.9.0" resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.9.0.tgz#d03eba68273dc0f7509e2a3d5cba21eae10379fe" integrity sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg== -"@opentelemetry/context-async-hooks@^1.25.0": - version "1.25.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/context-async-hooks/-/context-async-hooks-1.25.0.tgz#bc3dcb1302b34b0f56047dd0d0f56b33013f657f" - integrity sha512-sBW313mnMyFg0cp/40BRzrZBWG+581s2j5gIsa5fgGadswyILk4mNFATsqrCOpAx945RDuZ2B7ThQLgor9OpfA== +"@opentelemetry/context-async-hooks@^1.25.1": + version "1.25.1" + resolved "https://registry.yarnpkg.com/@opentelemetry/context-async-hooks/-/context-async-hooks-1.25.1.tgz#810bff2fcab84ec51f4684aff2d21f6c057d9e73" + integrity sha512-UW/ge9zjvAEmRWVapOP0qyCvPulWU6cQxGxDbWEFfGOj1VBBZAuOqTo3X6yWmDTD3Xe15ysCZChHncr2xFMIfQ== "@opentelemetry/context-base@^0.12.0": version "0.12.0" @@ -6858,14 +6846,14 @@ dependencies: "@opentelemetry/semantic-conventions" "1.24.1" -"@opentelemetry/core@1.25.0", "@opentelemetry/core@^1.1.0", "@opentelemetry/core@^1.25.0", "@opentelemetry/core@^1.8.0": +"@opentelemetry/core@1.25.0", "@opentelemetry/core@^1.1.0", "@opentelemetry/core@^1.8.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.23.0", "@opentelemetry/core@^1.25.1": version "1.25.1" resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-1.25.1.tgz#ff667d939d128adfc7c793edae2f6bca177f829d" integrity sha512-GeT/l6rBYWVQ4XArluLVB6WWQ8flHbdb6r2FCHC3smtdOAbrJBIv35tpV/yp9bmYUJf+xmZpu9DRTIeJVhFbEQ== @@ -6946,14 +6934,14 @@ "@opentelemetry/instrumentation" "^0.52.0" "@opentelemetry/semantic-conventions" "^1.22.0" -"@opentelemetry/instrumentation-http@0.52.0": - version "0.52.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-http/-/instrumentation-http-0.52.0.tgz#a2fd280a493591d2cf4db534253ca406580569f7" - integrity sha512-E6ywZuxTa4LnVXZGwL1oj3e2Eog1yIaNqa8KjKXoGkDNKte9/SjQnePXOmhQYI0A9nf0UyFbP9aKd+yHrkJXUA== +"@opentelemetry/instrumentation-http@0.52.1": + version "0.52.1" + resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-http/-/instrumentation-http-0.52.1.tgz#12061501601838d1c912f9c29bdd40a13a7e44cf" + integrity sha512-dG/aevWhaP+7OLv4BQQSEKMJv8GyeOp3Wxl31NHqE8xo9/fYMfEljiZphUHIfyg4gnZ9swMyWjfOQs5GUQe54Q== dependencies: - "@opentelemetry/core" "1.25.0" - "@opentelemetry/instrumentation" "0.52.0" - "@opentelemetry/semantic-conventions" "1.25.0" + "@opentelemetry/core" "1.25.1" + "@opentelemetry/instrumentation" "0.52.1" + "@opentelemetry/semantic-conventions" "1.25.1" semver "^7.5.2" "@opentelemetry/instrumentation-ioredis@0.41.0": @@ -7040,14 +7028,14 @@ "@opentelemetry/redis-common" "^0.36.2" "@opentelemetry/semantic-conventions" "^1.22.0" -"@opentelemetry/instrumentation@0.52.0", "@opentelemetry/instrumentation@^0.52.0": - version "0.52.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation/-/instrumentation-0.52.0.tgz#f8b790bfb1c61c27e0ba846bc6d0e377da195d1e" - integrity sha512-LPwSIrw+60cheWaXsfGL8stBap/AppKQJFE+qqRvzYrgttXFH2ofoIMxWadeqPTq4BYOXM/C7Bdh/T+B60xnlQ== +"@opentelemetry/instrumentation@0.52.1", "@opentelemetry/instrumentation@^0.49 || ^0.50 || ^0.51 || ^0.52.0", "@opentelemetry/instrumentation@^0.52.0", "@opentelemetry/instrumentation@^0.52.1": + version "0.52.1" + resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation/-/instrumentation-0.52.1.tgz#2e7e46a38bd7afbf03cf688c862b0b43418b7f48" + integrity sha512-uXJbYU/5/MBHjMp1FqrILLRuiJCs3Ofk0MeRDk8g1S1gD47U8X3JnSwcMO1rtRo1x1a7zKaQHaoYu49p/4eSKw== dependencies: - "@opentelemetry/api-logs" "0.52.0" + "@opentelemetry/api-logs" "0.52.1" "@types/shimmer" "^1.0.2" - import-in-the-middle "1.8.0" + import-in-the-middle "^1.8.1" require-in-the-middle "^7.1.1" semver "^7.5.2" shimmer "^1.2.1" @@ -7063,18 +7051,6 @@ semver "^7.5.2" shimmer "^1.2.1" -"@opentelemetry/instrumentation@^0.49 || ^0.50 || ^0.51": - version "0.51.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation/-/instrumentation-0.51.1.tgz#46fb2291150ec6923e50b2f094b9407bc726ca9b" - integrity sha512-JIrvhpgqY6437QIqToyozrUG1h5UhwHkaGK/WAX+fkrpyPtc+RO5FkRtUd9BH0MibabHHvqsnBGKfKVijbmp8w== - dependencies: - "@opentelemetry/api-logs" "0.51.1" - "@types/shimmer" "^1.0.2" - import-in-the-middle "1.7.4" - require-in-the-middle "^7.1.1" - semver "^7.5.2" - shimmer "^1.2.1" - "@opentelemetry/otlp-transformer@^0.50.0": version "0.50.0" resolved "https://registry.yarnpkg.com/@opentelemetry/otlp-transformer/-/otlp-transformer-0.50.0.tgz#211fe512fcce9d76042680f955336dbde3be03ef" @@ -7120,7 +7096,7 @@ "@opentelemetry/core" "1.24.1" "@opentelemetry/semantic-conventions" "1.24.1" -"@opentelemetry/resources@1.25.0", "@opentelemetry/resources@^1.25.0": +"@opentelemetry/resources@1.25.0": version "1.25.0" resolved "https://registry.yarnpkg.com/@opentelemetry/resources/-/resources-1.25.0.tgz#84a1e70097e342aa2047aac97be114ad14966793" integrity sha512-iHjydPMYJ+Li1auveJCq2rp5U2h6Mhq8BidiyE0jfVlDTFyR1ny8AfJHfmFzJ/RAM8vT8L7T21kcmGybxZC7lQ== @@ -7128,7 +7104,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.23.0", "@opentelemetry/resources@^1.25.1": 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== @@ -7188,7 +7164,7 @@ "@opentelemetry/resources" "1.24.1" "@opentelemetry/semantic-conventions" "1.24.1" -"@opentelemetry/sdk-trace-base@^1.23.0": +"@opentelemetry/sdk-trace-base@^1.23.0", "@opentelemetry/sdk-trace-base@^1.25.1": version "1.25.1" resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.25.1.tgz#cbc1e60af255655d2020aa14cde17b37bd13df37" integrity sha512-C8k4hnEbc5FamuZQ92nTOp8X/diCY56XUTnMiv9UTuJitCzaNNHAVsdm5+HLCdI8SLQsLWIrG38tddMxLVoftw== @@ -7197,15 +7173,6 @@ "@opentelemetry/resources" "1.25.1" "@opentelemetry/semantic-conventions" "1.25.1" -"@opentelemetry/sdk-trace-base@^1.25.0": - version "1.25.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.25.0.tgz#263f9ce19001c5cd7a814d0eb40ebc6469ae763d" - integrity sha512-6+g2fiRQUG39guCsKVeY8ToeuUf3YUnPkN6DXRA1qDmFLprlLvZm9cS6+chgbW70cZJ406FTtSCDnJwxDC5sGQ== - dependencies: - "@opentelemetry/core" "1.25.0" - "@opentelemetry/resources" "1.25.0" - "@opentelemetry/semantic-conventions" "1.25.0" - "@opentelemetry/semantic-conventions@1.23.0": version "1.23.0" resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.23.0.tgz#627f2721b960fe586b7f72a07912cb7699f06eef" @@ -7216,12 +7183,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": +"@opentelemetry/semantic-conventions@1.25.0", "@opentelemetry/semantic-conventions@^1.17.0", "@opentelemetry/semantic-conventions@^1.22.0", "@opentelemetry/semantic-conventions@^1.23.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": version "1.25.1" resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.25.1.tgz#0deecb386197c5e9c2c28f2f89f51fb8ae9f145e" integrity sha512-ZDjMJJQRlyk8A1KZFCc+bCbsyrn1wTwdNt56F7twdfUfnHUZUq77/WfONCj8p72NZOyP7pNTdUWSTYC3GTbuuQ== @@ -7376,13 +7343,13 @@ resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.9.1.tgz#d92bd2f7f006e0316cb4fda9d73f235965cf2c64" integrity sha512-caSOnG4kxcSkhqC/2ShV7rEoWwd3XrftokxJqOCMVvia4NYV/TPtJlS9C2os3Igxw/Qyxumj9GBQzcStzECvtQ== -"@prisma/instrumentation@5.15.0": - version "5.15.0" - resolved "https://registry.yarnpkg.com/@prisma/instrumentation/-/instrumentation-5.15.0.tgz#9ec061b35761579ffa896bdf19c6a0bf53247593" - integrity sha512-fCWOOOajTKOUEp43gRmBqwt6oN9bPJcLiloi2OG/2ED0N5z62Cuza6FDrlm3SJHQAXYlXqLE0HLdEE5WcUkOzg== +"@prisma/instrumentation@5.16.0": + version "5.16.0" + resolved "https://registry.yarnpkg.com/@prisma/instrumentation/-/instrumentation-5.16.0.tgz#ee50f851945364c43e4067b84fe4071235ca3dd2" + integrity sha512-MVzNRW2ikWvVNnMIEgQMcwWxpFD+XF2U2h0Qz7MjutRqJxrhWexWV2aSi2OXRaU8UL5wzWw7pnjdKUzYhWauLg== dependencies: "@opentelemetry/api" "^1.8" - "@opentelemetry/instrumentation" "^0.49 || ^0.50 || ^0.51" + "@opentelemetry/instrumentation" "^0.49 || ^0.50 || ^0.51 || ^0.52.0" "@opentelemetry/sdk-trace-base" "^1.22" "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": @@ -8030,10 +7997,10 @@ resolved "https://registry.yarnpkg.com/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-2.16.0.tgz#c831713b85516fb3f9da2985836ddf444dc634e6" integrity sha512-+uy1qPkA5MSNgJ0L9ur/vNTydfdHwHnBX2RQ+0thsvkqf90fU788YjkkXwUiBBNuqNyI69JiOW6frixAWy7oUg== -"@sentry/babel-plugin-component-annotate@2.19.0": - version "2.19.0" - resolved "https://registry.yarnpkg.com/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-2.19.0.tgz#70dcccb336bcec24148e1c9cd4e37724cebf5673" - integrity sha512-N2k8cMYu/7X6mzAH5j6bMeNcXQBJLL0lVAF63TDS57hUiT1v2uEqbeYFdH2CZBHb2LepLbMRXmvErIwy76FLTw== +"@sentry/babel-plugin-component-annotate@2.20.1": + version "2.20.1" + resolved "https://registry.yarnpkg.com/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-2.20.1.tgz#204c63ed006a048f48f633876e1b8bacf87a9722" + integrity sha512-4mhEwYTK00bIb5Y9UWIELVUfru587Vaeg0DQGswv4aIRHIiMKLyNqCEejaaybQ/fNChIZOKmvyqXk430YVd7Qg== "@sentry/bundler-plugin-core@2.16.0": version "2.16.0" @@ -8049,13 +8016,13 @@ magic-string "0.27.0" unplugin "1.0.1" -"@sentry/bundler-plugin-core@2.19.0": - version "2.19.0" - resolved "https://registry.yarnpkg.com/@sentry/bundler-plugin-core/-/bundler-plugin-core-2.19.0.tgz#c21935ff5aea9daccfa4c9e0db405aecdec292f6" - integrity sha512-PGTwpue2k4HnLlCuvLeg+cILPWHJorzheNq8KVlXed8mpb8kxKeY9EWQFxBqPS+XyktOMAxZmCMZfKdnHNaJVQ== +"@sentry/bundler-plugin-core@2.20.1": + version "2.20.1" + resolved "https://registry.yarnpkg.com/@sentry/bundler-plugin-core/-/bundler-plugin-core-2.20.1.tgz#c9dd35e2177a4c22ecf675558eb84fbc2607e465" + integrity sha512-6ipbmGzHekxeRCbp7eoefr6bdd/lW4cNA9eNnrmd9+PicubweGaZZbH2NjhFHsaxzgOezwipDHjrTaap2kTHgw== dependencies: "@babel/core" "^7.18.5" - "@sentry/babel-plugin-component-annotate" "2.19.0" + "@sentry/babel-plugin-component-annotate" "2.20.1" "@sentry/cli" "^2.22.3" dotenv "^16.3.1" find-up "^5.0.0" @@ -8117,12 +8084,12 @@ "@sentry/cli-win32-i686" "2.32.1" "@sentry/cli-win32-x64" "2.32.1" -"@sentry/vite-plugin@2.19.0", "@sentry/vite-plugin@^2.19.0": - version "2.19.0" - resolved "https://registry.yarnpkg.com/@sentry/vite-plugin/-/vite-plugin-2.19.0.tgz#c7938fb13eee15036963b87d7b12c4fc851e488b" - integrity sha512-xmntz/bvRwhhU9q2thZas1vQQch9CLMyD8oCfYlNqN57t5XKhIs2dsCU/uS7HCnxIXuuUb/cZtIS7AXVg16fFA== +"@sentry/vite-plugin@2.20.1", "@sentry/vite-plugin@^2.20.1": + version "2.20.1" + resolved "https://registry.yarnpkg.com/@sentry/vite-plugin/-/vite-plugin-2.20.1.tgz#80d5639fca3f68fbf81c316883272ffb34dbc544" + integrity sha512-IOYAJRcV+Uqn0EL8rxcoCvE77PbtGzKjP+B6iIgDZ229AWbpfbpWY8zHCcufwdDzb5PtgOhWWHT74iAsNyij/A== dependencies: - "@sentry/bundler-plugin-core" "2.19.0" + "@sentry/bundler-plugin-core" "2.20.1" unplugin "1.0.1" "@sentry/webpack-plugin@2.16.0": @@ -8134,12 +8101,12 @@ unplugin "1.0.1" uuid "^9.0.0" -"@sentry/webpack-plugin@2.19.0": - version "2.19.0" - resolved "https://registry.yarnpkg.com/@sentry/webpack-plugin/-/webpack-plugin-2.19.0.tgz#e2c011c15b9aed16916257a0eb883d0e1839d783" - integrity sha512-+TtwOAycYHX8uO/qGI81dFLW6opg4b/SZ/oJSC2K0sf8GUow6rv8RKcuzl4oPj3/QF1fuwsH7n8QCXm1XDMRdA== +"@sentry/webpack-plugin@2.20.1": + version "2.20.1" + resolved "https://registry.yarnpkg.com/@sentry/webpack-plugin/-/webpack-plugin-2.20.1.tgz#285d325a0a1bd0a534126b97e0190da9486ff7f6" + integrity sha512-U6LzoE09Ndt0OCWROoRaZqqIHGxyMRdKpBhbqoBqyyfVwXN/zGW3I/cWZ1e8rreiKFj+2+c7+X0kOS+NGMTUrg== dependencies: - "@sentry/bundler-plugin-core" "2.19.0" + "@sentry/bundler-plugin-core" "2.20.1" unplugin "1.0.1" uuid "^9.0.0" @@ -9500,7 +9467,6 @@ "@types/unist" "*" "@types/history-4@npm:@types/history@4.7.8", "@types/history-5@npm:@types/history@4.7.8", "@types/history@*": - name "@types/history-4" version "4.7.8" resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.8.tgz#49348387983075705fe8f4e02fb67f7daaec4934" integrity sha512-S78QIYirQcUoo6UJZx9CSP0O2ix9IaeAXwQi26Rhr/+mg7qqPy8TzaxHSUut7eGjL8WmLccT7/MXf304WjqHcA== @@ -20892,20 +20858,10 @@ import-in-the-middle@1.4.2: cjs-module-lexer "^1.2.2" module-details-from-path "^1.0.3" -import-in-the-middle@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/import-in-the-middle/-/import-in-the-middle-1.7.4.tgz#508da6e91cfa84f210dcdb6c0a91ab0c9e8b3ebc" - integrity sha512-Lk+qzWmiQuRPPulGQeK5qq0v32k2bHnWrRPFgqyvhw7Kkov5L6MOLOIU3pcWeujc9W4q54Cp3Q2WV16eQkc7Bg== - dependencies: - acorn "^8.8.2" - acorn-import-attributes "^1.9.5" - cjs-module-lexer "^1.2.2" - module-details-from-path "^1.0.3" - -import-in-the-middle@1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/import-in-the-middle/-/import-in-the-middle-1.8.0.tgz#c94d88d53701de9a248f9710b41f533e67f598a4" - integrity sha512-/xQjze8szLNnJ5rvHSzn+dcVXqCAU6Plbk4P24U/jwPmg1wy7IIp9OjKIO5tYue8GSPhDpPDiApQjvBUmWwhsQ== +import-in-the-middle@^1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/import-in-the-middle/-/import-in-the-middle-1.8.1.tgz#8b51c2cc631b64e53e958d7048d2d9463ce628f8" + integrity sha512-yhRwoHtiLGvmSozNOALgjRPFI6uYsds60EoMqqnXyyv+JOIW/BrrLejuTGBt+bq0T5tLzOHrN0T7xYTm4Qt/ng== dependencies: acorn "^8.8.2" acorn-import-attributes "^1.9.5" @@ -26645,10 +26601,10 @@ opentelemetry-instrumentation-fetch-node@1.2.0: "@opentelemetry/instrumentation" "^0.43.0" "@opentelemetry/semantic-conventions" "^1.17.0" -opentelemetry-instrumentation-remix@0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/opentelemetry-instrumentation-remix/-/opentelemetry-instrumentation-remix-0.7.0.tgz#ea3ac4d6da69300de1417c938eade2d029c5cd21" - integrity sha512-dF7IdcLkN2xIUATaa2X4ahb/Plk/c2wPdOz90MCVgFHuQZvGtzP9DwBpxXEzs6dz4f57ZzJsHpwJvAXHCSJrbg== +opentelemetry-instrumentation-remix@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/opentelemetry-instrumentation-remix/-/opentelemetry-instrumentation-remix-0.7.1.tgz#ef90ede718612786f7015e5496bd25cac8c49ce3" + integrity sha512-zzJ8CAsf4Pem+B1zY0NEKQcQjXIORgylPBIQMO2x1OdRc9HzBPLUp7JIlGt/RAfPsp5qaEs7QqvX9xtsrZgtFQ== dependencies: "@opentelemetry/instrumentation" "^0.43.0" "@opentelemetry/semantic-conventions" "^1.17.0" @@ -29004,7 +28960,6 @@ react-is@^18.0.0: "@remix-run/router" "1.0.2" "react-router-6@npm:react-router@6.3.0", react-router@6.3.0: - name react-router-6 version "6.3.0" resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.3.0.tgz#3970cc64b4cb4eae0c1ea5203a80334fdd175557" integrity sha512-7Wh1DzVQ+tlFjkeo+ujvjSqSJmkt1+8JO+T5xklPlgrh70y7ogx75ODRW0ThWhY7S+6yEDks8TYrtQe/aoboBQ== @@ -30438,23 +30393,16 @@ semver@7.5.3: dependencies: lru-cache "^6.0.0" -semver@7.x, semver@^7.0.0, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.2, semver@^7.5.3, semver@^7.5.4: - version "7.5.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" - integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== - dependencies: - lru-cache "^6.0.0" +semver@7.x, semver@^7.0.0, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.0, semver@^7.5.2, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.6.2: + version "7.6.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" + integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0, semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.5.0, semver@^7.6.0, semver@^7.6.2: - version "7.6.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" - integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== - send@0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" @@ -31536,7 +31484,6 @@ string-template@~0.2.1: integrity sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0= "string-width-cjs@npm:string-width@^4.2.0", string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: - name string-width-cjs version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -34772,7 +34719,6 @@ workerpool@^6.4.0: integrity sha512-i3KR1mQMNwY2wx20ozq2EjISGtQWDIfV56We+yGJ5yDs8jTwQiLLaqHlkBHITlCuJnYlVRmXegxFxZg7gqI++A== "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: - name wrap-ansi-cjs version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==