Skip to content

Commit 9db275f

Browse files
committedFeb 12, 2025·
Update legacy fallback to handle crypto dependency
1 parent ac70ac5 commit 9db275f

File tree

5 files changed

+19
-24
lines changed

5 files changed

+19
-24
lines changed
 

‎package-lock.json

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

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"format": "prettier --write .",
5252
"test": "npm run test:unit && npm run test:typescript",
5353
"test:unit": "node tests",
54-
"test:typescript": "tsc --project tests/typescript/tsconfig.esnext.json && tsc --project tests/typescript/tsconfig.nodenext.json && tsc --project tests/typescript/tsconfig.commonjs.json"
54+
"test:typescript": "tsc --project tests/typescript/tsconfig.esnext.json && tsc --project tests/typescript/tsconfig.nodenext.json && tsc --project tests/typescript/tsconfig.commonjs.json && tsc --project tests/typescript/tsconfig.global.json"
5555
},
5656
"files": [
5757
"index.js",
@@ -68,7 +68,7 @@
6868
},
6969
"devDependencies": {
7070
"bcrypt": "^5.1.1",
71-
"esm2umd": "^0.2.2",
71+
"esm2umd": "^0.3.0",
7272
"prettier": "^3.5.0",
7373
"typescript": "^5.7.3"
7474
}

‎tests/typescript/test-global.ts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/// <reference path="../../umd/index.d.ts" />
2+
3+
bcrypt.hashSync("test");

‎tests/typescript/tsconfig.global.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "./tsconfig.base.json",
3+
"compilerOptions": {
4+
"module": "None"
5+
},
6+
"include": ["./test-global.ts"]
7+
}

‎umd/index.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
import * as bcrypt from "../types.js";
22
export = bcrypt;
3+
export as namespace bcrypt;

0 commit comments

Comments
 (0)