Releases: lensapp/ogre-tools
Releases · lensapp/ogre-tools
v22.1.0
v22.0.0
22.0.0 (2026-04-24)
⚠ BREAKING CHANGES
- injectable: Restructure Inject/Inject2 types and clean minimalDi interfaces
- injectable-react: Rename getAbstractInjectionTokenComponent to *2
- injectable-extension-for-mobx: Unwrap computedInjectMany2 family and reuse ManyFactory
- injectable-extension-for-mobx: The following named exports are removed from
@lensapp/injectable-extension-for-mobx: computedInjectManyInjectable,
computedInjectManyWithMetaInjectable, computedInjectMany2Injectable,
computedInjectManyWithMeta2Injectable, computedInjectMaybeInjectable,
computedInjectMaybe2Injectable. Use the matching *InjectionToken exports
together with registerMobX instead.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
- injectable: di.decorate(alias, decorator) and
di.decorateFunction(alias, decorator) are gone. Replace call sites by
registering an injectable with injectionToken: injectionDecoratorToken.for(alias)
on a container created with { injectionDecorators: true }.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
- injectable: Containers that rely on di.decorate, di.decorateFunction,
or injectables registered against injectionDecoratorToken.for(...) must
now pass { injectionDecorators: true } to createContainer.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
Features
- injectable-extension-for-mobx: Add 2-variants of computedInjectMany et al (3b251bb)
- injectable-react: Add getAbstractInjectionTokenComponent (1fb8f41)
- injectable-react: Add getInjectableComponent2 for v2 InjectionToken2 (b48ad13)
- injectable-react: Add getInjectionTokenComponent (0423f4a)
- injectable-react: Add getInjectionTokenComponent2 for v2 InjectionToken2 (baf9c15)
- injectable-react: Add useInject2 factory-returning hook (9025880)
- injectable-react: Support injectable2 in useInject hooks (86b4e11)
- injectable: Add getAbstractInjectionToken2 with full enforcement (f3bd957)
- injectable: Add getInjectable2/getInjectionToken2 with curried instantiate and generic support (f38e667)
- injectable: Add getNumberOfInstances for global instance count introspection (22126e6)
- injectable: Add inject2/injectMany2 for factory-returning injection (7141062)
- injectable: Add injectable2/token2 support to Override type (0857ba9)
- injectable: Add instancePurgeCallbackToken with three-phase purge and LRU integration (9638776)
- injectable: Add LRU cache support for keyedSingleton instances (d3e16a5)
- injectable: Add registration/deregistration decorator tokens (62f9cf8)
- injectable: Add registration/deregistration decorator tokens as abstract v2 (5fdb64e)
- injectable: Enhance purge with key-based, token, scoped, and typed support (ef75e19)
- injectable: Make di.override and di.override2 cross-compatible with v1/v2 (7d8a697)
- injectable: Make injectionDecorators opt-in at container creation (ed0f5d2)
Bug Fixes
- injectable-extension-for-mobx: Wrap computed reads in runInAction to suppress MobX warnings (f56106d)
- injectable-mobx: Use curried inject for v2 minimalDi in computed-inject-2 variants (05a9d29)
- injectable-react: Accept specific ComponentType tokens for bare components (f9645ce)
- injectable-react: Run tsd separately per test file to avoid multi-directory glob bug (6e1014e)
- injectable-react: Update error message expectations after context removal (ab10112)
- injectable-react: Widen injectionToken type in getInjectableComponent (08109fe)
- injectable: Detect override-after-injection when overriding by token (4c5190e)
- injectable: Fix cascade deregistration throwing for already-deregistered injectables (329ad85)
- injectable: Fix cascade deregistration throwing for already-deregistered injectables (dd56f22)
- injectable: Fix context mutation and optimize hot paths (ecb9d4c)
- injectable: Fix WithMeta types and add type tests for token2 (fedddc3)
- injectable: Include injectable id in singleton instantiation-parameter error (c538535)
- injectable: Include injecting injectable's namespaced id in inject error messages (e71086d)
- injectable: Look up instantiation decorators by original injectable, not override (2ac1d81)
- injectable: Prevent double-decoration when injectable and token share id (71aa101)
- injectable: Stop double-applying injection decorators via injectMany (a6c37fa)
- injectable: Stop spreading v1 instantiation param in Inject2 factory (14a62f8)
- injectable: Tolerate undefined instantiation args on old-style singletons (bb22999)
- injectable: Use namespaced ids in error messages where injectable is registered (3167484)
- injectable: Use object reference as speciality in abstract decorator tokens (a992e1a)
Performance Improvements
- injectable-mobx: Track reactivity atoms lazily, share wrapper singletons, drop rest-spread (49618b8)
- injectable: Cache injection and instantiation decorator lists (a4820c6)
- injectable: Fast-path singleton cache hits, avoiding minimalDi allocation (68521a5)
- injectable: Optimize getInstance with lifecycle fast paths and decorator skip (45841f3)
- injectable: Optimize inject hot path and eliminate redundant computation (8a333a3)
- injectable: Optimize registration decoration to avoid per-injectable overhead (956e49f)
- injectable: Optimize registration path allocations (331693f)
- injectable: Reduce per-inject overhead in injectMany and inject (06c6593)
- injectable: Remove unused dependency tracking maps (d9de077)
- **inject...
v21.1.0
v21.0.3
v21.0.2
v21.0.1
v21.0.0
21.0.0 (2025-11-14)
⚠ BREAKING CHANGES
- core: - Renamed
ILifecycletoLifecycleto match naming convention
- Removed
InjectableLifecycleandGetInjectableOptionsin favour of
GetInjectableOptionsWithoutInstantiationParameterand
GetInjectableOptionsWithInstantiationParameter
Bug Fixes
- core: GetInjectable should be able to be called with a generic lifecycle enum (809a65b)