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-3376): use standard JS methods for copying Buffers #444

Merged
merged 2 commits into from
Jun 25, 2021

Conversation

addaleax
Copy link
Contributor

Description

  • Use standard JS methods for copying Buffers, because unlike the
    buffer module polyfill, these have working typechecking
  • Add tests that ensure that for all BSON distributions and all
    legacy packages, their serialization is cross-compatible
    (modulo NODE-2848, which would require updates to either the
    buffer poyfill or the legacy 1.x bson versions).

- Use standard JS methods for copying Buffers, because unlike the
  `buffer` module polyfill, these have working typechecking
- Add tests that ensure that for all BSON distributions and all
  legacy packages, their serialization is cross-compatible
  (modulo NODE-2848, which would require updates to either the
  `buffer` poyfill or the legacy 1.x bson versions).
@dariakp dariakp added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Jun 25, 2021
test/bson_older_versions_tests.js Show resolved Hide resolved
test/bson_older_versions_tests.js Show resolved Hide resolved
@nbbeeken nbbeeken added Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels Jun 25, 2021
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.

Very nice work on the tests! @addaleax

Copy link
Contributor

@emadum emadum left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

@nbbeeken nbbeeken merged commit 804050d into mongodb:master Jun 25, 2021
@addaleax addaleax deleted the 3376-dev branch June 26, 2021 10:11
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.

4 participants