@bem-react/di
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -6,2 +6,13 @@ # Change Log | ||
## [2.0.1](https://github.com/bem/bem-react/compare/@bem-react/di@2.0.0...@bem-react/di@2.0.1) (2019-05-27) | ||
### Bug Fixes | ||
* **di:** return type in GetNonDefaultProps without GetNonDefaultProps ([9f3ab8e](https://github.com/bem/bem-react/commit/9f3ab8e)) | ||
# [2.0.0](https://github.com/bem/bem-react/tree/master/packages/di/compare/@bem-react/di@1.6.0...@bem-react/di@2.0.0) (2019-05-24) | ||
@@ -12,3 +23,3 @@ | ||
* **di:** replace inverted by overridable ([957a0fe](https://github.com/bem/bem-react/tree/master/packages/di/commit/957a0fe)) | ||
* **di:** replace inverted by overridable ([957a0fe](https://github.com/bem/bem-react/commit/957a0fe)) | ||
@@ -29,3 +40,3 @@ | ||
* **di:** add hooks for registries and registryComponent ([c512dc2](https://github.com/bem/bem-react/tree/master/packages/di/commit/c512dc2)) | ||
* **di:** add hooks for registries and registryComponent ([c512dc2](https://github.com/bem/bem-react/commit/c512dc2)) | ||
@@ -41,3 +52,3 @@ | ||
* **di:** registers are overwritten in context ([a7b6377](https://github.com/bem/bem-react/tree/master/packages/di/commit/a7b6377)) | ||
* **di:** registers are overwritten in context ([a7b6377](https://github.com/bem/bem-react/commit/a7b6377)) | ||
@@ -53,3 +64,3 @@ | ||
* **di:** remove global variable providedRegistries ([8f5e93e](https://github.com/bem/bem-react/tree/master/packages/di/commit/8f5e93e)) | ||
* **di:** remove global variable providedRegistries ([8f5e93e](https://github.com/bem/bem-react/commit/8f5e93e)) | ||
@@ -65,3 +76,3 @@ | ||
* **di:** provided registries must be global ([57fdb8b](https://github.com/bem/bem-react/tree/master/packages/di/commit/57fdb8b)) | ||
* **di:** provided registries must be global ([57fdb8b](https://github.com/bem/bem-react/commit/57fdb8b)) | ||
@@ -77,3 +88,3 @@ | ||
* **di:** partially registries merge ([7890e03](https://github.com/bem/bem-react/tree/master/packages/di/commit/7890e03)) | ||
* **di:** partially registries merge ([7890e03](https://github.com/bem/bem-react/commit/7890e03)) | ||
@@ -89,3 +100,3 @@ | ||
* **di:** the way to add typings for registry result ([b76e4e1](https://github.com/bem/bem-react/tree/master/packages/di/commit/b76e4e1)) | ||
* **di:** the way to add typings for registry result ([b76e4e1](https://github.com/bem/bem-react/commit/b76e4e1)) | ||
@@ -101,5 +112,5 @@ | ||
* **di:** correct typings for withRegistry ([a79eca2](https://github.com/bem/bem-react/tree/master/packages/di/commit/a79eca2)) | ||
* **di:** return correct type from withRegistry ([e695088](https://github.com/bem/bem-react/tree/master/packages/di/commit/e695088)) | ||
* **di:** use map as class option for using in es5 ([24e9015](https://github.com/bem/bem-react/tree/master/packages/di/commit/24e9015)) | ||
* **di:** correct typings for withRegistry ([a79eca2](https://github.com/bem/bem-react/commit/a79eca2)) | ||
* **di:** return correct type from withRegistry ([e695088](https://github.com/bem/bem-react/commit/e695088)) | ||
* **di:** use map as class option for using in es5 ([24e9015](https://github.com/bem/bem-react/commit/24e9015)) | ||
@@ -109,3 +120,3 @@ | ||
* **v3:** init packages ([d652328](https://github.com/bem/bem-react/tree/master/packages/di/commit/d652328)) | ||
* **v3:** init packages ([d652328](https://github.com/bem/bem-react/commit/d652328)) | ||
@@ -121,5 +132,5 @@ | ||
* **di:** correct typings for withRegistry ([a79eca2](https://github.com/bem/bem-react/tree/master/packages/di/commit/a79eca2)) | ||
* **di:** return correct type from withRegistry ([e695088](https://github.com/bem/bem-react/tree/master/packages/di/commit/e695088)) | ||
* **di:** use map as class option for using in es5 ([24e9015](https://github.com/bem/bem-react/tree/master/packages/di/commit/24e9015)) | ||
* **di:** correct typings for withRegistry ([a79eca2](https://github.com/bem/bem-react/commit/a79eca2)) | ||
* **di:** return correct type from withRegistry ([e695088](https://github.com/bem/bem-react/commit/e695088)) | ||
* **di:** use map as class option for using in es5 ([24e9015](https://github.com/bem/bem-react/commit/24e9015)) | ||
@@ -129,3 +140,3 @@ | ||
* **v3:** init packages ([d652328](https://github.com/bem/bem-react/tree/master/packages/di/commit/d652328)) | ||
* **v3:** init packages ([d652328](https://github.com/bem/bem-react/commit/d652328)) | ||
@@ -141,5 +152,5 @@ | ||
* **di:** correct typings for withRegistry ([a79eca2](https://github.com/bem/bem-react/tree/master/packages/di/commit/a79eca2)) | ||
* **di:** return correct type from withRegistry ([4e09616](https://github.com/bem/bem-react/tree/master/packages/di/commit/4e09616)) | ||
* **di:** use map as class option for using in es5 ([24e9015](https://github.com/bem/bem-react/tree/master/packages/di/commit/24e9015)) | ||
* **di:** correct typings for withRegistry ([a79eca2](https://github.com/bem/bem-react/commit/a79eca2)) | ||
* **di:** return correct type from withRegistry ([4e09616](https://github.com/bem/bem-react/commit/4e09616)) | ||
* **di:** use map as class option for using in es5 ([24e9015](https://github.com/bem/bem-react/commit/24e9015)) | ||
@@ -149,3 +160,3 @@ | ||
* **v3:** init packages ([d652328](https://github.com/bem/bem-react/tree/master/packages/di/commit/d652328)) | ||
* **v3:** init packages ([d652328](https://github.com/bem/bem-react/commit/d652328)) | ||
@@ -161,4 +172,4 @@ | ||
* **di:** correct typings for withRegistry ([ce73d79](https://github.com/bem/bem-react/tree/master/packages/di/commit/ce73d79)) | ||
* **di:** use map as class option for using in es5 ([24e9015](https://github.com/bem/bem-react/tree/master/packages/di/commit/24e9015)) | ||
* **di:** correct typings for withRegistry ([ce73d79](https://github.com/bem/bem-react/commit/ce73d79)) | ||
* **di:** use map as class option for using in es5 ([24e9015](https://github.com/bem/bem-react/commit/24e9015)) | ||
@@ -168,3 +179,3 @@ | ||
* **v3:** init packages ([d652328](https://github.com/bem/bem-react/tree/master/packages/di/commit/d652328)) | ||
* **v3:** init packages ([d652328](https://github.com/bem/bem-react/commit/d652328)) | ||
@@ -180,3 +191,3 @@ | ||
* **di:** use map as class option for using in es5 ([24e9015](https://github.com/bem/bem-react/tree/master/packages/di/commit/24e9015)) | ||
* **di:** use map as class option for using in es5 ([24e9015](https://github.com/bem/bem-react/commit/24e9015)) | ||
@@ -186,3 +197,3 @@ | ||
* **v3:** init packages ([d652328](https://github.com/bem/bem-react/tree/master/packages/di/commit/d652328)) | ||
* **v3:** init packages ([d652328](https://github.com/bem/bem-react/commit/d652328)) | ||
@@ -189,0 +200,0 @@ |
@@ -1,6 +0,5 @@ | ||
import React, { ReactNode, FunctionComponent, ComponentType } from 'react'; | ||
export declare type GetNonDefaultProps<T> = keyof T extends never ? never : T; | ||
import React, { ReactNode, FC, ComponentType } from 'react'; | ||
export declare type RegistryContext = Record<string, Registry>; | ||
export declare const RegistryConsumer: React.ExoticComponent<React.ConsumerProps<Record<string, Registry>>>; | ||
export declare function withRegistry(...registries: Registry[]): <P>(Component: React.ComponentType<P>) => React.FunctionComponent<GetNonDefaultProps<P>>; | ||
export declare function withRegistry(...registries: Registry[]): <P>(Component: React.ComponentType<P>) => React.FunctionComponent<P>; | ||
export interface IComponentRegistryConsumerProps { | ||
@@ -10,3 +9,3 @@ id: string; | ||
} | ||
export declare const ComponentRegistryConsumer: FunctionComponent<IComponentRegistryConsumerProps>; | ||
export declare const ComponentRegistryConsumer: FC<IComponentRegistryConsumerProps>; | ||
export declare const useRegistries: () => Record<string, Registry>; | ||
@@ -13,0 +12,0 @@ export declare const useComponentRegistry: <T extends {}>(id: string) => T; |
{ | ||
"name": "@bem-react/di", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "BEM React Dependency Injection", | ||
"homepage": "https://github.com/bem/bem-react", | ||
"repository": "https://github.com/bem/bem-react/tree/master/packages/di", | ||
"homepage": "https://github.com/bem/bem-react/tree/master/packages/di", | ||
"repository": "https://github.com/bem/bem-react", | ||
"keywords": [ | ||
@@ -51,3 +51,3 @@ "bem", | ||
}, | ||
"gitHead": "b2939f6e269850d7147889f2632fa6ed3fc1f7b4" | ||
"gitHead": "f10e99bce98bbd563427c7eacc9a8a4ccae07007" | ||
} |
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
0
20550
167