Skip to content

Conversation

@johanviberg
Copy link
Owner

Summary

This PR introduces significant improvements to the ProxyCheck SDK with a modernized API, enhanced error handling, and better developer experience.

Key Changes

New Features

  • Modern Client Architecture: New ProxyCheck class with improved API design
  • Enhanced Error Handling: Comprehensive error system with recovery strategies
  • Semantic Configuration: Type-safe configuration with validation
  • Response Transformation: Utilities for handling and transforming API responses
  • Dashboard Service: Access to dashboard statistics and query history
  • List Management: Refactored list management with better compatibility

Improvements

  • TypeScript: Stronger type safety throughout the codebase
  • Testing: Comprehensive test coverage (245 tests)
  • Build System: Updated dependencies and configuration
  • Examples: Updated all examples to showcase new API features

Fixes

  • Fixed linting errors and code complexity issues
  • Resolved failing tests
  • Updated .gitignore for development files

Breaking Changes

This release includes breaking changes. Users will need to migrate to the new API:

Migration Required

  • The main client class has changed from ProxyCheckClient to ProxyCheck
  • Configuration options have been restructured
  • Response formats have been standardized
  • Some method names and signatures have changed

Migration Guide

// Old API
import { ProxyCheckClient } from 'proxycheck-ts';
const client = new ProxyCheckClient({ apiKey: 'your-key' });

// New API
import { ProxyCheck } from 'proxycheck-ts';
const client = new ProxyCheck({ apiKey: 'your-key' });

Please refer to the updated examples and documentation for detailed migration instructions.

Test Results

  • All 245 tests passing
  • TypeScript compilation successful
  • Linting passed
  • Build successful

Documentation

  • Updated README with new API examples
  • Comprehensive inline documentation
  • Updated CHANGELOG

}> {
// Simple email validation
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
const isValid = emailRegex.test(email);

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data High

This
regular expression
that depends on
library input
may run slow on strings starting with '!@!.' and with many repetitions of '!.'.
if (
ipv4Regex.test(trimmed) ||
ipv6Regex.test(trimmed) ||
emailRegex.test(trimmed) ||

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data High

This
regular expression
that depends on
library input
may run slow on strings starting with '!@!.' and with many repetitions of '!.'.
This
regular expression
that depends on
library input
may run slow on strings starting with '!@!.' and with many repetitions of '!.'.
This
regular expression
that depends on
library input
may run slow on strings starting with '!@!.' and with many repetitions of '!.'.
This
regular expression
that depends on
library input
may run slow on strings starting with '!@!.' and with many repetitions of '!.'.
This
regular expression
that depends on
library input
may run slow on strings starting with '!@!.' and with many repetitions of '!.'.
This
regular expression
that depends on
library input
may run slow on strings starting with '!@!.' and with many repetitions of '!.'.
if (ipv4Regex.test(address) || ipv6Regex.test(address)) {
return "ip";
}
if (emailRegex.test(address)) {

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data High

This
regular expression
that depends on
library input
may run slow on strings starting with '!@!.' and with many repetitions of '!.'.
This
regular expression
that depends on
library input
may run slow on strings starting with '!@!.' and with many repetitions of '!.'.
This
regular expression
that depends on
library input
may run slow on strings starting with '!@!.' and with many repetitions of '!.'.
This
regular expression
that depends on
library input
may run slow on strings starting with '!@!.' and with many repetitions of '!.'.
This
regular expression
that depends on
library input
may run slow on strings starting with '!@!.' and with many repetitions of '!.'.
This
regular expression
that depends on
library input
may run slow on strings starting with '!@!.' and with many repetitions of '!.'.
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.

2 participants