babel-plugin-transform-react-jsx-source
Advanced tools
Comparing version 6.5.0 to 6.8.0
@@ -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" | ||
} | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
3022
0
+ Addedbabel-runtime@6.26.0(transitive)
+ Addedcore-js@2.6.12(transitive)
+ Addedregenerator-runtime@0.11.1(transitive)
- Removedbabel-runtime@5.8.38(transitive)
- Removedcore-js@1.2.7(transitive)
Updatedbabel-runtime@^6.0.0