Skip to content

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

DarshanaVenkatesh
Copy link

@DarshanaVenkatesh DarshanaVenkatesh commented Aug 20, 2025

Description

Add a new file containing common utils used for views.

Open Questions

Checklist

Copilot

This comment was marked as outdated.

DarshanaVenkatesh and others added 4 commits August 20, 2025 13:38
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@DarshanaVenkatesh DarshanaVenkatesh changed the title feat(mongodb-constants): add new util for view pipeline COMPASS:9700 feat(mongodb-constants): add new utils for views COMPASS:9700 Aug 20, 2025
Copy link

@Copilot Copilot AI left a 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.

DarshanaVenkatesh and others added 2 commits August 20, 2025 15:48
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Member

@Anemy Anemy left a 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",
Copy link
Member

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?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants