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

babel-plugin-transform-react-jsx-source

Package Overview
Dependencies
Maintainers
3
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-react-jsx-source - npm Package Compare versions

Comparing version 6.1.4 to 6.1.17

25

lib/index.js

@@ -18,4 +18,2 @@

var _Object$keys = require("babel-runtime/core-js/object/keys")["default"];
var _interopRequireDefault = require("babel-runtime/helpers/interop-require-default")["default"];

@@ -34,21 +32,8 @@

function objectToAst(object) {
var properties = _Object$keys(object).map(function (attr) {
var value = undefined;
switch (typeof object[attr]) {
case "number":
value = t.numericLiteral(object[attr]);break;
default:
value = t.stringLiteral(object[attr].toString());
}
return t.objectProperty(t.identifier(attr), value);
});
return t.objectExpression(properties);
}
function makeTrace(fileName, lineNumber) {
return objectToAst({
fileName: fileName,
lineNumber: lineNumber
});
var fileNameLiteral = fileName != null ? t.stringLiteral(fileName) : t.nullLiteral();
var fileLineLiteral = lineNumber != null ? t.numericLiteral(lineNumber) : t.nullLiteral();
var fileNameProperty = t.objectProperty(t.identifier("fileName"), fileNameLiteral);
var lineNumberProperty = t.objectProperty(t.identifier("lineNumber"), fileLineLiteral);
return t.objectExpression([fileNameProperty, lineNumberProperty]);
}

@@ -55,0 +40,0 @@

6

package.json
{
"name": "babel-plugin-transform-react-jsx-source",
"version": "6.1.4",
"version": "6.1.17",
"description": "Add a __source prop to all JSX Elements",

@@ -13,7 +13,7 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-react-jsx-source",

"babel-runtime": "^5.0.0",
"babel-plugin-syntax-jsx": "^6.1.4"
"babel-plugin-syntax-jsx": "^6.1.17"
},
"devDependencies": {
"babel-helper-plugin-test-runner": "^6.1.4"
"babel-helper-plugin-test-runner": "^6.1.17"
}
}
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