Skip to content

Commit

Permalink
move to @sentry/integrations
Browse files Browse the repository at this point in the history
  • Loading branch information
Lms24 committed Jul 31, 2023
1 parent a3fc596 commit cbfaa35
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import * as Sentry from '@sentry/browser';
import { ContextLines } from '@sentry/integrations';

window.Sentry = Sentry;

Sentry.init({
dsn: 'https://public@dsn.ingest.sentry.io/1337',
integrations: [new Sentry.Integrations.ContextLines()],
integrations: [new ContextLines()],
});
1 change: 0 additions & 1 deletion packages/browser/src/integrations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ export { Breadcrumbs } from './breadcrumbs';
export { LinkedErrors } from './linkederrors';
export { HttpContext } from './httpcontext';
export { Dedupe } from './dedupe';
export { ContextLines } from './contextlines';
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Event, EventProcessor, Integration, StackFrame } from '@sentry/types';
import { stripUrlQueryAndFragment } from '@sentry/utils';
import { GLOBAL_OBJ, stripUrlQueryAndFragment } from '@sentry/utils';

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

interface ContextLinesOptions {
/**
Expand Down
1 change: 1 addition & 0 deletions packages/integrations/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ export { RewriteFrames } from './rewriteframes';
export { SessionTiming } from './sessiontiming';
export { Transaction } from './transaction';
export { HttpClient } from './httpclient';
export { ContextLines } from './contextlines';
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { StackFrame } from '@sentry/types';

import { applySourceContextToFrame } from '../../../src/integrations/contextlines';
import { applySourceContextToFrame } from '../src/contextlines';

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

0 comments on commit cbfaa35

Please sign in to comment.