@spinajs/di
Advanced tools
Comparing version 2.0.210 to 2.0.211
@@ -474,3 +474,7 @@ "use strict"; | ||
// with same injection types, we have to remove duplicates | ||
descriptor.inject = lodash_1.default.uniqBy(descriptor.inject, (x) => x.autoinjectKey); | ||
// constructor injects have no autoInject key, so we can filter them out | ||
// and add them first | ||
const constructorInject = descriptor.inject.filter((x) => x.autoinjectKey === ''); | ||
const rest = descriptor.inject.filter((x) => x.autoinjectKey !== ''); | ||
descriptor.inject = [...constructorInject, ...lodash_1.default.uniqBy(rest, (x) => x.autoinjectKey)]; | ||
return descriptor; | ||
@@ -477,0 +481,0 @@ } |
@@ -468,3 +468,7 @@ import { InvalidArgument } from '@spinajs/exceptions'; | ||
// with same injection types, we have to remove duplicates | ||
descriptor.inject = _.uniqBy(descriptor.inject, (x) => x.autoinjectKey); | ||
// constructor injects have no autoInject key, so we can filter them out | ||
// and add them first | ||
const constructorInject = descriptor.inject.filter((x) => x.autoinjectKey === ''); | ||
const rest = descriptor.inject.filter((x) => x.autoinjectKey !== ''); | ||
descriptor.inject = [...constructorInject, ..._.uniqBy(rest, (x) => x.autoinjectKey)]; | ||
return descriptor; | ||
@@ -471,0 +475,0 @@ } |
{ | ||
"name": "@spinajs/di", | ||
"version": "2.0.210", | ||
"version": "2.0.211", | ||
"description": "lightweight di container ", | ||
@@ -53,4 +53,4 @@ "main": "lib/cjs/index.js", | ||
"dependencies": { | ||
"@spinajs/exceptions": "^2.0.210", | ||
"@spinajs/util": "^2.0.210", | ||
"@spinajs/exceptions": "^2.0.211", | ||
"@spinajs/util": "^2.0.211", | ||
"lodash": "^4.17.21", | ||
@@ -57,0 +57,0 @@ "reflect-metadata": "^0.1.13" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
408230
4337
Updated@spinajs/exceptions@^2.0.211
Updated@spinajs/util@^2.0.211