react-json-renderer
Advanced tools
Comparing version 0.5.4 to 0.6.0
@@ -5,3 +5,3 @@ var _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; }; | ||
import React, { Children } from 'react'; | ||
import React, { Children, Fragment } from 'react'; | ||
@@ -11,3 +11,6 @@ var defaultProcessMeta = function defaultProcessMeta(tree) { | ||
type = void 0; | ||
if (typeof tree.type === 'string') { | ||
if (tree.type === Fragment) { | ||
name = 'Fragment'; | ||
type = 'fragment'; | ||
} else if (typeof tree.type === 'string') { | ||
name = tree.type; | ||
@@ -25,2 +28,3 @@ type = 'string'; | ||
// flowlint-next-line unclear-type:off | ||
var defaultProcessProps = function defaultProcessProps(props) { | ||
@@ -27,0 +31,0 @@ return props; |
@@ -9,3 +9,3 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
import React, { createElement, PureComponent } from 'react'; | ||
import React, { createElement, Fragment, PureComponent } from 'react'; | ||
@@ -18,2 +18,4 @@ var Fallback = function Fallback() { | ||
var components = params && params.components || {}; | ||
components.Fragment = Fragment; | ||
var fallback = params && params.fallback || Fallback; | ||
@@ -49,2 +51,3 @@ | ||
if (children != null) { | ||
// flowlint-next-line unclear-type:off | ||
;props.children = createChild(children); | ||
@@ -51,0 +54,0 @@ } |
@@ -19,3 +19,6 @@ 'use strict'; | ||
type = void 0; | ||
if (typeof tree.type === 'string') { | ||
if (tree.type === _react.Fragment) { | ||
name = 'Fragment'; | ||
type = 'fragment'; | ||
} else if (typeof tree.type === 'string') { | ||
name = tree.type; | ||
@@ -33,2 +36,3 @@ type = 'string'; | ||
// flowlint-next-line unclear-type:off | ||
var defaultProcessProps = function defaultProcessProps(props) { | ||
@@ -35,0 +39,0 @@ return props; |
@@ -26,2 +26,4 @@ 'use strict'; | ||
var components = params && params.components || {}; | ||
components.Fragment = _react.Fragment; | ||
var fallback = params && params.fallback || Fallback; | ||
@@ -57,2 +59,3 @@ | ||
if (children != null) { | ||
// flowlint-next-line unclear-type:off | ||
;props.children = createChild(children); | ||
@@ -59,0 +62,0 @@ } |
{ | ||
"name": "react-json-renderer", | ||
"version": "0.5.4", | ||
"version": "0.6.0", | ||
"description": "Render React components to a JSON tree", | ||
@@ -9,7 +9,3 @@ "repository": { | ||
}, | ||
"keywords": [ | ||
"react", | ||
"json", | ||
"renderer" | ||
], | ||
"keywords": ["react", "json", "renderer"], | ||
"bugs": { | ||
@@ -30,3 +26,4 @@ "url": "https://github.com/MainframeHQ/react-json-renderer/issues" | ||
"build:flow": "flow-copy-source src lib && flow-copy-source src es", | ||
"build": "npm run build:clean && npm run build:compile && npm run build:flow", | ||
"build": | ||
"npm run build:clean && npm run build:compile && npm run build:flow", | ||
"flow": "flow check", | ||
@@ -40,3 +37,3 @@ "lint": "eslint ./src", | ||
"peerDependencies": { | ||
"react": "^15.0.0 || ^16.0.0" | ||
"react": "^16.2.0" | ||
}, | ||
@@ -46,4 +43,4 @@ "devDependencies": { | ||
"babel-core": "^6.26.0", | ||
"babel-eslint": "^8.0.3", | ||
"babel-jest": "^21.2.0", | ||
"babel-eslint": "^8.1.2", | ||
"babel-jest": "^22.0.4", | ||
"babel-preset-env": "^1.6.1", | ||
@@ -53,11 +50,11 @@ "babel-preset-react": "^6.24.1", | ||
"del-cli": "^1.1.0", | ||
"eslint": "^4.12.1", | ||
"eslint": "^4.14.0", | ||
"eslint-config-prettier": "^2.9.0", | ||
"eslint-plugin-flowtype": "^2.39.1", | ||
"eslint-plugin-prettier": "^2.3.1", | ||
"eslint-plugin-flowtype": "^2.40.1", | ||
"eslint-plugin-prettier": "^2.4.0", | ||
"eslint-plugin-react": "^7.5.1", | ||
"flow-bin": "^0.60.1", | ||
"flow-bin": "^0.69.0", | ||
"flow-copy-source": "^1.2.1", | ||
"jest": "^21.2.1", | ||
"prettier": "^1.9.1", | ||
"jest": "^22.0.4", | ||
"prettier": "^1.9.2", | ||
"react": "^16.2.0", | ||
@@ -64,0 +61,0 @@ "react-test-renderer": "^16.2.0" |
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
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
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
206718
21
312