@sentry/babel-plugin-component-annotate
Advanced tools
Comparing version 2.22.3 to 2.22.4
@@ -180,2 +180,16 @@ 'use strict'; | ||
} | ||
// Handle the case of a function body returning a ternary operation. | ||
// `return (maybeTrue ? '' : (<SubComponent />))` | ||
if (arg.isConditionalExpression()) { | ||
var consequent = arg.get("consequent"); | ||
if (consequent.isJSXFragment() || consequent.isJSXElement()) { | ||
processJSX(annotateFragments, t, consequent, componentName, sourceFileName, attributeNames, ignoredComponents); | ||
} | ||
var alternate = arg.get("alternate"); | ||
if (alternate.isJSXFragment() || alternate.isJSXElement()) { | ||
processJSX(annotateFragments, t, alternate, componentName, sourceFileName, attributeNames, ignoredComponents); | ||
} | ||
return; | ||
} | ||
if (!arg.isJSXFragment() && !arg.isJSXElement()) { | ||
@@ -195,3 +209,2 @@ return; | ||
} | ||
// NOTE: I don't know of a case where `openingElement` would have more than one item, | ||
@@ -198,0 +211,0 @@ // but it's safer to always iterate |
{ | ||
"name": "@sentry/babel-plugin-component-annotate", | ||
"version": "2.22.3", | ||
"version": "2.22.4", | ||
"description": "A Babel plugin that annotates frontend components with additional data to enrich the experience in Sentry", | ||
@@ -59,4 +59,4 @@ "repository": "git://github.com/getsentry/sentry-javascript-bundler-plugins.git", | ||
"@rollup/plugin-node-resolve": "13.3.0", | ||
"@sentry-internal/eslint-config": "2.22.3", | ||
"@sentry-internal/sentry-bundler-plugin-tsconfig": "2.22.3", | ||
"@sentry-internal/eslint-config": "2.22.4", | ||
"@sentry-internal/sentry-bundler-plugin-tsconfig": "2.22.4", | ||
"@swc/core": "^1.2.205", | ||
@@ -63,0 +63,0 @@ "@swc/jest": "^0.2.21", |
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
114440
854