-
Notifications
You must be signed in to change notification settings - Fork 247
chore(data-service): remove dependency on compass-logging COMPASS-10116 #7595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 PR removes the @mongodb-js/compass-logging dependency from the data-service package and replaces it with direct usage of mongodb-log-writer and the debug package. This simplifies the dependency chain by using lower-level logging utilities directly.
Key Changes:
- Replaced
@mongodb-js/compass-loggingimports withmongodb-log-writeranddebug - Updated logger type definitions to use
MongoLogWriterinstead ofLogger['log']['unbound'] - Moved
mongodb-log-writerfrom devDependencies to dependencies
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/data-service/src/logger.ts | Updated imports and type definitions to use mongodb-log-writer and debug directly |
| packages/data-service/src/connection-attempt.ts | Changed to import mongoLogId from local logger module instead of creating a new logger |
| packages/data-service/src/connection-attempt.spec.ts | Updated test file to import mongoLogId from local logger module |
| packages/data-service/package.json | Removed @mongodb-js/compass-logging dependency and moved mongodb-log-writer to dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import _debug from 'debug'; | ||
|
|
||
| export const debug = _debug.extend('data-service'); | ||
| export const debug = _debug('data-service'); |
Copilot
AI
Nov 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The debug function usage has changed from .extend('data-service') to calling _debug('data-service') directly. However, the debug package's default export is already a function that creates namespaced debuggers. This change removes the ability to extend an existing debug namespace, which may break existing debug functionality if other parts of the codebase were using debug.extend(). Verify that all usages of the exported debug are compatible with this change.
| export const debug = _debug('data-service'); | |
| export const debug = _debug.extend('data-service'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Copilot is just wrong here
Description
Checklist
Motivation and Context
Open Questions
Dependents
Types of changes