- 2128106: Fixed a but LockProvider class
- a93ee80: The Pipeline class invoke method can now take function, async function, LazyPromise and reguler value
- 70e2494: Changed IInvokableObject method name
- b34c3dc: The LazyPromise defer method now accepts callbacks onSuccess, onFailure, and onFinally.
- 70e2494: Removed IEventListenerObject and EventListener types.
- 84e333c: Added new Pipeline utility class makes it easy to chain multiple functions and IInvokableObject instances together. Each function or object in the pipeline can inspect or modify the input as it passes through. The Pipeline class is immutable, so you can safely extend or modify it without causing issues.
- 0cc289d: Changed the serialization, deserialization of the TimeSpan class
- a4349e5: Renamed ILockListener contract to ILockListenable.
- a4349e5: Renamed ICacheListener contract to ICacheListenable.
- 92d7dd3: The LockProvider class and LockProviderFactory class uses MemoryEventBusAdapter by default now.
- 76063a4: Renamed IEventListener contract to IEventListenable.
- 89aa51e: Added 2 new methods for ILock contract, acquireBlocking and runBlocking. They retry acquiring the lock at a set interval until the timeout is reached."
- 76063a4: Renamed Listener type to EventListener
- 76063a4: Enhanced the IEventListenable contract to support both function, object literal and class instance listeners, providing greater flexibility in event handling.
- afa57c7: Added new method asPromise to the IEventBus. The asPromise method returns LazyPromise objecet that resolves once the BaseEvent is dispatched.
- 57e4bb5: Updated documentation
- 92d7dd3: The Cache class and CacehFactory class uses MemoryEventBusAdapter by default now.
- 1f1b344: Renamed function registerEventBusErrors to registerEventBusErrorsToSerde.
- 78bad79: Made ListCollection and IterableCollection class serializable and deserializable.
- 1f1b344: Renamed function registerCacheErrors to registerCacheErrorsToSerde
- 8253d62: Changed Lock class so it now doesn't implement ISerdeTransformer contract.
- fadaaeb: - Changes
- Converted the project to ESM only module.
- Removed the main entrypoint and multiple entry points to the project via package.json exports field.
- 4e4b1b8: Added new Serde class that implements IFlexibleSerded and that can be derivied from IFlexibleSerdeAdapter.
- 1f1b344: Renamed function registerCacheEvents to registerCacheEventsToSerde
- 66215ea: The ISerdeTransformer contract name field can now be bot a string and string[].
- 7055619: Improved lock component documentation
- 8253d62: Fixed a bug with Lock class serialization and deserialization
- 1f1b344: Added new functions registerCollectionsToSerde and registerCollectionErrorsToSerde
- 9160158: Renamed UnownedExtendLockError to UnownedRefreshLockError
- ebd0666: Removed IDatabaseLockAdapter inheritance from IDeinitizable and IInitizable to simplify the contract.
- 4a4b537: Removed the ISerdeRegistrable contract
- ebd0666: Removed isLocked method and getRemainingTime method from ILockAdapter.
- 4a4b537: Updated READNE.md and package.json.
- ebd0666: - Lock class
- Fixed a bug in acquireOrFail, it now correctly throws an error.
- e456cbe: Updated READNE.md and package.json.
- c2a6a79: Added more documentation for the lock component
- ecabc49: - Changes
- Remove static settings methods and settings builder classes from:
- EventBus class
- EventBusFactory class
- MemoryEventBusAdapter class
- RedisPubSubEventBusAdapter class
- Remove static settings methods and settings builder classes from:
- 1c41caf: - New features
- Added new ILock UnexpectedLockErrorEvent that will dispatched when error occurs.
- Added event listeners to ILockProvider, enabling monitoring of lock events from multiple locks.
- Changes
- Made all the ILock events defered when dispatched.
- 1821d46: - New features
- Added new ICache UnexpectedCacheErrorEvent that will dispatched when error occurs.
- Changes
- Made all the ICache events defered when dispatched.
- 9a0c764: - Changes
- Remove static settings methods and settings builder classes from:
- Cache class
- CacheFactory class
- MemoryCacheAdapter class
- MongodbCacheAdapter class
- LibsqlCacheAdapter class
- SqliteCacheAdapter class
- RedisCacheAdapter class
- Remove static settings methods and settings builder classes from:
- 9ef0a81: - New features
- Added distributed lock.
- Contracts
- Added IDatabaseLockAdapter
- Added ILockAdapter
- ILockProvider
- ILockProviderFactory
- ILock
- Derivables
- Added LockProvider class.
- Added LockProviderFactory class.
- Adapter
- LibsqlLockAdapter
- MemoryLockAdapter
- MongodbLockAdapter
- RedisLockAdapter
- SqliteLockAdapter
- Contracts
- Added distributed lock.
- 0dfe16c: - Changes
- Simplified the cacheAdapterTestSuite
- Simplified the cacheTestSuite
- 8fa218c: - Changes
- Simplified the eventBusAdapterTestSuite
- Simplified the eventBusTestSuite
- e2f6d79: - Changes
- IAsyncCollection: You can now pass in LazyPromise as default value in the following methods.
- firstOr
- lastOr
- beforeOr
- afterOr
- Cache: You can now pass in LazyPromise as default value in the following methods.
- getOr
- getOrAdd
- IAsyncCollection: You can now pass in LazyPromise as default value in the following methods.
- ef2315b: Fixed a minor type bug
- d486046: Added missing exports
- 604e43f: - Improved documentations
- c3aaf06: - Fixed bugs with LazyPromise class
- ccf442d: - Removed exists mehtod from the ICacheAdapter contract and all classes that implement the contract.
- afdd280: - Removed shouldRegisterEvents and shouldRegisterErrors from CacheSettings.
- Removed shouldRegisterErrors from EventBusSettings.
- 81396af: - Updated the documentation and made CacheSettings.eventBus field required.
- 3dfbd75: - Updated the ICacheAdapter contract: The withGroup method now accepts only a string as its argument.
- Updated the IEventBusAdapter contract: The withGroup method now accepts only a string as its argument.
- 615e616: - Added new settings to the Cache class, allowing you to decide whether to register all Cache related events and errors.
- 29334ad: ### Changes
- Simplified the event registration process by removing the registerCacheEvents function.
- All cache-related events are now registered directly within the Cache class constructor for improved clarity and maintainability.
- a6fe783: ### Changes
- Made all the cahce related Error serializable and deserializable
- All cache related error are registered directly within the Cache class constructor for improved clarity and maintainability
- 97a3934: ### Changes
- Made all the event bus related Error serializable and deserializable
- All event bus related error are registered directly within the EventBus class constructor for improved clarity and maintainability
- f64191c: ### Changes
- Introduced a new method, registerCustom, in the IFlexibleSerde contract. This method enables support for custom serialization and deserialization processes.
- 29aa4d7: Improved documentation
- 6d9dd94: Updated documentation
- c31871e: Added missing imports
- 5f8076b: Improved documentation
-
e21e0ce: ### Changes
- ICache and ICacheAdapter Enhancements:
- All ICache and ICacheAdapter classes now take a single constructor argument.
- A settings builder has been introduced for all ICache and ICacheAdapter classes.
- IEventBus and IEventBusAdapter Enhancements:
- All IEventBus and IEventBusAdapter classes now take a single constructor argument.
- A settings builder has been introduced for all IEventBus and IEventBusAdapter classes.
- LazyPromise class Enhancements:
- Removed the settings from LazyPromise class.
- Renamed to methods to use set as prefix
- ICache and ICacheAdapter Enhancements:
- e21e0ce: ### Changes
- Generic Type Defaults: Added default generic types for the following interfaces and classes
- Caching
- ICache contract
- Cache class
- ICacheAdapter contract
- MemoryCacheAdapter class
- SqliteCacheAdapter class
- LibsqlCacheAdapter class
- RedisCacheAdapter class
- MongodbCacheAdapter class
- Event bus:
- IEventBus contract
- EventBus class
- Collections:
- IAsyncCollection contract
- AsyncIterableCollection class
- ICollection contract
- IterableCollection class
- ListCollection class
- caa9f36: ## Changes
- Ensured consistent serialization and deserialization in all the cache adapters and event bus adapters.
- e21e0ce: ### Changes
- Remove withType method from ICacheFactory and IEventBusFactory.
-
9197902: ## Changes
- Moved cache group logic from the Cache class into the adapters classes.
- Key Impact: Each adapter is now required to implement the getGroup and withGroup methods.
- This change enhances flexibility for adapter-specific logic.
- Moved cache group logic from the Cache class into the adapters classes.
-
7d07f5d: ## New Features
-
Introduced new static helper methods for the LazyPromise class:
- all
- allSettled
- race
- any
These methods are similar to JavaScript Promise methods but execute lazily.
-
-
29bfdf2: ## Changes
- Renamed everything that start with namespace to group.
-
cd2342b: ## Changes
- Renamed all instances of the ISerializer contract to ISerde.
- Added two new contracts:
- IDeserializer: Handles only deserialization.
- ISerializer: Handles olny serialization.
- Introduced the ISerializable contract, enabling classes to be marked as serializable.
- Added the IFlexibleSerde contract, allowing registration of custom classes for serialization and deserialization.
- Implemented the ISerializable contract the TimeSpan class.
-
46d2474: ## New features
- Introduced a new static helper method wrapFn for the LazyPromise class. This method simplifies the process of wrapping asynchronous functions with LazyPromise.
-
d3eec52: ## Changes
- Removed abstract BaseCache class
- Removed abstract BaseEventBus class
- Added lazyPromiseSettings for AsyncIterableCollection class
- Added lazyPromiseSettings for Cache class
- Added lazyPromiseSettings for EventBus class
-
5e7dae8: ## New features
- Introduced a instance static method listenOnce for the IEventBus contract and EventBus class. This method simplifies add listener that will only execute once.
- Moved event bus group logic from the Cache class into the adapters classes.
- Key Impact: Each adapter is now required to implement the getGroup and withGroup methods.
- This change enhances flexibility for adapter-specific logic.
-
67ec890: ## New Features
- Introduced new static helper methods for the AsyncIterableCollection, IterableCollection and ListCollection classes:
- concat
- difference
- zip
- Introduced new static helper methods for the AsyncIterableCollection, IterableCollection and ListCollection classes:
- e08c7d6: ## Changes
- Changed IEventBus contract to use event maps types.
- 18e68be: ## Changes
- Removed abort, retry, timeout methods.
- Added these methods as part of the LazyPromise class for better developer experience.
- 2cc89b6: ## Minor features
- Added reusable tests for ICace contract.
- 8b27f63: ## Changes
- Added: A new NoOpCacheAdapter for mocking cache operations in testing environments.
- Updated: All cache and eventbus adapters now require a serializer to be explicitly provided, ensuring consistent serialization behavior.
- Removed: The validation feature has been removed from the EventBus and EventBusFactory classes.
- Added: A new abstract class BaseEventBus to simplify the implementation of IEventBus. This allows direct use without needing IEventBusAdapter.
-
29e7aee: ### ICollection
- Added
toRecord
: Converts a collection to aRecord
if the items are tuples of two elements, where the first element is astring
,number
, orsymbol
. - Added
toMap
: Converts a collection to aMap
if the items are tuples of two elements.
- Added
toRecord
: Converts a collection to aRecord
if the items are tuples of two elements, where the first element is astring
,number
, orsymbol
. - Added
toMap
: Converts a collection to aMap
if the items are tuples of two elements.
- Added
-
dc33da1: ## Changes
- Added Cache module that can work ttl keys and none ttl keys.
- Remove Storage module in favor of the Cache module because it can with ttl keys and none ttl keys.
- Added MongodbCacheAdapter
- Added SqliteCacheAdapter
- Added LibsqlCacheAdapter
- Added RedisCacheAdapter
- Added MemoryCacheAdapter
- Added Cache module: Introduced a new Cache module that supports both TTL (time-to-live) keys and non-TTL keys.
- Removed Storage module: Its functionality has been replaced by the more versatile Cache module, which supports both TTL and non-TTL keys.
- New Cache Adapters: Added the following cache adapters for improved flexibility and compatibility:
- MongodbCacheAdapter
- SqliteCacheAdapter
- LibsqlCacheAdapter
- RedisCacheAdapter
- MemoryCacheAdapter
- 6308641: ## Changes
- Enhanced the IStorageFactory, so the will throw runtime erros.
- Enhanced the IEventBusFactory, so the will throw runtime erros.
- Simplified the IStorage contract
- Simplified the IStorageAdapter contract
- Simplified Storage class
- Rewrote all the adapters
- f675866: ## Changes
- Changed IAsyncCollection contract to use LazyPromise instead PromiseLike.
- Changed IEventBus contract to use LazyPromise instead PromiseLike.
- Changed IStorage contract to use LazyPromise instead PromiseLike.
- Changed ISerializer contract to use PrommiseLike instead Promise.
- adfe30a: ## Changes
- Added get, getOrFail and set methods for the ICollection and IAsyncCollection contracts
- get method makes it easy to retrieve an item based on index. If item is not found null will be returned.
- getOr method makes it easy to retrieve an item based on index. If item is not found an error will be thrown.
- set method makes it easy to set item by index.
- Added get, getOrFail and set methods for the ICollection and IAsyncCollection contracts
- 0684e61: ## Changes
- Improved the IEventBusManager
- Improved the IStorageManager
-
a462c8f: ## New features
- Added EventBus class and IEventBus contract that includes methods that are useful for multitennacy.
- Added IEventBusAdapter, RedisEventBusAdapter and MemoryEventBusAdapter.
- Improvevd IStorage so they trigger events that can be listenable
- Improved IStorage by adding new methods that that are useful for multitennacy
- Introduced the
EventBus
class and theIEventBus
contract, which provide essential methods for supporting multitenancy. - Added IEventBusAdapter contract the following event bus adapters:
RedisEventBusAdapter
MemoryEventBusAdapter
- Enhanced
IStorage
to trigger events that can be subscribed to for better event-driven behavior. - Expanded
IStorage
with new methods designed to support multitenancy effectively.
- 99c4671: Simplified the storage contracts
- f324fc1: # Storage
- Simplified StorageAdapter contract
- Changed the StorageAdapter and Storage contract to use PromiseLike instead of Promise.
- Changed the Storage class to use LazyPromise instead of Promise.
- Removed unnecessary try catches from Storage class so unknown error can propagate up
- 790a76c: # IAsyncCollection and AsyncIterableCollection Changed IAsyncCollection contract to use PromiseLike instead of Promise. Changed AsyncIterableCollection to use LazyPromise instead of Promise. Removed all try catches catched unknown errors. Renamed timeout to takeUntilTimeout, and abort to takeUntilAbort.
-
e2031da: # New features
- Added abortable async utility function.
- Added abortableIterable utility function.
- Added delay async utility function.
- Added delayIterable utility function.
- Added retry async utility function.
- Added retryIterable utility function.
- Added timeout async utility function.
- Added timeoutIterable utility function.
- Added LazyPromise class utility.
- Added constant, exponential, linear and polynomial backoff policies.
- Added TimeSpan class that makes easy to work time intervals.
-
d070f85: Introduced a new namespace feature for the Storage contract. This enhancement enables the creation of a new Storage instance with a specified prefixed namespace, derived from the current Storage.
- d070f85: Removed AsyncDispose for StorageContract
-
ff9b885: ## Cache
- Added cache contract
- Added cache adapter contract.
- Added redis cache adapter
- Added mongodb cache adapter
- Added sqlite cache adapter.
- Added serializer contract
- Added super json serializer adapter
- Added redis serializer adapter
- Added mongodb serializer adapter
- Added sqlite serializer adapter.
- fad301c: Removed documentation for internal functions
-
7cb54cb: ## ICollection and IAsyncCollection changes Removed the throwOnIndexOverflow setting from all ICollection and IAsyncCollection methods. This change was made because the setting throwOnIndexOverflow was unnecessary; it only applied to very large collections, where using JavaScript is not advisable.
Changed the slice method signature to align with the JavaScript version.
Changed the shuffle method to accept a custom Math.random function, making it easier for testing.
Changed the sum, average, median, min, max, and percentage methods to throw an error when the collection is empty.
Changed the crossJoin method signature and its usage to ensure proper type inference.
- 7206c93: Updated the docs
- 218a64c: Added link to docs in readme
- 60c686d: Added proper documentation, changed som method names, added 2 new methods
- a10193f: Empty collection class instances can be created without passing in empty arrays
- 25b7503: Added npmignore
- First release