Skip to content

Commit 51ceb94

Browse files
authored
Merge branch 'develop' into abhi-vue-deprecations
2 parents f4c3046 + 9307308 commit 51ceb94

File tree

101 files changed

+159
-2830
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+159
-2830
lines changed

.github/ISSUE_TEMPLATE/flaky.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ body:
1818
id: job-name
1919
attributes:
2020
label: Name of Job
21-
placeholder: Build & Test / Nextjs (Node 10) Tests
21+
placeholder: Build & Test / Nextjs (Node 14) Tests
2222
description: name of job as reported in the status report
2323
validations:
2424
required: true

.github/workflows/build.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ jobs:
523523
strategy:
524524
fail-fast: false
525525
matrix:
526-
node: [8, 10, 12, 14, 16, 18, 20, 21]
526+
node: [14, 16, 18, 20, 21]
527527
steps:
528528
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
529529
uses: actions/checkout@v4
@@ -540,9 +540,7 @@ jobs:
540540
- name: Run tests
541541
env:
542542
NODE_VERSION: ${{ matrix.node }}
543-
run: |
544-
[[ $NODE_VERSION == 8 ]] && yarn add --dev --ignore-engines --ignore-scripts --ignore-workspace-root-check [email protected]
545-
yarn test-ci-node
543+
run: yarn test-ci-node
546544
- name: Compute test coverage
547545
uses: codecov/codecov-action@v4
548546
with:
@@ -585,7 +583,7 @@ jobs:
585583
strategy:
586584
fail-fast: false
587585
matrix:
588-
node: [10, 12, 14, 16, 18, 20, 21]
586+
node: [14, 16, 18, 20, 21]
589587
steps:
590588
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
591589
uses: actions/checkout@v4
@@ -612,12 +610,12 @@ jobs:
612610
path: ${{ steps.npm-cache-dir.outputs.dir }}
613611
key: ${{ runner.os }}-Playwright-${{steps.playwright-version.outputs.version}}
614612
- name: Install Playwright browser if not cached
615-
if: steps.playwright-cache.outputs.cache-hit != 'true' && matrix.node >= 14
613+
if: steps.playwright-cache.outputs.cache-hit != 'true'
616614
run: npx playwright install --with-deps
617615
env:
618616
PLAYWRIGHT_BROWSERS_PATH: ${{steps.npm-cache-dir.outputs.dir}}
619617
- name: Install OS dependencies of Playwright if cache hit
620-
if: steps.playwright-cache.outputs.cache-hit == 'true' && matrix.node >= 14
618+
if: steps.playwright-cache.outputs.cache-hit == 'true'
621619
run: npx playwright install-deps
622620
- name: Run tests
623621
env:
@@ -874,7 +872,7 @@ jobs:
874872
strategy:
875873
fail-fast: false
876874
matrix:
877-
node: [10, 12, 14, 16, 18, 20, 21]
875+
node: [14, 16, 18, 20, 21]
878876
typescript:
879877
- false
880878
include:

