geodatagouv / geoplatform

Core API and processing tools for geo.data.gouv.fr
MIT License
5 stars 1 forks source link

Bump mongodb from 3.1.13 to 3.2.4 #249

Closed dependabot-preview[bot] closed 5 years ago

dependabot-preview[bot] commented 5 years ago

Bumps mongodb from 3.1.13 to 3.2.4.

Release notes *Sourced from [mongodb's releases](https://github.com/mongodb/node-mongodb-native/releases).* > ## v3.2.1 > The MongoDB Node.js team is pleased to announce version 3.2.1 of the driver. > > *Due to a publishing snafu v3.2.1 was immediately published without a proper v3.2.0 release* > >

Release Highlights

> >

2.x EOL

> With the v3.1.0 release we officially deprecated the 2.x driver. With this release that driver > is effectively EOL, and will no longer be supported. Please update your driver as soon as possible. > >

Unified Topology

> In this release we are very excited to announce the immediate availability of a complete rewrite of the driver's "topology" layer. This is the core brains of the driver responsible for things like server selection, server discovery and monitoring. This work combines the three existing topology concepts (`Mongos`, `ReplSet`, and `Server`) into a single type `Topology`. The new `Topology` type uses the same machinery to represent all three types, greatly improving our ability to maintain the code, and reducing the chance for bug duplication. > > The `Topology` class no longer uses a callback store, instead relying on a server selection loop for operation execution. This means failed operations will fail faster, with more accurate stack traces and specifics about the failure. It generally makes it much easier to reason about what the driver is doing each time an operation is executed. > > You can enable it with the `useUnifiedTopology` feature flag passed to your `MongoClient` constructor, like so: > ``` > const client = MongoClient('mongodb://localhost:27017', { useUnifiedTopology: true }); > ``` > > This topology layer will replace the existing topologies in a breaking 4.x release later this year, so we strongly encourage our users to try it out as soon as possible. > >

`withTransaction` helper

> Reliably committing a transaction in the face of errors can be a complicated endeavor using the MongoDB 4.0 drivers API. This version introduces a `withTransaction` helper method on the `ClientSession` object that allows application logic to be executed within a transaction. This method is capable of retrying either the commit operation or entire transaction as needed (and when the error permits) to better ensure that the transaction can complete successfully. Consider using this for all but the most complicated of transactions use cases. > > A call to `withTransaction` begins a new transaction, executes the provided function, and then attempts to commit the transaction. The function passed to `withTransaction` must take a `session` parameter, and this session must be passed to all methods within the function. If some error is encountered, it will attempt to re-commit the transaction before ultimately failing back to the user after aborting the transaction. > **NOTE:** A mentioned, the passed in function MAY be retried multiple times, please keep this in mind when executing non-database operations within the function. > > Here’s an example of it in action: > ``` > const client = new MongoClient(); > await client.connect(); > > const session = client.startSession(); > > // NOTE: the `withTransaction` method only supports functions that return a `Promise` > try { > await session.withTransaction(async function(session) { > const coll = client.db('foo').collection('coll'); > await coll.insertOne({ a: 42 }, { session }); > }); > } catch (err) { > // transaction failed after attempted retry > console.dir({ err }); > } > ``` > >

Cursors support asyncInterator and for..await..of loops

> `Symbol.asyncIterator` is defined on cursors for Node.js versions that support it (>=v10.x.x). This allows you to use for..await..of loops with cursors: > ... (truncated)
Changelog *Sourced from [mongodb's changelog](https://github.com/mongodb/node-mongodb-native/blob/master/HISTORY.md).* > ## [3.2.4](https://github.com/mongodb/node-mongodb-native/compare/v3.2.2...v3.2.4) (2019-05-08) > > > ### Bug Fixes > > * **aggregation:** fix field name typo ([4235d04](https://github.com/mongodb/node-mongodb-native/commit/4235d04)) > * **async:** rewrote asyncGenerator in node < 10 syntax ([49c8cef](https://github.com/mongodb/node-mongodb-native/commit/49c8cef)) > * **BulkOp:** run unordered bulk ops in serial ([f548bd7](https://github.com/mongodb/node-mongodb-native/commit/f548bd7)) > * **bulkWrite:** fix issue with bulkWrite continuing w/ callback ([2a4a42c](https://github.com/mongodb/node-mongodb-native/commit/2a4a42c)) > * **docs:** correctly document that default for `sslValidate` is false ([1f8e7fa](https://github.com/mongodb/node-mongodb-native/commit/1f8e7fa)) > * **gridfs-stream:** honor chunk size ([9eeb114](https://github.com/mongodb/node-mongodb-native/commit/9eeb114)) > * **unified-topology:** only clone pool size if provided ([8dc2416](https://github.com/mongodb/node-mongodb-native/commit/8dc2416)) > > > ### Features > > * update to mongodb-core v3.2.3 ([1c5357a](https://github.com/mongodb/node-mongodb-native/commit/1c5357a)) > * **core:** update to mongodb-core v3.2.4 ([2059260](https://github.com/mongodb/node-mongodb-native/commit/2059260)) > * **lib:** implement executeOperationV2 ([67d4edf](https://github.com/mongodb/node-mongodb-native/commit/67d4edf)) > > > > > ## [3.2.3](https://github.com/mongodb/node-mongodb-native/compare/v3.2.2...v3.2.3) (2019-04-05) > > > ### Bug Fixes > > * **aggregation:** fix field name typo ([4235d04](https://github.com/mongodb/node-mongodb-native/commit/4235d04)) > * **async:** rewrote asyncGenerator in node < 10 syntax ([49c8cef](https://github.com/mongodb/node-mongodb-native/commit/49c8cef)) > * **bulkWrite:** fix issue with bulkWrite continuing w/ callback ([2a4a42c](https://github.com/mongodb/node-mongodb-native/commit/2a4a42c)) > * **docs:** correctly document that default for `sslValidate` is false ([1f8e7fa](https://github.com/mongodb/node-mongodb-native/commit/1f8e7fa)) > > > ### Features > > * update to mongodb-core v3.2.3 ([1c5357a](https://github.com/mongodb/node-mongodb-native/commit/1c5357a)) > > > > > ## [3.2.2](https://github.com/mongodb/node-mongodb-native/compare/v3.2.1...v3.2.2) (2019-03-22) > > > ### Bug Fixes > > * **asyncIterator:** stronger guard against importing async generator ([e0826fb](https://github.com/mongodb/node-mongodb-native/commit/e0826fb)) > > > ### Features > ... (truncated)
Commits - [`1c17b80`](https://github.com/mongodb/node-mongodb-native/commit/1c17b805e9831f3c206276e45402438e46b6f443) chore(release): 3.2.4 - [`2059260`](https://github.com/mongodb/node-mongodb-native/commit/2059260a1e14cf862a5cae20e3130fa09b6849d9) feat(core): update to mongodb-core v3.2.4 - [`0afbbcc`](https://github.com/mongodb/node-mongodb-native/commit/0afbbccf1bd7d437610c33cbd5523f01bc6bc6e5) Update README.md - [`c600a4e`](https://github.com/mongodb/node-mongodb-native/commit/c600a4eb19aa9a64643d1072c5eab5360db63ec9) Update README.md - [`fa8d952`](https://github.com/mongodb/node-mongodb-native/commit/fa8d95279109725365fc6744eb57f691b7257401) test(changeStream): fixes flakey changeStream tests - [`1909e87`](https://github.com/mongodb/node-mongodb-native/commit/1909e873fd13eb0eb8f99d14cbc911b0b12a2a3d) test(transactions): updated transactions tests to use runOn - [`dd82d3c`](https://github.com/mongodb/node-mongodb-native/commit/dd82d3c0e61eb57dcf6984da4b54731ac4b3951e) test(insert): check results returned by toJSON - [`3e957c1`](https://github.com/mongodb/node-mongodb-native/commit/3e957c1b5f22a9d405a38c023975775b3f2f9e39) chore(travis): test unified topology in travis - [`a09a2c9`](https://github.com/mongodb/node-mongodb-native/commit/a09a2c90e8bdd15da9fba20051ac10ac15c31763) style: fix prettier warning - [`e62b1c7`](https://github.com/mongodb/node-mongodb-native/commit/e62b1c7de4efe28f23500fa522da4b2ee6b6d508) refactor: add private `_findAndModify()` function that bypasses deprecation w... - Additional commits viewable in [compare view](https://github.com/mongodb/node-mongodb-native/compare/v3.1.13...v3.2.4)


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 will not automatically merge this PR because it includes a minor update to a production dependency.


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 ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major 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](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Automerge options (never/patch/minor, and dev/runtime dependencies) - 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) Finally, you can contact us by mentioning @dependabot.
codecov[bot] commented 5 years ago

Codecov Report

Merging #249 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #249   +/-   ##
=======================================
  Coverage   23.55%   23.55%           
=======================================
  Files          99       99           
  Lines        2165     2165           
=======================================
  Hits          510      510           
  Misses       1655     1655

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3f87f46...1a3100f. Read the comment docs.

dependabot-preview[bot] commented 5 years ago

Superseded by #252.