You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: etc/notes/CHANGES_7.0.0.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ The main focus of this release was usability improvements and a streamlined API.
16
16
-[`bson` and `mongodb-connection-string-url` versions 7.0.0](#bson-and-mongodb-connection-string-url-versions-700)
17
17
-[Optional peer dependency releases and version bumps](#optional-peer-dependency-releases-and-version-bumps)
18
18
-[🔐 AWS authentication](#-aws-authentication)
19
-
-[@aws-sdk/credential-providers is now required for MONGODB-AWS authentication](#aws-sdkcredential-providers-is-now-required-for-mongodb-aws-authentication)
19
+
-[`@aws-sdk/credential-providers` is now required for MONGODB-AWS authentication](#aws-sdkcredential-providers-is-now-required-for-mongodb-aws-authentication)
-[Explicitly provided credentials no longer accepted with MONGODB-AWS authentication](#explicitly-provided-credentials-no-longer-accepted-with-mongodb-aws-authentication)
-[Improve `MongoClient.connect()` consistency across environments](#improve-mongoclientconnect-consistency-across-environments)
33
-
-[MongoClient.close() no longer sends endSessions if the topology does not have session support](#mongoclientclose-no-longer-sends-endsessions-if-the-topology-does-not-have-session-support)
33
+
-[`MongoClient.close()` no longer sends `endSessions` if the topology does not have session support](#mongoclientclose-no-longer-sends-endsessions-if-the-topology-does-not-have-session-support)
34
34
-[📜 Removal of deprecated functionality](#-removal-of-deprecated-functionality)
35
35
-[Cursor and ChangeStream `stream()` method no longer accepts a transform](#cursor-and-changestream-stream-method-no-longer-accepts-a-transform)
36
36
-[MONGODB-CR AuthMechanism has been removed](#mongodb-cr-authmechanism-has-been-removed)
37
-
-[Internal ClientMetadata properties have been removed](#internal-clientmetadata-properties-have-been-removed)
37
+
-[Internal `ClientMetadata` properties have been removed](#internal-clientmetadata-properties-have-been-removed)
-[Assorted deprecated type, class, and option removals](#assorted-deprecated-type-class-and-option-removals)
40
40
-[⚠️ ALL BREAKING CHANGES](#%EF%B8%8F-all-breaking-changes)
@@ -43,7 +43,7 @@ The main focus of this release was usability improvements and a streamlined API.
43
43
44
44
### Minimum Node.js version is now v20.19.0
45
45
46
-
The minimum supported Node.js version is now v20.19.0 and our TypeScript target has been updated to ES2023. We strive to keep our minimum supported Node.js version in sync with the runtime's [release cadence](https://nodejs.dev/en/about/releases/) to keep up with the latest security updates and modern language features.
46
+
The minimum supported Node.js version is now [v20.19.0](https://nodejs.org/en/blog/release/v20.19.0) and our TypeScript target has been updated to ES2023. We strive to keep our minimum supported Node.js version in sync with the runtime's [release cadence](https://nodejs.dev/en/about/releases/) to keep up with the latest security updates and modern language features.
47
47
48
48
Notably, the driver now offers native support for explicit resource management. `Symbol.asyncDispose` implementations are available on the `MongoClient`, `ClientSession`, `ChangeStream` and on cursors.
49
49
@@ -72,7 +72,7 @@ Additionally, the driver is now compatible with the following packages:
72
72
73
73
To improve long-term maintainability and ensure compatibility with AWS updates, we’ve standardized AWS auth to use the official SDK in all cases and made a number of supporting changes outlined below.
74
74
75
-
### @aws-sdk/credential-providers is now required for MONGODB-AWS authentication
75
+
### `@aws-sdk/credential-providers` is now required for MONGODB-AWS authentication
76
76
77
77
Previous versions of the driver contained two implementations for AWS authentication and could run the risk of the custom driver implementation not supporting all AWS authentication features as well as not being correct when AWS makes changes. Using the official AWS SDK in all cases alleviates these issues.
78
78
@@ -95,7 +95,7 @@ import { MongoClient } from 'mongodb';
The previous method of providing URI encoded credentials based on the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` directly in the connection string will no longer work.
99
99
## ⚙️ Error handling improvements
100
100
101
101
### Dropping a collection returns false instead of throwing when NS not found
@@ -118,19 +118,19 @@ The `PoolClearedError` thrown in cases where the connection pool was cleared now
118
118
119
119
## 💥 Misc breaking improvements
120
120
121
-
### Change streams no longer whitelist $changeStream stage options
121
+
### Change streams no longer whitelist `$changeStream` stage options
122
122
123
-
Uses are now able to pass any option to `collection.watch()` and if it is invalid in the $changeStream stage of the pipeline the server will error. This is to allow users to provide newly added options quickly that are not in our public types.
123
+
Uses are now able to pass any option to `collection.watch()` and if it is invalid in the `$changeStream` stage of the pipeline the server will error. This is to allow users to provide newly added options quickly that are not in our public types.
124
124
125
-
### Cursors no longer provide a default batchSize of 1000 for getMores
125
+
### Cursors no longer provide a default `batchSize` of 1000 for `getMore`s
126
126
127
-
In driver versions <7.0, the driver provides a default batchSize of 1000 for each getMore when iterating a cursor. This behavior is not ideal because the default is set regardless of the documents being fetched. For example, if a cursor fetches many small documents, the driver's default of 1000 can result in many round-trips to fetch all documents, when the server could fit all documents inside a single getMore if no batchSize were set.
127
+
In driver versions <7.0, the driver provides a default `batchSize` of 1000 for each [`getMore`](https://www.mongodb.com/docs/manual/reference/command/getMore/) when iterating a cursor. This behavior is not ideal because the default is set regardless of the documents being fetched. For example, if a cursor fetches many small documents, the driver's default of 1000 can result in many round-trips to fetch all documents, when the server could fit all documents inside a single `getMore` if no `batchSize` were set.
128
128
129
-
Now, cursors no longer provide a default `batchSize` when executing a getMore. A `batchSize` will only be set on `getMore` commands if a batchSize has been explicitly configured for the cursor.
129
+
Now, cursors no longer provide a default `batchSize` when executing a `getMore`. A `batchSize` will only be set on `getMore` commands if a `batchSize` has been explicitly configured for the cursor.
130
130
131
131
### Auto encryption options now include default filenames in TS
132
132
133
-
A common source of confusion for people configuring auto encryption is where to specify the path to mongocryptd and where to specify the path to crypt_shared. We've now made this clearer in our Typescript users. Typescript now reports errors if the specified filename doesn't match the default name of the file. Some examples:
133
+
A common source of confusion for people configuring auto encryption is where to specify the path to `mongocryptd` and where to specify the path to `crypt_shared`. We've now made this clearer in our Typescript users. Typescript now reports errors if the specified filename doesn't match the default name of the file. Some examples:
134
134
135
135
```typescript
136
136
var path:AutoEncryptionOptions['extraOptions']['mongocryptdSpawnPath'] ='some path'; // ERROR
@@ -149,9 +149,9 @@ var path: AutoEncryptionOptions['extraOptions']['cryptSharedLibPath'] = 'mongo_c
149
149
150
150
### Improve `MongoClient.connect()` consistency across environments
151
151
152
-
The MongoClient connect function will now run a handshake regardless of credentials being defined. The upshot of this change is that connect is more consistent at verifying some fail-fast preconditions regardless of environment. For example, previously, if connecting to a `loadBalanced=true` cluster without authentication there would not have been an error until a command was attempted.
152
+
The `MongoClient` connect function will now run a handshake regardless of credentials being defined. The upshot of this change is that connect is more consistent at verifying some fail-fast preconditions regardless of environment. For example, previously, if connecting to a `loadBalanced=true` cluster without authentication there would not have been an error until a command was attempted.
153
153
154
-
### MongoClient.close() no longer sends endSessions if the topology does not have session support
154
+
### `MongoClient.close()` no longer sends `endSessions` if the topology does not have session support
155
155
156
156
`MongoClient.close()` attempts to free up any server resources that the client has instantiated, including sessions. Previously, `MongoClient.close()` unconditionally attempted to kill all sessions, regardless of whether or not the topology actually supports sessions.
This mechanism has been unsupported as of MongoDB 4.0 and attempting to use it will still raise an error.
177
177
178
-
### Internal ClientMetadata properties have been removed
178
+
### Internal `ClientMetadata` properties have been removed
179
179
180
180
Previous versions of the driver unintentionally made properties used when constructing client metadata public. These properties have now been made internal. The full list of properties is:
0 commit comments