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

babel-plugin-react-test-id

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-react-test-id - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

9

lib/index.js

@@ -7,3 +7,3 @@ 'use strict';

exports.default = babelPluginReactTestID;
var DEFAULT_PROPS = ['testID'];
const DEFAULT_PROPS = ['testID'];

@@ -14,7 +14,4 @@ function babelPluginReactTestID() {

visitor: {
JSXAttribute(path, _ref) {
var _ref$opts$props = _ref.opts.props,
props = _ref$opts$props === undefined ? DEFAULT_PROPS : _ref$opts$props;
var name = path.get('name');
JSXAttribute(path, { opts: { props = DEFAULT_PROPS } }) {
const name = path.get('name');
if (name.isJSXIdentifier() && props.includes(name.node.name)) {

@@ -21,0 +18,0 @@ path.remove();

{
"name": "babel-plugin-react-test-id",
"description": "Babel plugin for dealing with test ID props in your components",
"version": "1.0.1",
"version": "1.0.2",
"main": "lib/index.js",

@@ -32,3 +32,3 @@ "author": "Chris Sauve <chrismsauve@gmail.com>",

{
"version": "4.0.0"
"version": "6.0.0"
}

@@ -35,0 +35,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