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

@wordpress/element

Package Overview
Dependencies
Maintainers
10
Versions
171
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wordpress/element - npm Package Compare versions

Comparing version 2.5.0 to 2.6.0

10

build-module/serialize.js

@@ -45,3 +45,3 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread";

import { createContext, Fragment, StrictMode } from './react';
import { createContext, Fragment, StrictMode, forwardRef } from './react';
import RawHTML from './raw-html';

@@ -52,2 +52,6 @@

Consumer = _createContext.Consumer;
var ForwardRef = forwardRef(function () {
return null;
});
/**

@@ -59,3 +63,2 @@ * Valid attribute types.

var ATTRIBUTES_TYPES = new Set(['string', 'boolean', 'number']);

@@ -302,2 +305,5 @@ /**

return renderElement(props.children(context || type._currentValue), context, legacyContext);
case ForwardRef.$$typeof:
return renderElement(type.render(props), context, legacyContext);
}

@@ -304,0 +310,0 @@

8

build/serialize.js

@@ -71,2 +71,6 @@ "use strict";

Consumer = _createContext.Consumer;
var ForwardRef = (0, _react.forwardRef)(function () {
return null;
});
/**

@@ -78,3 +82,2 @@ * Valid attribute types.

var ATTRIBUTES_TYPES = new Set(['string', 'boolean', 'number']);

@@ -321,2 +324,5 @@ /**

return renderElement(props.children(context || type._currentValue), context, legacyContext);
case ForwardRef.$$typeof:
return renderElement(type.render(props), context, legacyContext);
}

@@ -323,0 +329,0 @@

{
"name": "@wordpress/element",
"version": "2.5.0",
"version": "2.6.0",
"description": "Element React module for WordPress.",

@@ -26,4 +26,4 @@ "author": "The WordPress Contributors",

"@babel/runtime": "^7.4.4",
"@wordpress/escape-html": "^1.4.0",
"lodash": "^4.17.11",
"@wordpress/escape-html": "^1.5.0",
"lodash": "^4.17.14",
"react": "^16.8.4",

@@ -35,3 +35,3 @@ "react-dom": "^16.8.4"

},
"gitHead": "256d514d356709cfdb27e28a5b200043d768d9cc"
"gitHead": "2080b50d4a41c9f746485519d1dc368dd9d9354d"
}

@@ -52,2 +52,3 @@ /**

StrictMode,
forwardRef,
} from './react';

@@ -57,2 +58,5 @@ import RawHTML from './raw-html';

const { Provider, Consumer } = createContext();
const ForwardRef = forwardRef( () => {
return null;
} );

@@ -411,2 +415,5 @@ /**

return renderElement( props.children( context || type._currentValue ), context, legacyContext );
case ForwardRef.$$typeof:
return renderElement( type.render( props ), context, legacyContext );
}

@@ -413,0 +420,0 @@

@@ -15,2 +15,3 @@ /**

StrictMode,
forwardRef,
} from '../react';

@@ -88,2 +89,16 @@ import RawHTML from '../raw-html';

it( 'should render with forwardRef', () => {
const ForwardedComponent = forwardRef( () => {
return <div>test</div>;
} );
const result = serialize(
<ForwardedComponent />
);
expect( result ).toBe(
'<div>test</div>'
);
} );
describe( 'empty attributes', () => {

@@ -90,0 +105,0 @@ it( 'should not render a null attribute value', () => {

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