Skip to content

Comments

fix(nuxt): Avoid logging database skip warning when debug is disabled#19095

Merged
logaretm merged 3 commits intodevelopfrom
awad/js-1600-unnecessary-nuxt-debug-warning-when-no-database-config-was
Jan 29, 2026
Merged

fix(nuxt): Avoid logging database skip warning when debug is disabled#19095
logaretm merged 3 commits intodevelopfrom
awad/js-1600-unnecessary-nuxt-debug-warning-when-no-database-config-was

Conversation

@logaretm
Copy link
Member

Previously this was left as-is since the DEBUG_BUILD flag doesn't work in build-time scripts. This PR ensures the warn is only logged by checking the user options by passing it to the nuxt/vite instrumentation plugin.

Closes #19094

@linear
Copy link

linear bot commented Jan 29, 2026

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request fixes an issue where a debug warning about missing database configuration was being logged regardless of the user's debug setting. The fix ensures that the warning is only shown when debug is explicitly enabled.

Changes:

  • Modified addDatabaseInstrumentation to accept an optional moduleOptions parameter
  • Added conditional check to only log the database skip warning when debug is enabled
  • Updated the function call in module.ts to pass moduleOptions

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
packages/nuxt/src/vite/databaseConfig.ts Added optional moduleOptions parameter and conditional debug logging based on moduleOptions?.debug
packages/nuxt/src/module.ts Updated addDatabaseInstrumentation call to pass moduleOptions
packages/nuxt/test/vite/databaseConfig.test.ts Added comprehensive test coverage for the new debug logging behavior with various scenarios

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@github-actions
Copy link
Contributor

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 11,742 - 11,360 +3%
GET With Sentry 2,055 18% 1,990 +3%
GET With Sentry (error only) 7,486 64% 7,741 -3%
POST Baseline 1,168 - 1,192 -2%
POST With Sentry 612 52% 603 +1%
POST With Sentry (error only) 1,069 92% 1,058 +1%
MYSQL Baseline 4,067 - 4,022 +1%
MYSQL With Sentry 604 15% 565 +7%
MYSQL With Sentry (error only) 3,351 82% 3,303 +1%

View base workflow run

@logaretm logaretm merged commit 1727485 into develop Jan 29, 2026
425 of 427 checks passed
@logaretm logaretm deleted the awad/js-1600-unnecessary-nuxt-debug-warning-when-no-database-config-was branch January 29, 2026 19:47
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.

Unnecessary Nuxt debug warning when no database config was set

2 participants