Skip to content

Releases: albertogasparin/react-magnetic-di

v2.3.4

30 May 09:42
Compare
Choose a tag to compare

Fix an issue with stats and the undocumented missing() tracking functionality.

v2.3.3

17 May 06:17
Compare
Choose a tag to compare

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

15 May 04:37
Compare
Choose a tag to compare

Fix

  • Add support for injectable additional config argument:
    • { displayName: 'MyComponentName' } custom displayName for components / functions
    • { track: false } ignore injectable on stats.unused()

v2.3.1

12 May 01:25
Compare
Choose a tag to compare

Bugfix

  • fix ESLint rule to support self referencing React components

v2.3.0

12 May 01:23
Compare
Choose a tag to compare

New features

  • runWithDi allows to use di in any function, and supports both sync and async code
  • stats enables verification of unused injectables, helping maintaining the codebase healthier

v2.2.13

17 Jan 05:05
Compare
Choose a tag to compare
  • Add support for di injection under react-test-renderer
  • Tweak injectable types to support exact type overload

v2.2.11

17 Nov 23:54
Compare
Choose a tag to compare

What's Changed

  • Explicit React 18 support

v2.2.10

07 Oct 00:04
Compare
Choose a tag to compare
  • Relax Typescript injectable type to allow components and partial mocks being returned

v2.2.7

14 Jan 02:54
Compare
Choose a tag to compare
  • Fix ESLint exhaustive-inject rule error when react was not in scope
  • Fix prop-types warning when injectable uses forwardRef
  • Updated peerDependencies ranges to fix React 17 install warning

v2.2.6

17 Aug 02:32
Compare
Choose a tag to compare

Bug fixes

  • fix injectable Flow type wrongly merging type defs, ensuring return value is type safe now