Skip to content

Releases: pcafstockf/async-injection

Fix "exports" in package.json

12 Sep 00:55
Compare
Choose a tag to compare

Fix package.json exports #18.
Thanks to @IvanLi-CN for finding this, and the solution.

Breaking API change (improved imports).

07 Aug 00:00
Compare
Choose a tag to compare

This release aims to shorten and simplify imports from async-injection.

A design goal of this project has always been to provide a minimal API surface of the most commonly used classes from index.ts, but still allow you to import less frequently used functionality from submodules.
However, due to the way the dual module cjs/esm support was done, submodule imports looked ugly, and while they worked, they could also be somewhat misleading.

import {INJECTABLE_METADATA_KEY} from 'async-injection/lib/cjs/constants';
// The above works even in an esm project!

This release moves the TypeScript typedefs up from inside lib/cjs/* and lib/esm/* to just lib/*.d.ts (and adds a ./* export in package.json).

Put simply in code, you can now just write:

import {INJECTABLE_METADATA_KEY} from 'async-injection/constants';

The interfaces in binder.ts turned out to be rarely used, so that submodule export has been dropped from index.ts. You can of course still import any of them using a submodule reference (e.g. 'async-injection/binder').

Ultimately the underlying JavaScript code is unchanged, but hopefully these typing changes will make things a little easier and more intuitive.

Improved handling of Reflect meta-data

23 May 23:06
Compare
Choose a tag to compare

Minor tweaks and updates

19 Jan 04:41
Compare
Choose a tag to compare
  • Backwards compatible binder api updates.
  • Update patch level dependencies.

Improved class constructor parameter type recognition

16 Nov 01:40
Compare
Choose a tag to compare
  • Improved handling of class constructor parameter type recognition.
  • Update dependencies.

Fix esm issues

06 Jun 01:29
Compare
Choose a tag to compare
  • Address esm issues #10 and #15
    • We now use .js extensions on relative imports.
    • This might break older webpack or tsc versions.
  • Fix missing type overload on Binder interface.
  • Update dev dependencies.

Updated docs

18 Jan 22:48
Compare
Choose a tag to compare
  • No code changes.
  • Updates to docs for consistency across projects.

devDependencies update

18 Jan 21:10
Compare
Choose a tag to compare
  • Update devDependencies.
  • Update github workflows.
  • Update badges in main ReadMe.
  • Add support directory.

Container cloning

17 Apr 00:54
Compare
Choose a tag to compare
  • Add experimental ability to clone a Container (see Container.clone JSDoc comments for details).
  • Fix error handling callback to pass instantiated object when construction succeeds but post construction fails.
  • Reformat code project wide (based on IntelliJ formatting options).

Support optional typing for interfaces and constants

18 Feb 04:04
Compare
Choose a tag to compare
  • Add Angular style InjectionToken class as a variant of InjectableId to support implicit typing of constants and interfaces.
  • Minor update to Binder.resolveSingletons to make it chainable (aka return the Container/Binder instance).
  • Minor updates to ReadMe.