Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(NODE-4753): remove erroneous deprecation of geoNear #3465

Merged
merged 2 commits into from
Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/cursor/aggregation_cursor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@ export class AggregationCursor<TSchema = any> extends AbstractCursor<TSchema> {
return this;
}

// deprecated methods
/** @deprecated Add a geoNear stage to the aggregation pipeline */
/** Add a geoNear stage to the aggregation pipeline */
geoNear($geoNear: Document): this {
assertUninitialized(this);
this[kPipeline].push({ $geoNear });
Expand Down
3 changes: 1 addition & 2 deletions test/types/mongodb.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Db, WithId, WriteConcern, WriteConcernSettings } from '../../src';
import * as MongoDBDriver from '../../src';
import type { ChangeStreamDocument } from '../../src/change_stream';
import { Collection } from '../../src/collection';
import { AggregationCursor } from '../../src/cursor/aggregation_cursor';
import type { AggregationCursor } from '../../src/cursor/aggregation_cursor';
import { FindCursor } from '../../src/cursor/find_cursor';
import { MongoClient } from '../../src/mongo_client';
import { Topology } from '../../src/sdam/topology';
Expand All @@ -16,7 +16,6 @@ expectDeprecated(Collection.prototype.update);
expectDeprecated(Collection.prototype.remove);
expectDeprecated(Collection.prototype.count);
expectDeprecated(Collection.prototype.mapReduce);
expectDeprecated(AggregationCursor.prototype.geoNear);
expectDeprecated(FindCursor.prototype.count);
expectDeprecated(Topology.prototype.unref);
expectDeprecated(Db.prototype.unref);
Expand Down