Skip to content

Commit ca6554b

Browse files
authored
feat(NODE-6991): deprecate unintentionally public client metadata types (#4566)
1 parent 0e16c7c commit ca6554b

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

src/cmap/handshake/client_metadata.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const NODE_DRIVER_VERSION = require('../../../package.json').version;
1111

1212
/**
1313
* @public
14+
* @deprecated This interface will be made internal in the next major release.
1415
* @see https://github.com/mongodb/specifications/blob/master/source/mongodb-handshake/handshake.md#hello-command
1516
*/
1617
export interface ClientMetadata {
@@ -38,7 +39,10 @@ export interface ClientMetadata {
3839
};
3940
}
4041

41-
/** @public */
42+
/**
43+
* @public
44+
* @deprecated This interface will be made internal in the next major release.
45+
*/
4246
export interface ClientMetadataOptions {
4347
driverInfo?: {
4448
name?: string;

src/mongo_client.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,6 +1035,7 @@ export interface MongoOptions
10351035
compressors: CompressorName[];
10361036
writeConcern: WriteConcern;
10371037
dbName: string;
1038+
/** @deprecated - Will be made internal in a future major release. */
10381039
metadata: ClientMetadata;
10391040
/** @internal */
10401041
extendedMetadata: Promise<Document>;

src/mongo_types.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,10 @@ export class TypedEventEmitter<Events extends EventsDescription> extends EventEm
472472
}
473473
}
474474

475-
/** @public */
475+
/**
476+
* @public
477+
* @deprecated Will be removed in favor of `AbortSignal` in the next major release.
478+
*/
476479
export class CancellationToken extends TypedEventEmitter<{ cancel(): void }> {
477480
constructor(...args: any[]) {
478481
super(...args);

0 commit comments

Comments
 (0)