react-magnetic-di
Advanced tools
Comparing version 2.2.12 to 2.2.13
@@ -13,5 +13,8 @@ "use strict"; | ||
if (Array.isArray(deps)) { | ||
// Read context and grab all the dependencies override | ||
// from all Providers in the tree | ||
var _ref = _context.Context._currentValue || {}, | ||
// Read context and grab all the dependencies override Providers in the tree | ||
var _ref = | ||
// grab value from alt renderer (eg react-test-renderer) | ||
_context.Context._currentRenderer2 && _context.Context._currentValue2 || | ||
// grab value from default renderer | ||
_context.Context._currentValue || {}, | ||
_ref$getDependencies = _ref.getDependencies, | ||
@@ -18,0 +21,0 @@ getDependencies = _ref$getDependencies === void 0 ? function (v) { |
@@ -7,7 +7,10 @@ import { PACKAGE_NAME } from './constants'; | ||
if (Array.isArray(deps)) { | ||
// Read context and grab all the dependencies override | ||
// from all Providers in the tree | ||
// Read context and grab all the dependencies override Providers in the tree | ||
const { | ||
getDependencies = v => v | ||
} = Context._currentValue || {}; | ||
} = | ||
// grab value from alt renderer (eg react-test-renderer) | ||
Context._currentRenderer2 && Context._currentValue2 || | ||
// grab value from default renderer | ||
Context._currentValue || {}; | ||
return getDependencies(deps, target); | ||
@@ -14,0 +17,0 @@ } else { |
{ | ||
"name": "react-magnetic-di", | ||
"version": "2.2.12", | ||
"version": "2.2.13", | ||
"description": "Context driven dependency injection", | ||
@@ -81,3 +81,4 @@ "keywords": [ | ||
"react-dom": "^18.2.0", | ||
"typescript": "^4.9.3", | ||
"react-test-renderer": "^18.2.0", | ||
"typescript": "^4.9.4", | ||
"webpack": "^4.46.0", | ||
@@ -84,0 +85,0 @@ "webpack-cli": "^3.3.12", |
@@ -52,3 +52,2 @@ declare module 'react-magnetic-di' { | ||
function injectable<T extends Dependency>(from: T, implementation: T): T; | ||
function injectable<T extends Dependency>( | ||
@@ -58,2 +57,3 @@ from: T, | ||
): T; | ||
function injectable<T extends Dependency>(from: T, implementation: T): T; | ||
@@ -60,0 +60,0 @@ function di(...dependencies: Dependency[]): void; |
Sorry, the diff of this file is not supported yet
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
88137
1822
37