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

babel-plugin-react-component-data-attribute

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-react-component-data-attribute - npm Package Compare versions

Comparing version 0.5.0 to 0.6.0

8

lib/index.js

@@ -62,5 +62,11 @@ 'use strict';

function shouldProcessPotentialComponent(path, name, state) {
if (!path.getFunctionParent().isProgram()) {
// Babel 7 returns null instead of Program from path.getFunctionParent if parent is not a function
if (typeof path.scope.getProgramParent === 'function') {
if (!path.scope.getProgramParent()) {
return false;
}
} else if (!path.getFunctionParent() || !path.getFunctionParent().isProgram()) {
return false;
}
if (path.parentPath.isAssignmentExpression()) {

@@ -67,0 +73,0 @@ return false;

2

package.json
{
"name": "babel-plugin-react-component-data-attribute",
"description": "Babel plugin to add a data attribute containing its component’s name to the top-level DOM node",
"version": "0.5.0",
"version": "0.6.0",
"main": "lib/index.js",

@@ -6,0 +6,0 @@ "author": "Chris Sauve <chrismsauve@gmail.com>",

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