The Node.js wrapper for libmongocrypt
Note This library provides encryption functionality for the MongoDB Node.js driver but is not intended to be consumed in isolation. The public API that uses the functionality in this library is available in the mongodb
package.
Only the following version combinations with the MongoDB Node.js Driver are considered stable.
[email protected] |
[email protected] |
[email protected] |
|
---|---|---|---|
[email protected] |
N/A | N/A | ✓ |
[email protected] |
N/A | ✓ | N/A |
[email protected] |
✓ | ✓ | N/A |
[email protected] |
✓ | N/A | N/A |
You can install mongodb-client-encryption
with the following:
npm install mongodb-client-encryption
Run the following command to build libmongocrypt and setup the node bindings for development:
bash ./etc/build-static.sh
We lint both the c++ bindings and the Typescript.
To lint the Typescript, you can run npm run check:eslint -- --fix
. To lint the c++, run npm run clang-format
.
The unit tests require the binding to be built. Run npm run rebuild
to build the addon from the c++ source. Then the tests can be run with npm test
.
Note: changes to c++ source are not automatically re-compiled. One needs to rebuild the bindings after each change.