Socket
Socket
Sign inDemoInstall

babel-plugin-estrela

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-estrela - npm Package Compare versions

Comparing version 0.11.0 to 0.11.1

1

dist/shared/tags.d.ts
export declare const selfClosingTags: string[];
export declare const svgTags: string[];

2

dist/transforms/jsx.transform.d.ts
import { NodePath, types as t } from '@babel/core';
declare type JSXElement = t.JSXElement | t.JSXFragment;
type JSXElement = t.JSXElement | t.JSXFragment;
export declare function transformJSX(path: NodePath<JSXElement>): void;
export {};

@@ -5,3 +5,3 @@ {

"author": "Eduardo Rosostolato",
"version": "0.11.0",
"version": "0.11.1",
"license": "MIT",

@@ -8,0 +8,0 @@ "main": "dist/index.js",

@@ -17,1 +17,23 @@ export const selfClosingTags = [

];
export const svgTags = [
'circle',
'clipPath',
'defs',
'ellipse',
'filter',
'g',
'line',
'linearGradient',
'mask',
'path',
'pattern',
'polygon',
'polyline',
'radialGradient',
'rect',
'stop',
'symbol',
'text',
'use',
];
import { NodePath, types as t } from '@babel/core';
import { selfClosingTags } from '../shared/tags';
import { selfClosingTags, svgTags } from '../shared/tags';
import { State } from '../types';

@@ -147,2 +147,3 @@

const isSelfClosing = !tagIsComponent && selfClosingTags.includes(tagName);
const isSvgTemplate = svgTags.includes(tagName) && result.index === 1;
const props = getAttrProps(path);

@@ -166,8 +167,7 @@

} else {
if (isSvgTemplate) {
result.template += `<svg _tmpl_>`;
}
result.template += `<${tagName}`;
if (tagName === 'slot') {
result.props[result.index] = props;
} else {
handleAttributes(props, result);
}
handleAttributes(props, result);
result.template += isSelfClosing ? '/>' : '>';

@@ -210,6 +210,2 @@ if (!isSelfClosing) {

if (prop === 'slot') {
continue;
}
if (prop === 'class' && typeof value === 'string') {

@@ -216,0 +212,0 @@ klass += ` ${value}`;

Sorry, the diff of this file is too big to display

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