Skip to content

Commit

Permalink
feat(NODE-5429): deprecate the AutoEncrypter interface (#3764)
Browse files Browse the repository at this point in the history
  • Loading branch information
baileympearson committed Jul 10, 2023
1 parent cd923c8 commit 9bb0d95
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,10 @@ export interface AutoEncryptionOptions {
};
}

/** @public */
/**
* @public
* @deprecated This interface will be removed in the next major version.
*/
export interface AutoEncrypter {
// eslint-disable-next-line @typescript-eslint/no-misused-new
new (client: MongoClient, options: AutoEncryptionOptions): AutoEncrypter;
Expand Down
6 changes: 6 additions & 0 deletions src/mongo_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,9 @@ export class MongoClient extends TypedEventEmitter<MongoClientEvents> {
this[kOptions].monitorCommands = value;
}

/**
* @deprecated This method will be removed in the next major version.
*/
get autoEncrypter(): AutoEncrypter | undefined {
return this[kOptions].autoEncrypter;
}
Expand Down Expand Up @@ -780,6 +783,9 @@ export interface MongoOptions
writeConcern: WriteConcern;
dbName: string;
metadata: ClientMetadata;
/**
* @deprecated This option will be removed in the next major version.
*/
autoEncrypter?: AutoEncrypter;
proxyHost?: string;
proxyPort?: number;
Expand Down

0 comments on commit 9bb0d95

Please sign in to comment.