Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(vue): Deprecate new VueIntegration() #10440

Merged
merged 1 commit into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/vue/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ export { init } from './sdk';
export { vueRouterInstrumentation } from './router';
export { attachErrorHandler } from './errorhandler';
export { createTracingMixins } from './tracing';
export { vueIntegration, VueIntegration } from './integration';
export {
vueIntegration,
// eslint-disable-next-line deprecation/deprecation
VueIntegration,
} from './integration';
2 changes: 2 additions & 0 deletions packages/vue/src/integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export const vueIntegration = defineIntegration(_vueIntegration);

/**
* Initialize Vue error & performance tracking.
*
* @deprecated Use `vueIntegration()` instead.
*/
// eslint-disable-next-line deprecation/deprecation
export const VueIntegration = convertIntegrationFnToClass(
Expand Down
4 changes: 2 additions & 2 deletions packages/vue/test/integration/VueIntegration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('Sentry.VueIntegration', () => {
});

// This would normally happen through client.addIntegration()
const integration = new Sentry.VueIntegration({ app });
const integration = Sentry.vueIntegration({ app });
integration['setup']?.(Sentry.getClient() as Client);

app.mount(el);
Expand All @@ -58,7 +58,7 @@ describe('Sentry.VueIntegration', () => {
app.mount(el);

// This would normally happen through client.addIntegration()
const integration = new Sentry.VueIntegration({ app });
const integration = Sentry.vueIntegration({ app });
integration['setup']?.(Sentry.getClient() as Client);

expect(warnings).toEqual([
Expand Down
3 changes: 1 addition & 2 deletions packages/vue/test/integration/init.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { createApp } from 'vue';

import { VueIntegration } from '../../src/integration';
import type { Options } from '../../src/types';
import * as Sentry from './../../src';

Expand Down Expand Up @@ -104,7 +103,7 @@ Update your \`Sentry.init\` call with an appropriate config option:
});

function runInit(options: Partial<Options>): void {
const integration = new VueIntegration();
const integration = Sentry.vueIntegration();

Sentry.init({
dsn: PUBLIC_DSN,
Expand Down