Skip to content

Commit 28e5103

Browse files
committedFeb 18, 2025·
fix: Use upstream fix to emit interop helpers
1 parent e7055ca commit 28e5103

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed
 

‎index.js

-3
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ function randomBytes(len) {
6464
return randomFallback(len);
6565
}
6666

67-
// Default fallback, if any
68-
randomFallback = null;
69-
7067
/**
7168
* Sets the pseudo random number generator to use as a fallback if neither node's `crypto` module nor the Web Crypto
7269
* API is available. Please note: It is highly important that the PRNG used is cryptographically secure and that it

‎package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
},
7070
"devDependencies": {
7171
"bcrypt": "^5.1.1",
72-
"esm2umd": "^0.3.0",
72+
"esm2umd": "^0.3.1",
7373
"prettier": "^3.5.0",
7474
"typescript": "^5.7.3"
7575
}

‎tests/index.js

+7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import assert from "node:assert";
2+
import { createRequire } from "node:module";
23
import bcryptcpp from "bcrypt";
34
import bcrypt from "../index.js";
45

6+
const require = createRequire(import.meta.url);
7+
58
const tests = [
69
function encodeBase64(done) {
710
var str = bcrypt.encodeBase64(
@@ -226,6 +229,10 @@ const tests = [
226229

227230
done();
228231
},
232+
function commonJS(done) {
233+
var umd = require("../umd/index.js");
234+
umd.genSalt().then(done);
235+
},
229236
];
230237

231238
function next() {

0 commit comments

Comments
 (0)
Please sign in to comment.