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-5399): use mongodb-js/saslprep instead of saslprep #3818

Merged
merged 1 commit into from Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 11 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -30,7 +30,7 @@
"socks": "^2.7.1"
},
"optionalDependencies": {
"saslprep": "^1.0.3"
"@mongodb-js/saslprep": "^1.1.0"
},
"peerDependencies": {
"@aws-sdk/credential-providers": "^3.201.0",
Expand Down Expand Up @@ -69,7 +69,6 @@
"@types/kerberos": "^1.1.2",
"@types/mocha": "^10.0.1",
"@types/node": "^20.1.0",
"@types/saslprep": "^1.0.1",
"@types/semver": "^7.5.0",
"@types/sinon": "^10.0.14",
"@types/sinon-chai": "^3.2.9",
Expand Down
15 changes: 8 additions & 7 deletions src/deps.ts
Expand Up @@ -126,13 +126,14 @@ export function getSnappy(): SnappyLib | { kModuleError: MongoMissingDependencyE
}
}

export let saslprep: typeof import('saslprep') | { kModuleError: MongoMissingDependencyError } =
makeErrorModule(
new MongoMissingDependencyError(
'Optional module `saslprep` not found.' +
' Please install it to enable Stringprep Profile for User Names and Passwords'
)
);
export let saslprep:
| typeof import('@mongodb-js/saslprep')
| { kModuleError: MongoMissingDependencyError } = makeErrorModule(
new MongoMissingDependencyError(
'Optional module `saslprep` not found.' +
' Please install it to enable Stringprep Profile for User Names and Passwords'
)
);

try {
// Ensure you always wrap an optional require in the try block NODE-3199
Expand Down