-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
8.15 #15426
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
…ncrypted-schemas-mongoose-main feat(NODE-6506): Add support for encrypted schemas
feat(NODE-6507): generate encryption configuration on mongoose connect
ci(NODE-6919): Use `mongodb-runner` in encryption cluster setup
chore: comments on CSFLE feature branch PR#2
…ocs and skip bulkWrite casting Fix #15410
…m/muazahmed-dev/mongoose into fix-findOneAndUpdate-empty-filter
…ty-filter Fix: Add strictFilter option to findOneAndUpdate (#14913)
Co-authored-by: hasezoey <hasezoey@gmail.com>
CSFLE support
feat(error): set `cause` to MongoDB error `reason` on ServerSelection errors
fix(model): make bulkSave() rely on document.validate() to validate docs and skip bulkWrite casting
Co-authored-by: hasezoey <hasezoey@gmail.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 completes the work on field-level encryption and query filtering for the project. Key changes include the introduction of the autoEncryptionType method on multiple schema types, modifications to schema encryption configuration and encrypted field handling, and updates to the query and bulkWrite operations to enforce non-empty filters.
Reviewed Changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
lib/schema/* | Added autoEncryptionType methods to various schema types for encryption support. |
lib/schema.js | Updated schema encryption configuration and added functions to manage encrypted fields. |
lib/query.js | Introduced helper methods (isEmptyFilter and checkRequireFilter) and added filter validation in multiple query operations. |
lib/model.js | Modified bulkWrite and bulkSave logic to support encrypted models; refactored buildBulkWriteOperations. |
lib/helpers/model/discriminator.js, docs, workflows, .eslintrc.js | Updated to support the new encryption features and updated documentation/configuration accordingly. |
Comments suppressed due to low confidence (1)
lib/model.js:3912
- In the update branch of buildBulkWriteOperations, the variables 'where' and 'changes' are used without being defined. Consider restoring their assignment (e.g., 'const where = document.$__where(delta[0]);' and 'const changes = delta[1];') prior to using them.
document.$__version(where, delta);
types: stricter projection typing with 1-level deep nesting
Summary
Just finishing up #15418 / #15327, otherwise should be ready to merge
Examples