Skip to content

Commit 464fb45

Browse files
committed
chore: comments
1 parent 19239df commit 464fb45

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/operations/command.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export interface CommandOperationOptions
6969
* Used when the command needs to grant access to the underlying namespaces for time series collections.
7070
* Only available on server versions 8.2 and above.
7171
* @public
72+
* @sinceServerVersion 8.2
7273
**/
7374
rawData?: boolean;
7475
}

src/operations/indexes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ export class ListIndexesOperation extends CommandOperation<CursorResponse> {
368368
* This allows typescript to delete the key but will
369369
* not allow a writeConcern to be assigned as a property on options.
370370
*/
371-
override options: ListIndexesOptions & { writeConcern?: never };
371+
override options: ListIndexesOptions & { writeConcern?: never; rawData?: boolean };
372372
collectionNamespace: MongoDBNamespace;
373373

374374
constructor(collection: Collection, options?: ListIndexesOptions) {

src/utils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -361,14 +361,14 @@ export function uuidV4(): Buffer {
361361
*/
362362
export function maxWireVersion(handshakeAware?: Connection | Topology | Server): number {
363363
if (handshakeAware) {
364-
if (handshakeAware.serverApi?.version) {
365-
// We return the max supported wire version for serverAPI.
366-
return MAX_SUPPORTED_WIRE_VERSION;
367-
}
368364
if (handshakeAware.hello) {
369365
return handshakeAware.hello.maxWireVersion;
370366
}
371367

368+
if (handshakeAware.serverApi?.version) {
369+
// We return the max supported wire version for serverAPI.
370+
return MAX_SUPPORTED_WIRE_VERSION;
371+
}
372372
// This is the fallback case for load balanced mode. If we are building commands the
373373
// object being checked will be a connection, and we will have a hello response on
374374
// it. For other cases, such as retryable writes, the object will be a server or

0 commit comments

Comments
 (0)