@patternfly/ast-helpers
Advanced tools
Comparing version 0.2.6 to 0.2.7
@@ -6,2 +6,13 @@ # Change Log | ||
## 0.2.7 (2022-01-21) | ||
### Bug Fixes | ||
* TS to JS conversion - Ability to spread props within components & allow for empty tags (fragments) ([#2816](https://github.com/patternfly/patternfly-org/issues/2816)) ([96e9706](https://github.com/patternfly/patternfly-org/commit/96e9706b05bb5ce18434a7a0dfde67c4e535e749)) | ||
## 0.2.6 (2022-01-19) | ||
@@ -8,0 +19,0 @@ |
{ | ||
"name": "@patternfly/ast-helpers", | ||
"description": "Acorn AST helpers for working with live code", | ||
"version": "0.2.6", | ||
"version": "0.2.7", | ||
"author": "Red Hat", | ||
@@ -18,3 +18,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "4b710ed718d4fa8a93e78aceb70a109b216547d7" | ||
"gitHead": "e11143989942e35c69e4da2c0c94e20d33787718" | ||
} |
@@ -215,9 +215,9 @@ const { generate, baseGenerator } = require('astring'); | ||
JSXSpreadAttribute(node, state) { | ||
state.write('...('); | ||
state.write(' {...'); | ||
if (node.argument.type === 'LogicalExpression') { | ||
state.write('('); | ||
this[node.argument.left.type](node.argument.left, state); | ||
state.write(' '); | ||
state.write(node.argument.operator); | ||
state.write(' '); | ||
state.write(` ${node.argument.operator} `); | ||
this[node.argument.right.type](node.argument.right, state); | ||
state.write(')'); | ||
} | ||
@@ -227,3 +227,3 @@ else { | ||
} | ||
state.write(')'); | ||
state.write('}'); | ||
}, | ||
@@ -237,5 +237,14 @@ // <></> | ||
type: 'JSXIdentifier', | ||
name: 'React.Fragment' | ||
} | ||
name: '' | ||
}, | ||
type: 'JSXOpeningElement' | ||
}, | ||
closingElement: { | ||
attributes: [], | ||
name: { | ||
type: 'JSXIdentifier', | ||
name: '' | ||
}, | ||
type: 'JSXClosingElement' | ||
}, | ||
children: node.children | ||
@@ -242,0 +251,0 @@ }, state); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
47602
1317