Skip to content
This repository was archived by the owner on Nov 22, 2025. It is now read-only.

Conversation

@meabed
Copy link
Contributor

@meabed meabed commented Aug 26, 2025

Summary

  • Added comprehensive WHOIS functionality to retrieve domain age and registration status
  • Implemented PSL (Public Suffix List) validation for consistent domain checking
  • Added robust WHOIS response parsing for 50+ TLDs

Changes

New Features

  • getDomainAge() - Get domain creation date and age information via WHOIS
  • getDomainRegistrationStatus() - Get detailed domain registration status
  • Integration with main verification methods (verifyEmail and verifyEmailDetailed)

Technical Implementation

  • Comprehensive WHOIS parser supporting 50+ TLDs with specific parsing rules
  • Socket-based WHOIS protocol implementation with timeout support
  • Automatic WHOIS server discovery for unknown TLDs
  • PSL validation for domain validity checking (consistent with email validation)
  • 1-hour LRU caching for WHOIS results
  • Native JavaScript Date parsing (no external date libraries)

Type Definitions

  • DomainAgeInfo - Domain age information interface
  • DomainRegistrationInfo - Registration status interface
  • ParsedWhoisResult - Internal WHOIS parsing result type

Testing

  • ✅ All 19 WHOIS tests passing
  • ✅ Edge cases handled (invalid domains, special characters)
  • ✅ Integration tests with real WHOIS servers

Documentation

  • Updated README with WHOIS function documentation
  • Added CHANGELOG entries for v2.4.0 and v2.4.1
  • Documented PSL validation approach

Breaking Changes

None - All changes are additive

Performance

  • WHOIS results cached for 1 hour
  • Configurable timeout support (default 5 seconds)
  • Graceful degradation for unreachable WHOIS servers

renovate bot and others added 17 commits August 23, 2025 01:58
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…-eslint to v8.41.0

- Moved @types/psl from dependencies (likely to devDependencies)
- Updated typescript-eslint from v8.40.0 to v8.41.0
- Moved @types/psl from dependencies to optimize bundle size
- Updated typescript-eslint to v8.41.0
Document dependency updates and package optimizations
Major Features:
- Name detection from email addresses with confidence scoring
- Domain typo detection and suggestions with 70+ common domains
- Smart caching for domain suggestions (24h TTL)
- Migration from ESLint/Prettier to Biome for better performance

Technical Improvements:
- Enhanced TypeScript interfaces for new features
- Backward compatible API with optional feature flags
- String similarity algorithm for accurate domain matching
- Performance optimized with LRU caching
- Comprehensive test coverage (129 tests passing)

Breaking Changes: None (fully backward compatible)

Details:
- detectName parameter for email verification functions
- suggestDomain parameter with customizable domain lists
- Support for custom detection/suggestion methods
- New exports for standalone utility functions
- Updated all Node.js imports to use node: protocol
- Removed ESLint/Prettier in favor of Biome
Add getDomainAge() and getDomainRegistrationStatus() functions to retrieve domain information via WHOIS lookups.

Features:
- getDomainAge(): Retrieves domain creation date, age in days/years, expiration and update dates
- getDomainRegistrationStatus(): Checks registration status, registrar, name servers, expiration, and lock status
- Support for 50+ TLDs with specific WHOIS servers
- Automatic WHOIS server discovery for unknown TLDs
- Intelligent parsing of various WHOIS response formats
- 1-hour caching for performance optimization
- Timeout support with graceful error handling
- Domain extraction from email addresses and URLs

Testing:
- Added comprehensive test suite with 19 tests
- Integration tests with real WHOIS servers
- Edge case handling and timeout scenarios

Documentation:
- Updated README with detailed API documentation
- Added TypeScript interfaces for WHOIS data structures
- Updated CHANGELOG for v2.4.0 release
- Replace simple WHOIS parser with comprehensive parser supporting 30+ TLDs
- Add TLD-specific regex patterns for better parsing accuracy
- Convert from luxon to native JavaScript Date parsing
- Add support for domain age and registration status in main verification methods
- Add checkDomainAge and checkDomainRegistration options to verifyEmail methods
- Improve date parsing for various WHOIS date formats
- Better handling of domain availability detection
- Enhanced error handling for rate limiting
- Fix linting issues and improve type safety
- Replace manual domain validation with psl.isValid() for consistency
- Use the same validation method as email domain validation
- Fix TypeScript type assertion for whoisCache
- Fix non-null assertion warning in verifyEmailDetailed
- Ensures consistent domain validation across the entire codebase
- Add changelog entry for v2.4.1 with validation improvements
- Document PSL (Public Suffix List) usage in WHOIS functions
- Add note about domain validation requirements in README
- Clarify that invalid domains return null
@meabed meabed merged commit 3a45f0b into master Aug 26, 2025
@meabed meabed deleted the develop branch August 26, 2025 20:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants