Skip to content

Commit

Permalink
This is chaos
Browse files Browse the repository at this point in the history
  • Loading branch information
lforst committed Nov 29, 2024
1 parent bea93f9 commit af67219
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
9 changes: 9 additions & 0 deletions packages/astro/src/integration/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ export const sentryAstro = (options: SentryOptions = {}): AstroIntegration => {

// We don't need to check for AUTH_TOKEN here, because the plugin will pick it up from the env
if (shouldUploadSourcemaps && command !== 'dev') {
// TODO(v9): Remove this warning
if (config.vite.build?.sourcemap === false) {

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (20) Unit Tests

Unhandled error

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.files.test.ts:30:43 This error originated in "test/integration/index.files.test.ts" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (20) Unit Tests

test/integration/index.test.ts > sentryAstro integration > enables source maps and adds the sentry vite plugin if an auth token is detected

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.test.ts:41:49

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (20) Unit Tests

test/integration/index.test.ts > sentryAstro integration > falls back to default output dir, if out and root dir are not available

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.test.ts:77:49

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (20) Unit Tests

test/integration/index.test.ts > sentryAstro integration > sets the correct assets glob for vercel if the Vercel adapter is used

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.test.ts:103:49

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (20) Unit Tests

test/integration/index.test.ts > sentryAstro integration > prefers user-specified assets-globs over the default values

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.test.ts:141:49

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (20) Unit Tests

test/integration/index.test.ts > sentryAstro integration > injects client and server init scripts

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.test.ts:213:49

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (20) Unit Tests

test/integration/index.test.ts > sentryAstro integration > injects client and server init scripts

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.test.ts:213:49

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (20) Unit Tests

test/integration/index.test.ts > sentryAstro integration > doesn't inject client init script if `enabled.client` is `false`

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.test.ts:225:49

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (20) Unit Tests

test/integration/index.test.ts > sentryAstro integration > doesn't inject server init script if `enabled.server` is `false`

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.test.ts:236:49

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (22) Unit Tests

Unhandled error

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.files.test.ts:30:43 This error originated in "test/integration/index.files.test.ts" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (22) Unit Tests

test/integration/index.test.ts > sentryAstro integration > enables source maps and adds the sentry vite plugin if an auth token is detected

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.test.ts:41:49

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (22) Unit Tests

test/integration/index.test.ts > sentryAstro integration > falls back to default output dir, if out and root dir are not available

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.test.ts:77:49

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (22) Unit Tests

test/integration/index.test.ts > sentryAstro integration > sets the correct assets glob for vercel if the Vercel adapter is used

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.test.ts:103:49

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (22) Unit Tests

test/integration/index.test.ts > sentryAstro integration > prefers user-specified assets-globs over the default values

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.test.ts:141:49

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (22) Unit Tests

test/integration/index.test.ts > sentryAstro integration > injects client and server init scripts

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.test.ts:213:49

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (22) Unit Tests

test/integration/index.test.ts > sentryAstro integration > injects client and server init scripts

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.test.ts:213:49

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (22) Unit Tests

test/integration/index.test.ts > sentryAstro integration > doesn't inject client init script if `enabled.client` is `false`

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.test.ts:225:49

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (22) Unit Tests

test/integration/index.test.ts > sentryAstro integration > doesn't inject server init script if `enabled.server` is `false`

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.test.ts:236:49

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (18) Unit Tests

Unhandled error

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.files.test.ts:30:43 This error originated in "test/integration/index.files.test.ts" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (18) Unit Tests

test/integration/index.test.ts > sentryAstro integration > enables source maps and adds the sentry vite plugin if an auth token is detected

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.test.ts:41:49

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (18) Unit Tests

test/integration/index.test.ts > sentryAstro integration > falls back to default output dir, if out and root dir are not available

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.test.ts:77:49

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (18) Unit Tests

test/integration/index.test.ts > sentryAstro integration > sets the correct assets glob for vercel if the Vercel adapter is used

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.test.ts:103:49

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (18) Unit Tests

test/integration/index.test.ts > sentryAstro integration > prefers user-specified assets-globs over the default values

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.test.ts:141:49

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (18) Unit Tests

test/integration/index.test.ts > sentryAstro integration > injects client and server init scripts

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.test.ts:213:49

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (18) Unit Tests

test/integration/index.test.ts > sentryAstro integration > injects client and server init scripts

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.test.ts:213:49

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (18) Unit Tests

test/integration/index.test.ts > sentryAstro integration > doesn't inject client init script if `enabled.client` is `false`

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.test.ts:225:49

Check failure on line 39 in packages/astro/src/integration/index.ts

View workflow job for this annotation

GitHub Actions / Node (18) Unit Tests

test/integration/index.test.ts > sentryAstro integration > doesn't inject server init script if `enabled.server` is `false`

TypeError: Cannot read properties of undefined (reading 'build') ❯ Object.astro:config:setup src/integration/index.ts:39:27 ❯ test/integration/index.test.ts:236:49
logger.warn(
"You disabled sourcemaps with the `vite.build.sourcemap` option. Currently, the Sentry SDK will override this option to generate sourcemaps. In future versions, the Sentry SDK will not override the `vite.build.sourcemap` option if you explicitly disable it. If you want to generate and upload sourcemaps please set the `vite.build.sourcemap` option to 'hidden' or undefined.",
);
}

// TODO: Add deleteSourcemapsAfterUpload option and warn if it isn't set.

updateConfig({
vite: {
build: {
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/src/config/webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ export function constructWebpackConfigFunction(
const runtimePrefix = !isServer ? 'Client' : runtime === 'edge' ? 'Edge' : 'Node.js';
// eslint-disable-next-line no-console
console.warn(
`[@sentry/nextjs - ${runtimePrefix}] You disabled sourcemaps with the Webpack \`devtool\` option. Currently, the Sentry SDK will override this option to generate sourcemaps. In future versions, the Sentry SDK will not override the \`devtool\` option if you explicitly disable it. If you want to generate and upload sourcemaps please set the \`devtool\` option to true or undefined.`,
`[@sentry/nextjs - ${runtimePrefix}] You disabled sourcemaps with the Webpack \`devtool\` option. Currently, the Sentry SDK will override this option to generate sourcemaps. In future versions, the Sentry SDK will not override the \`devtool\` option if you explicitly disable it. If you want to generate and upload sourcemaps please set the \`devtool\` option to 'hidden-source-map' or undefined.`,
);
}

Expand Down
3 changes: 1 addition & 2 deletions packages/solidstart/src/vite/sourceMaps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ export function makeSourceMapsVitePlugin(options: SentrySolidStartPluginOptions)
if (!sourceMapsUploadOptions?.filesToDeleteAfterUpload) {
// eslint-disable-next-line no-console
console.warn(
`[Sentry SolidStart PLugin] We recommend setting the \`sourceMapsUploadOptions.filesToDeleteAfterUpload\` option to clean up source maps after uploading.
[Sentry SolidStart Plugin] Otherwise, source maps might be deployed to production, depending on your configuration`,
'[Sentry SolidStart PLugin] We recommend setting the `sourceMapsUploadOptions.filesToDeleteAfterUpload` option to clean up source maps after uploading. Otherwise, source maps might be deployed to production, depending on your configuration. In future versions the SDK will default to deleting sourcemaps after uploading them.',
);
}
}
Expand Down

0 comments on commit af67219

Please sign in to comment.