Skip to content

chore(main): release 6.18.0 #4554

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

Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jun 4, 2025

🌱 A new release!

6.18.0 (2025-07-22)

The MongoDB Node.js team is pleased to announce version 6.18.0 of the mongodb package!

Release Notes

Cursors lazily instantiate sessions

In previous versions, sessions were eagerly allocated whenever a cursor was created, regardless of whether or not a cursor was actually iterated (and the session was actually needed). Some driver APIs (FindCursor.count(), AggregationCursor.explain() and FindCursor.explain()) don't actually iterate the cursor they are executed on. This can lead to client sessions being created and never being cleaned up.

With this update, sessions are not allocated until the cursor is iterated.

Idle connections are now pruned during periods of no activity even when minPoolSize=0

A MongoClient configured with a maxIdleTimeMS and minPoolSize of 0 is advantageous for workloads that have sustained periods of little or no activity because it allows the connection pool to close connections that are unused during these periods of inactivity. However, due to a bug in the ConnectionPool implementation, idle / perished connections were not cleaned up unless minPoolSize was non-zero.

With the changes in this PR, the ConnectionPool now always cleans up idle connections, regardless of minPoolSize.

CommandSucceededEvent and CommandFailedEvent events now have a databaseName property

CommandSucceededEvent and CommandFailedEvent now include the name of the database against which the command was executed.

Transaction state getters are deprecated

These were for internal use only and include:

Transaction#options
Transaction#recoveryToken
Transaction#isPinned
Transaction#isStarting
Transaction#isActive
Transaction#isCommitted

ClientMetadata, ClientMetadataOptions, and CancellationToken have been deprecated.

These types will be removed in an upcoming major version of the driver.

New appendMetadata API allows clients to add handshake metadata post construction

Driver information such as name, version, and platform are allowed:

import { MongoClient } from 'mongodb';

const client = new MongoClient(process.env.MONGODB_URI);
client.appendMetadata({ name: 'my library', version: '1.0', platform: 'NodeJS' });

CommandOptions.noResponse is deprecated

Caution

noResponse is not intended for use outside of MongoClient.close(). Do not use this option.

The Node driver has historically supported an option, noResponse, that is used internally when a MongoClient is closed. This option was accidentally public. This option will be removed in an upcoming major release.

ChangeStream event interfaces include a wallTime property

This property is available on all types with the exception of reshard collection and refine collection shard key events. Thanks to @qhello for bringing this bug to our attention!

Features

Bug Fixes

Documentation

We invite you to try the mongodb library immediately, and report any issues to the NODE project.


@baileympearson
Copy link
Contributor

run release_notes

@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch 2 times, most recently from b1da0ff to 05dec7d Compare June 10, 2025 17:14
@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch from 05dec7d to 389b55a Compare June 11, 2025 19:02
@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch 3 times, most recently from 777ed81 to 395f20b Compare June 26, 2025 14:24
@github-actions github-actions bot changed the title chore(main): release 6.17.1 chore(main): release 6.18.0 Jun 26, 2025
@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch 5 times, most recently from 7f86ec0 to d872fb5 Compare July 2, 2025 00:09
@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch 5 times, most recently from 1f649b3 to 8b2f349 Compare July 10, 2025 21:45
@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch 2 times, most recently from 0ad7872 to 026ac6e Compare July 18, 2025 13:27
@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch from 026ac6e to c526d5a Compare July 21, 2025 16:18
@baileympearson
Copy link
Contributor

run release_notes

@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch from c526d5a to 5313246 Compare July 22, 2025 16:50
@baileympearson
Copy link
Contributor

run release_notes

@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch from 5313246 to 1174ffb Compare July 22, 2025 18:09
@baileympearson
Copy link
Contributor

run release_notes

@baileympearson baileympearson merged commit 1f358f3 into main Jul 22, 2025
24 of 25 checks passed
@baileympearson baileympearson deleted the release-please--branches--main--components--mongodb branch July 22, 2025 19:52
Copy link
Contributor Author

🤖 Created releases:

🌻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant