Skip to content

Commit 5d709df

Browse files
dariakpalexbevi
andauthored
docs: Alex's edits
Co-authored-by: Alex Bevilacqua <[email protected]>
1 parent fc1e81d commit 5d709df

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

etc/notes/CHANGES_7.0.0.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The main focus of this release was usability improvements and a streamlined API.
1616
- [`bson` and `mongodb-connection-string-url` versions 7.0.0](#bson-and-mongodb-connection-string-url-versions-700)
1717
- [Optional peer dependency releases and version bumps](#optional-peer-dependency-releases-and-version-bumps)
1818
- [🔐 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)
2020
- [Custom AWS credential provider takes highest precedence](#custom-aws-credential-provider-takes-highest-precedence)
2121
- [Explicitly provided credentials no longer accepted with MONGODB-AWS authentication](#explicitly-provided-credentials-no-longer-accepted-with-mongodb-aws-authentication)
2222
- [⚙️ Error handling improvements](#%EF%B8%8F-error-handling-improvements)
@@ -25,16 +25,16 @@ The main focus of this release was usability improvements and a streamlined API.
2525
- [All encryption-related errors now subclass MongoError](#all-encryption-related-errors-now-subclass-mongoerror)
2626
- ['PoolRequstedRetry' error label renamed to 'PoolRequestedRetry'](#poolrequstedretry-error-label-renamed-to-poolrequestedretry)
2727
- [💥 Misc breaking improvements](#-misc-breaking-improvements)
28-
- [Change streams no longer whitelist $changeStream stage options](#change-streams-no-longer-whitelist-changestream-stage-options)
29-
- [Cursors no longer provide a default batchSize of 1000 for getMores](#cursors-no-longer-provide-a-default-batchsize-of-1000-for-getmores)
28+
- [Change streams no longer whitelist `$changeStream` stage options](#change-streams-no-longer-whitelist-changestream-stage-options)
29+
- [Cursors no longer provide a default `batchSize` of 1000 for `getMore`s](#cursors-no-longer-provide-a-default-batchsize-of-1000-for-getmores)
3030
- [Auto encryption options now include default filenames in TS](#auto-encryption-options-now-include-default-filenames-in-ts)
3131
- [☀️ Misc non-breaking improvements](#%EF%B8%8F-misc-non-breaking-improvements)
3232
- [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)
3434
- [📜 Removal of deprecated functionality](#-removal-of-deprecated-functionality)
3535
- [Cursor and ChangeStream `stream()` method no longer accepts a transform](#cursor-and-changestream-stream-method-no-longer-accepts-a-transform)
3636
- [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)
3838
- [`CommandOptions.noResponse` option removed](#commandoptionsnoresponse-option-removed)
3939
- [Assorted deprecated type, class, and option removals](#assorted-deprecated-type-class-and-option-removals)
4040
- [⚠️ 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.
4343

4444
### Minimum Node.js version is now v20.19.0
4545

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.
4747

4848
Notably, the driver now offers native support for explicit resource management. `Symbol.asyncDispose` implementations are available on the `MongoClient`, `ClientSession`, `ChangeStream` and on cursors.
4949

@@ -72,7 +72,7 @@ Additionally, the driver is now compatible with the following packages:
7272

7373
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.
7474

75-
### @aws-sdk/credential-providers is now required for MONGODB-AWS authentication
75+
### `@aws-sdk/credential-providers` is now required for MONGODB-AWS authentication
7676

7777
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.
7878

@@ -95,7 +95,7 @@ import { MongoClient } from 'mongodb';
9595

9696
const client = new MongoClient('mongodb<+srv>://<host>:<port>/?authMechanism=MONGODB-AWS');
9797
```
98-
98+
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.
9999
## ⚙️ Error handling improvements
100100

101101
### 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
118118

119119
## 💥 Misc breaking improvements
120120

121-
### Change streams no longer whitelist $changeStream stage options
121+
### Change streams no longer whitelist `$changeStream` stage options
122122

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.
124124

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
126126

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.
128128

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.
130130

131131
### Auto encryption options now include default filenames in TS
132132

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:
134134

135135
```typescript
136136
var path: AutoEncryptionOptions['extraOptions']['mongocryptdSpawnPath'] = 'some path'; // ERROR
@@ -149,9 +149,9 @@ var path: AutoEncryptionOptions['extraOptions']['cryptSharedLibPath'] = 'mongo_c
149149

150150
### Improve `MongoClient.connect()` consistency across environments
151151

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.
153153

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
155155

156156
`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.
157157

@@ -175,7 +175,7 @@ const stream = cursor.stream().map(JSON.stringify);
175175

176176
This mechanism has been unsupported as of MongoDB 4.0 and attempting to use it will still raise an error.
177177

178-
### Internal ClientMetadata properties have been removed
178+
### Internal `ClientMetadata` properties have been removed
179179

180180
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:
181181

0 commit comments

Comments
 (0)