Releases: albertogasparin/react-magnetic-di
Releases · albertogasparin/react-magnetic-di
v2.2.2
Bug fixes
- Ensure order is components first and hooks/functions second
v2.2.1
Bug fixes
- Fix typo on sort-dependencies rule
v2.2.0
New features
- New ESLint rule
sort-dependencies
: require injectable dependencies to be sorted
Bug fixes
- Fix ESLint rule breaking on inline conditional expression
v2.1.3
Bug fixes
- Ensure ESLint rule
exhaustive-inject
handles local variables in nested scopes properly
v2.1.2
Bug fixes
- Fix ESLint
exhaustive-inject
rule to not account for components coming from props
v2.1.1
Bug fix
- Fix ESLint rules errors on files not using di
v2.1.0
New features
- Support
babel-plugin-macros
by usingreact-magnetic-di/macro
as entry point for everything - Eslint rules are now available to help with common mistakes
- Automatically add
displayName
towithDi
HOC components - New method
injectable
that replacesmock
as more semantically correct
Bug fixes
- When multiple injectables of same dependency are passed in, last one in the array (or closer provider) wins
- Fixed
withDi
types
Deprecated APIs
mock
anddi.mock
are now deprecated and replaced byinjectable
(just a rename)
v2.0.0
Breaking changes
This is a complete rewrite of how the dependency injection works. The new pattern requires a babel plugin to be added (react-magnetic-di/babel
) and the public API is quite different (but simpler). Please refer to the new guides in the readme on how to make di
work.