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

babel-plugin-transform-react-jsx

Package Overview
Dependencies
Maintainers
5
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 7.0.0-alpha.20 to 7.0.0-beta.0

14

lib/index.js

@@ -7,2 +7,3 @@ "use strict";

var t = _ref.types;
var JSX_ANNOTATION_REGEX = /\*?\s*@jsx\s+([^\s]+)/;
var visitor = (0, _babelHelperBuilderReactJsx2.default)({

@@ -25,3 +26,16 @@ 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];
break;
}
}
state.set("jsxIdentifier", function () {

@@ -28,0 +42,0 @@ return id.split(".").map(function (name) {

8

package.json
{
"name": "babel-plugin-transform-react-jsx",
"version": "7.0.0-alpha.20",
"version": "7.0.0-beta.0",
"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.20",
"babel-plugin-syntax-jsx": "7.0.0-alpha.20"
"babel-helper-builder-react-jsx": "7.0.0-beta.0",
"babel-plugin-syntax-jsx": "7.0.0-beta.0"
},
"devDependencies": {
"babel-helper-plugin-test-runner": "7.0.0-alpha.20"
"babel-helper-plugin-test-runner": "7.0.0-beta.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