Skip to content

Commit

Permalink
fix: Use upstream fix to emit interop helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
dcodeIO committed Feb 18, 2025
1 parent e7055ca commit 28e5103
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
3 changes: 0 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ function randomBytes(len) {
return randomFallback(len);
}

// Default fallback, if any
randomFallback = null;

/**
* Sets the pseudo random number generator to use as a fallback if neither node's `crypto` module nor the Web Crypto
* API is available. Please note: It is highly important that the PRNG used is cryptographically secure and that it
Expand Down
8 changes: 4 additions & 4 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 @@ -69,7 +69,7 @@
},
"devDependencies": {
"bcrypt": "^5.1.1",
"esm2umd": "^0.3.0",
"esm2umd": "^0.3.1",
"prettier": "^3.5.0",
"typescript": "^5.7.3"
}
Expand Down
7 changes: 7 additions & 0 deletions tests/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import assert from "node:assert";
import { createRequire } from "node:module";
import bcryptcpp from "bcrypt";
import bcrypt from "../index.js";

const require = createRequire(import.meta.url);

const tests = [
function encodeBase64(done) {
var str = bcrypt.encodeBase64(
Expand Down Expand Up @@ -226,6 +229,10 @@ const tests = [

done();
},
function commonJS(done) {
var umd = require("../umd/index.js");
umd.genSalt().then(done);
},
];

function next() {
Expand Down

0 comments on commit 28e5103

Please sign in to comment.