A powerful dependency injection micro container for JavaScript applications
MIT License
Bot releases are visible (Hide)
v2.0.0
This version updates several dev dependencies to resolve security vulnerabilities, (thanks @dependabot-bot !)
It also adds a new ES module build, available in the /dist directory. This is a possible breaking change for some webpack users, so the major version has been bumped to 2. Most users can migrate to bottlejs 2.0.0 without any backwards compatibility problems. Thanks, @blikblum !
Published by young-steveo over 5 years ago
This release updates the dev dependencies to resolve security vulnerabilities in the testing pipeline. It also updates the typescript file to support limiting / type checking entry names: https://github.com/young-steveo/bottlejs/pull/115 (thanks @ethanresnick )
Published by young-steveo over 6 years ago
Bottle does not have any dependencies.
However, a security vulnerability was discovered in one of Bottle's build and testing tools. This version of BottleJS updates all of Bottle's dev tools to their latest versions and recompiles the minified source to alleviate any security concerns.
The only noticeable change is an improved file size from the minification library that BotteJS uses (the minified file is about 30 bytes smaller. 🤣)
Published by young-steveo over 6 years ago
serviceFactory
method #104Published by young-steveo almost 7 years ago
Fixes a bug with resetProviders
when using nested containers. Nested containers will no longer break when they have multiple children.
Published by young-steveo almost 7 years ago
This patch release adds better support for classes in the typescript definition file, and fixes a bug with registering new services on an already-instantiated nested container ( thanks to @aretmy and @TimWolla ).
Published by young-steveo over 7 years ago
Published by young-steveo over 7 years ago
bottle.resetProviders()
. This is primarily useful for unit testing. @cjsaylor$decorator
function that will only add decorators to that container's services. This is useful for nested bottles. @iMosesBottle.pop
and Bottle.clear
have been updated to allow empty strings to name and clear a bottle. Any string value is now valid. @Coburn37Published by young-steveo about 8 years ago
Bottle.clear
. - thanks, @emilong$list
method definition.Published by young-steveo about 8 years ago
instanceFactory
- thanks @nzackPublished by young-steveo over 8 years ago
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.
Published by young-steveo over 8 years ago
Added a TypeScript definition file, courtesy of @kenvunz
Published by young-steveo over 8 years ago
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.
Published by young-steveo almost 9 years ago
If a provider throws an error, the provider is no longer removed from the container (i.e., the service is not instantiated) See #39
Published by young-steveo almost 9 years ago
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.
New functionality:
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.