New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@wessberg/di

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wessberg/di - npm Package Compare versions

Comparing version 1.0.21 to 1.0.22

8

CHANGELOG.md

@@ -0,1 +1,9 @@

<a name="1.0.22"></a>
## 1.0.22 (2017-07-26)
* Bumped version ([5bad4a5](https://github.com/wessberg/di/commit/5bad4a5))
* Made it possible for implementations of services to be null if a custom new expression is passed as ([7a15be2](https://github.com/wessberg/di/commit/7a15be2))
<a name="1.0.21"></a>

@@ -2,0 +10,0 @@ ## 1.0.21 (2017-07-20)

2

dist/es2015/DIContainer/DIContainer.js

@@ -139,2 +139,4 @@ import { RegistrationKind } from "./Interface/IDIContainer";

catch (ex) {
if (registrationRecord.implementation == null)
throw new ReferenceError(`${this.constructor.name} could not construct a new service of kind: ${identifier}. Reason: No implementation was given!`);
const constructable = registrationRecord.implementation;

@@ -141,0 +143,0 @@ // Try without 'new' and call the implementation as a function.

2

dist/es2015/DIContainer/Interface/IDIContainer.d.ts

@@ -7,3 +7,3 @@ export interface IContainerIdentifierable {

export interface IImplementationable<T> {
implementation: NewableService<T> | CustomConstructableService<T>;
implementation: NewableService<T> | CustomConstructableService<T> | null;
}

@@ -10,0 +10,0 @@ export interface IRegisterOptions<T> extends IContainerIdentifierable, IImplementationable<T> {

@@ -150,2 +150,4 @@ (function (factory) {

catch (ex) {
if (registrationRecord.implementation == null)
throw new ReferenceError(`${this.constructor.name} could not construct a new service of kind: ${identifier}. Reason: No implementation was given!`);
const constructable = registrationRecord.implementation;

@@ -152,0 +154,0 @@ // Try without 'new' and call the implementation as a function.

@@ -7,3 +7,3 @@ export interface IContainerIdentifierable {

export interface IImplementationable<T> {
implementation: NewableService<T> | CustomConstructableService<T>;
implementation: NewableService<T> | CustomConstructableService<T> | null;
}

@@ -10,0 +10,0 @@ export interface IRegisterOptions<T> extends IContainerIdentifierable, IImplementationable<T> {

{
"name": "@wessberg/di",
"version": "1.0.21",
"version": "1.0.22",
"description": "A Dependency-Injection container that holds services and can produce instances of them as required. It mimics reflection by parsing the app at compile-time and supporting the generic-reflection syntax.",

@@ -5,0 +5,0 @@ "scripts": {

@@ -67,2 +67,10 @@ # DI (Dependency Injector)

<a name="1.0.22"></a>
## 1.0.22 (2017-07-26)
* Bumped version ([5bad4a5](https://github.com/wessberg/di/commit/5bad4a5))
* Made it possible for implementations of services to be null if a custom new expression is passed as ([7a15be2](https://github.com/wessberg/di/commit/7a15be2))
<a name="1.0.21"></a>

@@ -243,2 +251,11 @@ ## 1.0.21 (2017-07-20)

## 1.0.21 (2017-07-20)
* 1.0.21 ([6211cea](https://github.com/wessberg/di/commit/6211cea))
* Bumped version ([b434dda](https://github.com/wessberg/di/commit/b434dda))
* Fixed a bug where new expressions wouldn't be properly instantiated ([e92b55c](https://github.com/wessberg/di/commit/e92b55c))
<a name="1.0.20"></a>
## 1.0.20 (2017-07-19)

@@ -409,2 +426,11 @@

## 1.0.20 (2017-07-19)
* 1.0.20 ([33a85be](https://github.com/wessberg/di/commit/33a85be))
* Bumped version ([518a4d9](https://github.com/wessberg/di/commit/518a4d9))
* Refined typings to allow non-newable implementations ([db813b6](https://github.com/wessberg/di/commit/db813b6))
<a name="1.0.19"></a>
## 1.0.19 (2017-07-19)

@@ -566,2 +592,11 @@

## 1.0.19 (2017-07-19)
* 1.0.19 ([04b8515](https://github.com/wessberg/di/commit/04b8515))
* Bumped version ([17c361f](https://github.com/wessberg/di/commit/17c361f))
* Fixed an issue in the README ([b4366ec](https://github.com/wessberg/di/commit/b4366ec))
<a name="1.0.18"></a>
## 1.0.18 (2017-07-19)

@@ -714,1 +749,148 @@

## 1.0.18 (2017-07-19)
* 1.0.18 ([5aa7494](https://github.com/wessberg/di/commit/5aa7494))
* Update package.json ([c1a764b](https://github.com/wessberg/di/commit/c1a764b))
* Update README.md ([6377c8b](https://github.com/wessberg/di/commit/6377c8b))
* Updated package.json ([6d08aa7](https://github.com/wessberg/di/commit/6d08aa7))
<a name="1.0.17"></a>
## 1.0.17 (2017-05-31)
* 1.0.17 ([b537054](https://github.com/wessberg/di/commit/b537054))
* Added a 'noInject' decorator to the exports of the module which, together with the DI-compiler, will ([29c539e](https://github.com/wessberg/di/commit/29c539e))
<a name="1.0.16"></a>
## 1.0.16 (2017-05-30)
* 1.0.16 ([53d8f6b](https://github.com/wessberg/di/commit/53d8f6b))
* Added a new method: 'has', which returns true if a service matching the given generic type parameter ([f759574](https://github.com/wessberg/di/commit/f759574))
<a name="1.0.15"></a>
## 1.0.15 (2017-05-24)
* 1.0.15 ([9d53d45](https://github.com/wessberg/di/commit/9d53d45))
* Added the 'IGetOptions' and 'IRegisterOptions' to the exports of the module ([df9b8c0](https://github.com/wessberg/di/commit/df9b8c0))
<a name="1.0.14"></a>
## 1.0.14 (2017-05-24)
* 1.0.14 ([e2b442d](https://github.com/wessberg/di/commit/e2b442d))
* Separated the DIContainer from the compiler. ([cff58fc](https://github.com/wessberg/di/commit/cff58fc))
<a name="1.0.13"></a>
## 1.0.13 (2017-05-24)
* 1.0.13 ([70fd18c](https://github.com/wessberg/di/commit/70fd18c))
* Bumped CodeAnalyzer dependency to ^v1.0.8. ([4cb0162](https://github.com/wessberg/di/commit/4cb0162))
<a name="1.0.12"></a>
## 1.0.12 (2017-05-19)
* 1.0.12 ([a78e00e](https://github.com/wessberg/di/commit/a78e00e))
* Bumped CodeAnalyzer dependency to v1.0.7. ([489be4b](https://github.com/wessberg/di/commit/489be4b))
<a name="1.0.11"></a>
## 1.0.11 (2017-05-18)
* 1.0.11 ([7858546](https://github.com/wessberg/di/commit/7858546))
* Fixed a bug where irrelevant CallExpressions would be validated unnecessarily. ([872b616](https://github.com/wessberg/di/commit/872b616))
<a name="1.0.10"></a>
## 1.0.10 (2017-05-18)
* 1.0.10 ([1e97e39](https://github.com/wessberg/di/commit/1e97e39))
* Bumped CodeAnalyzer dependency to v1.0.6. ([22dbdc3](https://github.com/wessberg/di/commit/22dbdc3))
<a name="1.0.9"></a>
## 1.0.9 (2017-05-18)
* 1.0.9 ([50f126d](https://github.com/wessberg/di/commit/50f126d))
* Bumped GlobalObject dependency to v1.0.3 ([938cb3e](https://github.com/wessberg/di/commit/938cb3e))
<a name="1.0.8"></a>
## 1.0.8 (2017-05-18)
* 1.0.8 ([ddd7752](https://github.com/wessberg/di/commit/ddd7752))
* Mapped interfaces are now stored on the global object to support IIFE and arbitrary execution order. ([d3f54a7](https://github.com/wessberg/di/commit/d3f54a7))
<a name="1.0.7"></a>
## 1.0.7 (2017-05-18)
* 1.0.7 ([2e11b2e](https://github.com/wessberg/di/commit/2e11b2e))
* Bumped CodeAnalyzer dependency to v1.0.5. ([1769dad](https://github.com/wessberg/di/commit/1769dad))
<a name="1.0.6"></a>
## 1.0.6 (2017-05-18)
* 1.0.6 ([6ea792a](https://github.com/wessberg/di/commit/6ea792a))
* Bumped CodeAnalyzer dependency to v1.0.4. ([a89267d](https://github.com/wessberg/di/commit/a89267d))
<a name="1.0.5"></a>
## 1.0.5 (2017-05-16)
* 1.0.5 ([0b2fbf1](https://github.com/wessberg/di/commit/0b2fbf1))
* Bumped CodeAnalyzer dependency to v1.0.2. ([1e7f0e5](https://github.com/wessberg/di/commit/1e7f0e5))
<a name="1.0.4"></a>
## 1.0.4 (2017-05-16)
* 1.0.4 ([8c7cde5](https://github.com/wessberg/di/commit/8c7cde5))
* Bumped CodeAnalyzer dependency. ([8e38a9b](https://github.com/wessberg/di/commit/8e38a9b))
<a name="1.0.3"></a>
## 1.0.3 (2017-05-14)
* 1.0.3 ([e93089a](https://github.com/wessberg/di/commit/e93089a))
* Updated README ([52f4c85](https://github.com/wessberg/di/commit/52f4c85))
<a name="1.0.2"></a>
## 1.0.2 (2017-04-24)
* 1.0.2 ([89ff73d](https://github.com/wessberg/di/commit/89ff73d))
* Fixed a bug where 'hasAltered' would always be false. Cleanup. Added typings to .gitignore and .npmi ([ec99adc](https://github.com/wessberg/di/commit/ec99adc))
<a name="1.0.1"></a>
## 1.0.1 (2017-04-24)
* 1.0.1 ([b04742c](https://github.com/wessberg/di/commit/b04742c))
* Changed MagicString type to 'any' since there are no typings available ([b5894af](https://github.com/wessberg/di/commit/b5894af))
* First commit ([c1cf5b9](https://github.com/wessberg/di/commit/c1cf5b9))

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc