Skip to content

feat!: v3 modernization and migration notes#46

Merged
bermi merged 2 commits intomasterfrom
v3
Feb 8, 2026
Merged

feat!: v3 modernization and migration notes#46
bermi merged 2 commits intomasterfrom
v3

Conversation

@bermi
Copy link
Owner

@bermi bermi commented Feb 8, 2026

Breaking Changes

  • generatePassword() is now async and returns a Promise<string>.
  • ESM-only package output (type: module); CommonJS require() is no longer supported.
  • Defaults are now non-memorable with length: 12.
  • Security recommendations enforce a minimum entropy threshold unless ignoreSecurityRecommendations: true is set.
  • Legacy UMD/global builds and Bower/Ender integrations were removed.

Migration (v2 -> v3)

  • Update calls to await generatePassword(...) or use generatePasswordWithOptions with await.
  • Switch CommonJS require() to ESM import and ensure Node 20+.
  • If you used short lengths, restrictive patterns, or memorable mode, handle new security recommendations by increasing length/pattern breadth or passing ignoreSecurityRecommendations: true.
  • Update CLI expectations: defaults are non-memorable, -m uses a longer length, and -s/-sN generates passphrases.

Added

  • TypeScript-first core with strict typing.
  • WebCrypto-based randomness for Node and browser.
  • Deterministic entropy option for tests and simulations.
  • Passphrase mode via words (memorable 3-7 letter words).
  • Bun build/test pipeline, type tests, and Playwright browser checks.
  • Benchmark harness and documentation.

Changed

  • CLI now calls the async API and supports secure defaults.
  • CLI adds -s / -sN for passphrase generation.
  • Build output ships as ESM with explicit exports and declaration files.

@bermi bermi merged commit 4515e98 into master Feb 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant