Skip to content

Releases: joshuawright11/fusion

v0.4.0

31 Jan 01:10
71cedcf
Compare
Choose a tag to compare

Renamed identifier to id in function parameters.

Add updated README and docs.

v0.3.0

03 Jan 17:17
6a4a8bd
Compare
Choose a tag to compare

Refactors the internals to provide a cleaner interface.

Binding is simplified; it creates values with either a factory closure with a Container parameter or a value @autoclosure for providing a specific value.

  • bind(behavior:type:id:factory: (Container) -> T)
  • bind(behavior:type:id:value: @autoclosure () -> T)

Resolving is also simplified with three options.

  • resolve(_:id:) -> T? resolves a service, returning nil if it isn't registered
  • resolveAssert(_:id:) -> T resolves a service, failing an assertion if it isn't registered
  • resolveThrowing(_:id:) throws -> T resolves a service, throwing a FusionError.notRegistered if it isn't registered.

v0.2.2

12 Nov 09:49
Compare
Choose a tag to compare

Under the hood changes to singleton storages so that @Inject is equivalent to resolving with a nil identifier.

v0.2.1

08 Oct 17:39
Compare
Choose a tag to compare

Replaces already registered instances of singletons when re-registering a service.

v0.2.0

27 Sep 21:41
Compare
Choose a tag to compare

Cleans up Inject so that it's get-only, meaning it won't throw errors when used concurrently with Swift's new concurrency features.

Also adds convenience functions for registering an instance of a type without having to specify its actual type.

Initial release

20 Aug 23:29
Compare
Choose a tag to compare
0.1.0

Add static defaults for working with Container.default