Skip to content

Commit

Permalink
feat(v8/wasm): Remove deprecated exports (#10552)
Browse files Browse the repository at this point in the history
ref #10100
  • Loading branch information
AbhiPrasad authored Feb 7, 2024
1 parent 9493580 commit f34503f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
4 changes: 2 additions & 2 deletions dev-packages/browser-integration-tests/suites/wasm/init.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as Sentry from '@sentry/browser';
import { Wasm } from '@sentry/wasm';
import { wasmIntegration } from '@sentry/wasm';

window.Sentry = Sentry;

Sentry.init({
dsn: 'https://[email protected]/1337',
integrations: [new Wasm()],
integrations: [wasmIntegration()],
beforeSend: event => {
window.events.push(event);
return null;
Expand Down
23 changes: 2 additions & 21 deletions packages/wasm/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { convertIntegrationFnToClass, defineIntegration } from '@sentry/core';
import type { Event, Integration, IntegrationClass, IntegrationFn, StackFrame } from '@sentry/types';
import { defineIntegration } from '@sentry/core';
import type { Event, IntegrationFn, StackFrame } from '@sentry/types';

import { patchWebAssembly } from './patchWebAssembly';
import { getImage, getImages } from './registry';
Expand Down Expand Up @@ -35,25 +35,6 @@ const _wasmIntegration = (() => {

export const wasmIntegration = defineIntegration(_wasmIntegration);

/**
* Process WASM stack traces to support server-side symbolication.
*
* This also hooks the WebAssembly loading browser API so that module
* registrations are intercepted.
*
* @deprecated Use `wasmIntegration` export instead
*
* import { wasmIntegration } from '@sentry/wasm';
*
* ```
* Sentry.init({ integrations: [wasmIntegration()] });
* ```
*/
// eslint-disable-next-line deprecation/deprecation
export const Wasm = convertIntegrationFnToClass(INTEGRATION_NAME, wasmIntegration) as IntegrationClass<
Integration & { processEvent: (event: Event) => Event }
>;

/**
* Patches a list of stackframes with wasm data needed for server-side symbolication
* if applicable. Returns true if any frames were patched.
Expand Down

0 comments on commit f34503f

Please sign in to comment.