Skip to content

Commit

Permalink
feat(NODE-5398): use mongodb-js/saslprep instead of saslprep (#3820)
Browse files Browse the repository at this point in the history
  • Loading branch information
baileympearson authored Aug 17, 2023
1 parent 2910dca commit 5244711
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 21 deletions.
23 changes: 10 additions & 13 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"homepage": "https://github.com/mongodb/node-mongodb-native",
"optionalDependencies": {
"@aws-sdk/credential-providers": "^3.186.0",
"saslprep": "^1.0.3"
"@mongodb-js/saslprep": "^1.1.0"
},
"scripts": {
"build:evergreen": "node .evergreen/generate_evergreen_tasks.js",
Expand Down
15 changes: 8 additions & 7 deletions src/deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,14 @@ try {
} catch {} // eslint-disable-line
} catch {} // eslint-disable-line

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 `@mongodb-js/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

0 comments on commit 5244711

Please sign in to comment.