-
Notifications
You must be signed in to change notification settings - Fork 8
feat(mongodb-constants): add new utils for views COMPASS:9700 #567
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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 adds utilities for MongoDB view pipeline operations to the mongodb-constants package. The utilities focus on determining search index compatibility for views based on pipeline structure and MongoDB server version.
Key changes:
- Adds pipeline validation for search queryable views
- Implements version compatibility checks for Data Explorer and Compass
- Provides comprehensive test coverage for the new utilities
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
packages/mongodb-constants/src/views.ts | Main implementation with pipeline validation and version compatibility utilities |
packages/mongodb-constants/src/views.spec.ts | Comprehensive test suite covering all utility functions |
packages/mongodb-constants/src/index.ts | Exports the new view utilities |
packages/mongodb-constants/src/index.spec.ts | Updates export validation test |
packages/mongodb-constants/package.json | Adds mongodb dependency |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
Looks good, left one comment on the mongodb
dependency.
Having these functions here will make it easier if we ever want the same version check in something like the MongoDB VSCode plugin. Nice
@@ -72,6 +72,7 @@ | |||
"typescript": "^5.0.4" | |||
}, | |||
"dependencies": { | |||
"mongodb": "^6.18.0", |
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.
Can we have this instead in peerDependencies
and devDependencies
similar to how the devtools-connect
is doing it?
"mongodb": "^6.9.0", |
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.
Yup, done!
Description
Add a new file containing common utils used for views.
Open Questions
Checklist