diff --git a/CHANGELOG.md b/CHANGELOG.md index a3631305c..e88293b4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased - feat(nextjs): Set `sendDefaultPii: true` by default ([#1052](https://github.com/getsentry/sentry-wizard/pull/1052)) +- feat(nuxt): Set `sendDefaultPii: true` by default ([#1060](https://github.com/getsentry/sentry-wizard/pull/1060)) ## 6.5.0 diff --git a/e2e-tests/test-applications/nuxt-4-test-app/package.json b/e2e-tests/test-applications/nuxt-4-test-app/package.json index e601e79ee..0e0fa0bd6 100644 --- a/e2e-tests/test-applications/nuxt-4-test-app/package.json +++ b/e2e-tests/test-applications/nuxt-4-test-app/package.json @@ -14,5 +14,8 @@ "nuxt": "3.15.0", "vue": "latest", "vue-router": "latest" + }, + "resolutions": { + "@vercel/nft": "^0.27.4" } -} +} \ No newline at end of file diff --git a/e2e-tests/tests/nuxt-3.test.ts b/e2e-tests/tests/nuxt-3.test.ts index 0cf7140c7..80f279dcd 100644 --- a/e2e-tests/tests/nuxt-3.test.ts +++ b/e2e-tests/tests/nuxt-3.test.ts @@ -182,6 +182,9 @@ function testNuxtProjectConfigs(projectDir: string) { ' integrations: [Sentry.replayIntegration()],', ' // Enable logs to be sent to Sentry', ' enableLogs: true,', + ` // Enable sending of user PII (Personally Identifiable Information)`, + ' // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii', + ' sendDefaultPii: true,', " // Setting this option to true will print useful information to the console while you're setting up Sentry.", ' debug: false,', '});', @@ -198,6 +201,9 @@ function testNuxtProjectConfigs(projectDir: string) { ' tracesSampleRate: 1.0,', ' // Enable logs to be sent to Sentry', ' enableLogs: true,', + ' // Enable sending of user PII (Personally Identifiable Information)', + ' // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii', + ' sendDefaultPii: true,', " // Setting this option to true will print useful information to the console while you're setting up Sentry.", ' debug: false,', '});', diff --git a/e2e-tests/tests/nuxt-4.test.ts b/e2e-tests/tests/nuxt-4.test.ts index a0824d023..a92cef031 100644 --- a/e2e-tests/tests/nuxt-4.test.ts +++ b/e2e-tests/tests/nuxt-4.test.ts @@ -181,6 +181,9 @@ function testNuxtProjectConfigs(projectDir: string) { ' integrations: [Sentry.replayIntegration()],', ' // Enable logs to be sent to Sentry', ' enableLogs: true,', + ` // Enable sending of user PII (Personally Identifiable Information)`, + ' // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii', + ' sendDefaultPii: true,', " // Setting this option to true will print useful information to the console while you're setting up Sentry.", ' debug: false,', '});', @@ -197,6 +200,9 @@ function testNuxtProjectConfigs(projectDir: string) { ' tracesSampleRate: 1.0,', ' // Enable logs to be sent to Sentry', ' enableLogs: true,', + ' // Enable sending of user PII (Personally Identifiable Information)', + ' // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii', + ' sendDefaultPii: true,', " // Setting this option to true will print useful information to the console while you're setting up Sentry.", ' debug: false,', '});', diff --git a/src/nuxt/templates.ts b/src/nuxt/templates.ts index ebdabe647..282ef458b 100644 --- a/src/nuxt/templates.ts +++ b/src/nuxt/templates.ts @@ -113,7 +113,11 @@ Sentry.init({ // If set up, you can use your runtime config here // dsn: useRuntimeConfig().public.sentry.dsn, ${getConfigBody(dsn, 'client', selectedFeatures)} - + + // Enable sending of user PII (Personally Identifiable Information) + // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii + sendDefaultPii: true, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, }); @@ -128,7 +132,11 @@ function getSentryServerConfigContents( Sentry.init({ ${getConfigBody(dsn, 'server', selectedFeatures)} - + + // Enable sending of user PII (Personally Identifiable Information) + // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii + sendDefaultPii: true, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, }); diff --git a/test/nuxt/templates.test.ts b/test/nuxt/templates.test.ts index 9bc179770..ff487a56f 100644 --- a/test/nuxt/templates.test.ts +++ b/test/nuxt/templates.test.ts @@ -61,7 +61,11 @@ describe('Nuxt code templates', () => { // Enable logs to be sent to Sentry enableLogs: true, - + + // Enable sending of user PII (Personally Identifiable Information) + // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii + sendDefaultPii: true, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, }); @@ -101,7 +105,11 @@ describe('Nuxt code templates', () => { // Enable logs to be sent to Sentry enableLogs: true, - + + // Enable sending of user PII (Personally Identifiable Information) + // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii + sendDefaultPii: true, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, }); @@ -134,7 +142,11 @@ describe('Nuxt code templates', () => { // Enable logs to be sent to Sentry enableLogs: true, - + + // Enable sending of user PII (Personally Identifiable Information) + // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii + sendDefaultPii: true, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, }); @@ -175,7 +187,11 @@ describe('Nuxt code templates', () => { // If you don't want to use Session Replay, just remove the line below: integrations: [Sentry.replayIntegration()], - + + // Enable sending of user PII (Personally Identifiable Information) + // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii + sendDefaultPii: true, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, }); @@ -204,7 +220,11 @@ describe('Nuxt code templates', () => { // Enable logs to be sent to Sentry enableLogs: true, - + + // Enable sending of user PII (Personally Identifiable Information) + // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii + sendDefaultPii: true, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, }); @@ -230,7 +250,11 @@ describe('Nuxt code templates', () => { // If set up, you can use your runtime config here // dsn: useRuntimeConfig().public.sentry.dsn, dsn: "https://sentry.io/123", - + + // Enable sending of user PII (Personally Identifiable Information) + // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii + sendDefaultPii: true, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, }); @@ -263,7 +287,11 @@ describe('Nuxt code templates', () => { // Enable logs to be sent to Sentry enableLogs: true, - + + // Enable sending of user PII (Personally Identifiable Information) + // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii + sendDefaultPii: true, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, }); @@ -290,7 +318,11 @@ describe('Nuxt code templates', () => { // Enable logs to be sent to Sentry enableLogs: true, - + + // Enable sending of user PII (Personally Identifiable Information) + // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii + sendDefaultPii: true, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, }); @@ -318,7 +350,11 @@ describe('Nuxt code templates', () => { // We recommend adjusting this value in production, or using tracesSampler // for finer control tracesSampleRate: 1.0, - + + // Enable sending of user PII (Personally Identifiable Information) + // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii + sendDefaultPii: true, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, }); @@ -342,7 +378,11 @@ describe('Nuxt code templates', () => { Sentry.init({ dsn: "https://sentry.io/123", - + + // Enable sending of user PII (Personally Identifiable Information) + // https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii + sendDefaultPii: true, + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, });