enzyme-to-json
Advanced tools
Comparing version 3.4.0 to 3.4.1
{ | ||
"version": "3.4.0", | ||
"version": "3.4.1", | ||
"name": "enzyme-to-json", | ||
@@ -46,3 +46,3 @@ "description": "convert enzyme wrapper to a format compatible with Jest snapshot", | ||
"peerDependencies": { | ||
"enzyme": "^3.4.0" | ||
"enzyme": "^3.10.0" | ||
}, | ||
@@ -58,4 +58,4 @@ "devDependencies": { | ||
"codecov": "^2.3.0", | ||
"enzyme": "^3.7.0", | ||
"enzyme-adapter-react-16": "^1.7.0", | ||
"enzyme": "^3.10.0", | ||
"enzyme-adapter-react-16": "^1.14.0", | ||
"eslint": "^4.8.0", | ||
@@ -62,0 +62,0 @@ "eslint-config-prettier": "^2.6.0", |
@@ -24,3 +24,3 @@ 'use strict'; | ||
if (child.type === 'tag') { | ||
if (['tag', 'script'].includes(child.type)) { | ||
return (0, _utils.applyMap)({ | ||
@@ -27,0 +27,0 @@ node: child, |
10
utils.js
@@ -61,17 +61,17 @@ 'use strict'; | ||
var extractTypeName = exports.extractTypeName = function extractTypeName(node) { | ||
var name = (0, _Debug.typeName)(node); | ||
var type = node.type.$$typeof; | ||
if (name.$$typeof === Symbol.for('react.lazy')) { | ||
if (type === Symbol.for('react.lazy')) { | ||
return 'React.Lazy'; | ||
} | ||
if (name.$$typeof === Symbol.for('react.memo')) { | ||
if (type === Symbol.for('react.memo')) { | ||
return 'React.Memo'; | ||
} | ||
if (name === Symbol.for('react.suspense')) { | ||
if (node.type === Symbol.for('react.suspense')) { | ||
return 'React.Suspense'; | ||
} | ||
return name; | ||
return (0, _Debug.typeName)(node); | ||
}; |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
49554
0