Skip to content

Releases: litert/utils.js

v2.2.0

29 May 15:50
v2.2.0
bb28f4c

Choose a tag to compare

CHANGES

New Features

  • feat(pkg:string): regexpEscape API is now implemented using native
    RegExp.escape if available, with a polyfill fallback for older environments.

  • feat(pkg:string): new class WildcardCompiler to compile wildcard patterns
    into RegExp (string or object).

Full Changelog: v2.1.0...v2.2.0

v2.0.0

31 Mar 14:52
v2.0.0
0222454

Choose a tag to compare

What's Changed

New Features

  • build(project): migrate the project to ESM module system
  • feat(pkg:object): added API Object.isClassConstructor to 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.autoTickMs to tick timers by a specified ms interval instead of ticking all timers immediately.
  • feat(pkg:test): added new API Test.withEnv to run tests with temporary environment variables.

Bug Fixes

  • fix(pkg:async): Async.sleep should throw error immediately if an aborted signal is passed in.
  • fix(pkg:async): Async.sleep should sleep for 0ms if 0ms is passed in, instead of resolving immediately in the next tick.

Breaking Changes

  • build(project): increased the minimum required Node.js version to v20.0.0, to support ESM modules
  • fix(pkg:object): API Object.deepMerge should not mutate the both input objects
  • deprecate(pkg:ts-types): removed type IJsonSafeValue.
  • deprecate(pkg:string): mark API String.regexpEscape as deprecated since RegExp.escape is now widely supported in modern environments.

Other Changes

  • build(deps-dev): bump minimatch from 3.1.2 to 3.1.5 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #2
  • build(deps-dev): bump flatted from 3.3.3 to 3.4.2 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #3
  • build(deps): bump the npm_and_yarn group across 1 directory with 1 update by @dependabot[bot] in #4

Full Changelog: v1.7.0...v2.0.0

v1.7.0

03 Jan 15:52
v1.7.0
6408482

Choose a tag to compare

CHANGES

  • fix(pkg:ts-types): corrected the helper type IJsonSafeValue to whitelist undefined as a valid JSON safe value
  • feat(pkg:concurrent): added method MemoryMutex.wrap
  • feat(pkg:concurrent): added method MemoryMutex.run
  • fix(pkg:concurrent): the MemoryMutex should be non-reentrant by default,
    but an option is added to reenable reentrant behavior.
  • feat(pkg:async): added extra options collectResult to Async.withAbortSignal API
  • feat(pkg:async): added extra option opts.collectResult to Async.withTimeout
    to collect the result of the asynchronous task after timeout.

Full Changelog: v1.6.0...v1.7.0

v1.6.0

25 Dec 15:16
v1.6.0
810332a

Choose a tag to compare

What's Changed

  • build(deps-dev): bump js-yaml from 4.1.0 to 4.1.1 by @dependabot[bot] in #1
  • feat(pkg:concurrent): added utility class MemoryMutex
  • fix(pkg:concurrent): DebounceController.schedule should clear existing timer when maxDelay is reached
  • fix(pkg:array): ignore empty arrays in Deduplicate function
  • test(pkg:array): added unit tests for Deduplicate function
  • fix(pkg:async): added destroy method to AbortTimeoutController to release resources in time
  • fix(pkg:async): modified abort method of AbortTimeoutController to prevent aborting multiple times
  • feat(pkg:async): added API Async.withAbortSignal
  • feat(pkg:concurrent): added utility class BatchBuffer

New Contributors

Full Changelog: v1.5.0...v1.6.0

v1.5.0

05 Dec 03:30
v1.5.0
75d81c1

Choose a tag to compare

CHANGES

  • feat(pkg:ts-types): added helper type IInstanceOf

  • fix(pkg:string): renamed API String.includeEvilSpaceChars to String.includeEvilWhitespaceChars

    The old API is kept for backward compatibility, but will be removed in future releases.

  • fix(pkg:string): renamed API String.replaceEvilSpaceChars to String.replaceEvilWhitespaceChars

    The old API is kept for backward compatibility, but will be removed in future releases.

Full Changelog: v1.4.0...v1.5.0

v1.4.0

03 Oct 14:13
v1.4.0
56a9de8

Choose a tag to compare

CHANGES

  • feat(pkg:concurrent): added utility class ManualBreaker
  • feat(pkg:concurrent): added utility class CircuitBreaker
  • 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

Full Changelog: v1.3.0...v1.4.0

v1.3.0

02 Aug 17:21
v1.3.0
2195768

Choose a tag to compare

CHANGES

  • 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

Full Changelog: v1.2.1...v1.3.0

v1.2.1

22 Jun 13:01
v1.2.1
fe61326

Choose a tag to compare

CHANGES

  • 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

Full Changelog: v1.1.1...v1.2.1

v1.1.1

04 Jun 15:39
v1.1.1
5da47ed

Choose a tag to compare

CHANGES

  • 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

Full Changelog: v1.0.0...v1.1.1

v1.0.0

03 Jun 14:54
v1.0.0
6e02e59

Choose a tag to compare

The first release