Skip to content

v3.0.0

Latest
Compare
Choose a tag to compare
@herberttn herberttn released this 04 Oct 20:53
· 1 commit to main since this release

3.0.0 (2023-10-04)

  • refactor!: migrate to typescript (9a7a32d)

Features

  • add deprecation warnings and improve error messages (b9412b4)
  • allow custom injectable name (fbd702d)
  • allow manual constructors with optional injects (9fa92ae)
  • deps: update dependencies and node engine version (27bf5b3)
  • reuse singleton odin instance (b172fe1)

BREAKING CHANGES

  • The @OdinConfig decorator is now @Configuration.
  • The @PostConstruct decorator is now @Initializer.
  • The @Singleton decorator is now @Injectable({ singleton: true }).
  • Bundle.get now returns undefined instead of null.
  • Container.get now returns undefined instead of null.
  • Container.provide now returns undefined instead of null.
  • CustomProvider.resolve now returns undefined instead of null.
  • Registry.get now returns undefined instead of null.
  • Renamed InjectableDef to Descriptor.
  • Renamed InjectableDef.args to Descriptor.options.
  • Renamed InjectableDef.definition to Descriptor.injectable.
  • Renamed Bundle.checkHas to Bundle.validateRegistration.
  • Renamed Registry.checkHas to Registry.validateRegistration.
  • Renamed Secrets.getPostContruct to Secrets.getInitializer.
  • Renamed Secrets.setPostContruct to Secrets.setInitializer.
  • Removed Bundle.getId. The user should not have to decide which identifier to use, all of them should be accepted everywhere.
  • Removed Registry.getId. The user should not have to decide which identifier to use, all of them should be accepted everywhere.
  • Removed Registry.hasName. It has been covered by the new has implementation.
  • Removed Secrets.getNamed, Secrets.isNamed and Secrets.setNamed. It was the wrong solution for a simple problem, which has now been resolved. Feel free to implement/manage your own secrets.
  • Removed Secrets.getWrapper, Secrets.isWrapper and Secrets.setWrapper. The wrapper had no purpose within odin itself. Feel free to implement/manage your own secrets.
  • Removed Secrets.isCustom and Secrets.setCustom. The custom flag had no purpose within odin itself. Feel free to implement/manage your own secrets.

This release is also available on: