Skip to content

feat(NODE-5396): add mongodb-js/saslprep as a required dependency #3815

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
merged 3 commits into from
Aug 16, 2023

Conversation

baileympearson
Copy link
Contributor

@baileympearson baileympearson commented Aug 15, 2023

What is changing?

We no longer use the third-party saslprep package in favor of mongodb-js/saslprep (which can be bundled). We also made saslprep a required dependency and it will now always be installed.

Is there new documentation needed for these changes?

No.

What is the motivation for this change?

mongodb-js/saslprep can be bundled

Release Highlight

mongodb-js/saslprep is now installed by default

Until v6, the driver included the saslprep package as an optional dependency for SCRAM-SHA-256 authentication. saslprep breaks when bundled with webpack because it attempted to read a file relative to the package location and consequently the driver would throw errors when using SCRAM-SHA-256 if it were bundled.

The driver now depends on mongodb-js/saslprep, a fork of saslprep that can be bundled with webpack because it includes the necessary saslprep data in memory upon loading. This will be installed by default but will only be used if SCRAM-SHA-256 authentication is used.

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

addaleax
addaleax previously approved these changes Aug 15, 2023
@nbbeeken nbbeeken self-assigned this Aug 15, 2023
@nbbeeken nbbeeken added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Aug 15, 2023
@nbbeeken nbbeeken 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 15, 2023
@nbbeeken nbbeeken merged commit bd031fc into main Aug 16, 2023
@nbbeeken nbbeeken deleted the NODE-5396-saslprep-required branch August 16, 2023 15:09
orgads pushed a commit to orgads/node-mongodb-native that referenced this pull request Aug 22, 2023
orgads pushed a commit to orgads/node-mongodb-native that referenced this pull request Aug 22, 2023
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.

4 participants