From ccb6e7beaef1d0a5e78a52fb22400422cd61ae0b Mon Sep 17 00:00:00 2001 From: Daria Pardue Date: Mon, 14 Nov 2022 15:51:26 -0500 Subject: [PATCH 1/2] fix(NODE-4753): remove erroneous deprecation of geoNear --- src/cursor/aggregation_cursor.ts | 3 +-- test/types/mongodb.test-d.ts | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/cursor/aggregation_cursor.ts b/src/cursor/aggregation_cursor.ts index 1e91a169c9..981989902f 100644 --- a/src/cursor/aggregation_cursor.ts +++ b/src/cursor/aggregation_cursor.ts @@ -210,8 +210,7 @@ export class AggregationCursor extends AbstractCursor { 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 }); diff --git a/test/types/mongodb.test-d.ts b/test/types/mongodb.test-d.ts index 89e2371719..8900d1df7b 100644 --- a/test/types/mongodb.test-d.ts +++ b/test/types/mongodb.test-d.ts @@ -5,7 +5,6 @@ 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 { FindCursor } from '../../src/cursor/find_cursor'; import { MongoClient } from '../../src/mongo_client'; import { Topology } from '../../src/sdam/topology'; @@ -16,7 +15,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); From f85299bb2f292ab930b38c00f725574c19e563a3 Mon Sep 17 00:00:00 2001 From: Daria Pardue Date: Mon, 14 Nov 2022 16:15:23 -0500 Subject: [PATCH 2/2] fix: add back ts type --- test/types/mongodb.test-d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/test/types/mongodb.test-d.ts b/test/types/mongodb.test-d.ts index 8900d1df7b..fe75b1e223 100644 --- a/test/types/mongodb.test-d.ts +++ b/test/types/mongodb.test-d.ts @@ -5,6 +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 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';