Skip to content
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

feat(NODE-3989)!: only accept true and false for boolean options #3791

Merged
merged 9 commits into from
Aug 4, 2023

Conversation

W-A-James
Copy link
Contributor

@W-A-James W-A-James commented Aug 2, 2023

Description

What is changing?

  • Removed support for deprecated alternate boolean values in connection strings
Is there new documentation needed for these changes?

What is the motivation for this change?

NODE-3989

Release Highlight

Boolean options only accept 'true' or 'false' in connection strings

Prior to this change, we accepted the values '1', 'y', 'yes', 't' as synonyms for true and '-1', '0', 'f', 'n', 'no' as synonyms for false. These have now been removed in an effort to make working with connection string options simpler.

// Incorrect
const client = new MongoClient('mongodb://localhost:27017?tls=1'); // throws MongoParseError

// Correct
const client  = new MongoClient('mongodb://localhost:27017?tls=true');

Double check the following

  • Ran npm run check:lint script
  • 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

@W-A-James W-A-James marked this pull request as ready for review August 2, 2023 19:32
test/unit/assorted/uri_options.spec.test.ts Outdated Show resolved Hide resolved
test/unit/connection_string.test.ts Outdated Show resolved Hide resolved
@durran durran self-assigned this Aug 3, 2023
@durran durran added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Aug 3, 2023
@W-A-James W-A-James requested a review from durran August 3, 2023 14:08
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.

Lint errors.

@W-A-James W-A-James requested a review from durran August 3, 2023 19:39
@durran durran added Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels Aug 4, 2023
@durran durran merged commit e2e36cc into main Aug 4, 2023
@durran durran deleted the NODE-3989 branch August 4, 2023 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team Review Needs review from team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants