New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-react-require

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-react-require - npm Package Compare versions

Comparing version 2.1.0 to 3.0.0

examples/stateless-component1.jsx

1

lib/index.js

@@ -18,2 +18,3 @@ 'use strict';

Program: {

@@ -20,0 +21,0 @@ enter: function (path, _ref3) {

55

package.json
{
"name": "babel-plugin-react-require",
"version": "2.1.0",
"version": "3.0.0",
"description": "Babel plugin that adds React import declaration if file contains JSX tags.",

@@ -22,5 +22,3 @@ "keywords": [

},
"contributors": [],
"main": "lib",
"bin": {},
"repository": {

@@ -39,33 +37,24 @@ "type": "git",

},
"config": {},
"dependencies": {},
"devDependencies": {
"babel-cli": "^6.2.0",
"babel-core": "^6.3.2",
"babel-eslint": "^5.0.0-beta4",
"babel-plugin-syntax-jsx": "^6.1.18",
"babel-plugin-transform-es2015-block-scoping": "^6.1.18",
"babel-plugin-transform-es2015-classes": "^6.3.2",
"babel-plugin-transform-es2015-destructuring": "^6.1.18",
"babel-plugin-transform-es2015-modules-commonjs": "^6.2.0",
"babel-plugin-transform-es2015-parameters": "^6.1.18",
"babel-plugin-transform-es2015-shorthand-properties": "^6.1.18",
"chai": "^3.4.1",
"eslint": "^1.10.3",
"eslint-config-airbnb": "^2.0.0",
"eslint-plugin-react": "^3.11.2",
"istanbul": "^0.4.1",
"mocha": "^2.3.4",
"mocha-istanbul": "^0.2.0",
"rimraf": "^2.4.4"
},
"peerDependencies": {},
"bundledDependencies": [],
"optionalDependencies": {},
"engines": {},
"os": [],
"cpu": [],
"preferGlobal": false,
"private": false,
"publishConfig": {}
"babel-cli": "^6.16.0",
"babel-core": "^6.17.0",
"babel-eslint": "^7.0.0",
"babel-plugin-syntax-jsx": "^6.13.0",
"babel-plugin-transform-es2015-block-scoping": "^6.15.0",
"babel-plugin-transform-es2015-classes": "^6.14.0",
"babel-plugin-transform-es2015-destructuring": "^6.16.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.16.0",
"babel-plugin-transform-es2015-parameters": "^6.17.0",
"babel-plugin-transform-es2015-shorthand-properties": "^6.8.0",
"chai": "^3.5.0",
"eslint": "^3.7.1",
"eslint-config-airbnb": "^12.0.0",
"eslint-plugin-import": "^1.16.0",
"eslint-plugin-jsx-a11y": "^2.2.3",
"eslint-plugin-react": "^6.4.1",
"istanbul": "^0.4.5",
"mocha": "^3.1.2",
"mocha-istanbul": "^0.3.0",
"rimraf": "^2.5.4"
}
}

@@ -35,3 +35,3 @@ # babel-plugin-react-require

* Install babel-plugin-react-require
* Install `babel-plugin-react-require`.

@@ -42,3 +42,3 @@ ```

* Add react-require into `.babelrc`
* Add `react-require` into `.babelrc`. This plugin should be defined before `transform-es2015-modules-commonjs` plugin because it's using ES2015 modules syntax to import `React` into scope.

@@ -45,0 +45,0 @@ ```json

@@ -1,5 +0,4 @@

'use strict';
const babel = require('babel-core');
const assert = require('assert');
let reactPlugin;

@@ -9,3 +8,3 @@ let transform;

try {
reactPlugin = require('../lib-cov/index').default;
reactPlugin = require('../lib-cov/index').default; // eslint-disable-line import/no-unresolved
} catch (error) {

@@ -17,7 +16,5 @@ reactPlugin = require('../src/index').default;

beforeEach(() => {
transform = (code) => {
return babel.transform(code, {
plugins: ['syntax-jsx', reactPlugin],
}).code;
};
transform = code => babel.transform(code, {
plugins: ['syntax-jsx', reactPlugin],
}).code;
});

@@ -24,0 +21,0 @@

Sorry, the diff of this file is not supported yet

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