This repository was archived by the owner on Nov 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
feat: add WHOIS domain information functions with PSL validation #518
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Changes
New Features
getDomainAge()- Get domain creation date and age information via WHOISgetDomainRegistrationStatus()- Get detailed domain registration statusverifyEmailandverifyEmailDetailed)Technical Implementation
Type Definitions
DomainAgeInfo- Domain age information interfaceDomainRegistrationInfo- Registration status interfaceParsedWhoisResult- Internal WHOIS parsing result typeTesting
Documentation
Breaking Changes
None - All changes are additive
Performance