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.8 to 2.2.9

types/test.tsx

2

lib/cjs/react/provider.js

@@ -27,3 +27,3 @@ "use strict";

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

@@ -30,0 +30,0 @@ var DiProvider = function DiProvider(_ref) {

@@ -1,2 +0,2 @@

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

@@ -3,0 +3,0 @@ import React, { useContext, useMemo, forwardRef } from 'react';

{
"name": "react-magnetic-di",
"version": "2.2.8",
"version": "2.2.9",
"description": "Context driven dependency injection",

@@ -36,3 +36,2 @@ "keywords": [

},
"dependencies": {},
"peerDependencies": {

@@ -51,17 +50,18 @@ "prop-types": "^15.0.0",

"devDependencies": {
"@babel/cli": "^7.16.8",
"@babel/core": "^7.16.7",
"@babel/eslint-parser": "^7.16.5",
"@babel/plugin-proposal-class-properties": "^7.16.7",
"@babel/plugin-transform-runtime": "^7.16.8",
"@babel/preset-env": "^7.16.8",
"@babel/preset-flow": "^7.16.7",
"@babel/preset-react": "^7.16.7",
"@babel/runtime": "^7.16.7",
"@babel/cli": "^7.19.3",
"@babel/core": "^7.19.3",
"@babel/eslint-parser": "^7.19.1",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-transform-runtime": "^7.19.1",
"@babel/preset-env": "^7.19.3",
"@babel/preset-flow": "^7.18.6",
"@babel/preset-react": "^7.18.6",
"@babel/runtime": "^7.19.0",
"@testing-library/react": "^12.1.2",
"@types/jest": "^29.1.1",
"@types/react": "^17.0.38",
"@types/react-dom": "^17.0.11",
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.6",
"babel-jest": "^27.4.6",
"babel-loader": "^8.2.3",
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.7",
"babel-jest": "^29.1.2",
"babel-loader": "^8.2.5",
"babel-plugin-macros": "^3.1.0",

@@ -71,16 +71,17 @@ "babel-plugin-module-resolver": "^4.1.0",

"enzyme": "^3.11.0",
"eslint": "^8.6.0",
"eslint": "^8.24.0",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-local": "^1.0.0",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-react": "^7.31.8",
"eslint-plugin-react-hooks": "^4.6.0",
"flow-bin": "^0.169.0",
"flow-copy-source": "^2.0.9",
"jest": "^27.4.7",
"prettier": "^2.5.1",
"jest": "^29.1.2",
"jest-environment-jsdom": "^29.1.2",
"prettier": "^2.7.1",
"prop-types": "^15.8.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"typescript": "^4.5.4",
"typescript": "^4.8.4",
"webpack": "^4.46.0",

@@ -87,0 +88,0 @@ "webpack-cli": "^3.3.12",

@@ -179,2 +179,5 @@ <p align="center">

In case of babel macro (eg for use with CRA), the `configName` key is `reactMagneticDi`.
## ESLint plugin and rules

@@ -181,0 +184,0 @@

@@ -6,2 +6,16 @@ declare module 'react-magnetic-di' {

type DeepPartial<Type> = Type extends (...args: any) => any
? (...args: Parameters<Type>) => DeepPartial<ReturnType<Type>>
: Type extends ReadonlyArray<infer InferredArrayMember>
? InferredArrayMember[] extends Type
? Array<DeepPartial<InferredArrayMember>> // list
: DeepPartialObject<Type> // tuple
: Type extends object
? DeepPartialObject<Type>
: Type | undefined;
type DeepPartialObject<Type> = {
[Key in keyof Type]?: DeepPartial<Type[Key]>;
};
class DiProvider extends Component<

@@ -25,3 +39,6 @@ {

function injectable<T extends Dependency>(from: T, implementation: T): T;
function injectable<T extends Dependency>(
from: T,
implementation: DeepPartial<T>
): T;

@@ -28,0 +45,0 @@ function di(...dependencies: Dependency[]): void;

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