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

Bump bson from 4.0.3 to 4.2.0 #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dependabot-preview[bot]
Copy link
Contributor

Bumps bson from 4.0.3 to 4.2.0.

Release notes

Sourced from bson's releases.

v4.2.0

The MongoDB Node.js team is pleased to announce version 4.2.0 of the bson module!

Release Highlights

Convert code base to Typescript

Before this release we have converted the codebase to Typescript and you can find our bundled type definitions in the release. Converting to Typescript gave us an opportunity to fine tune our build pipeline, you should expect proper web bundle support with sourcemaps. If you were to ever encounter an issue or just want to get insight into the inner workings of the BSON library these sourcemaps will allow you to debug the original source code that is in typescript.

If you’re curious about Typescript take a look here.

A primary reason for converting to typescript is the first in class developer experience the language offers. It enables us to communicate APIs more succinctly to you the user and for you the user to benefit from excellent autocompletion and code intellisence while working with the BSON library.

BigInt support

BigInt is a new primitive type added to the ECMAScript specification, with this release you can use these new Long helpers to serialize BigInt(s) to BSON.

class Long {
  // ...
  /**
   * Returns a Long representing the given value, provided that it is a finite number.  Otherwise, zero is returned.
   * @param value - The number in question
   * @param unsigned - Whether unsigned or not, defaults to signed
   * @returns The corresponding Long value
   */
  static fromBigInt(value: bigint, unsigned?: boolean): Long;
  /** Converts the Long to a BigInt (arbitrary precision). */
  toBigInt(): bigint;
  // ...
}

It is important to note that BigInt supports arbitrary precision values while Long’s are clamped to maximum and minimum 64-bit integer values. We do have an investigation into supporting BigInt directly as well as helpers for Decimal128 interop but for now this is a great stepping stone to get started using BigInt in your code today!

FNV1A Hashing Removed

A previous iteration of the ObjectId class utilized a Fowler–Noll–Vo hash function to generate a portion of the Id created on the client side. This had been unused for sometime and here we were able to remove this code improving bundle sizes but without any breaking changes.

Documentation

We invite you to try the bson library immediately, and report any issues to the NODE project. Thanks very much to all the community members who contributed to this release!

Changelog

Sourced from bson's changelog.

4.2.0 (2020-10-13)

Features

Bug Fixes

  • adds interfaces for EJSON objects (7f5f1a3)
  • Correct API Extractor config to omit definition file from dist (#407) (ace8647)
  • coverage (992e2e0)
  • deprecate cacheFunctionsCrc32 (ea83bf5)
  • Rework rollup config to output named and default exports (#404) (a48676b)
  • Throw on BigInt type values (#397) (2dd54e5)
  • type issues with SerializeOptions and Long methods accepting Timestamp (c18ba71)

4.1.0 (2020-08-10)

Bug Fixes

  • spelling in deserializer errors (4c6f2e4)
  • object-id: harden the duck-typing (4b800ae)
  • parse value of Int32 in constructor (5cda40f)
  • Reduce floating point precision required of extended json implementations (#369) (5e35d1a)

Features

  • add support for primitives to EJSON.stringify (329857d)

4.0.4 (2020-03-26)

Bug Fixes

  • improve EJSON generation for previously skipped edge cases (30f5a8f)
  • only upgrade symbol to string if promoteValues is true (067a7ba)

Commits
  • d685aa5 chore(release): 4.2.0
  • ace8647 fix: Correct API Extractor config to omit definition file from dist (#407)
  • 3752fdc docs: Add release tags and export symbols from entry point (#405)
  • b1b2a0e feat: add extended json parsing for $uuid
  • a48676b fix: Rework rollup config to output named and default exports (#404)
  • 43ff12e refactor: Remove util dependency (#402)
  • 5f0c8f2 refactor: Removes dead code paths from number serialization (#399)
  • 2dd54e5 fix: Throw on BigInt type values (#397)
  • b95f059 refactor: Remove unused FNV-1a hash function (#398)
  • 7f5f1a3 fix: adds interfaces for EJSON objects
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by nbbeeken, a new releaser for bson since your current version.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

@dependabot-preview dependabot-preview bot added the dependencies Pull requests that update a dependency file label Nov 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants