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.2.9 to 0.2.10

7

lib/index.js

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

var types = options.types;
var pathClassDeclaration = options.pathClassDeclaration;

@@ -176,2 +175,3 @@

var ref = void 0;
var pathClassDeclaration = options.pathClassDeclaration;

@@ -187,3 +187,8 @@ if (!pathClassDeclaration.isClassExpression() && pathClassDeclaration.node.id) {

// We need to append the node at the parent level in this case.
if (pathClassDeclaration.parentPath.isExportDeclaration()) {
pathClassDeclaration = pathClassDeclaration.parentPath;
}
pathClassDeclaration.insertAfter(node);
path.remove();

@@ -190,0 +195,0 @@ break;

33

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

@@ -32,22 +32,25 @@ "main": "lib/index.js",

},
"files": [
"lib",
"src"
],
"dependencies": {},
"devDependencies": {
"babel-cli": "^6.11.4",
"babel-core": "^6.11.4",
"babel-eslint": "^6.1.2",
"babel-preset-es2015": "^6.6.0",
"babel-cli": "^6.14.0",
"babel-core": "^6.14.0",
"babel-eslint": "^7.0.0",
"babel-preset-es2015": "^6.14.0",
"babel-preset-react": "^6.11.1",
"babel-preset-stage-0": "^6.3.13",
"eslint": "^3.1.1",
"eslint-plugin-flowtype": "^2.4.0",
"eslint-plugin-mocha": "^4.2.0",
"eslint-plugin-react": "^5.0.1",
"flow": "^0.2.3",
"flow-bin": "^0.30.0",
"glob": "^7.0.5",
"istanbul": "^0.4.2",
"eslint": "^3.4.0",
"eslint-plugin-flowtype": "^2.14.3",
"eslint-plugin-import": "^2.0.0",
"eslint-plugin-mocha": "^4.5.1",
"eslint-plugin-react": "^6.2.0",
"flow-bin": "^0.33.0",
"glob": "^7.0.6",
"minimist": "^1.2.0",
"mocha": "^2.2.5",
"nodemon": "^1.10.0"
"mocha": "^3.0.2",
"nodemon": "^1.10.2"
}
}

@@ -46,3 +46,2 @@ // @flow weak

types,
pathClassDeclaration,
} = options;

@@ -68,2 +67,3 @@

let ref;
let pathClassDeclaration = options.pathClassDeclaration;

@@ -81,3 +81,8 @@ if (!pathClassDeclaration.isClassExpression() && pathClassDeclaration.node.id) {

// We need to append the node at the parent level in this case.
if (pathClassDeclaration.parentPath.isExportDeclaration()) {
pathClassDeclaration = pathClassDeclaration.parentPath;
}
pathClassDeclaration.insertAfter(node);
path.remove();

@@ -84,0 +89,0 @@ break;

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