Skip to content

Conversation

dariakp
Copy link
Contributor

@dariakp dariakp commented Sep 12, 2025

Description

Summary of Changes

This PR removes the remaining unreachable code given our min supported wire version is 8. It also deprecates ServerCapabilities and ReadPreference.minWireVersion, which are publicly exposed but serve no real function in our current code base.

Notes for Reviewers

ReadPreference.minWireVersion was only ever set to 5, hence removing the corresponding commonWireVersion check in server selection is safe.

What is the motivation for this change?

NODE-7139

Release Highlight

ServerCapabilities and ReadPreference.minWireVersion are deprecated

Neither the ServerCapabilities class nor the ReadPreference.minWireVersion property were ever intended for public use and, internally, are effectively dead code with the driver's minimum supported server version being 4.2.

Double check the following

  • Lint is passing (npm run check:lint)
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@dariakp dariakp marked this pull request as ready for review September 12, 2025 21:33
@dariakp dariakp requested a review from a team as a code owner September 12, 2025 21:33
@durran durran self-assigned this Sep 15, 2025
@durran durran added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Sep 15, 2025
Copy link
Member

@durran durran left a comment

Choose a reason for hiding this comment

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

Love PRs with all removals.

@durran durran merged commit 14303bc into main Sep 15, 2025
28 of 31 checks passed
@durran durran deleted the NODE-7139/cleanup-pre-4.2-logic branch September 15, 2025 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Primary Review In Review with primary reviewer, not yet ready for team's eyes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants