-
Notifications
You must be signed in to change notification settings - Fork 80
chore: moving common classes into src/common #356
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
Moves shared utility modules into a centralized src/common
directory and updates all import paths accordingly.
- Relocated
config.ts
,errors.ts
,logger.ts
, andsession.ts
undersrc/common
. - Adjusted import statements across tests and source files to reference the new common path.
- Fixed relative paths within moved modules (e.g., updated helper imports in
src/common/session.ts
).
Reviewed Changes
Copilot reviewed 19 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
tests/unit/telemetry.test.ts | Updated imports to src/common for session, config, and logger |
tests/unit/session.test.ts | Updated imports to src/common for session and config |
tests/integration/tools/mongodb/mongodbHelpers.ts | Updated UserConfig import to src/common/config.ts |
tests/integration/tools/mongodb/connect/connect.test.ts | Updated config import to src/common/config.ts |
tests/integration/tools/atlas/clusters.test.ts | Updated Session import to src/common/session.ts |
tests/integration/telemetry.test.ts | Updated Session and config imports to src/common |
tests/integration/helpers.ts | Updated UserConfig , Session , and config imports to src/common |
src/tools/tool.ts | Updated imports for Session , logger , and UserConfig to src/common |
src/tools/mongodb/mongodbTool.ts | Updated ErrorCodes , MongoDBError , and logger imports to src/common |
src/tools/mongodb/connect/connect.ts | Updated UserConfig and Session imports to src/common |
src/tools/atlas/connect/connectCluster.ts | Updated logger import to src/common |
src/tools/atlas/atlasTool.ts | Updated logger import to src/common |
src/telemetry/telemetry.ts | Updated Session , UserConfig , and logger imports to src/common |
src/server.ts | Updated Session , logger , and UserConfig imports to src/common |
src/index.ts | Updated logger , config , and Session imports to src/common |
src/helpers/indexCheck.ts | Updated errors import to src/common/errors.ts |
src/common/session.ts | Corrected internal helper import paths and atlas client import |
src/common/atlas/cluster.ts | Corrected logger import to src/common |
src/common/atlas/apiClient.ts | Corrected logger import to src/common |
Comments suppressed due to low confidence (1)
src/common/session.ts:1
- [nitpick] Consider adding a barrel file (e.g.,
src/common/index.ts
) or configuring path aliases to re-export common modules—this will simplify deep relative imports across the codebase.
import { NodeDriverServiceProvider } from "@mongosh/service-provider-node-driver";
…sword.ts into src/helpers and src/helpers/packageInfo.ts into src/common
Pull Request Test Coverage Report for Build 16218434167Details
💛 - Coveralls |
|
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.
LGTM
Proposed changes
moves
config.ts
,errors.ts
,logger.ts
&session.ts
intosrc/common
moves
src/helpers/packageInfo.ts
intosrc/common
moves
src/common/container.ts
andsrc/common/atlas/generatePassword.ts
intosrc/helpers
now
src/common
should be about classes and common functionality andsrc/helpers
should be about pure/utility functionsNOTE: no code changes except for import paths
Checklist