Skip to content

Commit e4066ec

Browse files
committed
fix compilation
1 parent 0290530 commit e4066ec

File tree

2 files changed

+7
-131
lines changed

2 files changed

+7
-131
lines changed

mongodb.d.ts

Lines changed: 4 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,6 @@ export declare abstract class AbstractCursor<TSchema = any, CursorEvents extends
9696
close(): Promise<void>;
9797
/** @deprecated Callbacks are deprecated and will be removed in the next major version. See [mongodb-legacy](https://github.com/mongodb-js/nodejs-mongodb-legacy) for migration assistance */
9898
close(callback: Callback): void;
99-
/**
100-
* @deprecated options argument is deprecated
101-
*/
102-
close(options: CursorCloseOptions): Promise<void>;
103-
/**
104-
* @deprecated options argument is deprecated. Callbacks are deprecated and will be removed in the next major version. See [mongodb-legacy](https://github.com/mongodb-js/nodejs-mongodb-legacy) for migration assistance
105-
*/
106-
close(options: CursorCloseOptions, callback: Callback): void;
10799
/**
108100
* Returns an array of documents. The caller is responsible for making sure that there
109101
* is enough memory to store the results. Note that the array only contains partial
@@ -268,8 +260,6 @@ export declare type AddToSetOperators<Type> = {
268260

269261
/** @public */
270262
export declare interface AddUserOptions extends CommandOperationOptions {
271-
/** @deprecated Please use db.command('createUser', ...) instead for this option */
272-
digestPassword?: null;
273263
/** Roles associated with the created user */
274264
roles?: string | string[] | RoleSpecification | RoleSpecification[];
275265
/** Custom data associated with the user (only Mongodb 2.6 or higher) */
@@ -981,7 +971,6 @@ export declare interface BulkResult {
981971
nModified: number;
982972
nRemoved: number;
983973
upserted: Document[];
984-
opTime?: Document;
985974
}
986975

987976
/** @public */
@@ -999,8 +988,6 @@ export declare interface BulkWriteOptions extends CommandOperationOptions {
999988
bypassDocumentValidation?: boolean;
1000989
/** If true, when an insert fails, don't execute the remaining writes. If false, continue with remaining inserts when one fails. */
1001990
ordered?: boolean;
1002-
/** @deprecated use `ordered` instead */
1003-
keepGoing?: boolean;
1004991
/** Force server to assign _id values instead of driver. */
1005992
forceServerObjectId?: boolean;
1006993
/** Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0). */
@@ -1061,12 +1048,6 @@ export declare class BulkWriteResult {
10611048
getWriteErrorAt(index: number): WriteError | undefined;
10621049
/** Retrieve all write errors */
10631050
getWriteErrors(): WriteError[];
1064-
/**
1065-
* Retrieve lastOp if available
1066-
*
1067-
* @deprecated Will be removed in 5.0
1068-
*/
1069-
getLastOp(): Document | undefined;
10701051
/** Retrieve the write concern error if one exists */
10711052
getWriteConcernError(): WriteConcernError | undefined;
10721053
toJSON(): BulkResult;
@@ -2435,10 +2416,6 @@ export declare interface CollectionInfo extends Document {
24352416

24362417
/** @public */
24372418
export declare interface CollectionOptions extends BSONSerializeOptions, WriteConcernOptions, LoggerOptions {
2438-
/**
2439-
* @deprecated Use readPreference instead
2440-
*/
2441-
slaveOk?: boolean;
24422419
/** Specify a read concern for the collection. (only MongoDB 3.2 or higher supported) */
24432420
readConcern?: ReadConcernLike;
24442421
/** The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST). */
@@ -2527,8 +2504,6 @@ export declare class CommandFailedEvent {
25272504

25282505
/** @public */
25292506
export declare interface CommandOperationOptions extends OperationOptions, WriteConcernOptions, ExplainOptions {
2530-
/** @deprecated This option does nothing */
2531-
fullResponse?: boolean;
25322507
/** Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported) */
25332508
readConcern?: ReadConcernLike;
25342509
/** Collation */
@@ -2919,14 +2894,6 @@ export declare interface CreateIndexesOptions extends CommandOperationOptions {
29192894
/** @public */
29202895
export declare const CURSOR_FLAGS: readonly ["tailable", "oplogReplay", "noCursorTimeout", "awaitData", "exhaust", "partial"];
29212896

2922-
/** @public
2923-
* @deprecated This interface is deprecated */
2924-
export declare interface CursorCloseOptions {
2925-
/** Bypass calling killCursors when closing the cursor. */
2926-
/** @deprecated the skipKillCursors option is deprecated */
2927-
skipKillCursors?: boolean;
2928-
}
2929-
29302897
/** @public */
29312898
export declare type CursorFlag = typeof CURSOR_FLAGS[number];
29322899

@@ -2976,11 +2943,6 @@ export declare class Db {
29762943
constructor(client: MongoClient, databaseName: string, options?: DbOptions);
29772944
get databaseName(): string;
29782945
get options(): DbOptions | undefined;
2979-
/**
2980-
* slaveOk specified
2981-
* @deprecated Use secondaryOk instead
2982-
*/
2983-
get slaveOk(): boolean;
29842946
/**
29852947
* Check if a secondary can be used (because the read preference is *not* set to primary)
29862948
*/
@@ -3203,11 +3165,6 @@ export declare class Db {
32033165
indexInformation(name: string, callback: Callback<Document>): void;
32043166
/** @deprecated Callbacks are deprecated and will be removed in the next major version. See [mongodb-legacy](https://github.com/mongodb-js/nodejs-mongodb-legacy) for migration assistance */
32053167
indexInformation(name: string, options: IndexInformationOptions, callback: Callback<Document>): void;
3206-
/**
3207-
* Unref all sockets
3208-
* @deprecated This function is deprecated and will be removed in the next major version.
3209-
*/
3210-
unref(): void;
32113168
/**
32123169
* Create a new Change Stream, watching for new changes (insertions, updates,
32133170
* replacements, deletions, and invalidations) in this database. Will ignore all
@@ -3288,8 +3245,6 @@ export declare interface DeleteOptions extends CommandOperationOptions, WriteCon
32883245
hint?: string | Document;
32893246
/** Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0). */
32903247
let?: Document;
3291-
/** @deprecated use `removeOne` or `removeMany` to implicitly specify the limit */
3292-
single?: boolean;
32933248
}
32943249

32953250
/** @public */
@@ -3775,8 +3730,6 @@ export declare type Flatten<Type> = Type extends ReadonlyArray<infer Item> ? Ite
37753730
/** @public */
37763731
export declare type GenericListener = (...args: any[]) => void;
37773732

3778-
/* Excluded from this release type: GetMoreOptions */
3779-
37803733
/**
37813734
* Constructor for a streaming GridFS interface
37823735
* @public
@@ -4879,11 +4832,6 @@ export declare interface MongoClientOptions extends BSONSerializeOptions, Suppor
48794832
forceServerObjectId?: boolean;
48804833
/** A primary key factory function for generation of custom `_id` keys */
48814834
pkFactory?: PkFactory;
4882-
/**
4883-
* A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible
4884-
* @deprecated Setting a custom promise library is deprecated the next major version will use the global Promise constructor only.
4885-
*/
4886-
promiseLibrary?: any;
48874835
/** The logging level */
48884836
loggerLevel?: LoggerLevel;
48894837
/** Custom logger object */
@@ -5226,7 +5174,7 @@ export declare class MongoNotConnectedError extends MongoAPIError {
52265174
* Mongo Client Options
52275175
* @public
52285176
*/
5229-
export declare interface MongoOptions extends Required<Pick<MongoClientOptions, 'autoEncryption' | 'connectTimeoutMS' | 'directConnection' | 'driverInfo' | 'forceServerObjectId' | 'minHeartbeatFrequencyMS' | 'heartbeatFrequencyMS' | 'keepAlive' | 'keepAliveInitialDelay' | 'localThresholdMS' | 'logger' | 'maxConnecting' | 'maxIdleTimeMS' | 'maxPoolSize' | 'minPoolSize' | 'monitorCommands' | 'noDelay' | 'pkFactory' | 'promiseLibrary' | 'raw' | 'replicaSet' | 'retryReads' | 'retryWrites' | 'serverSelectionTimeoutMS' | 'socketTimeoutMS' | 'srvMaxHosts' | 'srvServiceName' | 'tlsAllowInvalidCertificates' | 'tlsAllowInvalidHostnames' | 'tlsInsecure' | 'waitQueueTimeoutMS' | 'zlibCompressionLevel'>>, SupportedNodeConnectionOptions {
5177+
export declare interface MongoOptions extends Required<Pick<MongoClientOptions, 'autoEncryption' | 'connectTimeoutMS' | 'directConnection' | 'driverInfo' | 'forceServerObjectId' | 'minHeartbeatFrequencyMS' | 'heartbeatFrequencyMS' | 'keepAlive' | 'keepAliveInitialDelay' | 'localThresholdMS' | 'logger' | 'maxConnecting' | 'maxIdleTimeMS' | 'maxPoolSize' | 'minPoolSize' | 'monitorCommands' | 'noDelay' | 'pkFactory' | 'raw' | 'replicaSet' | 'retryReads' | 'retryWrites' | 'serverSelectionTimeoutMS' | 'socketTimeoutMS' | 'srvMaxHosts' | 'srvServiceName' | 'tlsAllowInvalidCertificates' | 'tlsAllowInvalidHostnames' | 'tlsInsecure' | 'waitQueueTimeoutMS' | 'zlibCompressionLevel'>>, SupportedNodeConnectionOptions {
52305178
hosts: HostAddress[];
52315179
srvHost?: string;
52325180
credentials?: MongoCredentials;
@@ -5554,14 +5502,6 @@ export declare class OrderedBulkOperation extends BulkOperationBase {
55545502
addToOperationsList(batchType: BatchType, document: Document | UpdateStatement | DeleteStatement): this;
55555503
}
55565504

5557-
/**
5558-
* @public
5559-
* @deprecated This interface is unused and will be removed in the next major version of the driver.
5560-
*/
5561-
export declare interface PipeOptions {
5562-
end?: boolean;
5563-
}
5564-
55655505
/** @public */
55665506
export declare interface PkFactory {
55675507
createPk(): any;
@@ -5582,43 +5522,6 @@ export declare type ProfilingLevel = typeof ProfilingLevel[keyof typeof Profilin
55825522
/** @public */
55835523
export declare type ProfilingLevelOptions = CommandOperationOptions;
55845524

5585-
/**
5586-
* @public
5587-
* Projection is flexible to permit the wide array of aggregation operators
5588-
* @deprecated since v4.1.0: Since projections support all aggregation operations we have no plans to narrow this type further
5589-
*/
5590-
export declare type Projection<TSchema extends Document = Document> = Document;
5591-
5592-
/**
5593-
* @public
5594-
* @deprecated since v4.1.0: Since projections support all aggregation operations we have no plans to narrow this type further
5595-
*/
5596-
export declare type ProjectionOperators = Document;
5597-
5598-
/**
5599-
* Global promise store allowing user-provided promises
5600-
* @deprecated Setting a custom promise library is deprecated the next major version will use the global Promise constructor only.
5601-
* @public
5602-
*/
5603-
declare class Promise_2 {
5604-
/**
5605-
* Validates the passed in promise library
5606-
* @deprecated Setting a custom promise library is deprecated the next major version will use the global Promise constructor only.
5607-
*/
5608-
static validate(lib: unknown): lib is PromiseConstructor;
5609-
/**
5610-
* Sets the promise library
5611-
* @deprecated Setting a custom promise library is deprecated the next major version will use the global Promise constructor only.
5612-
*/
5613-
static set(lib: PromiseConstructor | null): void;
5614-
/**
5615-
* Get the stored promise library, or resolves passed in
5616-
* @deprecated Setting a custom promise library is deprecated the next major version will use the global Promise constructor only.
5617-
*/
5618-
static get(): PromiseConstructor | null;
5619-
}
5620-
export { Promise_2 as Promise }
5621-
56225525
/** @public */
56235526
export declare type PropertyType<Type, Property extends string> = string extends Property ? unknown : Property extends keyof Type ? Type[Property] : Property extends `${number}` ? Type extends ReadonlyArray<infer ArrayType> ? ArrayType : unknown : Property extends `${infer Key}.${infer Rest}` ? Key extends `${number}` ? Type extends ReadonlyArray<infer ArrayType> ? PropertyType<ArrayType, Rest> : unknown : Key extends keyof Type ? Type[Key] extends Map<string, infer MapType> ? MapType : PropertyType<Type[Key], Rest> : unknown : unknown;
56245527

@@ -5750,12 +5653,6 @@ export declare class ReadPreference {
57505653
* @param mode - The string representing the read preference mode.
57515654
*/
57525655
isValid(mode?: string): boolean;
5753-
/**
5754-
* Indicates that this readPreference needs the "secondaryOk" bit when sent over the wire
5755-
* @deprecated Use secondaryOk instead
5756-
* @see https://docs.mongodb.com/manual/reference/mongodb-wire-protocol/#op-query
5757-
*/
5758-
slaveOk(): boolean;
57595656
/**
57605657
* Indicates that this readPreference needs the "SecondaryOk" bit when sent over the wire
57615658
* @see https://docs.mongodb.com/manual/reference/mongodb-wire-protocol/#op-query
@@ -6116,17 +6013,15 @@ export declare class ServerOpeningEvent {
61166013
/* Excluded from this release type: __constructor */
61176014
}
61186015

6119-
/** @public */
6120-
export declare type ServerOptions = Omit<ConnectionPoolOptions, 'id' | 'generation' | 'hostAddress'> & MonitorOptions;
6016+
/* Excluded from this release type: ServerOptions */
61216017

61226018
/* Excluded from this release type: ServerPrivate */
61236019

61246020
/* Excluded from this release type: ServerSelectionCallback */
61256021

61266022
/* Excluded from this release type: ServerSelectionRequest */
61276023

6128-
/** @public */
6129-
export declare type ServerSelector = (topologyDescription: TopologyDescription, servers: ServerDescription[]) => ServerDescription[];
6024+
/* Excluded from this release type: ServerSelector */
61306025

61316026
/**
61326027
* Reflects the existence of a session on the server. Can be reused by the session pool.
@@ -6366,27 +6261,7 @@ export declare class TopologyOpeningEvent {
63666261
/* Excluded from this release type: __constructor */
63676262
}
63686263

6369-
/** @public */
6370-
export declare interface TopologyOptions extends BSONSerializeOptions, ServerOptions {
6371-
srvMaxHosts: number;
6372-
srvServiceName: string;
6373-
hosts: HostAddress[];
6374-
retryWrites: boolean;
6375-
retryReads: boolean;
6376-
/** How long to block for server selection before throwing an error */
6377-
serverSelectionTimeoutMS: number;
6378-
/** The name of the replica set to connect to */
6379-
replicaSet?: string;
6380-
srvHost?: string;
6381-
/* Excluded from this release type: srvPoller */
6382-
/** Indicates that a client should directly connect to a node without attempting to discover its topology type */
6383-
directConnection: boolean;
6384-
loadBalanced: boolean;
6385-
metadata: ClientMetadata;
6386-
/** MongoDB server API version */
6387-
serverApi?: ServerApi;
6388-
/* Excluded from this release type: __index */
6389-
}
6264+
/* Excluded from this release type: TopologyOptions */
63906265

63916266
/* Excluded from this release type: TopologyPrivate */
63926267

@@ -6860,8 +6735,6 @@ export declare class WriteConcernError {
68606735
get errmsg(): string | undefined;
68616736
/** Write concern error info. */
68626737
get errInfo(): Document | undefined;
6863-
/** @deprecated The `err` prop that contained a MongoServerError has been deprecated. */
6864-
get err(): WriteConcernErrorData;
68656738
toJSON(): WriteConcernErrorData;
68666739
toString(): string;
68676740
}

src/connection_string.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,9 @@ export const OPTIONS = {
964964
promoteValues: {
965965
type: 'boolean'
966966
},
967+
useBigInt64: {
968+
type: 'boolean'
969+
},
967970
proxyHost: {
968971
type: 'string'
969972
},

0 commit comments

Comments
 (0)