Skip to content

Releases: pcafstockf/async-injection

Support resource cleanup for Singletons

28 Nov 00:53
Compare
Choose a tag to compare

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

02 Aug 22:28
Compare
Choose a tag to compare

Revert type declaration for AbstractConstructor which was broken during eslint integration.
Update eslint related dev-dependencies.

ESLINT integration + Improvements

14 Jul 23:46
Compare
Choose a tag to compare

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

28 Jun 21:30
Compare
Choose a tag to compare

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).

17 Jun 17:32
Compare
Choose a tag to compare

No source code changes.

cjs and esm distributions

11 Jun 23:59
Compare
Choose a tag to compare

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

08 Jun 16:47
Compare
Choose a tag to compare

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

08 May 02:34
Compare
Choose a tag to compare

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

09 Jun 02:46
Compare
Choose a tag to compare
  • Add ascending parameter to isIdKnown and removeBinding methods.
  • Update tslib
  • Update ts-node and nyc devDependencies.

Project clean up

27 Apr 22:57
Compare
Choose a tag to compare

Fix #1
Add tslint and Changelog