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

@babel/helper-builder-react-jsx

Package Overview
Dependencies
Maintainers
4
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/helper-builder-react-jsx - npm Package Compare versions

Comparing version 7.18.6 to 7.19.0

lib/index.js.map

39

lib/index.js

@@ -53,3 +53,3 @@ "use strict";

exit(path, state) {
const callExpr = buildElementCall(path, state.file);
const callExpr = buildElementCall(path, state);

@@ -68,3 +68,3 @@ if (callExpr) {

const callExpr = buildFragmentCall(path, state.file);
const callExpr = buildFragmentCall(path, state);

@@ -85,2 +85,3 @@ if (callExpr) {

node.type = "Identifier";
return node;
} else {

@@ -131,4 +132,4 @@ return stringLiteral(node.name);

function buildElementCall(path, file) {
if (opts.filter && !opts.filter(path.node, file)) return;
function buildElementCall(path, pass) {
if (opts.filter && !opts.filter(path.node, pass)) return;
const openingPath = path.get("openingElement");

@@ -154,3 +155,3 @@ path.node.children = react.buildChildren(path.node);

if (opts.pre) {
opts.pre(state, file);
opts.pre(state, pass);
}

@@ -163,3 +164,3 @@

{
convertedAttributes = buildOpeningElementAttributes(attribs, file);
convertedAttributes = buildOpeningElementAttributes(attribs, pass);
}

@@ -173,3 +174,3 @@ } else {

if (opts.post) {
opts.post(state, file);
opts.post(state, pass);
}

@@ -188,3 +189,3 @@

function buildOpeningElementAttributes(attribs, file) {
function buildOpeningElementAttributes(attribs, pass) {
let _props = [];

@@ -194,3 +195,3 @@ const objs = [];

useSpread = false
} = file.opts;
} = pass.opts;

@@ -201,3 +202,3 @@ if (typeof useSpread !== "boolean") {

const useBuiltIns = file.opts.useBuiltIns || false;
const useBuiltIns = pass.opts.useBuiltIns || false;

@@ -238,3 +239,3 @@ if (typeof useBuiltIns !== "boolean") {

const helper = useBuiltIns ? memberExpression(identifier("Object"), identifier("assign")) : file.addHelper("extends");
const helper = useBuiltIns ? memberExpression(identifier("Object"), identifier("assign")) : pass.addHelper("extends");
convertedAttribs = callExpression(helper, objs);

@@ -246,8 +247,8 @@ }

function buildFragmentCall(path, file) {
if (opts.filter && !opts.filter(path.node, file)) return;
function buildFragmentCall(path, pass) {
if (opts.filter && !opts.filter(path.node, pass)) return;
path.node.children = react.buildChildren(path.node);
const args = [];
const tagName = null;
const tagExpr = file.get("jsxFragIdentifier")();
const tagExpr = pass.get("jsxFragIdentifier")();
const state = {

@@ -261,3 +262,3 @@ tagExpr: tagExpr,

if (opts.pre) {
opts.pre(state, file);
opts.pre(state, pass);
}

@@ -268,6 +269,6 @@

if (opts.post) {
opts.post(state, file);
opts.post(state, pass);
}
file.set("usedFragment", true);
pass.set("usedFragment", true);
const call = state.call || callExpression(state.callee, args);

@@ -277,2 +278,4 @@ if (state.pure) (0, _helperAnnotateAsPure.default)(call);

}
}
}
//# sourceMappingURL=index.js.map
{
"name": "@babel/helper-builder-react-jsx",
"version": "7.18.6",
"version": "7.19.0",
"description": "Helper function to build react jsx",

@@ -18,6 +18,7 @@ "repository": {

"@babel/helper-annotate-as-pure": "^7.18.6",
"@babel/types": "^7.18.6"
"@babel/types": "^7.19.0"
},
"devDependencies": {
"@babel/traverse": "^7.18.6"
"@babel/core": "^7.19.0",
"@babel/traverse": "^7.19.0"
},

@@ -24,0 +25,0 @@ "engines": {

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