ripple 0.3.118 → 0.3.119

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
@@ -1,5 +1,14 @@
1
1
  # ripple
2
2
 
3
+ ## 0.3.119
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ [[`2e65731`](https://github.com/Ripple-TS/ripple/commit/2e657313feb272ef7c32510f8e2aa3de1b53ccb3)]:
9
+ - @tsrx/core@0.1.57
10
+ - @tsrx/ripple@0.1.58
11
+
3
12
  ## 0.3.118
4
13
 
5
14
  ### Patch Changes
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Ripple is an elegant TypeScript UI framework",
4
4
  "license": "MIT",
5
5
  "author": "Dominic Gannaway",
6
- "version": "0.3.118",
6
+ "version": "0.3.119",
7
7
  "type": "module",
8
8
  "module": "src/runtime/index-client.js",
9
9
  "main": "src/runtime/index-client.js",
@@ -73,8 +73,8 @@
73
73
  "clsx": "^2.1.1",
74
74
  "devalue": "^5.8.1",
75
75
  "esm-env": "^1.2.2",
76
- "@tsrx/core": "0.1.56",
77
- "@tsrx/ripple": "0.1.57"
76
+ "@tsrx/core": "0.1.57",
77
+ "@tsrx/ripple": "0.1.58"
78
78
  },
79
79
  "devDependencies": {
80
80
  "@types/estree": "^1.0.8",
@@ -1293,12 +1293,21 @@ export function App() @{
1293
1293
  expect(result).toContain('_$_.spread_props(');
1294
1294
  });
1295
1295
 
1296
- it('rejects less-than comparisons at line start in element children without whitespace', () => {
1296
+ it('reads a less-than at line start in element children as literal text', () => {
1297
1297
  const source = `function TodoList({ items }: { items: { text: string }[] }) @{
1298
1298
  <ul>var a = 3
1299
1299
  <4;</ul>
1300
1300
  }`;
1301
-
1302
- expect(() => parse(source, 'App.tsrx')).toThrow();
1301
+ const ast = parse(source, 'App.tsrx');
1302
+ const returned = get_returned_tsrx(ast.body[0]);
1303
+ const ul =
1304
+ returned.type === 'JSXElement'
1305
+ ? returned
1306
+ : returned.children.find((n: AST.Node) => n.type === 'JSXElement') as ESTreeJSX.JSXElement;
1307
+ expect((ul.openingElement.name as ESTreeJSX.JSXIdentifier).name).toBe('ul');
1308
+ expect(ul.children).toHaveLength(1);
1309
+ const text = ul.children[0] as unknown as { type: string; value: string };
1310
+ expect(text.type).toBe('JSXText');
1311
+ expect(text.value).toBe('var a = 3\n\t<4;');
1303
1312
  });
1304
1313
  });