Skip to content

Releases: Wal33D/address-validation-service

v0.1.5 - Address Preprocessing & Enhanced Error Handling

30 Jul 20:17

Choose a tag to compare

🚀 Release v0.1.5

✨ New Features

  • Address Preprocessing - Intelligent preprocessing of addresses before USPS API calls

    • Automatically adds periods to directional abbreviations (N, S, E, W → N., S., E., W.)
    • Validates and corrects city names based on known issues
    • Implements ZIP-to-city mapping for invalid cities
    • Adds periods to street type abbreviations (Dr, St, Ave → Dr., St., Ave.)
  • Request Deduplication - Prevents duplicate API calls for concurrent identical requests

    • Reduces API usage and improves performance
    • Tracks deduplication statistics
  • Circuit Breaker Pattern - Protects against cascading failures

    • Automatically opens circuit after failure threshold
    • Implements half-open state for recovery testing
    • Configurable failure thresholds and timeout periods

🛠️ Improvements

  • Enhanced Error Handling

    • Error handler now checks headersSent before sending responses
    • Improved error logging with structured data
    • Better error categorization and operational error tracking
  • Connection Pooling

    • HTTP keep-alive agents for better performance
    • Reuses connections for USPS and Google Maps APIs
  • ZIP-Only Fallback Strategy

    • Automatically retries with ZIP-only when USPS returns 400 errors
    • Improves success rate for addresses with invalid city names

📚 Documentation

  • Added comprehensive OpenAPI/Swagger documentation
  • Created API response structure documentation
  • Added integration test coverage

🐛 Bug Fixes

  • Fixed test failures in error handler and security middleware tests
  • Fixed TypeScript compilation errors
  • Resolved axios interceptor issues in tests

📦 Dependencies

  • Updated axios configuration with retry logic
  • Added proper TypeScript types for all new features

🧪 Testing

  • All tests passing (132 passed, 1 skipped)
  • Added comprehensive test coverage for new features
  • Integration tests for address preprocessing

🔧 Technical Details

  • Version: 0.1.5
  • Node.js: >=14.0.0
  • TypeScript: 5.7.3

Contributors

  • Wal33D (Waleed Judah)