Releases: young-steveo/bottlejs
Version 1.3.0
This version of Bottle adds a new list
method that allows introspection into the registered services on a container. Check out the docs in the API section of the Readme for more information.
TypeScript Support
Added a TypeScript definition file, courtesy of @kenvunz
Strict Mode
New global setting Bottle.config.strict
. When set to true
, Bottle will throw an error when attempting to resolve an undefined service during automatic injection.
note: Accessing an undefined service from the container directly (e.g. bottle.container.Service
) will not throw an error.
Bugfix: Providers no longer deleted
If a provider throws an error, the provider is no longer removed from the container (i.e., the service is not instantiated) See #39
New Provider Functionality
You can now register a provider more than once without bottle logging an error as long as the service has not been instantiated. Previous versions of bottle would always log an error if a service was registered more than once.
v1.1.0: Version 1.1.0
New functionality:
- Bottle will now throw anything passed to a middleware
next
function:next(new Error('fail'))
register
method now accepts$value
property. The value of this property will be registered on the container instead of the object itself.
See the Readme for more info.
Thanks to @nswbmw for the middleware error support.