Skip to content

Releases: albertogasparin/react-magnetic-di

v2.2.2

16 Jul 02:47
Compare
Choose a tag to compare

Bug fixes

  • Ensure order is components first and hooks/functions second

v2.2.1

14 Jul 23:22
Compare
Choose a tag to compare

Bug fixes

  • Fix typo on sort-dependencies rule

v2.2.0

13 Jul 08:52
Compare
Choose a tag to compare

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

08 Jul 01:04
Compare
Choose a tag to compare

Bug fixes

  • Ensure ESLint rule exhaustive-inject handles local variables in nested scopes properly

v2.1.2

07 Jul 23:41
Compare
Choose a tag to compare

Bug fixes

  • Fix ESLint exhaustive-inject rule to not account for components coming from props

v2.1.1

06 Jul 23:51
Compare
Choose a tag to compare

Bug fix

  • Fix ESLint rules errors on files not using di

v2.1.0

04 Jul 00:59
Compare
Choose a tag to compare

New features

  • Support babel-plugin-macros by using react-magnetic-di/macro as entry point for everything
  • Eslint rules are now available to help with common mistakes
  • Automatically add displayName to withDi HOC components
  • New method injectable that replaces mock 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 and di.mock are now deprecated and replaced by injectable (just a rename)

v2.0.0

21 May 23:13
Compare
Choose a tag to compare

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.