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

feat(NODE-3034): deprecate number as an input to ObjectId constructor #640

Merged
merged 2 commits into from
Jan 26, 2024

Conversation

alenakhineika
Copy link
Contributor

@alenakhineika alenakhineika commented Jan 25, 2024

Description

Deprecate number as an input to ObjectId constructor.

What is changing?

Create separate overloads for each input type of the ObjectID constructor and deprecate one that accepts a numeric input value.

Is there new documentation needed for these changes?

None

What is the motivation for this change?

NODE-3034

Release Highlight

A number as an input to the ObjectId constructor is deprecated

Instead, use static createFromTime() to set a numeric value for the new ObjectId.

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

@alenakhineika alenakhineika marked this pull request as ready for review January 25, 2024 16:05
@nbbeeken nbbeeken self-assigned this Jan 25, 2024
@nbbeeken nbbeeken added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Jan 25, 2024
src/objectid.ts Show resolved Hide resolved
@nbbeeken nbbeeken merged commit 44bec19 into main Jan 26, 2024
4 checks passed
@nbbeeken nbbeeken deleted the NODE-3034-deprecate-number-input-to-objectid branch January 26, 2024 15:01
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.

2 participants