From 6e751f60fa1afc5f2643602d9d1665ecb5640059 Mon Sep 17 00:00:00 2001 From: David Hanson <1564426+Davidhanson90@users.noreply.github.com> Date: Sat, 27 Feb 2021 10:52:52 +0000 Subject: [PATCH 1/8] Adding feature table for needle project for quick scanning --- readme.md | 90 +++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 78 insertions(+), 12 deletions(-) diff --git a/readme.md b/readme.md index e1848c0..85fff7b 100644 --- a/readme.md +++ b/readme.md @@ -57,6 +57,84 @@ And you should import this module at the root of your application. import "reflect-metadata"; ``` +# Feature table + +| Feature | Sub-feature | Needle | Notes | +|------------------------|----------------------------------|--------|----------------------------------------------------------------------------------------| +| Decorator support | | YES | Using '@decorators' to signal behaviour | +| Optional decorators | | YES | Supporting decorator less injection | +| TypeScript Typing's | | YES | Full TypeScript support with Type safety | +| Global configuration | | YES | Ability to configure global setting in the container | +| Semantic Injection | | YES | Ability to respect semantic versioning in all injectable types | +| Cache | | YES | Caching of injectables | +| | Cache manipulation | YES | Ability to directly manipulate the cache | +| | Scoping support | YES | Caching support in scoped injectors | +| Metrics | | YES | Tracking of injectables in the system | +| | Auto tracking | YES | Zero config tracking model | +| | Activation tracking | YES | Tracking when a type is first constructed | +| | Activation owners | YES | Tracking what type created an Injectable | +| | Resolution statistics | YES | Details of how often a type has been resolved etc | +| | Creation cost | YES | Cost in time to construct the the Injectable | +| | Dependency counts | YES | Number of dependencies a given type has | +| | Scoping support | YES | Are metrics tracked in scoped injectors | +| | Metrics manipulation | YES | Can developers manipulate metrics | +| Tokenisation | | YES | Does the DI library support tokenisation | +| | Decorator support | YES | Can you define tokens using '@decorators' | +| | API support | YES | Can you define tokens using an API | +| | String tokens | YES | Can I use strings as tokens | +| | Symbol tokens | YES | Can I use Symbols to as tokens | +| | Multiple tokens | YES | Can I register multiple tokens for a single Injectable | +| | Token overriding | YES | Can I override existing token registrations | +| | Unique token enforcement | YES | Can I enforce no token overriding | +| | Scoping support | YES | Are tokens supported in scoped injectors | +| Strategies | | YES | Does the DI library support injecting multiple injectables into a given constructor | +| | Decorator support | YES | Can I use `@decorators` to register a strategy | +| | API support | YES | Can I use the API to register a strategy | +| | String tokens | YES | Can I register strategies using strings | +| | Symbol tokens | YES | Can I register strategies using Symbols | +| | Scoping support | YES | Are strategies supported in scoped injectors | +| Factories | | YES | Does the DI library support factory construction types | +| | Decorator support | YES | Can I use `@decorators` to resolve a factory | +| | API support | YES | Can I use API to resolve a factory | +| | Scoping support | YES | Are factories supported in scoped injectors | +| | Auto factories | YES | Can all types be used as Factories | +| | Parameter profiling | YES | Can I control constructor parameters explicitly | +| Lazy Injection | | YES | Does the DI library support lazy dependency injection | +| | Decorator support | YES | Can I use `@decorators` to register/resolve a lazy injectable | +| | API support | YES | Can I use the API to register/resolve a lazy injectable | +| | Scoping support | YES | Are lazy injectables supported in scoped injectors | +| Optional Injection | | YES | Does the DI library support optional constructor params for injection | +| | Decorator support | YES | Can I use `@decorators` to resolve optional injectable | +| | API support | YES | Can I use the API to register/resolve a optional injectable | +| | Scoping support | YES | Are optional injectables supported in scoped injectors | +| Instance Injection | | YES | Does the DI library support registering instances against a type | +| | API support | YES | Can I use the API to register an instance of a type for injection | +| | Scoping support | YES | Are instances supported in scoped injectors | +| Value Injection | | YES | Does the DI library allow for registering a value for injection (Non-injectable types) | +| | Intrinsic values | YES | Can I register intrinsic types such as Date, Regex, Number | +| | AOT values | YES | Can I eagerly supply the value for the value injection | +| | JIT values | YES | Can I compute the value at point of injection | +| | Dynamic values | YES | Can I recompute the value being injected on each resolution | +| Custom Construction | | YES | Does the DI library support construction external to the library itself | +| | Bespoke type construction | YES | Can I create my own constructor for a given type | +| | Global bespoke construction | YES | Can I create a global constructor for all types | +| | Abstract type construction | YES | Can I create a constructor for abstract base types | +| | Scoping support | YES | Are custom constructors supported in scoped injectors | +| Hierarchical injection | | YES | Does the DI library support scoped injection contexts | +| | String scope names | YES | Can I use strings for scope names | +| | Symbol scope names | YES | Can I use Symbols for scoped names | +| | Registration overriding | YES | Can I override ancestral registration in my scope | +| | Disposal | YES | Can I destroy a scope | +| | Scope lookup | YES | Can I find a scope easily using its name or id. | +| | Scope inheritance | YES | Can scopes extend other scopes | +| Interception | | YES | Does the DI library support interceptors | +| | Decorator support | YES | Can I register interceptions using `@decorators` | +| | API support | YES | Can I register interceptions using the API | +| | Before construction interception | YES | Can I intercept a given type before its constructed | +| | After construction interception | YES | Can I intercept a given type after its constructed | +| Injection delegation | | YES | Can I delegate all construction to another DI library. | + + # Injectable basics ## Decorators vs Registration API @@ -598,18 +676,6 @@ If you want the value to mutate on each request, you can set `cacheSyncing` to f **Note**: As values have no associated type upon which to decorate, you can only use the Injector API to register values. -```typescript -import { getRootInjector } from '@morgan-stanley/needle'; - -const vehicle = new Vehicle('Bike'); - -getRootInjector().registerInstance(Vehicle, vehicle); - -const instance = get(Vehicle); - -console.log(instance === vehicle) // True -``` - # Metrics tracking The injector tracks metrics about your injectable types during runtime. There are a range of different values captured and these are stored in the metrics provider which is accessible via the Injector type. The data is store as records and the below type shows the information captured. From 21d66363a477b819e28f46b8e880de041f6c4b6b Mon Sep 17 00:00:00 2001 From: David Hanson <1564426+Davidhanson90@users.noreply.github.com> Date: Sat, 27 Feb 2021 10:54:34 +0000 Subject: [PATCH 2/8] Switch the columns around --- readme.md | 149 +++++++++++++++++++++++++++--------------------------- 1 file changed, 74 insertions(+), 75 deletions(-) diff --git a/readme.md b/readme.md index 85fff7b..ecfb7e5 100644 --- a/readme.md +++ b/readme.md @@ -59,81 +59,80 @@ import "reflect-metadata"; # Feature table -| Feature | Sub-feature | Needle | Notes | -|------------------------|----------------------------------|--------|----------------------------------------------------------------------------------------| -| Decorator support | | YES | Using '@decorators' to signal behaviour | -| Optional decorators | | YES | Supporting decorator less injection | -| TypeScript Typing's | | YES | Full TypeScript support with Type safety | -| Global configuration | | YES | Ability to configure global setting in the container | -| Semantic Injection | | YES | Ability to respect semantic versioning in all injectable types | -| Cache | | YES | Caching of injectables | -| | Cache manipulation | YES | Ability to directly manipulate the cache | -| | Scoping support | YES | Caching support in scoped injectors | -| Metrics | | YES | Tracking of injectables in the system | -| | Auto tracking | YES | Zero config tracking model | -| | Activation tracking | YES | Tracking when a type is first constructed | -| | Activation owners | YES | Tracking what type created an Injectable | -| | Resolution statistics | YES | Details of how often a type has been resolved etc | -| | Creation cost | YES | Cost in time to construct the the Injectable | -| | Dependency counts | YES | Number of dependencies a given type has | -| | Scoping support | YES | Are metrics tracked in scoped injectors | -| | Metrics manipulation | YES | Can developers manipulate metrics | -| Tokenisation | | YES | Does the DI library support tokenisation | -| | Decorator support | YES | Can you define tokens using '@decorators' | -| | API support | YES | Can you define tokens using an API | -| | String tokens | YES | Can I use strings as tokens | -| | Symbol tokens | YES | Can I use Symbols to as tokens | -| | Multiple tokens | YES | Can I register multiple tokens for a single Injectable | -| | Token overriding | YES | Can I override existing token registrations | -| | Unique token enforcement | YES | Can I enforce no token overriding | -| | Scoping support | YES | Are tokens supported in scoped injectors | -| Strategies | | YES | Does the DI library support injecting multiple injectables into a given constructor | -| | Decorator support | YES | Can I use `@decorators` to register a strategy | -| | API support | YES | Can I use the API to register a strategy | -| | String tokens | YES | Can I register strategies using strings | -| | Symbol tokens | YES | Can I register strategies using Symbols | -| | Scoping support | YES | Are strategies supported in scoped injectors | -| Factories | | YES | Does the DI library support factory construction types | -| | Decorator support | YES | Can I use `@decorators` to resolve a factory | -| | API support | YES | Can I use API to resolve a factory | -| | Scoping support | YES | Are factories supported in scoped injectors | -| | Auto factories | YES | Can all types be used as Factories | -| | Parameter profiling | YES | Can I control constructor parameters explicitly | -| Lazy Injection | | YES | Does the DI library support lazy dependency injection | -| | Decorator support | YES | Can I use `@decorators` to register/resolve a lazy injectable | -| | API support | YES | Can I use the API to register/resolve a lazy injectable | -| | Scoping support | YES | Are lazy injectables supported in scoped injectors | -| Optional Injection | | YES | Does the DI library support optional constructor params for injection | -| | Decorator support | YES | Can I use `@decorators` to resolve optional injectable | -| | API support | YES | Can I use the API to register/resolve a optional injectable | -| | Scoping support | YES | Are optional injectables supported in scoped injectors | -| Instance Injection | | YES | Does the DI library support registering instances against a type | -| | API support | YES | Can I use the API to register an instance of a type for injection | -| | Scoping support | YES | Are instances supported in scoped injectors | -| Value Injection | | YES | Does the DI library allow for registering a value for injection (Non-injectable types) | -| | Intrinsic values | YES | Can I register intrinsic types such as Date, Regex, Number | -| | AOT values | YES | Can I eagerly supply the value for the value injection | -| | JIT values | YES | Can I compute the value at point of injection | -| | Dynamic values | YES | Can I recompute the value being injected on each resolution | -| Custom Construction | | YES | Does the DI library support construction external to the library itself | -| | Bespoke type construction | YES | Can I create my own constructor for a given type | -| | Global bespoke construction | YES | Can I create a global constructor for all types | -| | Abstract type construction | YES | Can I create a constructor for abstract base types | -| | Scoping support | YES | Are custom constructors supported in scoped injectors | -| Hierarchical injection | | YES | Does the DI library support scoped injection contexts | -| | String scope names | YES | Can I use strings for scope names | -| | Symbol scope names | YES | Can I use Symbols for scoped names | -| | Registration overriding | YES | Can I override ancestral registration in my scope | -| | Disposal | YES | Can I destroy a scope | -| | Scope lookup | YES | Can I find a scope easily using its name or id. | -| | Scope inheritance | YES | Can scopes extend other scopes | -| Interception | | YES | Does the DI library support interceptors | -| | Decorator support | YES | Can I register interceptions using `@decorators` | -| | API support | YES | Can I register interceptions using the API | -| | Before construction interception | YES | Can I intercept a given type before its constructed | -| | After construction interception | YES | Can I intercept a given type after its constructed | -| Injection delegation | | YES | Can I delegate all construction to another DI library. | - +| Feature | Sub-feature | Details | Needle | +|------------------------|----------------------------------|----------------------------------------------------------------------------------------|--------------| +| Decorator support | | Using '@decorators' to signal behaviour | Full Support | +| Optional decorators | | Supporting decorator less injection | Full Support | +| TypeScript Typing's | | Full TypeScript support with Type safety | Full Support | +| Global configuration | | Ability to configure global setting in the container | Full Support | +| Semantic Injection | | Ability to respect semantic versioning in all injectable types | Full Support | +| Cache | | Caching of injectables | Full Support | +| | Cache manipulation | Ability to directly manipulate the cache | Full Support | +| | Scoping support | Caching support in scoped injectors | Full Support | +| Metrics | | Tracking of injectables in the system | Full Support | +| | Auto tracking | Zero config tracking model | Full Support | +| | Activation tracking | Tracking when a type is first constructed | Full Support | +| | Activation owners | Tracking what type created an Injectable | Full Support | +| | Resolution statistics | Details of how often a type has been resolved etc | Full Support | +| | Creation cost | Cost in time to construct the the Injectable | Full Support | +| | Dependency counts | Number of dependencies a given type has | Full Support | +| | Scoping support | Are metrics tracked in scoped injectors | Full Support | +| | Metrics manipulation | Can developers maniplulate metrics | Full Support | +| Tokenisation | | Does the DI library support tokenisation | Full Support | +| | Decorator support | Can you define tokens using '@decorators' | Full Support | +| | API support | Can you define tokens using an API | Full Support | +| | String tokens | Can I use strings as tokens | Full Support | +| | Symbol tokens | Can I use Symbols to as tokens | Full Support | +| | Multiple tokens | Can I register multiple tokens for a single Injectable | Full Support | +| | Token overriding | Can I override exisiting token registrations | Full Support | +| | Unique token enforcement | Can I enforce no token overriding | Full Support | +| | Scoping support | Are tokens supported in scoped injectors | Full Support | +| Strategies | | Does the DI library support injecting multiple injectables into a given constructor | Full Support | +| | Decorator support | Can I use `@decorators` to register a strategy | Full Support | +| | API support | Can I use the API to register a strategy | Full Support | +| | String tokens | Can I register strategies using strings | Full Support | +| | Symbol tokens | Can I register strategies using Symbols | Full Support | +| | Scoping support | Are strategies supported in scoped injectors | Full Support | +| Factories | | Does the DI library support factory construction types | Full Support | +| | Decorator support | Can I use `@decorators` to resolve a factory | Full Support | +| | API support | Can I use API to resolve a factory | Full Support | +| | Scoping support | Are factories supported in scoped injectors | Full Support | +| | Auto factories | Can all types be used as Factories | Full Support | +| | Parameter profiling | Can I control constructor parameters explicitly | Full Support | +| Lazy Injection | | Does the DI library support lazy dependency injection | Full Support | +| | Decorator support | Can I use `@decorators` to register/resolve a lazy injectable | Full Support | +| | API support | Can I use the API to register/resolve a lazy injectable | Full Support | +| | Scoping support | Are lazy injectables supported in scoped injectors | Full Support | +| Optional Injection | | Does the DI library support optional constructor params for injection | Full Support | +| | Decorator support | Can I use `@decorators` to resolve optional injectable | Full Support | +| | API support | Can I use the API to register/resolve a optional injectable | Full Support | +| | Scoping support | Are optional injectables supported in scoped injectors | Full Support | +| Instance Injection | | Does the DI library support registering instances against a type | Full Support | +| | API support | Can I use the API to register an instance of a type for injection | Full Support | +| | Scoping support | Are instances supported in scoped injectors | Full Support | +| Value Injection | | Does the DI library allow for registering a value for injection (Non-injectable types) | Full Support | +| | Intrinsic values | Can I register intrinsic types such as Date, Regex, Number | Full Support | +| | AOT values | Can I eagerly supply the value for the value injection | Full Support | +| | JIT values | Can I compute the value at point of injection | Full Support | +| | Dynamic values | Can I recompute the value being injected on each resolution | Full Support | +| Custom Construction | | Does the DI library support construction external to the library itself | Full Support | +| | Bespoke type construction | Can I create my own constructor for a given type | Full Support | +| | Global bespoke construction | Can I create a global constructor for all types | Full Support | +| | Abstract type construction | Can I create a constructor for abstract base types | Full Support | +| | Scoping support | Are custom constructors supported in scoped injectors | Full Support | +| Hierarchical injection | | Does the DI library support scoped injection contexts | Full Support | +| | String scope names | Can I use strings for scope names | Full Support | +| | Symbol scope names | Can I use Symbols for scoped names | Full Support | +| | Registration overriding | Can I override ancestral registration in my scope | Full Support | +| | Disposal | Can I destroy a scope | Full Support | +| | Scope lookup | Can I find a scope easily using its name or id. | Full Support | +| | Scope inheritance | Can scopes extend other scopes | Full Support | +| Interception | | Does the DI library support interceptors | Full Support | +| | Decorator support | Can I register interceptions using `@decorators` | Full Support | +| | API support | Can I register interceptions using the API | Full Support | +| | Before construction interception | Can I intercept a given type before its constructed | Full Support | +| | After construction interception | Can I intercept a given type after its constructed | Full Support | +| Injection delegation | | Can I delegate all construction to another DI library. | Full Support | # Injectable basics From 69e9ccc9860409ef0ae7398d7337a5ef66cd98f9 Mon Sep 17 00:00:00 2001 From: David Hanson <1564426+Davidhanson90@users.noreply.github.com> Date: Sat, 27 Feb 2021 10:56:32 +0000 Subject: [PATCH 3/8] Fix typos --- readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index ecfb7e5..89c904e 100644 --- a/readme.md +++ b/readme.md @@ -59,9 +59,9 @@ import "reflect-metadata"; # Feature table -| Feature | Sub-feature | Details | Needle | +| Feature | Sub-feature | Details | Status | |------------------------|----------------------------------|----------------------------------------------------------------------------------------|--------------| -| Decorator support | | Using '@decorators' to signal behaviour | Full Support | +| Decorator support | | Using '@decorators' to signal behavior | Full Support | | Optional decorators | | Supporting decorator less injection | Full Support | | TypeScript Typing's | | Full TypeScript support with Type safety | Full Support | | Global configuration | | Ability to configure global setting in the container | Full Support | @@ -77,14 +77,14 @@ import "reflect-metadata"; | | Creation cost | Cost in time to construct the the Injectable | Full Support | | | Dependency counts | Number of dependencies a given type has | Full Support | | | Scoping support | Are metrics tracked in scoped injectors | Full Support | -| | Metrics manipulation | Can developers maniplulate metrics | Full Support | +| | Metrics manipulation | Can developers manipulate metrics | Full Support | | Tokenisation | | Does the DI library support tokenisation | Full Support | | | Decorator support | Can you define tokens using '@decorators' | Full Support | | | API support | Can you define tokens using an API | Full Support | | | String tokens | Can I use strings as tokens | Full Support | | | Symbol tokens | Can I use Symbols to as tokens | Full Support | | | Multiple tokens | Can I register multiple tokens for a single Injectable | Full Support | -| | Token overriding | Can I override exisiting token registrations | Full Support | +| | Token overriding | Can I override existing token registrations | Full Support | | | Unique token enforcement | Can I enforce no token overriding | Full Support | | | Scoping support | Are tokens supported in scoped injectors | Full Support | | Strategies | | Does the DI library support injecting multiple injectables into a given constructor | Full Support | From 732f4f7a6262acfb680bfc3fcb5a5b9e8ca88b15 Mon Sep 17 00:00:00 2001 From: David Hanson <1564426+Davidhanson90@users.noreply.github.com> Date: Sat, 27 Feb 2021 10:59:47 +0000 Subject: [PATCH 4/8] Minor fixes --- readme.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index 89c904e..8060df5 100644 --- a/readme.md +++ b/readme.md @@ -57,7 +57,7 @@ And you should import this module at the root of your application. import "reflect-metadata"; ``` -# Feature table +# Feature support | Feature | Sub-feature | Details | Status | |------------------------|----------------------------------|----------------------------------------------------------------------------------------|--------------| @@ -69,12 +69,12 @@ import "reflect-metadata"; | Cache | | Caching of injectables | Full Support | | | Cache manipulation | Ability to directly manipulate the cache | Full Support | | | Scoping support | Caching support in scoped injectors | Full Support | -| Metrics | | Tracking of injectables in the system | Full Support | +| Metrics | | Tracking injectables in the system | Full Support | | | Auto tracking | Zero config tracking model | Full Support | | | Activation tracking | Tracking when a type is first constructed | Full Support | | | Activation owners | Tracking what type created an Injectable | Full Support | | | Resolution statistics | Details of how often a type has been resolved etc | Full Support | -| | Creation cost | Cost in time to construct the the Injectable | Full Support | +| | Creation cost | Cost in time to construct the Injectable | Full Support | | | Dependency counts | Number of dependencies a given type has | Full Support | | | Scoping support | Are metrics tracked in scoped injectors | Full Support | | | Metrics manipulation | Can developers manipulate metrics | Full Support | @@ -134,6 +134,7 @@ import "reflect-metadata"; | | After construction interception | Can I intercept a given type after its constructed | Full Support | | Injection delegation | | Can I delegate all construction to another DI library. | Full Support | + # Injectable basics ## Decorators vs Registration API From 2bd4534e2bdfa937561661ba5b33dcaeea8b0810 Mon Sep 17 00:00:00 2001 From: David Hanson <1564426+Davidhanson90@users.noreply.github.com> Date: Sat, 27 Feb 2021 11:19:05 +0000 Subject: [PATCH 5/8] Add links to key sections in the docs --- readme.md | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/readme.md b/readme.md index 8060df5..3aa608b 100644 --- a/readme.md +++ b/readme.md @@ -61,79 +61,78 @@ import "reflect-metadata"; | Feature | Sub-feature | Details | Status | |------------------------|----------------------------------|----------------------------------------------------------------------------------------|--------------| -| Decorator support | | Using '@decorators' to signal behavior | Full Support | -| Optional decorators | | Supporting decorator less injection | Full Support | -| TypeScript Typing's | | Full TypeScript support with Type safety | Full Support | -| Global configuration | | Ability to configure global setting in the container | Full Support | -| Semantic Injection | | Ability to respect semantic versioning in all injectable types | Full Support | +| [Decorator support](https://github.com/morganstanley/needle#creating-an-injectable-type) | | Using '@decorators' to signal behavior | Full Support | +| Optional decorators | | Supporting decorator free injection | Full Support | +| TypeScript Typing's | | Full TypeScript support with type safety | Full Support | +| [Global configuration](https://github.com/morganstanley/needle#global-configuration) | | Ability to configure global settings in the container | Full Support | +| [Semantic Injection](https://github.com/morganstanley/needle#semantic-injection) | | Ability to respect semantic versioning in all injectable types | Full Support | | Cache | | Caching of injectables | Full Support | | | Cache manipulation | Ability to directly manipulate the cache | Full Support | | | Scoping support | Caching support in scoped injectors | Full Support | -| Metrics | | Tracking injectables in the system | Full Support | +| [Metrics](https://github.com/morganstanley/needle#metrics-tracking) | | Tracking injectables in the system | Full Support | | | Auto tracking | Zero config tracking model | Full Support | | | Activation tracking | Tracking when a type is first constructed | Full Support | -| | Activation owners | Tracking what type created an Injectable | Full Support | +| | Activation owners | Tracking what type is responsible for constructing an Injectable | Full Support | | | Resolution statistics | Details of how often a type has been resolved etc | Full Support | | | Creation cost | Cost in time to construct the Injectable | Full Support | -| | Dependency counts | Number of dependencies a given type has | Full Support | +| | Dependency counts | Number of dependencies a given type has in its constructor | Full Support | | | Scoping support | Are metrics tracked in scoped injectors | Full Support | -| | Metrics manipulation | Can developers manipulate metrics | Full Support | -| Tokenisation | | Does the DI library support tokenisation | Full Support | +| | Metrics manipulation | Can developers manipulate the metric data | Full Support | +| [Tokenisation](https://github.com/morganstanley/needle#tokens) | | Does the DI library support tokenisation | Full Support | | | Decorator support | Can you define tokens using '@decorators' | Full Support | | | API support | Can you define tokens using an API | Full Support | | | String tokens | Can I use strings as tokens | Full Support | -| | Symbol tokens | Can I use Symbols to as tokens | Full Support | -| | Multiple tokens | Can I register multiple tokens for a single Injectable | Full Support | +| | Symbol tokens | Can I use Symbols as tokens | Full Support | +| | Multiple tokens | Can I register multiple tokens for a single injectable | Full Support | | | Token overriding | Can I override existing token registrations | Full Support | -| | Unique token enforcement | Can I enforce no token overriding | Full Support | +| | Unique token enforcement | Can I enforce unqiue tokens | Full Support | | | Scoping support | Are tokens supported in scoped injectors | Full Support | -| Strategies | | Does the DI library support injecting multiple injectables into a given constructor | Full Support | +| [Strategies](https://github.com/morganstanley/needle#strategies) | | Does the DI library support injecting multiple injectables into a given constructor | Full Support | | | Decorator support | Can I use `@decorators` to register a strategy | Full Support | | | API support | Can I use the API to register a strategy | Full Support | | | String tokens | Can I register strategies using strings | Full Support | | | Symbol tokens | Can I register strategies using Symbols | Full Support | | | Scoping support | Are strategies supported in scoped injectors | Full Support | -| Factories | | Does the DI library support factory construction types | Full Support | +| [Factories](https://github.com/morganstanley/needle#factories) | | Does the DI library support factory construction types | Full Support | | | Decorator support | Can I use `@decorators` to resolve a factory | Full Support | | | API support | Can I use API to resolve a factory | Full Support | | | Scoping support | Are factories supported in scoped injectors | Full Support | | | Auto factories | Can all types be used as Factories | Full Support | | | Parameter profiling | Can I control constructor parameters explicitly | Full Support | -| Lazy Injection | | Does the DI library support lazy dependency injection | Full Support | +| [Lazy Injection](https://github.com/morganstanley/needle#lazy-injection) | | Does the DI library support lazy dependency injection | Full Support | | | Decorator support | Can I use `@decorators` to register/resolve a lazy injectable | Full Support | | | API support | Can I use the API to register/resolve a lazy injectable | Full Support | | | Scoping support | Are lazy injectables supported in scoped injectors | Full Support | -| Optional Injection | | Does the DI library support optional constructor params for injection | Full Support | +| [Optional Injection](https://github.com/morganstanley/needle#optional-injection) | | Does the DI library support optional constructor params for injection | Full Support | | | Decorator support | Can I use `@decorators` to resolve optional injectable | Full Support | | | API support | Can I use the API to register/resolve a optional injectable | Full Support | | | Scoping support | Are optional injectables supported in scoped injectors | Full Support | -| Instance Injection | | Does the DI library support registering instances against a type | Full Support | +| [Instance Injection](https://github.com/morganstanley/needle#register-instance) | | Does the DI library support registering instances against a type | Full Support | | | API support | Can I use the API to register an instance of a type for injection | Full Support | | | Scoping support | Are instances supported in scoped injectors | Full Support | -| Value Injection | | Does the DI library allow for registering a value for injection (Non-injectable types) | Full Support | +| [Value Injection](https://github.com/morganstanley/needle#register-value) | | Does the DI library allow for registering a value for injection (Non-injectable types) | Full Support | | | Intrinsic values | Can I register intrinsic types such as Date, Regex, Number | Full Support | | | AOT values | Can I eagerly supply the value for the value injection | Full Support | | | JIT values | Can I compute the value at point of injection | Full Support | | | Dynamic values | Can I recompute the value being injected on each resolution | Full Support | -| Custom Construction | | Does the DI library support construction external to the library itself | Full Support | +| [Custom Construction](https://github.com/morganstanley/needle#external-resolution-strategies) | | Does the DI library support construction external to the library itself | Full Support | | | Bespoke type construction | Can I create my own constructor for a given type | Full Support | | | Global bespoke construction | Can I create a global constructor for all types | Full Support | | | Abstract type construction | Can I create a constructor for abstract base types | Full Support | | | Scoping support | Are custom constructors supported in scoped injectors | Full Support | -| Hierarchical injection | | Does the DI library support scoped injection contexts | Full Support | +| [Hierarchical injection](https://github.com/morganstanley/needle#scoped-injection) | | Does the DI library support scoped injection contexts | Full Support | | | String scope names | Can I use strings for scope names | Full Support | | | Symbol scope names | Can I use Symbols for scoped names | Full Support | | | Registration overriding | Can I override ancestral registration in my scope | Full Support | | | Disposal | Can I destroy a scope | Full Support | | | Scope lookup | Can I find a scope easily using its name or id. | Full Support | | | Scope inheritance | Can scopes extend other scopes | Full Support | -| Interception | | Does the DI library support interceptors | Full Support | +| [Interception](https://github.com/morganstanley/needle#interception) | | Does the DI library support interceptors | Full Support | | | Decorator support | Can I register interceptions using `@decorators` | Full Support | | | API support | Can I register interceptions using the API | Full Support | | | Before construction interception | Can I intercept a given type before its constructed | Full Support | | | After construction interception | Can I intercept a given type after its constructed | Full Support | -| Injection delegation | | Can I delegate all construction to another DI library. | Full Support | - +| [Injection delegation](https://github.com/morganstanley/needle#external-resolution-strategy) | | Can I delegate all construction to another DI library. | Full Support | # Injectable basics From 1a93fd0a78ee9bba221272a3a2492a5e15bc8990 Mon Sep 17 00:00:00 2001 From: David Hanson <1564426+Davidhanson90@users.noreply.github.com> Date: Sat, 27 Feb 2021 11:27:17 +0000 Subject: [PATCH 6/8] reword to typescript support. --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 3aa608b..14dbc6b 100644 --- a/readme.md +++ b/readme.md @@ -63,7 +63,7 @@ import "reflect-metadata"; |------------------------|----------------------------------|----------------------------------------------------------------------------------------|--------------| | [Decorator support](https://github.com/morganstanley/needle#creating-an-injectable-type) | | Using '@decorators' to signal behavior | Full Support | | Optional decorators | | Supporting decorator free injection | Full Support | -| TypeScript Typing's | | Full TypeScript support with type safety | Full Support | +| TypeScript support | | Full TypeScript support with type safety | Full Support | | [Global configuration](https://github.com/morganstanley/needle#global-configuration) | | Ability to configure global settings in the container | Full Support | | [Semantic Injection](https://github.com/morganstanley/needle#semantic-injection) | | Ability to respect semantic versioning in all injectable types | Full Support | | Cache | | Caching of injectables | Full Support | From 82e67049268a7855b9420e045dcc78203d21392d Mon Sep 17 00:00:00 2001 From: David Hanson <1564426+Davidhanson90@users.noreply.github.com> Date: Sun, 28 Feb 2021 10:20:06 +0000 Subject: [PATCH 7/8] Remove docs from package publish --- .npmignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.npmignore b/.npmignore index aa4febc..ee5e6ad 100644 --- a/.npmignore +++ b/.npmignore @@ -22,7 +22,8 @@ typedoc.json main/**/* spec/**/* .github/**/* -.dco/**/* +dco/**/* +docs/**/* # except for ts files (required for source maps) From 461922fd78f363e7dca7c7d584173558815a12a8 Mon Sep 17 00:00:00 2001 From: David Hanson <1564426+Davidhanson90@users.noreply.github.com> Date: Sun, 28 Feb 2021 10:34:48 +0000 Subject: [PATCH 8/8] Update version for publishing --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index f411217..aacf2e5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@morgan-stanley/needle", - "version": "0.3.6", + "version": "0.3.7", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index a9bb3c8..57834c6 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "0.3.6", + "version": "0.3.7", "description": "A small & lightweight dependency injection container for use in multiple contexts like Angular, React & node.", "name": "@morgan-stanley/needle", "license": "Apache-2.0",