feat(dev): move @netlify/db-dev to dependency of @netlify/dev#611
feat(dev): move @netlify/db-dev to dependency of @netlify/dev#611
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✏️ Tip: You can disable in-progress messages and the fortune message in your review settings. Tip CodeRabbit can use Trivy to scan for security misconfigurations and secrets in Infrastructure as Code files.Add a .trivyignore file to your project to customize which findings Trivy reports. 📝 WalkthroughWalkthroughMoves "@netlify/db-dev" from Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/dev/package.json`:
- Line 62: The catch block in packages/dev/src/main.ts that handles requiring
'@netlify/db-dev' (the block around the startup logic in the main/startDev
function) currently tells users to install the package; update that message to
indicate a runtime/startup failure instead (e.g., "Failed to start dev server:
`@netlify/db-dev` failed to load"), keep the catch in place, and include the
actual error details in the log so operators see the underlying cause; locate
the require/import error handling in the main (or startDev/initDev) function and
replace the install-oriented text with a startup failure message that includes
the error object.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 31aa8f67-c1cd-41ff-8ead-3d1fc7afd071
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (1)
packages/dev/package.json
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/dev/src/main.ts`:
- Around line 486-488: Replace the invalid this.#logger.debug call in the
Netlify DB startup catch block with this.#logger.warn and pass the error
formatted as a string; specifically, update the catch that currently calls
this.#logger.warn('Failed to start Netlify DB locally.') and
this.#logger.debug({ error }, 'Netlify DB startup error') to use
this.#logger.warn('Netlify DB startup error: ' + String(error)) (or template
string) so the Logger interface methods (error/log/warn) are used and the error
is provided as a string.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ad41c5a5-ec42-42a4-9182-c884fb342007
📒 Files selected for processing (1)
packages/dev/src/main.ts
|
@eduardoboucas this is ready for another review |
Make @netlify/db-dev a direct dependency of @netlify/dev so the CLI can use it without requiring an additional install.