Skip to content

test(e2e): Add missing @sentry/core dep to nextjs-16-userfeedback - #22988

Merged
chargome merged 1 commit into
developfrom
test/fix-nextjs-16-userfeedback-sentry-core-dep
Aug 4, 2026
Merged

test(e2e): Add missing @sentry/core dep to nextjs-16-userfeedback#22988
chargome merged 1 commit into
developfrom
test/fix-nextjs-16-userfeedback-sentry-core-dep

Conversation

@chargome

@chargome chargome commented Aug 4, 2026

Copy link
Copy Markdown
Member

Declares @sentry/core as a dependency of the nextjs-16-userfeedback E2E app, fixing the E2E nextjs-16-userfeedback Test job.

`tests/feedback.test.ts` imports `FeedbackEvent` from `@sentry/core`, which the
app never declared. It resolved only via the monorepo root symlink, so it broke
once CI copied the app out of tree, and Next 16.3 surfaced it by no longer
filtering diagnostics in test files.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@chargome chargome self-assigned this Aug 4, 2026
@chargome
chargome marked this pull request as ready for review August 4, 2026 09:40
@chargome
chargome enabled auto-merge (squash) August 4, 2026 09:40
"test:assert": "pnpm test:prod"
},
"dependencies": {
"@sentry/core": "file:../../packed/sentry-core-packed.tgz",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The @sentry/core package is listed as a runtime dependency but is only used for a type-only import in a test file. It should be a devDependency.
Severity: LOW

Suggested Fix

In package.json, move the @sentry/core entry from the dependencies object to the devDependencies object. This correctly reflects that the package is only needed for development and type-checking, not for the runtime execution of the application.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location:
dev-packages/e2e-tests/test-applications/nextjs-16-userfeedback/package.json#L14

Potential issue: The `@sentry/core` package is incorrectly listed in `dependencies`. It
is only used for a type-only import (`import type { FeedbackEvent } ...`) within the
test file `tests/feedback.test.ts`. Since TypeScript strips type-only imports during
compilation, this package is not required for the application to run. This leads to
incorrect package configuration and potential bundle bloat. For consistency, it should
be moved to `devDependencies`, similar to how other test applications in this repository
handle type-only test dependencies.

Did we get this right? 👍 / 👎 to inform future reviews.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 29.91 kB - -
@sentry/browser - with treeshaking flags 28.12 kB - -
@sentry/browser (incl. Tracing) 47.36 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.36 kB - -
@sentry/browser (incl. Tracing, Profiling) 52.13 kB - -
@sentry/browser (incl. Tracing, Replay) 86.7 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 76.13 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 91.41 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 104.05 kB - -
@sentry/browser (incl. Feedback) 47.22 kB - -
@sentry/browser (incl. sendFeedback) 34.76 kB - -
@sentry/browser (incl. FeedbackAsync) 39.87 kB - -
@sentry/browser (incl. Metrics) 30.99 kB - -
@sentry/browser (incl. Logs) 31.22 kB - -
@sentry/browser (incl. Metrics & Logs) 31.9 kB - -
@sentry/react 31.73 kB - -
@sentry/react (incl. Tracing) 49.61 kB - -
@sentry/vue 34.98 kB - -
@sentry/vue (incl. Tracing) 49.34 kB - -
@sentry/svelte 29.94 kB - -
CDN Bundle 32.01 kB - -
CDN Bundle (incl. Tracing) 47.72 kB - -
CDN Bundle (incl. Logs, Metrics) 33.55 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.08 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 72.9 kB - -
CDN Bundle (incl. Tracing, Replay) 85.35 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.65 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.14 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.46 kB - -
CDN Bundle - uncompressed 95.52 kB - -
CDN Bundle (incl. Tracing) - uncompressed 143.1 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 100.23 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 147.08 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 224.99 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 262.36 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 266.33 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 276.07 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 280.02 kB - -
@sentry/nextjs (client) 52.21 kB - -
@sentry/sveltekit (client) 47.81 kB - -
@sentry/core/server 80.01 kB - -
@sentry/core/browser 51.97 kB - -
@sentry/node 120.89 kB -0.01% -1 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 0 B added added
@sentry/node - without tracing 84.26 kB -0.01% -1 B 🔽
@sentry/aws-serverless 92.94 kB - -
@sentry/cloudflare (withSentry) - minified 219.37 kB - -
@sentry/cloudflare (withSentry) 540.47 kB - -

View base workflow run

@chargome
chargome merged commit 7a86f15 into develop Aug 4, 2026
43 checks passed
@chargome
chargome deleted the test/fix-nextjs-16-userfeedback-sentry-core-dep branch August 4, 2026 09:47
chargome added a commit that referenced this pull request Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants