mongodb 6.20.0-dev.20251106.sha.696664cb → 6.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -11
- package/lib/beta.d.ts +9229 -0
- package/lib/beta.js +21 -0
- package/lib/beta.js.map +1 -0
- package/lib/bulk/common.js +9 -7
- package/lib/bulk/common.js.map +1 -1
- package/lib/change_stream.js +38 -84
- package/lib/change_stream.js.map +1 -1
- package/lib/client-side-encryption/auto_encrypter.js +4 -2
- package/lib/client-side-encryption/auto_encrypter.js.map +1 -1
- package/lib/client-side-encryption/client_encryption.js +3 -2
- package/lib/client-side-encryption/client_encryption.js.map +1 -1
- package/lib/client-side-encryption/crypto_callbacks.js +81 -0
- package/lib/client-side-encryption/crypto_callbacks.js.map +1 -0
- package/lib/client-side-encryption/errors.js +1 -3
- package/lib/client-side-encryption/errors.js.map +1 -1
- package/lib/client-side-encryption/mongocryptd_manager.js +1 -1
- package/lib/client-side-encryption/mongocryptd_manager.js.map +1 -1
- package/lib/cmap/auth/aws_temporary_credentials.js +58 -10
- package/lib/cmap/auth/aws_temporary_credentials.js.map +1 -1
- package/lib/cmap/auth/mongo_credentials.js +15 -0
- package/lib/cmap/auth/mongo_credentials.js.map +1 -1
- package/lib/cmap/auth/mongodb_aws.js +7 -2
- package/lib/cmap/auth/mongodb_aws.js.map +1 -1
- package/lib/cmap/auth/providers.js +1 -0
- package/lib/cmap/auth/providers.js.map +1 -1
- package/lib/cmap/connect.js +1 -1
- package/lib/cmap/connect.js.map +1 -1
- package/lib/cmap/connection.js +27 -28
- package/lib/cmap/connection.js.map +1 -1
- package/lib/cmap/connection_pool.js +59 -59
- package/lib/cmap/connection_pool.js.map +1 -1
- package/lib/cmap/errors.js +1 -1
- package/lib/cmap/errors.js.map +1 -1
- package/lib/cmap/handshake/client_metadata.js +5 -7
- package/lib/cmap/handshake/client_metadata.js.map +1 -1
- package/lib/cmap/metrics.js +3 -3
- package/lib/cmap/metrics.js.map +1 -1
- package/lib/cmap/wire_protocol/constants.js +1 -3
- package/lib/cmap/wire_protocol/constants.js.map +1 -1
- package/lib/cmap/wire_protocol/on_data.js +1 -0
- package/lib/cmap/wire_protocol/on_data.js.map +1 -1
- package/lib/cmap/wire_protocol/responses.js +2 -2
- package/lib/cmap/wire_protocol/responses.js.map +1 -1
- package/lib/collection.js +1 -1
- package/lib/collection.js.map +1 -1
- package/lib/connection_string.js +10 -8
- package/lib/connection_string.js.map +1 -1
- package/lib/cursor/abstract_cursor.js +34 -17
- package/lib/cursor/abstract_cursor.js.map +1 -1
- package/lib/cursor/change_stream_cursor.js +2 -2
- package/lib/cursor/change_stream_cursor.js.map +1 -1
- package/lib/cursor/find_cursor.js +26 -37
- package/lib/cursor/find_cursor.js.map +1 -1
- package/lib/cursor/run_command_cursor.js +1 -1
- package/lib/cursor/run_command_cursor.js.map +1 -1
- package/lib/db.js +6 -6
- package/lib/db.js.map +1 -1
- package/lib/error.js +2 -2
- package/lib/error.js.map +1 -1
- package/lib/gridfs/download.js +5 -5
- package/lib/gridfs/download.js.map +1 -1
- package/lib/gridfs/index.js +9 -9
- package/lib/gridfs/index.js.map +1 -1
- package/lib/gridfs/upload.js +8 -2
- package/lib/gridfs/upload.js.map +1 -1
- package/lib/index.js +4 -2
- package/lib/index.js.map +1 -1
- package/lib/mongo_client.js +67 -58
- package/lib/mongo_client.js.map +1 -1
- package/lib/mongo_client_auth_providers.js +6 -0
- package/lib/mongo_client_auth_providers.js.map +1 -1
- package/lib/mongo_logger.js.map +1 -1
- package/lib/mongo_types.js +2 -1
- package/lib/mongo_types.js.map +1 -1
- package/lib/operations/aggregate.js +3 -0
- package/lib/operations/aggregate.js.map +1 -1
- package/lib/operations/command.js.map +1 -1
- package/lib/operations/create_collection.js +1 -0
- package/lib/operations/create_collection.js.map +1 -1
- package/lib/operations/drop.js +9 -8
- package/lib/operations/drop.js.map +1 -1
- package/lib/operations/execute_operation.js +1 -3
- package/lib/operations/execute_operation.js.map +1 -1
- package/lib/operations/find.js.map +1 -1
- package/lib/read_preference.js +14 -10
- package/lib/read_preference.js.map +1 -1
- package/lib/resource_management.js +58 -0
- package/lib/resource_management.js.map +1 -0
- package/lib/sdam/server.js +14 -14
- package/lib/sdam/server.js.map +1 -1
- package/lib/sdam/srv_polling.js +2 -2
- package/lib/sdam/srv_polling.js.map +1 -1
- package/lib/sdam/topology.js +68 -24
- package/lib/sdam/topology.js.map +1 -1
- package/lib/sessions.js +4 -5
- package/lib/sessions.js.map +1 -1
- package/lib/transactions.js +13 -2
- package/lib/transactions.js.map +1 -1
- package/lib/utils.js +14 -0
- package/lib/utils.js.map +1 -1
- package/mongodb.d.ts +244 -72
- package/package.json +20 -17
- package/src/beta.ts +22 -0
- package/src/bulk/common.ts +11 -9
- package/src/change_stream.ts +37 -85
- package/src/client-side-encryption/auto_encrypter.ts +12 -6
- package/src/client-side-encryption/client_encryption.ts +6 -5
- package/src/client-side-encryption/crypto_callbacks.ts +87 -0
- package/src/client-side-encryption/errors.ts +0 -3
- package/src/cmap/auth/aws_temporary_credentials.ts +70 -12
- package/src/cmap/auth/mongo_credentials.ts +21 -1
- package/src/cmap/auth/mongodb_aws.ts +17 -8
- package/src/cmap/auth/providers.ts +1 -0
- package/src/cmap/connect.ts +1 -1
- package/src/cmap/connection.ts +18 -14
- package/src/cmap/connection_pool.ts +13 -4
- package/src/cmap/errors.ts +1 -1
- package/src/cmap/handshake/client_metadata.ts +26 -18
- package/src/cmap/wire_protocol/constants.ts +0 -2
- package/src/cmap/wire_protocol/on_data.ts +2 -1
- package/src/collection.ts +1 -1
- package/src/connection_string.ts +20 -13
- package/src/cursor/abstract_cursor.ts +52 -12
- package/src/cursor/change_stream_cursor.ts +2 -2
- package/src/cursor/find_cursor.ts +27 -40
- package/src/cursor/run_command_cursor.ts +1 -1
- package/src/error.ts +2 -2
- package/src/gridfs/download.ts +4 -0
- package/src/gridfs/upload.ts +22 -0
- package/src/index.ts +8 -2
- package/src/mongo_client.ts +100 -68
- package/src/mongo_client_auth_providers.ts +8 -0
- package/src/mongo_logger.ts +1 -1
- package/src/mongo_types.ts +2 -1
- package/src/operations/aggregate.ts +6 -0
- package/src/operations/command.ts +12 -0
- package/src/operations/create_collection.ts +3 -0
- package/src/operations/drop.ts +11 -9
- package/src/operations/execute_operation.ts +2 -6
- package/src/operations/find.ts +11 -2
- package/src/read_preference.ts +9 -0
- package/src/resource_management.ts +74 -0
- package/src/sdam/topology.ts +60 -2
- package/src/sessions.ts +8 -2
- package/src/transactions.ts +17 -2
- package/src/utils.ts +18 -0
- package/tsconfig.json +7 -5
- package/lib/operations/end_sessions.js +0 -34
- package/lib/operations/end_sessions.js.map +0 -1
- package/src/operations/end_sessions.ts +0 -44
package/README.md
CHANGED
|
@@ -83,28 +83,28 @@ For exhaustive server and runtime version compatibility matrices, please refer t
|
|
|
83
83
|
|
|
84
84
|
The following table describes add-on component version compatibility for the Node.js driver. Only packages with versions in these supported ranges are stable when used in combination.
|
|
85
85
|
|
|
86
|
-
| Component | `mongodb@3.x` | `mongodb@4.x` | `mongodb@5.x` | `mongodb@<6.12` | `mongodb@>=6.12` |
|
|
87
|
-
| ------------------------------------------------------------------------------------ | ------------------ | ------------------ | ------------------ | --------------- | ------------------ |
|
|
88
|
-
| [bson](https://www.npmjs.com/package/bson) | ^1.0.0 | ^4.0.0 | ^5.0.0 | ^6.0.0 | ^6.0.0 |
|
|
89
|
-
| [bson-ext](https://www.npmjs.com/package/bson-ext) | ^1.0.0 \|\| ^2.0.0 | ^4.0.0 | N/A | N/A | N/A |
|
|
90
|
-
| [kerberos](https://www.npmjs.com/package/kerberos) | ^1.0.0 | ^1.0.0 \|\| ^2.0.0 | ^1.0.0 \|\| ^2.0.0 | ^2.0.1 | ^2.0.1 |
|
|
91
|
-
| [mongodb-client-encryption](https://www.npmjs.com/package/mongodb-client-encryption) | ^1.0.0 | ^1.0.0 \|\| ^2.0.0 | ^2.3.0 | ^6.0.0 | ^6.0.0 |
|
|
92
|
-
| [mongodb-legacy](https://www.npmjs.com/package/mongodb-legacy) | N/A | ^4.0.0 | ^5.0.0 | ^6.0.0 | ^6.0.0 |
|
|
93
|
-
| [@mongodb-js/zstd](https://www.npmjs.com/package/@mongodb-js/zstd) | N/A | ^1.0.0 | ^1.0.0 | ^1.1.0 | ^1.1.0 \|\| ^2.0.0 |
|
|
86
|
+
| Component | `mongodb@3.x` | `mongodb@4.x` | `mongodb@5.x` | `mongodb@<6.12` | `mongodb@>=6.12` |
|
|
87
|
+
| ------------------------------------------------------------------------------------ | ------------------ | ------------------ | ------------------ | --------------- | ------------------ |
|
|
88
|
+
| [bson](https://www.npmjs.com/package/bson) | ^1.0.0 | ^4.0.0 | ^5.0.0 | ^6.0.0 | ^6.0.0 |
|
|
89
|
+
| [bson-ext](https://www.npmjs.com/package/bson-ext) | ^1.0.0 \|\| ^2.0.0 | ^4.0.0 | N/A | N/A | N/A |
|
|
90
|
+
| [kerberos](https://www.npmjs.com/package/kerberos) | ^1.0.0 | ^1.0.0 \|\| ^2.0.0 | ^1.0.0 \|\| ^2.0.0 | ^2.0.1 | ^2.0.1 |
|
|
91
|
+
| [mongodb-client-encryption](https://www.npmjs.com/package/mongodb-client-encryption) | ^1.0.0 | ^1.0.0 \|\| ^2.0.0 | ^2.3.0 | ^6.0.0 | ^6.0.0 |
|
|
92
|
+
| [mongodb-legacy](https://www.npmjs.com/package/mongodb-legacy) | N/A | ^4.0.0 | ^5.0.0 | ^6.0.0 | ^6.0.0 |
|
|
93
|
+
| [@mongodb-js/zstd](https://www.npmjs.com/package/@mongodb-js/zstd) | N/A | ^1.0.0 | ^1.0.0 | ^1.1.0 | ^1.1.0 \|\| ^2.0.0 |
|
|
94
94
|
|
|
95
95
|
|
|
96
96
|
#### Typescript Version
|
|
97
97
|
|
|
98
|
-
We recommend using the latest version of typescript, however we currently ensure the driver's public types compile against `typescript@
|
|
98
|
+
We recommend using the latest version of typescript, however we currently ensure the driver's public types compile against `typescript@4.4.0`.
|
|
99
99
|
This is the lowest typescript version guaranteed to work with our driver: older versions may or may not work - use at your own risk.
|
|
100
100
|
Since typescript [does not restrict breaking changes to major versions](https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes), we consider this support best effort.
|
|
101
101
|
If you run into any unexpected compiler failures against our supported TypeScript versions, please let us know by filing an issue on our [JIRA](https://jira.mongodb.org/browse/NODE).
|
|
102
102
|
|
|
103
|
-
Additionally, our Typescript types are compatible with the ECMAScript standard for our minimum supported Node version. Currently, our Typescript targets
|
|
103
|
+
Additionally, our Typescript types are compatible with the ECMAScript standard for our minimum supported Node version. Currently, our Typescript targets es2021.
|
|
104
104
|
|
|
105
105
|
## Installation
|
|
106
106
|
|
|
107
|
-
The recommended way to get started using the Node.js driver is by using the `npm` (Node Package Manager) to install the dependency in your project.
|
|
107
|
+
The recommended way to get started using the Node.js 5.x driver is by using the `npm` (Node Package Manager) to install the dependency in your project.
|
|
108
108
|
|
|
109
109
|
After you've created your own project using `npm init`, you can run:
|
|
110
110
|
|