Skip to content

Commit

Permalink
remove noResponse deprecation - do in node-6377
Browse files Browse the repository at this point in the history
lint fix
  • Loading branch information
aditi-khare-mongoDB committed Sep 16, 2024
1 parent 56772b7 commit 6104c57
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/cmap/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ export class OpMsgRequest {

// flags
this.checksumPresent = false;
this.moreToCome = options.moreToCome || command.writeConcern?.w === 0 || false;
this.moreToCome = options.moreToCome ?? command.writeConcern?.w === 0;
this.exhaustAllowed =
typeof options.exhaustAllowed === 'boolean' ? options.exhaustAllowed : false;
}
Expand Down
6 changes: 0 additions & 6 deletions src/operations/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@ export interface CommandOperationOptions
// Admin command overrides.
dbName?: string;
authdb?: string;
/**
* @deprecated
* Will be removed in the next major version. Set writeConcern.w to 0 instead.
*
* **WARNING:** When this flag is true, it may result in indeterminate driver behavior.
*/
noResponse?: boolean;
}

Expand Down
2 changes: 1 addition & 1 deletion test/integration/node-specific/mongo_client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ describe('class MongoClient', function () {
expect(startedEvents).to.have.lengthOf(1);
expect(startedEvents[0]).to.have.property('commandName', 'endSessions');
expect(endEvents).to.have.lengthOf(1);
expect(endEvents[0]).to.property('reply', undefined);
expect(endEvents[0]).to.have.property('reply', undefined); // noReponse: true
});

context('when server selection would return no servers', () => {
Expand Down

0 comments on commit 6104c57

Please sign in to comment.