Conversation
There was a problem hiding this comment.
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
addDatabaseInstrumentationto accept an optionalmoduleOptionsparameter - Added conditional check to only log the database skip warning when
debugis enabled - Updated the function call in
module.tsto passmoduleOptions
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.
There was a problem hiding this comment.
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.
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.
|
Previously this was left as-is since the
DEBUG_BUILDflag 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