@patternfly/ast-helpers 0.2.6 → 0.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,41 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 0.2.10 (2022-01-26)
7
+
8
+ **Note:** Version bump only for package @patternfly/ast-helpers
9
+
10
+
11
+
12
+
13
+
14
+ ## 0.2.9 (2022-01-25)
15
+
16
+ **Note:** Version bump only for package @patternfly/ast-helpers
17
+
18
+
19
+
20
+
21
+
22
+ ## 0.2.8 (2022-01-24)
23
+
24
+ **Note:** Version bump only for package @patternfly/ast-helpers
25
+
26
+
27
+
28
+
29
+
30
+ ## 0.2.7 (2022-01-21)
31
+
32
+
33
+ ### Bug Fixes
34
+
35
+ * 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))
36
+
37
+
38
+
39
+
40
+
6
41
  ## 0.2.6 (2022-01-19)
7
42
 
8
43
  **Note:** Version bump only for package @patternfly/ast-helpers
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@patternfly/ast-helpers",
3
3
  "description": "Acorn AST helpers for working with live code",
4
- "version": "0.2.6",
4
+ "version": "0.2.10",
5
5
  "author": "Red Hat",
6
6
  "license": "MIT",
7
7
  "publishConfig": {
@@ -15,5 +15,5 @@
15
15
  "acorn-static-class-features": "^1.0.0",
16
16
  "astring": "^1.7.5"
17
17
  },
18
- "gitHead": "4b710ed718d4fa8a93e78aceb70a109b216547d7"
18
+ "gitHead": "8deca1e920c80f8842a3110808459ada006f66ec"
19
19
  }
package/stringify.js CHANGED
@@ -212,18 +212,18 @@ const es2017GeneratorJSX = {
212
212
  },
213
213
  // {...props}
214
214
  JSXSpreadAttribute(node, state) {
215
- state.write('...(');
215
+ state.write(' {...');
216
216
  if (node.argument.type === 'LogicalExpression') {
217
+ state.write('(');
217
218
  this[node.argument.left.type](node.argument.left, state);
218
- state.write(' ');
219
- state.write(node.argument.operator);
220
- state.write(' ');
219
+ state.write(` ${node.argument.operator} `);
221
220
  this[node.argument.right.type](node.argument.right, state);
221
+ state.write(')');
222
222
  }
223
223
  else {
224
224
  this[node.argument.type](node.argument, state);
225
225
  }
226
- state.write(')');
226
+ state.write('}');
227
227
  },
228
228
  // <></>
229
229
  JSXFragment(node, state) {
@@ -232,8 +232,17 @@ const es2017GeneratorJSX = {
232
232
  attributes: [],
233
233
  name: {
234
234
  type: 'JSXIdentifier',
235
- name: 'React.Fragment'
236
- }
235
+ name: ''
236
+ },
237
+ type: 'JSXOpeningElement'
238
+ },
239
+ closingElement: {
240
+ attributes: [],
241
+ name: {
242
+ type: 'JSXIdentifier',
243
+ name: ''
244
+ },
245
+ type: 'JSXClosingElement'
237
246
  },
238
247
  children: node.children
239
248
  }, state);