Skip to content

Commit

Permalink
Add bcryptjs build script and step
Browse files Browse the repository at this point in the history
  • Loading branch information
karlhorky committed Feb 26, 2025
1 parent 503268b commit f8183bb
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ jobs:
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Bundle bcryptjs (succeeds)
run: npm run build-bcryptjs
- name: Bundle bcrypt (fails)
run: npm run build
3 changes: 3 additions & 0 deletions index-bcryptjs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import bcrypt from 'bcryptjs';

console.log(await bcrypt.hash('x', 10));
12 changes: 11 additions & 1 deletion package-lock.json

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

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
"type": "module",
"main": "index.js",
"scripts": {
"build": "esbuild index.ts --bundle --platform=node --format=esm --target=node22 --outfile=out.js"
"build": "esbuild index.ts --bundle --platform=node --format=esm --target=node22 --outfile=out.js",
"build-bcryptjs": "esbuild index-bcryptjs.ts --bundle --platform=node --format=esm --target=node22 --outfile=out.js"
},
"dependencies": {
"bcrypt": "5.1.1"
"bcrypt": "5.1.1",
"bcryptjs": "3.0.2"
},
"devDependencies": {
"@types/bcrypt": "5.0.2",
Expand Down

0 comments on commit f8183bb

Please sign in to comment.