MIGRATION.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Upgrading from 7.x to 8.x
2+
3+
## Removal of Severity Enum
4+
5+
In v7 we deprecated the `Severity` enum in favor of using the `SeverityLevel` type. In v8 we removed the `Severity`
6+
enum. If you were using the `Severity` enum, you should replace it with the `SeverityLevel` type. See
7+
[below](#severity-severitylevel-and-severitylevels) for code snippet examples
8+
9+
## Removal of the `Offline` integration
10+
11+
The `Offline` integration has been removed in favor of the offline transport wrapper:
12+
http://docs.sentry.io/platforms/javascript/configuration/transports/#offline-caching
13+
114
# Deprecations in 7.x
215

316
You can use the **Experimental** [@sentry/migr8](https://www.npmjs.com/package/@sentry/migr8) to automatically update

dev-packages/browser-integration-tests/suites/replay/slowClick/windowOpen/test.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,14 @@ sentryTest('window.open() is considered for slow click', async ({ getLocalTestUr
2828

2929
// Ensure window.open() still works as expected
3030
const context = browser.contexts()[0];
31-
const waitForNewPage = context.waitForEvent('page');
3231

33-
await page.locator('#windowOpenButton').click();
32+
const [reqResponse1] = await Promise.all([
33+
reqPromise1,
34+
context.waitForEvent('page'),
35+
page.locator('#windowOpenButton').click(),
36+
]);
3437

35-
const { breadcrumbs } = getCustomRecordingEvents(await reqPromise1);
38+
const { breadcrumbs } = getCustomRecordingEvents(reqResponse1);
3639

3740
// Filter out potential blur breadcrumb, as otherwise this can be flaky
3841
const filteredBreadcrumb = breadcrumbs.filter(breadcrumb => breadcrumb.category !== 'ui.blur');
@@ -57,8 +60,6 @@ sentryTest('window.open() is considered for slow click', async ({ getLocalTestUr
5760
},
5861
]);
5962

60-
await waitForNewPage;
61-
6263
const pages = context.pages();
6364

6465
expect(pages.length).toBe(2);

dev-packages/browser-integration-tests/suites/wasm/init.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import * as Sentry from '@sentry/browser';
2-
import { Wasm } from '@sentry/wasm';
2+
import { wasmIntegration } from '@sentry/wasm';
33

44
window.Sentry = Sentry;
55

66
Sentry.init({
77
dsn: 'https://[email protected]/1337',
8-
integrations: [new Wasm()],
8+
integrations: [wasmIntegration()],
99
beforeSend: event => {
1010
window.events.push(event);
1111
return null;

dev-packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/index.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as Sentry from '@sentry/react';
2-
import { BrowserTracing } from '@sentry/tracing';
32
import React from 'react';
43
import ReactDOM from 'react-dom/client';
54
import {
@@ -18,14 +17,12 @@ Sentry.init({
1817
environment: 'qa', // dynamic sampling bias to keep transactions
1918
dsn: process.env.REACT_APP_E2E_TEST_DSN,
2019
integrations: [
21-
new BrowserTracing({
22-
routingInstrumentation: Sentry.reactRouterV6Instrumentation(
23-
React.useEffect,
24-
useLocation,
25-
useNavigationType,
26-
createRoutesFromChildren,
27-
matchRoutes,
28-
),
20+
Sentry.reactRouterV6BrowserTracingIntegration({
21+
useEffect: React.useEffect,
22+
useLocation,
23+
useNavigationType,
24+
createRoutesFromChildren,
25+
matchRoutes,
2926
}),
3027
],
3128
// We recommend adjusting this value in production, or using tracesSampler

dev-packages/node-integration-tests/suites/express/tracing-experimental/test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import { conditionalTest } from '../../../utils';
21
import { cleanupChildProcesses, createRunner } from '../../../utils/runner';
32

4-
conditionalTest({ min: 14 })('express tracing experimental', () => {
3+
describe('express tracing experimental', () => {
54
afterAll(() => {
65
cleanupChildProcesses();
76
});

dev-packages/node-integration-tests/suites/tracing-experimental/apollo-graphql/test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import { conditionalTest } from '../../../utils';
21
import { createRunner } from '../../../utils/runner';
32

4-
conditionalTest({ min: 14 })('GraphQL/Apollo Tests', () => {
3+
describe('GraphQL/Apollo Tests', () => {
54
test('CJS - should instrument GraphQL queries used from Apollo Server.', done => {
65
const EXPECTED_TRANSACTION = {
76
transaction: 'Test Transaction',

dev-packages/node-integration-tests/suites/tracing-experimental/hapi/test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import { conditionalTest } from '../../../utils';
21
import { cleanupChildProcesses, createRunner } from '../../../utils/runner';
32

43
jest.setTimeout(20000);
54

6-
conditionalTest({ min: 14 })('hapi auto-instrumentation', () => {
5+
describe('hapi auto-instrumentation', () => {
76
afterAll(async () => {
87
cleanupChildProcesses();
98
});

dev-packages/node-integration-tests/suites/tracing-experimental/mongodb/test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import { MongoMemoryServer } from 'mongodb-memory-server-global';
22

3-
import { conditionalTest } from '../../../utils';
43
import { cleanupChildProcesses, createRunner } from '../../../utils/runner';
54

65
jest.setTimeout(20000);
76

8-
conditionalTest({ min: 14 })('MongoDB experimental Test', () => {
7+
describe('MongoDB experimental Test', () => {
98
let mongoServer: MongoMemoryServer;
109

1110
beforeAll(async () => {

dev-packages/node-integration-tests/suites/tracing-experimental/mongoose/test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import { MongoMemoryServer } from 'mongodb-memory-server-global';
22

3-
import { conditionalTest } from '../../../utils';
43
import { cleanupChildProcesses, createRunner } from '../../../utils/runner';
54

65
jest.setTimeout(20000);
76

8-
conditionalTest({ min: 14 })('Mongoose experimental Test', () => {
7+
describe('Mongoose experimental Test', () => {
98
let mongoServer: MongoMemoryServer;
109

1110
beforeAll(async () => {

dev-packages/node-integration-tests/suites/tracing-experimental/mysql/test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import { conditionalTest } from '../../../utils';
21
import { cleanupChildProcesses, createRunner } from '../../../utils/runner';
32

4-
conditionalTest({ min: 14 })('mysql auto instrumentation', () => {
3+
describe('mysql auto instrumentation', () => {
54
afterAll(() => {
65
cleanupChildProcesses();
76
});

dev-packages/node-integration-tests/suites/tracing-experimental/mysql2/test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import { conditionalTest } from '../../../utils';
21
import { cleanupChildProcesses, createRunner } from '../../../utils/runner';
32

4-
conditionalTest({ min: 14 })('mysql2 auto instrumentation', () => {
3+
describe('mysql2 auto instrumentation', () => {
54
afterAll(() => {
65
cleanupChildProcesses();
76
});

dev-packages/node-integration-tests/suites/tracing-experimental/postgres/test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import { conditionalTest } from '../../../utils';
21
import { createRunner } from '../../../utils/runner';
32

4-
conditionalTest({ min: 14 })('postgres auto instrumentation', () => {
3+
describe('postgres auto instrumentation', () => {
54
test('should auto-instrument `pg` package', done => {
65
const EXPECTED_TRANSACTION = {
76
transaction: 'Test Transaction',

dev-packages/node-integration-tests/suites/tracing-new/apollo-graphql/test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
import { TestEnv, assertSentryTransaction, conditionalTest } from '../../../utils';
1+
import { TestEnv, assertSentryTransaction } from '../../../utils';
22

3-
// Node 10 is not supported by `graphql-js`
4-
// Ref: https://github.com/graphql/graphql-js/blob/main/package.json
5-
conditionalTest({ min: 12 })('GraphQL/Apollo Tests', () => {
3+
describe('GraphQL/Apollo Tests', () => {
64
test('should instrument GraphQL and Apollo Server.', async () => {
75
const env = await TestEnv.init(__dirname);
86
const envelope = await env.getEnvelopeRequest({ envelopeType: 'transaction' });

dev-packages/node-integration-tests/suites/tracing-new/auto-instrument/mongodb/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { MongoMemoryServer } from 'mongodb-memory-server-global';
22

3-
import { TestEnv, assertSentryTransaction, conditionalTest } from '../../../../utils';
3+
import { TestEnv, assertSentryTransaction } from '../../../../utils';
44

55
// This test can take longer.
66
jest.setTimeout(15000);
77

8-
conditionalTest({ min: 12 })('MongoDB Test', () => {
8+
describe('MongoDB Test', () => {
99
let mongoServer: MongoMemoryServer;
1010

1111
beforeAll(async () => {

dev-packages/node-integration-tests/suites/tracing-new/prisma-orm/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { TestEnv, assertSentryTransaction, conditionalTest } from '../../../utils';
1+
import { TestEnv, assertSentryTransaction } from '../../../utils';
22

3-
conditionalTest({ min: 12 })('Prisma ORM Integration', () => {
3+
describe('Prisma ORM Integration', () => {
44
test('should instrument Prisma client for tracing.', async () => {
55
const env = await TestEnv.init(__dirname);
66
const envelope = await env.getEnvelopeRequest({ envelopeType: 'transaction' });

dev-packages/node-integration-tests/suites/tracing/apollo-graphql/test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
import { TestEnv, assertSentryTransaction, conditionalTest } from '../../../utils';
1+
import { TestEnv, assertSentryTransaction } from '../../../utils';
22

3-
// Node 10 is not supported by `graphql-js`
4-
// Ref: https://github.com/graphql/graphql-js/blob/main/package.json
5-
conditionalTest({ min: 12 })('GraphQL/Apollo Tests', () => {
3+
describe('GraphQL/Apollo Tests', () => {
64
test('should instrument GraphQL and Apollo Server.', async () => {
75
const env = await TestEnv.init(__dirname);
86
const envelope = await env.getEnvelopeRequest({ envelopeType: 'transaction' });

dev-packages/node-integration-tests/suites/tracing/auto-instrument/mongodb/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { MongoMemoryServer } from 'mongodb-memory-server-global';
22

3-
import { TestEnv, assertSentryTransaction, conditionalTest } from '../../../../utils';
3+
import { TestEnv, assertSentryTransaction } from '../../../../utils';
44

55
// This test can take longer.
66
jest.setTimeout(15000);
77

8-
conditionalTest({ min: 12 })('MongoDB Test', () => {
8+
describe('MongoDB Test', () => {
99
let mongoServer: MongoMemoryServer;
1010

1111
beforeAll(async () => {

dev-packages/node-integration-tests/suites/tracing/prisma-orm/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { TestEnv, assertSentryTransaction, conditionalTest } from '../../../utils';
1+
import { TestEnv, assertSentryTransaction } from '../../../utils';
22

3-
conditionalTest({ min: 12 })('Prisma ORM Integration', () => {
3+
describe('Prisma ORM Integration', () => {
44
test('should instrument Prisma client for tracing.', async () => {
55
const env = await TestEnv.init(__dirname);
66
const envelope = await env.getEnvelopeRequest({ envelopeType: 'transaction' });

dev-packages/rollup-utils/plugins/bundlePlugins.mjs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,6 @@ export function makeTerserPlugin() {
116116
reserved: [
117117
// ...except for `_experiments`, which we want to remain usable from the outside
118118
'_experiments',
119-
// ...except for some localforage internals, which if we replaced them would break the localforage package
120-
// with the error "Error: Custom driver not compliant": https://github.com/getsentry/sentry-javascript/issues/5527.
121-
// Reference for which fields are affected: https://localforage.github.io/localForage/ (ctrl-f for "_")
122-
'_driver',
123-
'_initStorage',
124-
'_support',
125119
// We want to keep some replay fields unmangled to enable integration tests to access them
126120
'_replay',
127121
'_canvas',

packages/angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"author": "Sentry",
88
"license": "MIT",
99
"engines": {
10-
"node": ">=8"
10+
"node": ">=14"
1111
},
1212
"main": "build/bundles/sentry-angular.umd.js",
1313
"module": "build/fesm2015/sentry-angular.js",

packages/browser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"author": "Sentry",
88
"license": "MIT",
99
"engines": {
10-
"node": ">=8"
10+
"node": ">=14"
1111
},
1212
"files": [
1313
"cjs",

packages/browser/src/client.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import type {
99
EventHint,
1010
Options,
1111
ParameterizedString,
12-
Severity,
1312
SeverityLevel,
1413
UserFeedback,
1514
} from '@sentry/types';
@@ -76,8 +75,7 @@ export class BrowserClient extends BaseClient<BrowserClientOptions> {
7675
*/
7776
public eventFromMessage(
7877
message: ParameterizedString,
79-
// eslint-disable-next-line deprecation/deprecation
80-
level: Severity | SeverityLevel = 'info',
78+
level: SeverityLevel = 'info',
8179
hint?: EventHint,
8280
): PromiseLike<Event> {
8381
return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace);

packages/browser/src/eventbuilder.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import type {
44
EventHint,
55
Exception,
66
ParameterizedString,
7-
Severity,
87
SeverityLevel,
98
StackFrame,
109
StackParser,
@@ -178,8 +177,7 @@ export function eventFromException(
178177
export function eventFromMessage(
179178
stackParser: StackParser,
180179
message: ParameterizedString,
181-
// eslint-disable-next-line deprecation/deprecation
182-
level: Severity | SeverityLevel = 'info',
180+
level: SeverityLevel = 'info',
183181
hint?: EventHint,
184182
attachStacktrace?: boolean,
185183
): PromiseLike<Event> {

packages/browser/src/exports.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ export type {
66
Event,
77
EventHint,
88
Exception,
9-
// eslint-disable-next-line deprecation/deprecation
10-
Severity,
119
SeverityLevel,
1210
StackFrame,
1311
Stacktrace,

packages/bun/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"author": "Sentry",
88
"license": "MIT",
99
"engines": {
10-
"node": ">=8"
10+
"node": ">=14"
1111
},
1212
"files": [
1313
"cjs",

packages/bun/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ export type {
88
EventHint,
99
Exception,
1010
Session,
11-
// eslint-disable-next-line deprecation/deprecation
12-
Severity,
1311
SeverityLevel,
1412
Span,
1513
StackFrame,

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"author": "Sentry",
88
"license": "MIT",
99
"engines": {
10-
"node": ">=8"
10+
"node": ">=14"
1111
},
1212
"files": [
1313
"cjs",

0 commit comments

Comments
 (0)