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

@vue/babel-plugin-jsx

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vue/babel-plugin-jsx - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

18

dist/transform-vue-jsx.js

@@ -79,9 +79,13 @@ "use strict";

*/
VNodeChild = isComponent ? t.objectExpression([
!!children.length && t.objectProperty(t.identifier('default'), t.arrowFunctionExpression([], t.arrayExpression(utils_1.buildIIFE(path, children)))),
...(slots ? (t.isObjectExpression(slots)
? slots.properties
: [t.spreadElement(slots)]) : []),
optimize && t.objectProperty(t.identifier('_'), t.numericLiteral(slotFlag)),
].filter(Boolean)) : t.arrayExpression(children);
VNodeChild = isComponent
? children.length
? t.objectExpression([
!!children.length && t.objectProperty(t.identifier('default'), t.arrowFunctionExpression([], t.arrayExpression(utils_1.buildIIFE(path, children)))),
...(slots ? (t.isObjectExpression(slots)
? slots.properties
: [t.spreadElement(slots)]) : []),
optimize && t.objectProperty(t.identifier('_'), t.numericLiteral(slotFlag)),
].filter(Boolean))
: slots
: t.arrayExpression(children);
}

@@ -88,0 +92,0 @@ else if (children.length === 1) {

{
"name": "@vue/babel-plugin-jsx",
"version": "1.0.4",
"version": "1.0.5",
"description": "Babel plugin for Vue 3.0 JSX",

@@ -5,0 +5,0 @@ "author": "Amour1688 <lcz_1996@foxmail.com>",

@@ -241,6 +241,13 @@ # Babel Plugin JSX for Vue 3.0

```jsx
const A = (props, { slots }) => (
<>
<h1>{ slots.default ? slots.default() : 'foo' }</h1>
<h2>{ slots.bar?.() }</h2>
</>
);
const App = {
setup() {
const slots = {
foo: () => <span>B</span>,
bar: () => <span>B</span>,
};

@@ -261,3 +268,3 @@ return () => (

default: () => <div>A</div>,
foo: () => <span>B</span>,
bar: () => <span>B</span>,
};

@@ -276,3 +283,3 @@ return () => <A v-slots={slots} />;

default: () => <div>A</div>,
foo: () => <span>B</span>,
bar: () => <span>B</span>,
}}

@@ -336,2 +343,13 @@ </A>

</td>
<td align="center">
<a target="_blank" href="https://github.com/leezng/vue-json-pretty">
<img
height="32"
style="vertical-align: -0.32em; margin-right: 8px;"
src="https://raw.githubusercontent.com/leezng/vue-json-pretty/master/static/logo.svg"
/>
<br>
<strong>Vue Json Pretty</strong>
</a>
</td>
</tr>

@@ -338,0 +356,0 @@ </tbody>

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