3.0.0 (2023-10-04)
- refactor!: migrate to typescript (9a7a32d)
- 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)
- The
@OdinConfig
decorator is now@Configuration
. - The
@PostConstruct
decorator is now@Initializer
. - The
@Singleton
decorator is now@Injectable({ singleton: true })
. Bundle.get
now returnsundefined
instead ofnull
.Container.get
now returnsundefined
instead ofnull
.Container.provide
now returnsundefined
instead ofnull
.CustomProvider.resolve
now returnsundefined
instead ofnull
.Registry.get
now returnsundefined
instead ofnull
.- Renamed
InjectableDef
toDescriptor
. - Renamed
InjectableDef.args
toDescriptor.options
. - Renamed
InjectableDef.definition
toDescriptor.injectable
. - Renamed
Bundle.checkHas
toBundle.validateRegistration
. - Renamed
Registry.checkHas
toRegistry.validateRegistration
. - Renamed
Secrets.getPostContruct
toSecrets.getInitializer
. - Renamed
Secrets.setPostContruct
toSecrets.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 newhas
implementation. - Removed
Secrets.getNamed
,Secrets.isNamed
andSecrets.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
andSecrets.setWrapper
. Thewrapper
had no purpose within odin itself. Feel free to implement/manage your own secrets. - Removed
Secrets.isCustom
andSecrets.setCustom
. Thecustom
flag had no purpose within odin itself. Feel free to implement/manage your own secrets.
2.0.0 (2023-06-20)
- support injectable wrappers for composing decorators (8cdefea)
- Removed the auto binding of
action
,state
and any other methods that start withon
. Binding must be done by the user, asodin
should not be responsible for choosing which methods should be bound. - Renamed
unregister
toderegister
of theBundle
andRegistry
classes. The removal is now done using the definition itself, so theargs
argument has been removed.