Skip to content

chore(deps): bump bcryptjs and @types/bcryptjs in /web#365

Merged
malinmalliyawadu merged 3 commits intomainfrom
dependabot-npm_and_yarn-web-multi-6d7db9f379
Dec 14, 2025
Merged

chore(deps): bump bcryptjs and @types/bcryptjs in /web#365
malinmalliyawadu merged 3 commits intomainfrom
dependabot-npm_and_yarn-web-multi-6d7db9f379

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github Dec 9, 2025

Bumps bcryptjs and @types/bcryptjs. These dependencies needed to be updated together.
Updates bcryptjs from 2.4.3 to 3.0.3

Release notes

Sourced from bcryptjs's releases.

v3.0.3

Bug fixes

  • Always yield to event loop before nextTick for async versions (#164) (1211e9a2213e0b3ee232a204b3ce899beebce31a)

v3.0.2

Bug fixes

  • Use upstream fix to emit interop helpers (28e510389374f5736c447395443d4a6687325048)

v3.0.1

Bug fixes

  • Separate ESM and UMD type definitions (e7055caf0c723cbcf8bc3f0784b8c30ee332380f)

v3.0.0

Breaking changes

  • Modernize project structure (2f45985738604c743c4b8cc8464e3e7d3e04c73d) The project now exports an ECMAScript module by default, albeit with an UMD fallback, ships with types, the dist/ directory no longer exists in version control, and Closure Compiler externs have been removed.
  • Generate 2b hashes by default (d36bfb42fa642b6d6986a84ce106a7110e5824db) This library was not affected by the bug that led to incrementing the bcrypt version from 2a to 2b, but nowadays most implementations use 2b, including the native bcrypt binding, so this change aligns with them. Existing hashes will continue to work, but test logic that generates hashes and compares them literally might need to be updated to account for the new default.

Features

  • Add helper to check for password input length (d5656b39e2e368c87724a312e4e454456a4e5d1b)

Other

  • Update publish workflow (2a9bea9e276e6be04dbd403f9695937788b3b10a)
  • Add note on using the ESM variant in the browser (e09eb9afb14170069aaea19631b763307ee7b480)
  • Update types (58333a1533dd53838e2697628f84b98d54a5c079)
  • Merge lint and test workflows (2e3b17659e8856696acfe3015631ce2989eb3084)
  • Fix tests (ec02e8a0ada7a8f6c71a91df164db8c25bbbb7b4)
  • Update legacy fallback to handle crypto dependency (9db275fa10b1b40da4a6844480d7f8ae8df27fb8)
  • Update lint workflow title (ac70ac57c2f99ad5639eddf54578e5fdd07b9c4c)
  • Adapt crypto module usage for ESM environments (574d690d4972bcebbd5ca07880a62abab9ae3c0b)
  • Format with prettier (e7465479282d8155852ce88d6407eccb14adc106)
  • Rename default branch to 'main' (548559d032d7dd5ac3e4e16d7afd87b36ebe96ca)
  • Update description to mention TypeScript support (4977df0849eaf8cad5b0d0b543fe452432a2d761)
  • Add stale action for issues and PRs (a84d4e45487df0972d8781feafa477d5db4c1dbd)
  • Fix typo (c8c9c01799bbc13092fcbb20cfab4d9015d14c61)
  • Fix Node.js version in CI (1b54cc48d4120b50e1d9058e5a67f326102fd744)

Backlog from v2

  • Added externs to .npmignore (#124) (7e2e93af99df2952253f9cf32db29aefa8f272f7) The npm package does not need externs as it is needed only for closure compiler. Added it in .npmignore since bcryptjs overrides global module and process in WebStorm IDE.
  • Make sure the bin script uses LF (684fac6814a81d974c805a15e22fd69922c7ca6e)
  • Post-merge; Clean up a bit (b09f7f266a7015456b7b36deeb026dc636f64542)

... (truncated)

Commits
  • 1211e9a fix: Always yield to event loop before nextTick for async versions (#164)
  • 28e5103 fix: Use upstream fix to emit interop helpers
  • e7055ca fix: Separate ESM and UMD type definitions
  • 2a9bea9 Update publish workflow
  • d5656b3 Add helper to check for password input length
  • e09eb9a Add note on using the ESM variant in the browser
  • 58333a1 Update types
  • 2e3b176 Merge lint and test workflows
  • ec02e8a Fix tests
  • 9db275f Update legacy fallback to handle crypto dependency
  • Additional commits viewable in compare view

Updates @types/bcryptjs from 2.4.6 to 3.0.0

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot Bot added the dependencies Pull requests that update a dependency file label Dec 9, 2025
@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 9, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
volunteer-portal Ready Ready Preview, Comment Dec 14, 2025 1:06am
volunteer-portal-docs Ready Ready Preview, Comment Dec 14, 2025 1:06am
volunteer-portal-playwright-reports Ready Ready Preview, Comment Dec 14, 2025 1:06am

Bumps [bcryptjs](https://github.com/dcodeIO/bcrypt.js) and [@types/bcryptjs](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/bcryptjs). These dependencies needed to be updated together.

Updates `bcryptjs` from 2.4.3 to 3.0.3
- [Release notes](https://github.com/dcodeIO/bcrypt.js/releases)
- [Commits](dcodeIO/bcrypt.js@2.4.3...v3.0.3)

Updates `@types/bcryptjs` from 2.4.6 to 3.0.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/bcryptjs)

---
updated-dependencies:
- dependency-name: bcryptjs
  dependency-version: 3.0.3
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: "@types/bcryptjs"
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Dec 14, 2025

Claude finished @dependabot[bot]'s task β€”β€” View job


PR Review: bcryptjs Dependency Update βœ…

Review Tasks

  • Analyze changed files and version updates
  • Search codebase for bcryptjs usage patterns
  • Review breaking changes impact on authentication code
  • Assess security implications
  • Check performance considerations
  • Complete comprehensive review

Review Summary

This dependency update is recommended for approval. It's a safe upgrade with security improvements and no breaking changes required.

Key Findings

βœ… No Breaking Changes Required

Your codebase primarily uses the native bcrypt library (not bcryptjs), so the bcryptjs v3 breaking changes don't affect your main authentication flows.

πŸ“Š Current bcrypt Usage Pattern

  • Primary authentication: Uses native bcrypt library (auth-options.ts:9, register/route.ts:3, password-reset.ts:5)
  • Legacy migration code: Uses bcryptjs only in historical-data-transformer.ts:21 for data migration
  • Type definitions: Both @types/bcrypt and @types/bcryptjs are properly configured

πŸ” Security Assessment

Positive security implications:

  1. Improved hash defaults: bcryptjs v3 now generates 2b hashes by default (vs 2a), aligning with modern standards
  2. Better async handling: Fixes event loop yielding in async operations (#164)
  3. ESM compatibility: Modern module structure with better interop
  4. Type safety: Updated TypeScript definitions for better development experience

No security concerns:

  • Existing password hashes remain fully compatible
  • No changes needed to authentication logic
  • Hash verification continues to work seamlessly

⚑ Performance Considerations

  • No performance impact on main authentication (uses native bcrypt)
  • Slight improvement in async operations for migration code
  • Better memory usage with improved event loop handling in bcryptjs

πŸ—οΈ Code Quality

The dependency update follows best practices:

  • Semantic versioning properly handled
  • Type definitions updated in sync
  • No deprecated API usage in codebase

Migration Code Impact (Minimal)

The only place bcryptjs is used is in src/lib/historical-data-transformer.ts:21:

import { hash } from "bcryptjs";
// Used for generating passwords during data migration
const hashedPassword = await hash(randomPassword, 12);

Impact: βœ… No changes needed - the hash function API remains identical in bcryptjs v3.

Recommendations

  1. βœ… Approve and merge - This is a safe security improvement
  2. πŸ“‹ Optional follow-up: Consider consolidating to use only native bcrypt library throughout the codebase for consistency (though not required)
  3. πŸ§ͺ Testing: The GitHub Actions build process will validate compatibility

Test Coverage

βœ… Existing tests remain valid - No authentication logic changes required
βœ… Type checking passes - Updated type definitions are compatible
βœ… Migration code unaffected - bcryptjs hash API unchanged

Verdict: Safe to merge πŸš€

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 14, 2025

πŸ“Š Playwright Test Report

πŸ§ͺ Test Run for 1c8eb09

πŸ“„ View detailed report:
πŸ‘‰ https://volunteer-portal-playwright-reports-1tnhj8e1r-everybody-eats.vercel.app


@malinmalliyawadu malinmalliyawadu merged commit 7fe449f into main Dec 14, 2025
29 of 31 checks passed
@malinmalliyawadu malinmalliyawadu deleted the dependabot-npm_and_yarn-web-multi-6d7db9f379 branch December 14, 2025 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant