ripple 0.3.89 → 0.3.90
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 +15 -0
- package/package.json +3 -3
- package/tests/client/compiler/compiler.basic.test.tsrx +16 -14
- package/tests/hydration/compiled/client/basic.js +147 -147
- package/tests/hydration/compiled/client/composite.js +10 -10
- package/tests/hydration/compiled/client/events.js +59 -56
- package/tests/hydration/compiled/client/for.js +316 -311
- package/tests/hydration/compiled/client/head.js +37 -37
- package/tests/hydration/compiled/client/hmr.js +12 -12
- package/tests/hydration/compiled/client/html-in-template.js +16 -16
- package/tests/hydration/compiled/client/html.js +365 -365
- package/tests/hydration/compiled/client/if-children.js +85 -85
- package/tests/hydration/compiled/client/if-fragment-controlflow.js +62 -62
- package/tests/hydration/compiled/client/if.js +47 -47
- package/tests/hydration/compiled/client/mixed-control-flow.js +58 -58
- package/tests/hydration/compiled/client/nested-control-flow.js +177 -177
- package/tests/hydration/compiled/client/portal.js +30 -30
- package/tests/hydration/compiled/client/reactivity.js +28 -28
- package/tests/hydration/compiled/client/switch.js +46 -46
- package/tests/hydration/compiled/client/track-async-serialization.js +70 -70
- package/tests/hydration/compiled/client/try.js +35 -35
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# ripple
|
|
2
2
|
|
|
3
|
+
## 0.3.90
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1324](https://github.com/Ripple-TS/ripple/pull/1324)
|
|
8
|
+
[`1925074`](https://github.com/Ripple-TS/ripple/commit/1925074254de0e61c8578cba136c50ea8f89cd35)
|
|
9
|
+
Thanks [@leonidaz](https://github.com/leonidaz)! - Minor adjustments from
|
|
10
|
+
@tsrx/ripple moving to the parser ast vs its own version
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
[[`1925074`](https://github.com/Ripple-TS/ripple/commit/1925074254de0e61c8578cba136c50ea8f89cd35),
|
|
14
|
+
[`1925074`](https://github.com/Ripple-TS/ripple/commit/1925074254de0e61c8578cba136c50ea8f89cd35)]:
|
|
15
|
+
- @tsrx/core@0.1.36
|
|
16
|
+
- @tsrx/ripple@0.1.37
|
|
17
|
+
|
|
3
18
|
## 0.3.89
|
|
4
19
|
|
|
5
20
|
### 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.
|
|
6
|
+
"version": "0.3.90",
|
|
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.
|
|
77
|
-
"@tsrx/ripple": "0.1.
|
|
76
|
+
"@tsrx/core": "0.1.36",
|
|
77
|
+
"@tsrx/ripple": "0.1.37"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@types/estree": "^1.0.8",
|
|
@@ -69,15 +69,15 @@ describe('compiler > basics', () => {
|
|
|
69
69
|
|
|
70
70
|
const ast = parse(source, 'App.tsrx');
|
|
71
71
|
const elements = get_returned_tsrx(ast.body[0]).children.filter(
|
|
72
|
-
(node: AST.Node) => node.type === '
|
|
73
|
-
) as
|
|
72
|
+
(node: AST.Node) => node.type === 'JSXElement',
|
|
73
|
+
) as ESTreeJSX.JSXElement[];
|
|
74
74
|
const expression = elements[0].children[0] as AST.Node & { expression: AST.Expression };
|
|
75
75
|
const text_expression = elements[1].children[0] as AST.Node & { expression: AST.Expression };
|
|
76
76
|
|
|
77
77
|
expect(elements).toHaveLength(2);
|
|
78
|
-
expect(expression.type).toBe('
|
|
78
|
+
expect(expression.type).toBe('JSXExpressionContainer');
|
|
79
79
|
expect((expression.expression as AST.Identifier).name).toBe('markup');
|
|
80
|
-
expect(text_expression.type).toBe('
|
|
80
|
+
expect(text_expression.type).toBe('JSXExpressionContainer');
|
|
81
81
|
expect((text_expression.expression as AST.Identifier).name).toBe('text');
|
|
82
82
|
|
|
83
83
|
const { code } = compile(source, 'text-directive.tsrx', { mode: 'client' });
|
|
@@ -196,8 +196,8 @@ export function App() @{
|
|
|
196
196
|
const declaration = (ast.body[0] as AST.VariableDeclaration).declarations[0];
|
|
197
197
|
const fragment = get_returned_tsrx(declaration) as any;
|
|
198
198
|
|
|
199
|
-
expect(fragment.type).toBe('
|
|
200
|
-
expect(fragment.children[0].type).toBe('
|
|
199
|
+
expect(fragment.type).toBe('JSXFragment');
|
|
200
|
+
expect(fragment.children[0].type).toBe('JSXExpressionContainer');
|
|
201
201
|
expect(fragment.children[0].expression.type).toBe('TemplateLiteral');
|
|
202
202
|
expect(fragment.children[0].expression.quasis[0].value.raw).toBe('333');
|
|
203
203
|
});
|
|
@@ -215,9 +215,9 @@ export function App() @{
|
|
|
215
215
|
const declaration = (ast.body[0] as AST.VariableDeclaration).declarations[0];
|
|
216
216
|
const fragment = get_returned_tsrx(declaration) as any;
|
|
217
217
|
|
|
218
|
-
expect(fragment.type).toBe('
|
|
218
|
+
expect(fragment.type).toBe('JSXFragment');
|
|
219
219
|
expect(fragment.children.map((child: any) => child.type)).toEqual([
|
|
220
|
-
'
|
|
220
|
+
'JSXExpressionContainer',
|
|
221
221
|
]);
|
|
222
222
|
expect(fragment.children[0].expression.type).toBe('TemplateLiteral');
|
|
223
223
|
expect(fragment.children[0].expression.quasis[0].value.raw).toContain('<b></b>');
|
|
@@ -1229,14 +1229,16 @@ export function App() @{
|
|
|
1229
1229
|
const ast = parse(source, 'App.tsrx');
|
|
1230
1230
|
const returned = get_returned_tsrx(ast.body[0]);
|
|
1231
1231
|
const ul =
|
|
1232
|
-
returned.type === '
|
|
1232
|
+
returned.type === 'JSXElement'
|
|
1233
1233
|
? returned
|
|
1234
|
-
: returned.children.find(
|
|
1235
|
-
|
|
1234
|
+
: returned.children.find(
|
|
1235
|
+
(n: AST.Node) => n.type === 'JSXElement',
|
|
1236
|
+
) as ESTreeJSX.JSXElement;
|
|
1237
|
+
expect((ul.openingElement.name as ESTreeJSX.JSXIdentifier).name).toBe('ul');
|
|
1236
1238
|
expect(ul.children).toHaveLength(1);
|
|
1237
|
-
const text = ul.children[0] as unknown as { type: string;
|
|
1238
|
-
expect(text.type).toBe('
|
|
1239
|
-
expect(text.
|
|
1239
|
+
const text = ul.children[0] as unknown as { type: string; value: string };
|
|
1240
|
+
expect(text.type).toBe('JSXText');
|
|
1241
|
+
expect(text.value).toBe('var a = "123"');
|
|
1240
1242
|
expect((ul.closingElement?.name as ESTreeJSX.JSXIdentifier)?.name).toBe('ul');
|
|
1241
1243
|
},
|
|
1242
1244
|
);
|