Skip to content

Commit

Permalink
Update legacy fallback to handle crypto dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
dcodeIO committed Feb 12, 2025
1 parent ac70ac5 commit 9db275f
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 24 deletions.
28 changes: 6 additions & 22 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"format": "prettier --write .",
"test": "npm run test:unit && npm run test:typescript",
"test:unit": "node tests",
"test:typescript": "tsc --project tests/typescript/tsconfig.esnext.json && tsc --project tests/typescript/tsconfig.nodenext.json && tsc --project tests/typescript/tsconfig.commonjs.json"
"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"
},
"files": [
"index.js",
Expand All @@ -68,7 +68,7 @@
},
"devDependencies": {
"bcrypt": "^5.1.1",
"esm2umd": "^0.2.2",
"esm2umd": "^0.3.0",
"prettier": "^3.5.0",
"typescript": "^5.7.3"
}
Expand Down
3 changes: 3 additions & 0 deletions tests/typescript/test-global.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/// <reference path="../../umd/index.d.ts" />

bcrypt.hashSync("test");
7 changes: 7 additions & 0 deletions tests/typescript/tsconfig.global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"module": "None"
},
"include": ["./test-global.ts"]
}
1 change: 1 addition & 0 deletions umd/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
import * as bcrypt from "../types.js";
export = bcrypt;
export as namespace bcrypt;

0 comments on commit 9db275f

Please sign in to comment.