Skip to content

Commit 199dcaf

Browse files
authored
fix(NODE-4753): remove erroneous deprecation of geoNear (#3465)
1 parent 1eea4f0 commit 199dcaf

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/cursor/aggregation_cursor.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,7 @@ export class AggregationCursor<TSchema = any> extends AbstractCursor<TSchema> {
210210
return this;
211211
}
212212

213-
// deprecated methods
214-
/** @deprecated Add a geoNear stage to the aggregation pipeline */
213+
/** Add a geoNear stage to the aggregation pipeline */
215214
geoNear($geoNear: Document): this {
216215
assertUninitialized(this);
217216
this[kPipeline].push({ $geoNear });

test/types/mongodb.test-d.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Db, WithId, WriteConcern, WriteConcernSettings } from '../../src';
55
import * as MongoDBDriver from '../../src';
66
import type { ChangeStreamDocument } from '../../src/change_stream';
77
import { Collection } from '../../src/collection';
8-
import { AggregationCursor } from '../../src/cursor/aggregation_cursor';
8+
import type { AggregationCursor } from '../../src/cursor/aggregation_cursor';
99
import { FindCursor } from '../../src/cursor/find_cursor';
1010
import { MongoClient } from '../../src/mongo_client';
1111
import { Topology } from '../../src/sdam/topology';
@@ -16,7 +16,6 @@ expectDeprecated(Collection.prototype.update);
1616
expectDeprecated(Collection.prototype.remove);
1717
expectDeprecated(Collection.prototype.count);
1818
expectDeprecated(Collection.prototype.mapReduce);
19-
expectDeprecated(AggregationCursor.prototype.geoNear);
2019
expectDeprecated(FindCursor.prototype.count);
2120
expectDeprecated(Topology.prototype.unref);
2221
expectDeprecated(Db.prototype.unref);

0 commit comments

Comments
 (0)