From bdb338643b6bb7267c2c5b8804b7778b1ba1e9ef Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Tue, 4 Nov 2025 16:02:03 -0500 Subject: [PATCH] feat(NODE-7230): add deprecations --- src/cmap/auth/mongo_credentials.ts | 1 + src/cmap/connection.ts | 2 ++ src/cursor/abstract_cursor.ts | 7 +++++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/cmap/auth/mongo_credentials.ts b/src/cmap/auth/mongo_credentials.ts index 259147d5b07..bf804745e32 100644 --- a/src/cmap/auth/mongo_credentials.ts +++ b/src/cmap/auth/mongo_credentials.ts @@ -58,6 +58,7 @@ export interface AuthMechanismProperties extends Document { SERVICE_NAME?: string; SERVICE_REALM?: string; CANONICALIZE_HOST_NAME?: GSSAPICanonicalizationValue; + /** @deprecated Will be removed in the next major version. */ AWS_SESSION_TOKEN?: string; /** A user provided OIDC machine callback function. */ OIDC_CALLBACK?: OIDCCallbackFunction; diff --git a/src/cmap/connection.ts b/src/cmap/connection.ts index ce62f9a7dad..91c4fa85910 100644 --- a/src/cmap/connection.ts +++ b/src/cmap/connection.ts @@ -91,6 +91,7 @@ export interface CommandOptions extends BSONSerializeOptions { /** Session to use for the operation */ session?: ClientSession; documentsReturnedIn?: string; + /** @deprecated Will be removed in the next major version. */ noResponse?: boolean; omitMaxTimeMS?: boolean; @@ -139,6 +140,7 @@ export interface ConnectionOptions tls: boolean; noDelay?: boolean; socketTimeoutMS?: number; + /** @deprecated Will be removed in the next major version */ cancellationToken?: CancellationToken; metadata: ClientMetadata; /** @internal */ diff --git a/src/cursor/abstract_cursor.ts b/src/cursor/abstract_cursor.ts index a69f9fbabf9..a596e0710e1 100644 --- a/src/cursor/abstract_cursor.ts +++ b/src/cursor/abstract_cursor.ts @@ -59,9 +59,12 @@ export const CURSOR_FLAGS = [ 'partial' ] as const; -/** @public */ +/** + * @public + * @deprecated Will be removed in the next major version + */ export interface CursorStreamOptions { - /** A transformation method applied to each document emitted by the stream */ + /** @deprecated Will be removed in the next major version */ transform?(this: void, doc: Document): Document; }