Skip to content
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

fix(NODE-3681): Typescript error in Collection.findOneAndModify UpdateFilter $currentDate #4047

Merged
merged 10 commits into from
Mar 21, 2024

Conversation

aditi-khare-mongoDB
Copy link
Contributor

@aditi-khare-mongoDB aditi-khare-mongoDB commented Mar 19, 2024

Description

When a field with boolean value true, is passed into $currentDate, it will no longer throw an TS error.

What is changing?

Example:

$currentData: {
   lastModified: true
} // no longer throws a TS error
Is there new documentation needed for these changes?

No.

What is the motivation for this change?

The motivation is that the Node Driver should not output unnecessary errors to users.

Release Highlight

Collection.findOneAndModify's UpdateFilter.$currentDate no longer throws on collections with limited schema

Example:

const collection = new Collection(); // collection with no schema
collection.update(
    $currentData: {
       lastModified: true
    } // no longer throws a TS error
);

Double check the following

  • Ran npm run check:lint script
  • 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

testing fix

testing fix 2
@aditi-khare-mongoDB aditi-khare-mongoDB marked this pull request as ready for review March 19, 2024 20:59
@aditi-khare-mongoDB aditi-khare-mongoDB marked this pull request as draft March 19, 2024 20:59
@aditi-khare-mongoDB aditi-khare-mongoDB marked this pull request as ready for review March 20, 2024 19:28
@baileympearson baileympearson self-assigned this Mar 21, 2024
@baileympearson baileympearson merged commit a8670a7 into main Mar 21, 2024
17 of 26 checks passed
@baileympearson baileympearson deleted the NODE-3681/current-date-type branch March 21, 2024 20:24
@baileympearson
Copy link
Contributor

CI failures are unrelated. All TS-related tasks pass in CI.

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