- feat(pkg:ts-types): added utility type
INullable<T>to make a type nullable. - feat(pkg:ts-types): added utility type
IMaybeVoid<T>to make a type possibly void.
- fix(pkg:concurrent): introduced new counting strategy abstraction for CircuitBreaker.
- feat(pkg:concurrent): a new
ErrorRateCircuitBreakerCounteris implemented forCircuitBreakerto count the error rate of requests. - deprecate(pkg:concurrent): the old logics are kept in
LegacyCircuitBreakerCounterand will be removed in future releases.The old options will still be supported and the
LegacyCircuitBreakerCounterwill be used internally when the old options are used.
-
feat(pkg:string):
regexpEscapeAPI is now implemented using nativeRegExp.escapeif available, with a polyfill fallback for older environments. -
feat(pkg:string): new class
WildcardCompilerto compile wildcard patterns into RegExp (string or object).
- feat(pkg:object): added API
Object.deepFreeze. - feat(pkg:ts-types): added utility type
IDeepReadonly<T>to recursively make all properties of an object type readonly.
- chore: upgraded dev dependencies to latest versions.
- build: removed all dependencies of
@litert/utils-test.
- build(project): migrate the project to ESM module system
- feat(pkg:object): added API
Object.isClassConstructorto check if a value is a native ES2015 class constructor - feat(pkg:string): added API
String.parseKeyValue - feat(pkg:string): added API
String.parseBooleanValue - feat(pkg:object): added class
Object.PropertyPathParser - feat(pkg:object): added API
Object.getPropertyByPath - feat(pkg:test): added new API
Test.autoTickMsto tick timers by a specified ms interval instead of ticking all timers immediately. - feat(pkg:test): added new API
Test.withEnvto run tests with temporary environment variables.
- fix(pkg:async):
Async.sleepshould throw error immediately if an aborted signal is passed in. - fix(pkg:async):
Async.sleepshould sleep for 0ms if 0ms is passed in, instead of resolving immediately in the next tick.
- build(project): increased the minimum required Node.js version to v20.0.0, to support ESM modules
- fix(pkg:object): API
Object.deepMergeshould not mutate the both input objects - deprecate(pkg:ts-types): removed type
IJsonSafeValue. - deprecate(pkg:string): mark API
String.regexpEscapeas deprecated sinceRegExp.escapeis now widely supported in modern environments.
- fix(pkg:ts-types): corrected the helper type
IJsonSafeValueto whitelistundefinedas a valid JSON safe value - feat(pkg:concurrent): added method
MemoryMutex.wrap - feat(pkg:concurrent): added method
MemoryMutex.run - fix(pkg:concurrent): the
MemoryMutexshould be non-reentrant by default, but an option is added to reenable reentrant behavior. - feat(pkg:async): added extra options
collectResulttoAsync.withAbortSignalAPI - feat(pkg:async): added extra option
opts.collectResulttoAsync.withTimeoutto collect the result of the asynchronous task after timeout.
- feat(pkg:concurrent): added utility class
MemoryMutex - fix(pkg:concurrent):
DebounceController.scheduleshould clear existing timer when maxDelay is reached - fix(pkg:array): ignore empty arrays in
Deduplicatefunction - test(pkg:array): added unit tests for
Deduplicatefunction - fix(pkg:async): added
destroymethod toAbortTimeoutControllerto release resources in time - fix(pkg:async): modified
abortmethod ofAbortTimeoutControllerto prevent aborting multiple times - feat(pkg:async): added API
Async.withAbortSignal - feat(pkg:concurrent): added utility class
BatchBuffer
-
feat(pkg:ts-types): added helper type
IInstanceOf -
fix(pkg:string): renamed API
String.includeEvilSpaceCharstoString.includeEvilWhitespaceCharsThe old API is kept for backward compatibility, but will be removed in future releases.
-
fix(pkg:string): renamed API
String.replaceEvilSpaceCharstoString.replaceEvilWhitespaceCharsThe old API is kept for backward compatibility, but will be removed in future releases.
- feat(pkg:concurrent): added utility class
SlideWindowCounter - feat(pkg:concurrent): added utility class
CountingRateLimiter - feat(pkg:concurrent): added utility class
TokenBucketRateLimiter - feat(pkg:concurrent): added utility class
TokenBucketRateLimiterManager - feat(pkg:concurrent): added utility class
LeakyBucketRateLimiter - feat(pkg:concurrent): added utility class
LeakyBucketRateLimiterManager - feat(pkg:ts-types): added helper type
IJsonSafeValue - feat(pkg:ts-types): added helper type
IMaybeArray - feat(pkg:concurrent): added utility class
ManualBreaker - feat(pkg:concurrent): added utility class
CircuitBreaker
- feat(pkg:test): add API
Test.autoTick - feat(pkg:async): added utility class
AbortTimeoutController - feat(pkg:concurrent): added utility class
ThrottleController - feat(pkg:concurrent): added utility class
DebounceController - feat(pkg:concurrent): added utility class
FiberPool - feat(pkg:async): added API
Async.sleep, with timer safety - feat(pkg:async): added API
Async.autoRetry, with exponential backoff and jitter supports. - fix(pkg:network): export API
Network.isValidIPv4Address - feat(pkg:network): add API
Network.isValidMacAddress - feat(pkg:string): add API
String.isEmailAddress
- feat(pkg:network): added API
Network.isValidIPv4Address - feat(pkg:async): added utility class
FiberController - feat(pkg:async): added utility class
PromiseController - feat(pkg:async): added utility class
BackgroundRunner - feat(pkg:async): added API
Async.withTimeout
- build(doc): initialized project documents
- feat(pkg:string): added name casing detection APIs
- feat(pkg:string): added API
String.toChunksBackward - feat(pkg:string): added API
String.toChunks - fix(project): added missing metadata of packages