pretty-format
Advanced tools
Comparing version 30.0.0-alpha.5 to 30.0.0-alpha.6
@@ -305,12 +305,14 @@ /*! | ||
}; | ||
const isCustomElement = val => { | ||
const tagName = val?.tagName; | ||
return typeof tagName === 'string' && tagName.includes('-') || testHasAttribute(val); | ||
}; | ||
const testNode = val => { | ||
const constructorName = val.constructor.name; | ||
const { | ||
nodeType, | ||
tagName | ||
nodeType | ||
} = val; | ||
const isCustomElement = typeof tagName === 'string' && tagName.includes('-') || testHasAttribute(val); | ||
return nodeType === ELEMENT_NODE && (ELEMENT_REGEXP.test(constructorName) || isCustomElement) || nodeType === TEXT_NODE && constructorName === 'Text' || nodeType === COMMENT_NODE && constructorName === 'Comment' || nodeType === FRAGMENT_NODE && constructorName === 'DocumentFragment'; | ||
return nodeType === ELEMENT_NODE && (ELEMENT_REGEXP.test(constructorName) || isCustomElement(val)) || nodeType === TEXT_NODE && constructorName === 'Text' || nodeType === COMMENT_NODE && constructorName === 'Comment' || nodeType === FRAGMENT_NODE && constructorName === 'DocumentFragment'; | ||
}; | ||
const test = val => val?.constructor?.name && testNode(val); | ||
const test = val => (val?.constructor?.name || isCustomElement(val)) && testNode(val); | ||
exports.test = test; | ||
@@ -620,3 +622,3 @@ function nodeIsText(node) { | ||
var _escapeHTML = _interopRequireDefault(__webpack_require__("./src/plugins/lib/escapeHTML.ts")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } | ||
/** | ||
@@ -706,3 +708,3 @@ * Copyright (c) Meta Platforms, Inc. and affiliates. | ||
var __webpack_exports__ = {}; | ||
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. | ||
// This entry need to be wrapped in an IIFE because it uses a non-standard name for the exports (exports). | ||
(() => { | ||
@@ -726,3 +728,3 @@ var exports = __webpack_exports__; | ||
var _ReactTestComponent = _interopRequireDefault(__webpack_require__("./src/plugins/ReactTestComponent.ts")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } | ||
/** | ||
@@ -729,0 +731,0 @@ * Copyright (c) Meta Platforms, Inc. and affiliates. |
{ | ||
"name": "pretty-format", | ||
"version": "30.0.0-alpha.5", | ||
"version": "30.0.0-alpha.6", | ||
"repository": { | ||
@@ -24,3 +24,3 @@ "type": "git", | ||
"dependencies": { | ||
"@jest/schemas": "30.0.0-alpha.5", | ||
"@jest/schemas": "30.0.0-alpha.6", | ||
"ansi-styles": "^5.0.0", | ||
@@ -34,3 +34,3 @@ "react-is": "^18.0.0" | ||
"immutable": "^4.0.0", | ||
"jest-util": "30.0.0-alpha.5", | ||
"jest-util": "30.0.0-alpha.6", | ||
"react": "18.2.0", | ||
@@ -46,3 +46,3 @@ "react-dom": "18.2.0", | ||
}, | ||
"gitHead": "fa24a3bdd6682978d76799265016fb9d5bff135e" | ||
"gitHead": "ba74b7de1b9cca88daf33f9d1b46bfe2b7f485a5" | ||
} |
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
60259
1121
+ Added@jest/schemas@30.0.0-alpha.6(transitive)
+ Added@sinclair/typebox@0.33.21(transitive)
- Removed@jest/schemas@30.0.0-alpha.5(transitive)
- Removed@sinclair/typebox@0.32.35(transitive)
Updated@jest/schemas@30.0.0-alpha.6