Releases: pcafstockf/async-injection
Support resource cleanup for Singletons
For Singleton type services, the @Release decorator allows for notification to a service when it is no longer needed (e.g. service.destroy()
).
The Container.releaseSingletons
method can be used to release all Singletons in a Container
. This might be done for instance when you have allocated a child Container
for the duration of a single transaction and want to quickly unsubscribe and release resources allocated during that transaction, before also dropping your reference to the child Container
itself.
Update devDependencies.
Type fixes
Revert type declaration for AbstractConstructor which was broken during eslint integration.
Update eslint related dev-dependencies.
ESLINT integration + Improvements
Merge PR ESLINT integration + Improvements.
Update devDependencies.
Resolved a few of eslint warnings.
tsc no longer removes comments in generated code. This can cause problems with post-processing tools such as istanbul. If file size is of concern to you, you should probably be minifying anyway.
Types cleanup
No actual source code changes.
Added Reflect type from reflect-metadata in order to remove the @ts-ignore comments.
Improved tsconfig.json structure for IDE compatibility.
Thanks to @tripodsgames for those contributions.
Update tsc devDependency from 4.3.3 to 4.3.4.
Update the ChangeLog to properly reflect recent GitHub releases.
Build esm into esm dir (not mjs).
No source code changes.
cjs and esm distributions
Build now generates both cjs and esm distributions.
tslib (where used) is now inlined instead of imported.
No other code changes.
New Feature: Allow alternate polyfill for Reflect API
WARNING: This is a a breaking change release.
The API and code have not changed, but you will need to explicitly import a polyfill into your own code in order to use this release (see the ReadMe).
Previously Async-Injection relied on reflect-metadata (which is still supported), but this release also allows for the use of alternative implementations such as:
Thank you to @tripodsgames for this contribution.
New Feature: Support a construction success handler
Add post construction handling feature to Binder.bindClass. This is for scenarios where it is not feasible to add the @PostConstruct decorator to the target class.
Updated tslib
Updated jasmine devDependency.
Ascending isIdKnown and removeBinding methods
- Add ascending parameter to isIdKnown and removeBinding methods.
- Update tslib
- Update ts-node and nyc devDependencies.
Project clean up
Fix #1
Add tslint and Changelog