From 50a7c4b8c2f82bea7f2cdb8f77f578ba2ddf6015 Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Mon, 23 Jun 2025 18:09:11 +0200 Subject: [PATCH 1/2] chore(NODE-6991): deprecate remaining types to be removed in v7 --- src/cmap/handshake/client_metadata.ts | 6 +++++- src/mongo_types.ts | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/cmap/handshake/client_metadata.ts b/src/cmap/handshake/client_metadata.ts index 9a633a72aac..d8dbe7c7ad9 100644 --- a/src/cmap/handshake/client_metadata.ts +++ b/src/cmap/handshake/client_metadata.ts @@ -11,6 +11,7 @@ const NODE_DRIVER_VERSION = require('../../../package.json').version; /** * @public + * @deprecated This interface will be made internal in the next major release. * @see https://github.com/mongodb/specifications/blob/master/source/mongodb-handshake/handshake.md#hello-command */ export interface ClientMetadata { @@ -38,7 +39,10 @@ export interface ClientMetadata { }; } -/** @public */ +/** + * @public + * @deprecated This interface will be made internal in the next major release. + */ export interface ClientMetadataOptions { driverInfo?: { name?: string; diff --git a/src/mongo_types.ts b/src/mongo_types.ts index fda9909429b..e96204931f3 100644 --- a/src/mongo_types.ts +++ b/src/mongo_types.ts @@ -472,7 +472,10 @@ export class TypedEventEmitter extends EventEm } } -/** @public */ +/** + * @public + * @deprecated Will be removed in favor of `AbortSignal` in the next major release. + */ export class CancellationToken extends TypedEventEmitter<{ cancel(): void }> { constructor(...args: any[]) { super(...args); From 7e7a2b5087c083ac74ea9530ab5491643403990c Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Thu, 26 Jun 2025 16:14:43 +0200 Subject: [PATCH 2/2] chore: deprecate metadata --- src/mongo_client.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mongo_client.ts b/src/mongo_client.ts index be74e3b08c2..5cbf8ec66e0 100644 --- a/src/mongo_client.ts +++ b/src/mongo_client.ts @@ -1035,6 +1035,7 @@ export interface MongoOptions compressors: CompressorName[]; writeConcern: WriteConcern; dbName: string; + /** @deprecated - Will be made internal in a future major release. */ metadata: ClientMetadata; /** @internal */ extendedMetadata: Promise;