Skip to content

0.6.0

Choose a tag to compare

@Pinta365 Pinta365 released this 28 Sep 17:42
· 7 commits to main since this release

v0.6.0

This release introduces an error handling system with safe API variants, making @cross/jwt more robust and
suitable for functional programming patterns.

Result Type Driven Function Alternatives

  • New *Safe function variants that return Result<T, JWTError> instead of throwing exceptions
  • Perfect for functional programming patterns and better type safety
  • Available for all core operations: signJWTSafe, validateJWTSafe, generateKeySafe, etc.

New Examples

  • examples/basic-usage.ts - Traditional throwing API usage
  • examples/result-type-usage.ts - Safe Result-based API usage

Backward Compatibility

  • All existing APIs remain unchanged
  • Safe variants are additive, not replacements
  • Gradual migration path available