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
6
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.5.0 to 6.8.0

46

lib/index.js

@@ -0,25 +1,7 @@

/*istanbul ignore next*/"use strict";
/**
* This adds {fileName, lineNumber} annotations to React component definitions
* and to jsx tag literals.
*
*
* == JSX Literals ==
*
* <sometag />
*
* becomes:
*
* var __jsxFileName = 'this/file.js';
* <sometag __source={{fileName: __jsxFileName, lineNumber: 10}}/>
*/
"use strict";
exports.__esModule = true;
var TRACE_ID = "__source";
var FILE_NAME_VAR = "_jsxFileName";
exports["default"] = function (_ref) {
var t = _ref.types;
exports.default = function ( /*istanbul ignore next*/_ref) {
/*istanbul ignore next*/var t = _ref.types;

@@ -33,3 +15,3 @@ function makeTrace(fileNameIdentifier, lineNumber) {

var visitor = {
var visitor = { /*istanbul ignore next*/
JSXOpeningElement: function JSXOpeningElement(path, state) {

@@ -58,2 +40,20 @@ if (!state.fileNameIdentifier) {

module.exports = exports["default"];
/**
* This adds {fileName, lineNumber} annotations to React component definitions
* and to jsx tag literals.
*
*
* == JSX Literals ==
*
* <sometag />
*
* becomes:
*
* var __jsxFileName = 'this/file.js';
* <sometag __source={{fileName: __jsxFileName, lineNumber: 10}}/>
*/
var TRACE_ID = "__source";
var FILE_NAME_VAR = "_jsxFileName";
/*istanbul ignore next*/module.exports = exports["default"];
{
"name": "babel-plugin-transform-react-jsx-source",
"version": "6.5.0",
"version": "6.8.0",
"description": "Add a __source prop to all JSX Elements",

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

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