Comparing version 2.2.1-betta.0 to 2.2.2-betta.0
@@ -7,3 +7,4 @@ import UniqueStack from './unique-stack'; | ||
if (stack.push(name)[0] != null) { | ||
throw new Error('Cyclic dependencies couldn\'t be resolved.'); | ||
throw new Error('Cyclic dependencies couldn\'t be resolved.\n\n' + | ||
`Requested: ${name}\nResolution stack:\n\t${stack.items.join('\n\t')}`); | ||
} | ||
@@ -10,0 +11,0 @@ const itemFactory = factories[name]; |
@@ -5,2 +5,3 @@ export declare type ETuple<E, T> = [E, null] | [null, T]; | ||
pop: (expected?: T) => ETuple<Error, T>; | ||
readonly items: T[]; | ||
readonly size: number; | ||
@@ -7,0 +8,0 @@ }; |
@@ -24,4 +24,7 @@ const _push = (stack, set) => (item) => { | ||
}, | ||
get items() { | ||
return stack.slice(); | ||
}, | ||
}); | ||
const UniqueStack = () => UniqueStackApi([], new Set()); | ||
export default UniqueStack; |
@@ -12,3 +12,4 @@ "use strict"; | ||
if (stack.push(name)[0] != null) { | ||
throw new Error('Cyclic dependencies couldn\'t be resolved.'); | ||
throw new Error('Cyclic dependencies couldn\'t be resolved.\n\n' + | ||
("Requested: " + name + "\nResolution stack:\n\t" + stack.items.join('\n\t'))); | ||
} | ||
@@ -15,0 +16,0 @@ var itemFactory = factories[name]; |
@@ -5,2 +5,3 @@ export declare type ETuple<E, T> = [E, null] | [null, T]; | ||
pop: (expected?: T) => ETuple<Error, T>; | ||
readonly items: T[]; | ||
readonly size: number; | ||
@@ -7,0 +8,0 @@ }; |
@@ -26,4 +26,7 @@ "use strict"; | ||
}, | ||
get items() { | ||
return stack.slice(); | ||
}, | ||
}); }; | ||
var UniqueStack = function () { return UniqueStackApi([], new Set()); }; | ||
exports.default = UniqueStack; |
{ | ||
"name": "true-di", | ||
"version": "2.2.1-betta.0", | ||
"version": "2.2.2-betta.0", | ||
"description": "Framework Agnostic, Zero Dependency, Isomorphic & Minimalistic Dependency Injection Container for TypeScript and JavaScript projects", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -15,3 +15,6 @@ import UniqueStack from './unique-stack'; | ||
if (stack.push(name)[0] != null) { | ||
throw new Error('Cyclic dependencies couldn\'t be resolved.'); | ||
throw new Error( | ||
'Cyclic dependencies couldn\'t be resolved.\n\n' + | ||
`Requested: ${name}\nResolution stack:\n\t${stack.items.join('\n\t')}`, | ||
); | ||
} | ||
@@ -18,0 +21,0 @@ |
@@ -6,2 +6,3 @@ export type ETuple<E, T> = [E, null] | [null, T]; | ||
pop: (expected?: T) => ETuple<Error, T>, | ||
readonly items: T[], | ||
readonly size: number, | ||
@@ -38,2 +39,5 @@ }; | ||
}, | ||
get items(): T[] { | ||
return stack.slice(); | ||
}, | ||
}); | ||
@@ -40,0 +44,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
95113
1769