Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(NODE-5429): deprecate the AutoEncrypter interface #3764

Merged
merged 1 commit into from Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/deps.ts
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
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