Skip to content

Commit 3d6e46c

Browse files
committed
chore(release): v22.0.0
1 parent ac758b4 commit 3d6e46c

41 files changed

Lines changed: 456 additions & 166 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,101 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [22.0.0](https://github.com/lensapp/ogre-tools/compare/v21.1.0...v22.0.0) (2026-04-24)
7+
8+
### ⚠ BREAKING CHANGES
9+
10+
- **injectable:** Restructure Inject/Inject2 types and clean minimalDi interfaces
11+
- **injectable-react:** Rename getAbstractInjectionTokenComponent to \*2
12+
- **injectable-extension-for-mobx:** Unwrap computedInjectMany2 family and reuse ManyFactory
13+
- **injectable-extension-for-mobx:** The following named exports are removed from
14+
@lensapp/injectable-extension-for-mobx: computedInjectManyInjectable,
15+
computedInjectManyWithMetaInjectable, computedInjectMany2Injectable,
16+
computedInjectManyWithMeta2Injectable, computedInjectMaybeInjectable,
17+
computedInjectMaybe2Injectable. Use the matching \*InjectionToken exports
18+
together with registerMobX instead.
19+
20+
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
21+
22+
- **injectable:** di.decorate(alias, decorator) and
23+
di.decorateFunction(alias, decorator) are gone. Replace call sites by
24+
registering an injectable with injectionToken: injectionDecoratorToken.for(alias)
25+
on a container created with { injectionDecorators: true }.
26+
27+
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
28+
29+
- **injectable:** Containers that rely on di.decorate, di.decorateFunction,
30+
or injectables registered against injectionDecoratorToken.for(...) must
31+
now pass { injectionDecorators: true } to createContainer.
32+
33+
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
34+
35+
### Features
36+
37+
- **injectable-extension-for-mobx:** Add 2-variants of computedInjectMany et al ([3b251bb](https://github.com/lensapp/ogre-tools/commit/3b251bbc3e1a6e83409bda20ddebf77803a87fef))
38+
- **injectable-react:** Add getAbstractInjectionTokenComponent ([1fb8f41](https://github.com/lensapp/ogre-tools/commit/1fb8f4180c30c52dc9126cf2480bb4422a15b81f))
39+
- **injectable-react:** Add getInjectableComponent2 for v2 InjectionToken2 ([b48ad13](https://github.com/lensapp/ogre-tools/commit/b48ad13d479469e1a58e69daf04da475166ba398))
40+
- **injectable-react:** Add getInjectionTokenComponent ([0423f4a](https://github.com/lensapp/ogre-tools/commit/0423f4aa1ce701f920c5ff39d9727a5762aaa175))
41+
- **injectable-react:** Add getInjectionTokenComponent2 for v2 InjectionToken2 ([baf9c15](https://github.com/lensapp/ogre-tools/commit/baf9c15224bf949315ddc739cdb241803677f019))
42+
- **injectable-react:** Add useInject2 factory-returning hook ([9025880](https://github.com/lensapp/ogre-tools/commit/9025880bf5ca4f2dce4a7568e5ee8f542678ac5a))
43+
- **injectable-react:** Support injectable2 in useInject hooks ([86b4e11](https://github.com/lensapp/ogre-tools/commit/86b4e113b852d95dbbbdea9b23c5f846a8e168d6))
44+
- **injectable:** Add getAbstractInjectionToken2 with full enforcement ([f3bd957](https://github.com/lensapp/ogre-tools/commit/f3bd957cdb1fe7e9a42295724c541381d631e873))
45+
- **injectable:** Add getInjectable2/getInjectionToken2 with curried instantiate and generic support ([f38e667](https://github.com/lensapp/ogre-tools/commit/f38e667e0e719513a7d8dd7dcd41bf9b95fadf86))
46+
- **injectable:** Add getNumberOfInstances for global instance count introspection ([22126e6](https://github.com/lensapp/ogre-tools/commit/22126e64a0cef701142e5364aca362cd2de47c1e))
47+
- **injectable:** Add inject2/injectMany2 for factory-returning injection ([7141062](https://github.com/lensapp/ogre-tools/commit/7141062c11f2a8a03b1756d5a43108ffe3cee14a))
48+
- **injectable:** Add injectable2/token2 support to Override type ([0857ba9](https://github.com/lensapp/ogre-tools/commit/0857ba95b6a573a27f4649593a7c0dda03a36807))
49+
- **injectable:** Add instancePurgeCallbackToken with three-phase purge and LRU integration ([9638776](https://github.com/lensapp/ogre-tools/commit/9638776af4590ba850c3e409c27c6012ec5b1822))
50+
- **injectable:** Add LRU cache support for keyedSingleton instances ([d3e16a5](https://github.com/lensapp/ogre-tools/commit/d3e16a5d5f6ea054ac502b77cebc92f3f35a89ec))
51+
- **injectable:** Add registration/deregistration decorator tokens ([62f9cf8](https://github.com/lensapp/ogre-tools/commit/62f9cf8fff258c9daac5647088206b06cdf6ef2b))
52+
- **injectable:** Add registration/deregistration decorator tokens as abstract v2 ([5fdb64e](https://github.com/lensapp/ogre-tools/commit/5fdb64e02e5591e87ba5f8fb5d441f0f069fbc7b))
53+
- **injectable:** Enhance purge with key-based, token, scoped, and typed support ([ef75e19](https://github.com/lensapp/ogre-tools/commit/ef75e19ef71a34d0dc5330cf9bc1cbe8c3de06a7))
54+
- **injectable:** Make di.override and di.override2 cross-compatible with v1/v2 ([7d8a697](https://github.com/lensapp/ogre-tools/commit/7d8a697bfed754b8fc61aacc3631f1e8f4733f26))
55+
- **injectable:** Make injectionDecorators opt-in at container creation ([ed0f5d2](https://github.com/lensapp/ogre-tools/commit/ed0f5d2e34459349000db3ce73b60e9ae08dd981))
56+
57+
### Bug Fixes
58+
59+
- **injectable-extension-for-mobx:** Wrap computed reads in runInAction to suppress MobX warnings ([f56106d](https://github.com/lensapp/ogre-tools/commit/f56106d21928969159d8faf247cd5c02d18bc9cf))
60+
- **injectable-mobx:** Use curried inject for v2 minimalDi in computed-inject-2 variants ([05a9d29](https://github.com/lensapp/ogre-tools/commit/05a9d29fed99d8e7c23d47f242d9fba8ba3c6c31))
61+
- **injectable-react:** Accept specific ComponentType tokens for bare components ([f9645ce](https://github.com/lensapp/ogre-tools/commit/f9645cee3310d3bc98e5d3c45a8face0e6b7daac))
62+
- **injectable-react:** Run tsd separately per test file to avoid multi-directory glob bug ([6e1014e](https://github.com/lensapp/ogre-tools/commit/6e1014ed51fc197782df6c0fd474e0dd08129f08))
63+
- **injectable-react:** Update error message expectations after context removal ([ab10112](https://github.com/lensapp/ogre-tools/commit/ab1011205af68ffbb0cebaa3dbd9a29ad756fe6c))
64+
- **injectable-react:** Widen injectionToken type in getInjectableComponent ([08109fe](https://github.com/lensapp/ogre-tools/commit/08109fe3f48d1fba6fb03ab0373de7ff4cd2047c))
65+
- **injectable:** Detect override-after-injection when overriding by token ([4c5190e](https://github.com/lensapp/ogre-tools/commit/4c5190e5cd96bc201ef1a08f6c4fc193b0f15f78))
66+
- **injectable:** Fix cascade deregistration throwing for already-deregistered injectables ([329ad85](https://github.com/lensapp/ogre-tools/commit/329ad85ea00058ffeb595f52d533703f620638f7))
67+
- **injectable:** Fix cascade deregistration throwing for already-deregistered injectables ([dd56f22](https://github.com/lensapp/ogre-tools/commit/dd56f22c876c9d92d92b672e5b776e6d9c12606c))
68+
- **injectable:** Fix context mutation and optimize hot paths ([ecb9d4c](https://github.com/lensapp/ogre-tools/commit/ecb9d4c882c773c33f18fc87fbc3a80d5114ecdf))
69+
- **injectable:** Fix WithMeta types and add type tests for token2 ([fedddc3](https://github.com/lensapp/ogre-tools/commit/fedddc3db6ab326ad03fa698f63bb835f2a3625c))
70+
- **injectable:** Include injectable id in singleton instantiation-parameter error ([c538535](https://github.com/lensapp/ogre-tools/commit/c53853593252e6589db20cdd7b11c804cc5bd542))
71+
- **injectable:** Include injecting injectable's namespaced id in inject error messages ([e71086d](https://github.com/lensapp/ogre-tools/commit/e71086d6ac5349e0052bfee450c705fafe654726))
72+
- **injectable:** Look up instantiation decorators by original injectable, not override ([2ac1d81](https://github.com/lensapp/ogre-tools/commit/2ac1d814f4a6c2a9fb488fb6eee928d3837553c0))
73+
- **injectable:** Prevent double-decoration when injectable and token share id ([71aa101](https://github.com/lensapp/ogre-tools/commit/71aa101135ea13bcd63e99a8bee80b932ddb8f54))
74+
- **injectable:** Stop double-applying injection decorators via injectMany ([a6c37fa](https://github.com/lensapp/ogre-tools/commit/a6c37fafe32b4cec7abddbd0eb701f904310874f))
75+
- **injectable:** Stop spreading v1 instantiation param in Inject2 factory ([14a62f8](https://github.com/lensapp/ogre-tools/commit/14a62f87fb24ace10e1a986fb31291dbd82e09ea))
76+
- **injectable:** Tolerate undefined instantiation args on old-style singletons ([bb22999](https://github.com/lensapp/ogre-tools/commit/bb2299994c16e208a9bdce3e75e451957ab2f8af))
77+
- **injectable:** Use namespaced ids in error messages where injectable is registered ([3167484](https://github.com/lensapp/ogre-tools/commit/3167484aef1402cac521b203bfebfe04e4098b21))
78+
- **injectable:** Use object reference as speciality in abstract decorator tokens ([a992e1a](https://github.com/lensapp/ogre-tools/commit/a992e1a4fe896982766a96ce85b66a6dad4a6866))
79+
80+
### Performance Improvements
81+
82+
- **injectable-mobx:** Track reactivity atoms lazily, share wrapper singletons, drop rest-spread ([49618b8](https://github.com/lensapp/ogre-tools/commit/49618b8569562f64b09043e1692ade04ec2794b3))
83+
- **injectable:** Cache injection and instantiation decorator lists ([a4820c6](https://github.com/lensapp/ogre-tools/commit/a4820c67f1452779058c95e2c6706764267b266e))
84+
- **injectable:** Fast-path singleton cache hits, avoiding minimalDi allocation ([68521a5](https://github.com/lensapp/ogre-tools/commit/68521a5a150619d56c81e6df124ee17bf47251c9))
85+
- **injectable:** Optimize getInstance with lifecycle fast paths and decorator skip ([45841f3](https://github.com/lensapp/ogre-tools/commit/45841f3c3b45894e30e1a0f891f5755afc125cd8))
86+
- **injectable:** Optimize inject hot path and eliminate redundant computation ([8a333a3](https://github.com/lensapp/ogre-tools/commit/8a333a3ffd0d924bf723355b5302f072750fe704))
87+
- **injectable:** Optimize registration decoration to avoid per-injectable overhead ([956e49f](https://github.com/lensapp/ogre-tools/commit/956e49fe4efecc85335d8384fed1a8924290bfb0))
88+
- **injectable:** Optimize registration path allocations ([331693f](https://github.com/lensapp/ogre-tools/commit/331693f67db899202ba0be772349d52edc2b8f91))
89+
- **injectable:** Reduce per-inject overhead in injectMany and inject ([06c6593](https://github.com/lensapp/ogre-tools/commit/06c6593d00f424c83760f8da19714417c2b3ae53))
90+
- **injectable:** Remove unused dependency tracking maps ([d9de077](https://github.com/lensapp/ogre-tools/commit/d9de077cc97ce405fe753d55b04f9190381cd5b0))
91+
- **injectable:** Replace O(n\*m) deregistration context scan with reverse index ([6857aef](https://github.com/lensapp/ogre-tools/commit/6857aef94eb743d4a1dab57efa4e5b9e2a804459))
92+
93+
### Code Refactoring
94+
95+
- **injectable-extension-for-mobx:** Stop exporting injectables from package surface ([a675191](https://github.com/lensapp/ogre-tools/commit/a675191e4c939308e187164ef04380c16338c356))
96+
- **injectable-extension-for-mobx:** Unwrap computedInjectMany2 family and reuse ManyFactory ([3df7e8a](https://github.com/lensapp/ogre-tools/commit/3df7e8a57a66378b9b62a0144c75cba672e1c7ca))
97+
- **injectable-react:** Rename getAbstractInjectionTokenComponent to \*2 ([738f2b8](https://github.com/lensapp/ogre-tools/commit/738f2b8e5982bf92dbf226d2c7b62633988735f3))
98+
- **injectable:** Remove di.decorate and di.decorateFunction shorthands ([4add9f6](https://github.com/lensapp/ogre-tools/commit/4add9f612cbaec7cc774449dfe194199c4f4c753))
99+
- **injectable:** Restructure Inject/Inject2 types and clean minimalDi interfaces ([fe45011](https://github.com/lensapp/ogre-tools/commit/fe4501174bc0133708efc4eb50b6f0177aa6482b))
100+
6101
## [21.1.0](https://github.com/lensapp/ogre-tools/compare/v21.0.3...v21.1.0) (2026-03-19)
7102

8103
### Features

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "21.1.0",
2+
"version": "22.0.0",
33
"command": {
44
"publish": {
55
"forcePublish": true,

0 commit comments

Comments
 (0)