gtx-cli 1.2.13 → 1.2.14

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.
@@ -40,6 +40,9 @@ function addGTIdentifierToSyntaxTree(tree, startingIndex = 0) {
40
40
  key: (0, getVariableName_1.getVariableName)({ ...props, 'data-_gt': generaltranslation }, 'datetime'),
41
41
  };
42
42
  }
43
+ else if (type === "" || type === "React.Fragment") {
44
+ generaltranslation.transformation = 'fragment';
45
+ }
43
46
  if (type === 'Plural') {
44
47
  generaltranslation.transformation = 'plural';
45
48
  const pluralBranches = Object.entries(props).reduce((acc, [branchName, branch]) => {
@@ -151,11 +151,16 @@ function buildJSXTree(importAliases, node, unwrappedExpressions, updates, errors
151
151
  const children = node.children
152
152
  .map((child) => buildJSXTree(importAliases, child, unwrappedExpressions, updates, errors, file))
153
153
  .filter((child) => child !== null && child !== '');
154
+ const props = {};
155
+ if (children.length === 1) {
156
+ props.children = children[0];
157
+ }
158
+ else if (children.length > 1) {
159
+ props.children = children;
160
+ }
154
161
  return {
155
162
  type: '',
156
- props: {
157
- children: children.length === 1 ? children[0] : children,
158
- },
163
+ props,
159
164
  };
160
165
  }
161
166
  // If it's a string literal (standalone)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gtx-cli",
3
- "version": "1.2.13",
3
+ "version": "1.2.14",
4
4
  "main": "dist/index.js",
5
5
  "bin": "dist/main.js",
6
6
  "scripts": {