babel-plugin-transform-react-jsx
Advanced tools
Comparing version 7.0.0-alpha.19 to 7.0.0-alpha.20
@@ -7,3 +7,2 @@ "use strict"; | ||
var t = _ref.types; | ||
var JSX_ANNOTATION_REGEX = /\*?\s*@jsx\s+([^\s]+)/; | ||
var visitor = (0, _babelHelperBuilderReactJsx2.default)({ | ||
@@ -26,21 +25,3 @@ pre: function pre(state) { | ||
visitor.Program = function (path, state) { | ||
var file = state.file; | ||
var id = state.opts.pragma || "React.createElement"; | ||
var _arr = file.ast.comments; | ||
for (var _i = 0; _i < _arr.length; _i++) { | ||
var comment = _arr[_i]; | ||
var matches = JSX_ANNOTATION_REGEX.exec(comment.value); | ||
if (matches) { | ||
id = matches[1]; | ||
if (id === "React.DOM") { | ||
throw file.buildCodeFrameError(comment, "The @jsx React.DOM pragma has been deprecated as of React 0.12"); | ||
} else { | ||
break; | ||
} | ||
} | ||
} | ||
state.set("jsxIdentifier", function () { | ||
@@ -47,0 +28,0 @@ return id.split(".").map(function (name) { |
{ | ||
"name": "babel-plugin-transform-react-jsx", | ||
"version": "7.0.0-alpha.19", | ||
"version": "7.0.0-alpha.20", | ||
"description": "Turn JSX into React function calls", | ||
@@ -12,8 +12,8 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-react-jsx", | ||
"dependencies": { | ||
"babel-helper-builder-react-jsx": "7.0.0-alpha.19", | ||
"babel-plugin-syntax-jsx": "7.0.0-alpha.19" | ||
"babel-helper-builder-react-jsx": "7.0.0-alpha.20", | ||
"babel-plugin-syntax-jsx": "7.0.0-alpha.20" | ||
}, | ||
"devDependencies": { | ||
"babel-helper-plugin-test-runner": "7.0.0-alpha.19" | ||
"babel-helper-plugin-test-runner": "7.0.0-alpha.20" | ||
} | ||
} |
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
3905
42
+ Addedbabel-helper-builder-react-jsx@7.0.0-alpha.20(transitive)
+ Addedbabel-plugin-syntax-jsx@7.0.0-alpha.20(transitive)
+ Addedbabel-types@7.0.0-alpha.20(transitive)
- Removedbabel-helper-builder-react-jsx@7.0.0-alpha.19(transitive)
- Removedbabel-plugin-syntax-jsx@7.0.0-alpha.19(transitive)
- Removedbabel-types@7.0.0-alpha.19(transitive)