Skip to content

Commit c5a53b1

Browse files
authored
Merge branch 'main' into NODE-7046
2 parents 8af4446 + 9e9059a commit c5a53b1

47 files changed

Lines changed: 1016 additions & 1638 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.evergreen/config.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1860,17 +1860,6 @@ tasks:
18601860
- {key: NODE_LTS_VERSION, value: '22'}
18611861
- func: install dependencies
18621862
- func: run lint checks
1863-
- name: run-resource-management-async-dispose
1864-
tags:
1865-
- resource-management
1866-
commands:
1867-
- command: expansions.update
1868-
type: setup
1869-
params:
1870-
updates:
1871-
- {key: NODE_LTS_VERSION, value: '22'}
1872-
- func: install dependencies
1873-
- func: check resource management
18741863
- name: test-explicit-resource-management-feature-integration
18751864
tags:
18761865
- resource-management

.evergreen/generate_evergreen_tasks.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -510,17 +510,6 @@ SINGLETON_TASKS.push(
510510
{ func: 'run lint checks' }
511511
]
512512
},
513-
{
514-
name: 'run-resource-management-async-dispose',
515-
tags: ['resource-management'],
516-
commands: [
517-
updateExpansions({
518-
NODE_LTS_VERSION: LATEST_LTS
519-
}),
520-
{ func: 'install dependencies' },
521-
{ func: 'check resource management' }
522-
]
523-
},
524513
{
525514
name: 'test-explicit-resource-management-feature-integration',
526515
tags: ['resource-management'],

.evergreen/run-resource-management.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

api-extractor.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
"dtsRollup": {
1111
"enabled": true,
1212
"untrimmedFilePath": "",
13-
"publicTrimmedFilePath": "<projectFolder>/<unscopedPackageName>.d.ts",
14-
"betaTrimmedFilePath": "<projectFolder>/lib/beta.d.ts"
13+
"publicTrimmedFilePath": "<projectFolder>/<unscopedPackageName>.d.ts"
1514
},
1615
"tsdocMetadata": {
1716
"enabled": false

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
"scripts": {
125125
"build:evergreen": "node .evergreen/generate_evergreen_tasks.js",
126126
"build:ts": "node ./node_modules/typescript/bin/tsc",
127-
"build:dts": "npm run build:ts && api-extractor run && node etc/clean_definition_files.cjs && ESLINT_USE_FLAT_CONFIG=false eslint --no-ignore --fix mongodb.d.ts lib/beta.d.ts",
127+
"build:dts": "npm run build:ts && api-extractor run && node etc/clean_definition_files.cjs && ESLINT_USE_FLAT_CONFIG=false eslint --no-ignore --fix mongodb.d.ts",
128128
"build:docs": "./etc/docs/build.ts",
129129
"build:typedoc": "typedoc",
130130
"build:nightly": "node ./.github/scripts/nightly.mjs",
@@ -143,7 +143,6 @@
143143
"check:unit": "nyc mocha test/unit",
144144
"check:ts": "node ./node_modules/typescript/bin/tsc -v && node ./node_modules/typescript/bin/tsc --noEmit",
145145
"check:atlas": "nyc mocha --config test/manual/mocharc.js test/manual/atlas_connectivity.test.ts",
146-
"check:resource-management": "nyc mocha --config test/manual/mocharc.js test/manual/resource_management.test.ts",
147146
"check:drivers-atlas-testing": "nyc mocha --config test/mocha_mongodb.js test/atlas/drivers_atlas_testing.test.ts",
148147
"check:aws": "nyc mocha --config test/mocha_mongodb.js test/integration/auth/mongodb_aws.test.ts test/integration/auth/mongodb_aws.prose.test.ts",
149148
"check:oidc-auth": "nyc mocha --config test/mocha_mongodb.js test/integration/auth/auth.spec.test.ts",

src/beta.ts

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/change_stream.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import { MongoClient } from './mongo_client';
1818
import { type InferIdType, TypedEventEmitter } from './mongo_types';
1919
import type { AggregateOptions } from './operations/aggregate';
2020
import type { OperationParent } from './operations/command';
21-
import { type AsyncDisposable, configureResourceManagement } from './resource_management';
2221
import type { ServerSessionId } from './sessions';
2322
import { CSOTTimeoutContext, type TimeoutContext } from './timeout';
2423
import { filterOptions, getTopology, type MongoDBNamespace, squashError } from './utils';
@@ -574,13 +573,10 @@ export class ChangeStream<
574573
implements AsyncDisposable
575574
{
576575
/**
577-
* @beta
578576
* @experimental
579577
* An alias for {@link ChangeStream.close|ChangeStream.close()}.
580578
*/
581-
declare [Symbol.asyncDispose]: () => Promise<void>;
582-
/** @internal */
583-
async asyncDispose() {
579+
async [Symbol.asyncDispose]() {
584580
await this.close();
585581
}
586582

@@ -1090,5 +1086,3 @@ export class ChangeStream<
10901086
}
10911087
}
10921088
}
1093-
1094-
configureResourceManagement(ChangeStream.prototype);

src/cmap/auth/providers.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/** @public */
22
export const AuthMechanism = Object.freeze({
33
MONGODB_AWS: 'MONGODB-AWS',
4-
MONGODB_CR: 'MONGODB-CR',
54
MONGODB_DEFAULT: 'DEFAULT',
65
MONGODB_GSSAPI: 'GSSAPI',
76
MONGODB_PLAIN: 'PLAIN',

src/cmap/connect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ export async function prepareHandshakeDocument(
222222
const options = authContext.options;
223223
const compressors = options.compressors ? options.compressors : [];
224224
const { serverApi } = authContext.connection;
225-
const clientMetadata: Document = await options.extendedMetadata;
225+
const clientMetadata: Document = await options.metadata;
226226

227227
const handshakeDoc: HandshakeDocument = {
228228
[serverApi?.version || options.loadBalanced === true ? 'hello' : LEGACY_HELLO_COMMAND]: 1,

src/cmap/connection.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ export interface CommandOptions extends BSONSerializeOptions {
9090
/** Session to use for the operation */
9191
session?: ClientSession;
9292
documentsReturnedIn?: string;
93-
noResponse?: boolean;
9493
omitMaxTimeMS?: boolean;
9594

9695
// TODO(NODE-2802): Currently the CommandOptions take a property willRetryWrite which is a hint
@@ -140,9 +139,8 @@ export interface ConnectionOptions
140139
socketTimeoutMS?: number;
141140
/** @internal */
142141
cancellationToken?: CancellationToken;
143-
metadata: ClientMetadata;
144142
/** @internal */
145-
extendedMetadata: Promise<Document>;
143+
metadata: Promise<ClientMetadata>;
146144
/** @internal */
147145
mongoLogger?: MongoLogger | undefined;
148146
}
@@ -468,7 +466,7 @@ export class Connection extends TypedEventEmitter<ConnectionEvents> {
468466
signal: options.signal
469467
});
470468

471-
if (options.noResponse || message.moreToCome) {
469+
if (message.moreToCome) {
472470
yield MongoDBResponse.empty;
473471
return;
474472
}
@@ -568,11 +566,7 @@ export class Connection extends TypedEventEmitter<ConnectionEvents> {
568566
new CommandSucceededEvent(
569567
this,
570568
message,
571-
options.noResponse
572-
? undefined
573-
: message.moreToCome
574-
? { ok: 1 }
575-
: (object ??= document.toObject(bsonOptions)),
569+
message.moreToCome ? { ok: 1 } : (object ??= document.toObject(bsonOptions)),
576570
started,
577571
this.description.serverConnectionId
578572
)

0 commit comments

Comments
 (0)