Releases: albertogasparin/react-magnetic-di
Releases · albertogasparin/react-magnetic-di
v2.3.4
Fix an issue with stats
and the undocumented missing()
tracking functionality.
v2.3.3
Fix bad injectables
So far, we forgot to enforce that values passed in as injectables were actual injectables. So DiProvider
would accept anything and not flag that the provided value will be ignored. This releases fixes that. It will complain/break some tests but those "injectables" were not working anyway.
A side effect is a breaking change on one TS type: if you were using Dependency
before in your project, you'll likely have to replace it with Injectable
, as the latter is more strict.
v2.3.2
Fix
- Add support for
injectable
additional config argument:{ displayName: 'MyComponentName' }
custom displayName for components / functions{ track: false }
ignore injectable onstats.unused()
v2.3.1
Bugfix
- fix ESLint rule to support self referencing React components
v2.3.0
New features
runWithDi
allows to usedi
in any function, and supports both sync and async codestats
enables verification of unused injectables, helping maintaining the codebase healthier
v2.2.13
- Add support for
di
injection underreact-test-renderer
- Tweak injectable types to support exact type overload
v2.2.11
What's Changed
- Explicit React 18 support
v2.2.10
- Relax Typescript
injectable
type to allow components and partial mocks being returned
v2.2.7
- Fix ESLint
exhaustive-inject
rule error whenreact
was not in scope - Fix
prop-types
warning when injectable usesforwardRef
- Updated peerDependencies ranges to fix React 17 install warning
v2.2.6
Bug fixes
- fix
injectable
Flow type wrongly merging type defs, ensuring return value is type safe now