Skip to content

Commit cbfaa35

Browse files
committed
move to @sentry/integrations
1 parent a3fc596 commit cbfaa35

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import * as Sentry from '@sentry/browser';
2+
import { ContextLines } from '@sentry/integrations';
23

34
window.Sentry = Sentry;
45

56
Sentry.init({
67
dsn: 'https://[email protected]/1337',
7-
integrations: [new Sentry.Integrations.ContextLines()],
8+
integrations: [new ContextLines()],
89
});

packages/browser/src/integrations/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ export { Breadcrumbs } from './breadcrumbs';
44
export { LinkedErrors } from './linkederrors';
55
export { HttpContext } from './httpcontext';
66
export { Dedupe } from './dedupe';
7-
export { ContextLines } from './contextlines';

packages/browser/src/integrations/contextlines.ts renamed to packages/integrations/src/contextlines.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Event, EventProcessor, Integration, StackFrame } from '@sentry/types';
2-
import { stripUrlQueryAndFragment } from '@sentry/utils';
2+
import { GLOBAL_OBJ, stripUrlQueryAndFragment } from '@sentry/utils';
33

4-
import { WINDOW } from '../helpers';
4+
const WINDOW = GLOBAL_OBJ as typeof GLOBAL_OBJ & Window;
55

66
interface ContextLinesOptions {
77
/**

packages/integrations/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ export { RewriteFrames } from './rewriteframes';
99
export { SessionTiming } from './sessiontiming';
1010
export { Transaction } from './transaction';
1111
export { HttpClient } from './httpclient';
12+
export { ContextLines } from './contextlines';

packages/browser/test/unit/integrations/contextlines.test.ts renamed to packages/integrations/test/contextlines.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { StackFrame } from '@sentry/types';
22

3-
import { applySourceContextToFrame } from '../../../src/integrations/contextlines';
3+
import { applySourceContextToFrame } from '../src/contextlines';
44

55
const lines = ['line1', 'line2', 'line3', 'line4', 'line5', 'line6', 'line7', 'line8', 'line9'];
66
describe('ContextLines', () => {

0 commit comments

Comments
 (0)