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

babel-plugin-transform-react-remove-prop-types

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-react-remove-prop-types - npm Package Compare versions

Comparing version 0.4.3 to 0.4.4

16

lib/index.js

@@ -33,2 +33,11 @@ 'use strict';

if (state.opts.plugins) {
var pluginsVisitors = state.opts.plugins.map(function (pluginName) {
var plugin = require(pluginName);
return plugin({ template: template, types: types }).visitor;
});
programPath.traverse(_babelTraverse.visitors.merge(pluginsVisitors));
}
// On program start, do an explicit traversal up front for this plugin.

@@ -146,2 +155,4 @@ programPath.traverse({

var _babelTraverse = require('babel-traverse');
var _isAnnotatedForRemoval = require('./isAnnotatedForRemoval');

@@ -161,2 +172,5 @@

// weak
/* eslint-disable global-require, import/no-dynamic-require */
function isPathReactClass(path) {

@@ -174,3 +188,3 @@ if (path.matchesPattern('React.Component') || path.matchesPattern('React.PureComponent')) {

return false;
} // weak
}

@@ -177,0 +191,0 @@ function isReactClass(superClass, scope) {

8

package.json
{
"name": "babel-plugin-transform-react-remove-prop-types",
"version": "0.4.3",
"version": "0.4.4",
"description": "Remove unnecessary React propTypes from the production build",

@@ -32,3 +32,5 @@ "main": "lib/index.js",

},
"dependencies": {},
"dependencies": {
"babel-traverse": "^6.24.1"
},
"devDependencies": {

@@ -38,2 +40,4 @@ "babel-cli": "^6.22.2",

"babel-eslint": "^7.1.1",
"babel-plugin-flow-react-proptypes": "^2.1.3",
"babel-plugin-transform-flow-strip-types": "^6.22.0",
"babel-preset-es2015": "^6.22.0",

@@ -40,0 +44,0 @@ "babel-preset-react": "^6.22.0",

// @flow weak
/* eslint-disable global-require, import/no-dynamic-require */
import { visitors } from 'babel-traverse';
import isAnnotatedForRemoval from './isAnnotatedForRemoval';

@@ -77,2 +79,11 @@ import isStatelessComponent from './isStatelessComponent';

if (state.opts.plugins) {
const pluginsVisitors = state.opts.plugins.map((pluginName) => {
const plugin = require(pluginName);
return plugin({ template, types }).visitor;
});
programPath.traverse(visitors.merge(pluginsVisitors));
}
// On program start, do an explicit traversal up front for this plugin.

@@ -79,0 +90,0 @@ programPath.traverse({

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