-
Notifications
You must be signed in to change notification settings - Fork 254
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-4704): remove deprecated ObjectId methods #525
Conversation
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.
Just minor test description changes per our test patterns.
96724ce
to
6bfbff5
Compare
6bfbff5
to
68eefb0
Compare
docs/upgrade-to-v5.md
Outdated
|
||
```ts | ||
const oid = new ObjectId(); | ||
const counterField = oid.id[9] << 16 | oid.id[10] << 8 | oid.id[11]; |
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.
completely optional - should we consider just adding a simple getter that does this for users?
getCounter() : number { return this.id[9] << 16 | this.id[10] << 8 | this.id[11]; }
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.
Per the spec we should not have one: https://github.com/mongodb/specifications/blob/master/source/objectid.rst#counter
68eefb0
to
d24d275
Compare
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.
in the spirit of the spec, I think we shouldn't include the instructions for obtaining the counter (especially if we ever want to change the internal implementation); otherwise lgtm
d24d275
to
685a6d0
Compare
Co-authored-by: Durran Jordan <durran@gmail.com>
5854054
to
6e21ac0
Compare
Description
What is changing?
Removing deprecated ObjectId methods.
What is the motivation for this change?
Methods are deprecated, alternatives exist.
Double check the following
npm run lint
script<type>(NODE-xxxx)<!>: <description>