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

@wordpress/compose

Package Overview
Dependencies
Maintainers
12
Versions
197
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wordpress/compose - npm Package Compare versions

Comparing version 3.7.2 to 3.8.0

build-module/higher-order/compose.js

4

build-module/higher-order/with-instance-id/index.js

@@ -22,5 +22,5 @@ import _extends from "@babel/runtime/helpers/esm/extends";

*
* @param {WPElement} WrappedComponent The wrapped component.
* @param {WPComponent} WrappedComponent The wrapped component.
*
* @return {Component} Component with an instanceId prop.
* @return {WPComponent} Component with an instanceId prop.
*/

@@ -27,0 +27,0 @@

@@ -28,5 +28,5 @@ import _extends from "@babel/runtime/helpers/esm/extends";

*
* @param {Component} OriginalComponent Component requiring setTimeout
* @param {WPComponent} OriginalComponent Component requiring setTimeout
*
* @return {Component} Wrapped component.
* @return {WPComponent} Wrapped component.
*/

@@ -33,0 +33,0 @@

@@ -25,3 +25,3 @@ import _extends from "@babel/runtime/helpers/esm/extends";

*
* @return {Component} Wrapped component.
* @return {WPComponent} Wrapped component.
*/

@@ -28,0 +28,0 @@

@@ -1,18 +0,6 @@

/**
* External dependencies
*/
import { flowRight } from 'lodash'; // Utils
// Utils
export { default as createHigherOrderComponent } from './utils/create-higher-order-component'; // Compose helper (aliased flowRight from Lodash)
export { default as createHigherOrderComponent } from './utils/create-higher-order-component';
/**
* Composes multiple higher-order components into a single higher-order component. Performs right-to-left function
* composition, where each successive invocation is supplied the return value of the previous.
*
* @param {...Function} hocs The HOC functions to invoke.
*
* @return {Function} Returns the new composite function.
*/
export { default as compose } from './higher-order/compose'; // Higher-order components
export { flowRight as compose }; // Higher-order components
export { default as ifCondition } from './higher-order/if-condition';

@@ -19,0 +7,0 @@ export { default as pure } from './higher-order/pure';

@@ -38,5 +38,5 @@ "use strict";

*
* @param {WPElement} WrappedComponent The wrapped component.
* @param {WPComponent} WrappedComponent The wrapped component.
*
* @return {Component} Component with an instanceId prop.
* @return {WPComponent} Component with an instanceId prop.
*/

@@ -43,0 +43,0 @@ var _default = (0, _createHigherOrderComponent.default)(function (WrappedComponent) {

@@ -46,5 +46,5 @@ "use strict";

*
* @param {Component} OriginalComponent Component requiring setTimeout
* @param {WPComponent} OriginalComponent Component requiring setTimeout
*
* @return {Component} Wrapped component.
* @return {WPComponent} Wrapped component.
*/

@@ -51,0 +51,0 @@ var withSafeTimeout = (0, _createHigherOrderComponent.default)(function (OriginalComponent) {

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

*
* @return {Component} Wrapped component.
* @return {WPComponent} Wrapped component.
*/

@@ -45,0 +45,0 @@ function withState() {

@@ -8,12 +8,12 @@ "use strict";

});
Object.defineProperty(exports, "compose", {
Object.defineProperty(exports, "createHigherOrderComponent", {
enumerable: true,
get: function get() {
return _lodash.flowRight;
return _createHigherOrderComponent.default;
}
});
Object.defineProperty(exports, "createHigherOrderComponent", {
Object.defineProperty(exports, "compose", {
enumerable: true,
get: function get() {
return _createHigherOrderComponent.default;
return _compose.default;
}

@@ -70,6 +70,6 @@ });

var _lodash = require("lodash");
var _createHigherOrderComponent = _interopRequireDefault(require("./utils/create-higher-order-component"));
var _compose = _interopRequireDefault(require("./higher-order/compose"));
var _ifCondition = _interopRequireDefault(require("./higher-order/if-condition"));

@@ -76,0 +76,0 @@

{
"name": "@wordpress/compose",
"version": "3.7.2",
"version": "3.8.0",
"description": "WordPress higher-order components (HOCs).",

@@ -24,5 +24,6 @@ "author": "The WordPress Contributors",

"react-native": "src/index",
"sideEffects": false,
"dependencies": {
"@babel/runtime": "^7.4.4",
"@wordpress/element": "^2.8.2",
"@wordpress/element": "^2.9.0",
"@wordpress/is-shallow-equal": "^1.6.1",

@@ -34,3 +35,3 @@ "lodash": "^4.17.15"

},
"gitHead": "707754784420a7089ae31ec4d6c756ce9af9c782"
"gitHead": "52bfe7deb90fe2b6df7f1a0a92f89cc69462a491"
}

@@ -166,7 +166,7 @@ # Compose

- _WrappedComponent_ `WPElement`: The wrapped component.
- _WrappedComponent_ `WPComponent`: The wrapped component.
_Returns_
- `Component`: Component with an instanceId prop.
- `WPComponent`: Component with an instanceId prop.

@@ -180,7 +180,7 @@ <a name="withSafeTimeout" href="#withSafeTimeout">#</a> **withSafeTimeout**

- _OriginalComponent_ `Component`: Component requiring setTimeout
- _OriginalComponent_ `WPComponent`: Component requiring setTimeout
_Returns_
- `Component`: Wrapped component.
- `WPComponent`: Wrapped component.

@@ -198,3 +198,3 @@ <a name="withState" href="#withState">#</a> **withState**

- `Component`: Wrapped component.
- `WPComponent`: Wrapped component.

@@ -201,0 +201,0 @@

@@ -15,5 +15,5 @@ /**

*
* @param {WPElement} WrappedComponent The wrapped component.
* @param {WPComponent} WrappedComponent The wrapped component.
*
* @return {Component} Component with an instanceId prop.
* @return {WPComponent} Component with an instanceId prop.
*/

@@ -20,0 +20,0 @@ export default createHigherOrderComponent( ( WrappedComponent ) => {

@@ -20,5 +20,5 @@ /**

*
* @param {Component} OriginalComponent Component requiring setTimeout
* @param {WPComponent} OriginalComponent Component requiring setTimeout
*
* @return {Component} Wrapped component.
* @return {WPComponent} Wrapped component.
*/

@@ -25,0 +25,0 @@ const withSafeTimeout = createHigherOrderComponent(

@@ -17,3 +17,3 @@ /**

*
* @return {Component} Wrapped component.
* @return {WPComponent} Wrapped component.
*/

@@ -20,0 +20,0 @@ export default function withState( initialState = {} ) {

@@ -1,18 +0,6 @@

/**
* External dependencies
*/
import { flowRight } from 'lodash';
// Utils
export { default as createHigherOrderComponent } from './utils/create-higher-order-component';
/**
* Composes multiple higher-order components into a single higher-order component. Performs right-to-left function
* composition, where each successive invocation is supplied the return value of the previous.
*
* @param {...Function} hocs The HOC functions to invoke.
*
* @return {Function} Returns the new composite function.
*/
export { flowRight as compose };
// Compose helper (aliased flowRight from Lodash)
export { default as compose } from './higher-order/compose';

@@ -19,0 +7,0 @@ // Higher-order components

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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