Skip to content

Commit 3e148e6

Browse files
authored
feat(vue): Deprecate new VueIntegration() (#10440)
`vueIntegration()` is already exported, but we didn't deprecate the class yet.
1 parent 8bcd136 commit 3e148e6

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

packages/vue/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@ export { init } from './sdk';
44
export { vueRouterInstrumentation } from './router';
55
export { attachErrorHandler } from './errorhandler';
66
export { createTracingMixins } from './tracing';
7-
export { vueIntegration, VueIntegration } from './integration';
7+
export {
8+
vueIntegration,
9+
// eslint-disable-next-line deprecation/deprecation
10+
VueIntegration,
11+
} from './integration';

packages/vue/src/integration.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ export const vueIntegration = defineIntegration(_vueIntegration);
3535

3636
/**
3737
* Initialize Vue error & performance tracking.
38+
*
39+
* @deprecated Use `vueIntegration()` instead.
3840
*/
3941
// eslint-disable-next-line deprecation/deprecation
4042
export const VueIntegration = convertIntegrationFnToClass(

packages/vue/test/integration/VueIntegration.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe('Sentry.VueIntegration', () => {
3636
});
3737

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

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

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

6464
expect(warnings).toEqual([

packages/vue/test/integration/init.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { createApp } from 'vue';
22

3-
import { VueIntegration } from '../../src/integration';
43
import type { Options } from '../../src/types';
54
import * as Sentry from './../../src';
65

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

106105
function runInit(options: Partial<Options>): void {
107-
const integration = new VueIntegration();
106+
const integration = Sentry.vueIntegration();
108107

109108
Sentry.init({
110109
dsn: PUBLIC_DSN,

0 commit comments

Comments
 (0)