Skip to content

Conversation

@nbbeeken
Copy link
Contributor

@nbbeeken nbbeeken commented Nov 22, 2022

Description

What is changing?

Removing deprecated ObjectId methods.

What is the motivation for this change?

Methods are deprecated, alternatives exist.

Double check the following

  • Ran npm run lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: <type>(NODE-xxxx)<!>: <description>
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@nbbeeken nbbeeken marked this pull request as ready for review November 23, 2022 16:28
@nbbeeken nbbeeken added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Nov 23, 2022
@nbbeeken nbbeeken requested a review from durran November 23, 2022 16:29
Copy link
Member

@durran durran left a 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.

durran
durran previously approved these changes Nov 23, 2022
@durran durran added Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels Nov 23, 2022
@nbbeeken nbbeeken force-pushed the NODE-4704-remove-deprecated-oid-methods branch from 96724ce to 6bfbff5 Compare November 23, 2022 20:32
@nbbeeken nbbeeken requested a review from dariakp November 23, 2022 20:33
@nbbeeken nbbeeken force-pushed the NODE-4704-remove-deprecated-oid-methods branch from 6bfbff5 to 68eefb0 Compare November 28, 2022 20:32

```ts
const oid = new ObjectId();
const counterField = oid.id[9] << 16 | oid.id[10] << 8 | oid.id[11];
Copy link
Contributor

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]; }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nbbeeken nbbeeken force-pushed the NODE-4704-remove-deprecated-oid-methods branch from 68eefb0 to d24d275 Compare November 29, 2022 21:21
baileympearson
baileympearson previously approved these changes Nov 30, 2022
Copy link
Contributor

@dariakp dariakp left a 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

@nbbeeken nbbeeken force-pushed the NODE-4704-remove-deprecated-oid-methods branch from d24d275 to 685a6d0 Compare November 30, 2022 20:02
@nbbeeken nbbeeken requested a review from dariakp November 30, 2022 20:05
dariakp
dariakp previously approved these changes Nov 30, 2022
@nbbeeken nbbeeken force-pushed the NODE-4704-remove-deprecated-oid-methods branch from 5854054 to 6e21ac0 Compare November 30, 2022 21:44
@baileympearson baileympearson merged commit f1cccf2 into main Nov 30, 2022
@baileympearson baileympearson deleted the NODE-4704-remove-deprecated-oid-methods branch November 30, 2022 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team Review Needs review from team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants