Skip to content

Conversation

@addaleax
Copy link
Collaborator

This partially adjusts the changes in 55e28dc -- we should get this data both when using the 7.x and 6.x driver. Because this field is private/async in the 7.x driver, this patch also adds integration tests for both versions.

Description

Open Questions

Checklist

This partially adjusts the changes in  55e28dc -- we should get
this data both when using the 7.x and 6.x driver. Because this
field is private/async in the 7.x driver, this patch also adds
integration tests for both versions.
// TODO: Use a public API once NODE-7406 is done.
// `metadata` became internal + async in v7.x, previously it
// was synchronously available.
driver: (await (client.options as any).metadata).driver,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://mongodb.slack.com/archives/C03MPA2FY6S/p1769100928344779?thread_ts=1769089443.524629&cid=C03MPA2FY6S

For now you can stick with client.options.metadata while we figure out the best way to solve it.

"gen-esm-wrapper": "^1.1.3",
"mocha": "^8.4.0",
"mongodb": "^6.9.0 || ^7.0.0",
"mongodb": "^7.0.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to remove support for 6x already? I'm fine with it if it does not break backwards compatibility.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd also be fine with that, but I don't see any strong reason to do so until all of our products are on 7.x

(This PR does not remove support for 6.x, on the contrary, it adds explicit testing with both the 6.x and 7.x driver. This is the devDependencies list, not the dependencies list)

@addaleax addaleax merged commit cbcc28f into main Jan 23, 2026
35 of 36 checks passed
@addaleax addaleax deleted the go-back-to-driver-metadata branch January 23, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants