Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-magnetic-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

react-magnetic-di - npm Package Compare versions

Comparing version 2.2.12 to 2.2.13

9

lib/cjs/react/consumer.js

@@ -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

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