Skip to content

Conversation

@tadjik1
Copy link
Member

@tadjik1 tadjik1 commented Oct 28, 2025

Description

Summary of Changes

Marked options parameter in .rewrapManyDataKey() method of the ClientEncryption. This parameter is already considered as optional in the code (if (options) {) as well as in the documentation examples:

@example
```ts
// attempting to rewrap all data keys with no matches
const filter = { _id: new Binary() } // assume _id matches no documents in the database
const result = await clientEncryption.rewrapManyDataKey(filter);
Notes for Reviewers

New type tests are added, and the configuration for tsd is updated to our current target (es2023).

What is the motivation for this change?

NODE-7247
Align documentation and implementation with typescript definition.

Release Highlight

Release notes highlight

The options parameter for the ClientEncryption.rewrapManyDataKey() method is now correctly marked as optional in its TypeScript definition. This change aligns the type signature with the method's implementation and documentation, resolving a type mismatch for TypeScript users.

Double check the following

  • Lint is passing (npm run check:lint)
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@tadjik1 tadjik1 marked this pull request as ready for review October 28, 2025 09:56
@tadjik1 tadjik1 requested a review from a team as a code owner October 28, 2025 09:56
@baileympearson baileympearson self-assigned this Oct 28, 2025
@baileympearson baileympearson added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Oct 28, 2025
@baileympearson baileympearson changed the title feat(NODE-7247): clarify #rewrapManyDataKey() parameter types fix(NODE-7247): clarify #rewrapManyDataKey() parameter types Oct 28, 2025
@baileympearson baileympearson merged commit cb522bf into main Oct 30, 2025
25 of 27 checks passed
@baileympearson baileympearson deleted the NODE-7247 branch October 30, 2025 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Primary Review In Review with primary reviewer, not yet ready for team's eyes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants