Skip to content

Commit

Permalink
Merge pull request #63 from fibjs/feat/adapt_to_0.38_dev
Browse files Browse the repository at this point in the history
[WIP] build: adapt to fibjs 0.38.0
  • Loading branch information
xicilion authored Apr 17, 2024
2 parents 7badb9b + e8302a5 commit b731c15
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
3 changes: 2 additions & 1 deletion demo/defs/user/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ module.exports = db => {
}
},
beforeCreate: function () {
var salt = crypto.pseudoRandomBytes(64);
const randomBytes = crypto.pseudoRandomBytes || crypto.randomBytes;
var salt = randomBytes(64);
this.salt = salt.hex();
this.password = crypto.pbkdf2(this.password || "", salt, 256, 64, 'sha1').hex();
}
Expand Down
29 changes: 16 additions & 13 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 @@ -51,7 +51,7 @@
"faker": "^4.1.0",
"fib-pug": "0.0.2",
"fib-push": "^1.4.2",
"fib-session": "^0.5.3",
"fib-session": "^0.6.0",
"fib-typify": "^0.11.6",
"ts-expect": "^1.3.0",
"vuepress": "^1.0.3",
Expand Down

0 comments on commit b731c15

Please sign in to comment.