This repository has been archived by the owner on Nov 7, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^0.8.0
->^0.10.0
Release Notes
pleerock/typedi
v0.10.0
Compare Source
BREAKING CHANGES
Container.remove signature change
The
Container.remove
method from now accepts one ID or an array of IDs.Removed support for calling
Service([depA, depB], factory)
This was an undocumented way of calling the
Service
function directly instead of using it as a decorator. This optionhas been removed and the official supported way of achieving the same is with
Container.set
. Example:Added
eager
option toServiceOptions
, when enabled the class will be instantiated as soon as it's registered in the containerdestroy
property it will be called by TypeDIChanged
@Service
decorator directlyMissingProvidedServiceTypeError
toCannotInstantiateValueError
Fixed
v0.9.1
Compare Source
Fixed
v0.9.0
BREAKING CHANGES
Unregistered types are not resolved
Prior to this version when an unknown constructable type was requested from the default container it was added automatically
to the container and returned. This behavior has changed and now a
ServiceNotFoundError
error is thrown.Changed container reset behavior
Until now resetting a container removed all dependency declarations from the container. From now on the default behavior
is to remove the created instances only but not the definitions. This means requesting a Service again from the container
won't result in a
ServiceNotFoundError
but will create a new instance of the requested function again.The old behavior can be restored with passing the
{ strategy: 'resetServices'}
to theContainerInstance.reset
function.Changed
undefined
todefault
ServiceNotFoundError
to better explain which service is missing (#138)Fixed
@Inject
-ed properties were not injected in inherited child classes (ref #102)Container.reset()
was called (ref #157)Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.