ripple 0.3.46 → 0.3.47

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,21 @@
1
1
  # ripple
2
2
 
3
+ ## 0.3.47
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1063](https://github.com/Ripple-TS/ripple/pull/1063)
8
+ [`a960343`](https://github.com/Ripple-TS/ripple/commit/a960343169aee906162211c502b6cc6b74e2a124)
9
+ Thanks [@leonidaz](https://github.com/leonidaz)! - Standardizes compile api
10
+ across all packages, including forcing types to adhere to the standard. Adds
11
+ more debug compile options to the playgrounds.
12
+ - Updated dependencies
13
+ [[`eae7b40`](https://github.com/Ripple-TS/ripple/commit/eae7b4047f4d8cc7a0278fb48ffe630d73a592c6),
14
+ [`b34b95a`](https://github.com/Ripple-TS/ripple/commit/b34b95a808ec801109d1818f4d24ae0bbc00f66b),
15
+ [`a960343`](https://github.com/Ripple-TS/ripple/commit/a960343169aee906162211c502b6cc6b74e2a124)]:
16
+ - @tsrx/ripple@0.0.29
17
+ - ripple@0.3.47
18
+
3
19
  ## 0.3.46
4
20
 
5
21
  ### 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.46",
6
+ "version": "0.3.47",
7
7
  "type": "module",
8
8
  "module": "src/runtime/index-client.js",
9
9
  "main": "src/runtime/index-client.js",
@@ -76,7 +76,7 @@
76
76
  "esm-env": "^1.2.2",
77
77
  "@types/estree": "^1.0.8",
78
78
  "@types/estree-jsx": "^1.0.5",
79
- "@tsrx/ripple": "0.0.28"
79
+ "@tsrx/ripple": "0.0.29"
80
80
  },
81
81
  "devDependencies": {
82
82
  "@types/node": "^24.3.0",
@@ -84,9 +84,9 @@
84
84
  "typescript": "^5.9.3",
85
85
  "@volar/language-core": "~2.4.28",
86
86
  "vscode-languageserver-types": "^3.17.5",
87
- "@tsrx/core": "0.0.26"
87
+ "@tsrx/core": "0.0.27"
88
88
  },
89
89
  "peerDependencies": {
90
- "ripple": "0.3.46"
90
+ "ripple": "0.3.47"
91
91
  }
92
92
  }
@@ -117,7 +117,7 @@ component App() {
117
117
  });
118
118
  }`;
119
119
  const result = compile(source, 'test.tsrx');
120
- const effect_match = result.js.code.match(EFFECT_BODY_REGEX);
120
+ const effect_match = result.code.match(EFFECT_BODY_REGEX);
121
121
  expect(effect_match?.[1].trim()).toMatchSnapshot();
122
122
  });
123
123
 
@@ -136,7 +136,7 @@ component App() {
136
136
  });
137
137
  }`;
138
138
  const result = compile(source, 'test.tsrx');
139
- const effect_match = result.js.code.match(EFFECT_BODY_REGEX);
139
+ const effect_match = result.code.match(EFFECT_BODY_REGEX);
140
140
  expect(effect_match?.[1].trim()).toMatchSnapshot();
141
141
  });
142
142
  });
@@ -14,9 +14,9 @@ describe('compiler > attributes', () => {
14
14
  const result = compile(source, 'test.tsrx', { mode: 'client' });
15
15
 
16
16
  // Should contain properly quoted hyphenated properties and unquoted valid identifiers
17
- expect(result.js.code).toMatch(/'data-scope': "test"/);
18
- expect(result.js.code).toMatch(/'aria-label': "accessible"/);
19
- expect(result.js.code).toMatch(/class: "valid"/);
17
+ expect(result.code).toMatch(/'data-scope': "test"/);
18
+ expect(result.code).toMatch(/'aria-label': "accessible"/);
19
+ expect(result.code).toMatch(/class: "valid"/);
20
20
  });
21
21
 
22
22
  it('generates valid JavaScript for all types of hyphenated attributes', () => {
@@ -33,7 +33,7 @@ describe('compiler > attributes', () => {
33
33
  export default component App() { <Child ${attr} /> }`;
34
34
 
35
35
  const result = compile(source, 'test.tsrx', { mode: 'client' });
36
- expect(result.js.code).toMatch(expected);
36
+ expect(result.code).toMatch(expected);
37
37
  });
38
38
  });
39
39
 
@@ -57,14 +57,14 @@ describe('compiler > attributes', () => {
57
57
  const result = compile(source, 'test.tsrx', { mode: 'client' });
58
58
 
59
59
  // Valid identifiers should not be quoted
60
- expect(result.js.code).toMatch(/validProp: "valid"/);
61
- expect(result.js.code).toMatch(/class: "valid"/);
62
- expect(result.js.code).toMatch(/id: "valid"/);
60
+ expect(result.code).toMatch(/validProp: "valid"/);
61
+ expect(result.code).toMatch(/class: "valid"/);
62
+ expect(result.code).toMatch(/id: "valid"/);
63
63
 
64
64
  // Invalid identifiers (with hyphens) should be quoted
65
- expect(result.js.code).toMatch(/'data-invalid': "invalid"/);
66
- expect(result.js.code).toMatch(/'aria-invalid': "invalid"/);
67
- expect(result.js.code).toMatch(/'custom-prop': "invalid"/);
65
+ expect(result.code).toMatch(/'data-invalid': "invalid"/);
66
+ expect(result.code).toMatch(/'aria-invalid': "invalid"/);
67
+ expect(result.code).toMatch(/'custom-prop': "invalid"/);
68
68
  });
69
69
 
70
70
  it('ensures generated code is syntactically valid JavaScript', () => {
@@ -80,7 +80,7 @@ describe('compiler > attributes', () => {
80
80
  const result = compile(source, 'test.tsrx', { mode: 'client' });
81
81
 
82
82
  // Extract the props object from the generated code and test it's valid JavaScript
83
- const match = result.js.code.match(/Child\([^,]+,\s*(\{[^}]+\})/);
83
+ const match = result.code.match(/Child\([^,]+,\s*(\{[^}]+\})/);
84
84
  expect(match).toBeTruthy();
85
85
 
86
86
  const propsObject = match?.[1];
@@ -65,8 +65,8 @@ describe('compiler > basics', () => {
65
65
  expect(explicit_text.type).toBe('Text');
66
66
  expect((explicit_text.expression as AST.Identifier).name).toBe('markup');
67
67
 
68
- const { js } = compile(source, 'text-directive.tsrx', { mode: 'client' });
69
- expect(js.code).not.toContain('_$_.html');
68
+ const { code } = compile(source, 'text-directive.tsrx', { mode: 'client' });
69
+ expect(code).not.toContain('_$_.html');
70
70
 
71
71
  const invalid_source = `export component App() {
72
72
  const text = 'plain';
@@ -318,10 +318,10 @@ describe('compiler > basics', () => {
318
318
  <div class="b">{'b'}</div>
319
319
  }`;
320
320
 
321
- const { js } = compile(source, 'grouped-count.tsrx', { mode: 'client' });
321
+ const { code } = compile(source, 'grouped-count.tsrx', { mode: 'client' });
322
322
 
323
- expect(js.code).toMatch(/_\$_\.template\(`<!><!>`,\s*1,\s*2\)/);
324
- expect(js.code).not.toMatch(/_\$_\.template\(`<!><!>`,\s*1,\s*3\)/);
323
+ expect(code).toMatch(/_\$_\.template\(`<!><!>`,\s*1,\s*2\)/);
324
+ expect(code).not.toMatch(/_\$_\.template\(`<!><!>`,\s*1,\s*3\)/);
325
325
  });
326
326
 
327
327
  it('emits anonymous component expressions as arrows in client output', () => {
@@ -330,7 +330,7 @@ const Inline = component(props) => {
330
330
  <div>{props.x}</div>
331
331
  }
332
332
  `;
333
- const result = compile(source, 'anonymous-component.tsrx', { mode: 'client' }).js.code;
333
+ const result = compile(source, 'anonymous-component.tsrx', { mode: 'client' }).code;
334
334
 
335
335
  expect(result).toContain('const Inline = (__anchor, props, __block) => {');
336
336
  expect(result).not.toContain('function Inline');
@@ -343,7 +343,7 @@ const Inline = component(props) {
343
343
  <div>{props.x}</div>
344
344
  }
345
345
  `;
346
- const result = compile(source, 'anonymous-component.tsrx', { mode: 'client' }).js.code;
346
+ const result = compile(source, 'anonymous-component.tsrx', { mode: 'client' }).code;
347
347
 
348
348
  expect(result).toContain('const Inline = function (__anchor, props, __block) {');
349
349
  expect(result).not.toContain('function Inline');
@@ -611,12 +611,12 @@ function use_nested({ value: &[count, tracked] }: { value: Tracked<number> }) {
611
611
  return tracked;
612
612
  }
613
613
  `;
614
- const { js } = compile(source, 'tracked-nested-lazy.tsrx', { mode: 'client' });
614
+ const { code } = compile(source, 'tracked-nested-lazy.tsrx', { mode: 'client' });
615
615
 
616
616
  // Nested lazy array should still use tracked tuple fast path from outer annotation.
617
- expect(js.code).toContain('_$_.update(');
618
- expect(js.code).not.toContain('[0]');
619
- expect(js.code).not.toContain('[1]');
617
+ expect(code).toContain('_$_.update(');
618
+ expect(code).not.toContain('[0]');
619
+ expect(code).not.toContain('[1]');
620
620
  });
621
621
 
622
622
  it('uses tracked fast path for nested lazy params at tuple rest positions', () => {
@@ -627,11 +627,11 @@ function use_tuple_rest({ value: [head, &[count, tracked]] }: { value: [number,
627
627
  return tracked;
628
628
  }
629
629
  `;
630
- const { js } = compile(source, 'tracked-nested-lazy-tuple-rest.tsrx', { mode: 'client' });
630
+ const { code } = compile(source, 'tracked-nested-lazy-tuple-rest.tsrx', { mode: 'client' });
631
631
 
632
632
  // Tuple rest element access should resolve to Tracked<number>, not Tracked<number>[].
633
- expect(js.code).toContain('_$_.update(');
634
- expect(js.code).not.toContain('[1]');
633
+ expect(code).toContain('_$_.update(');
634
+ expect(code).not.toContain('[1]');
635
635
  });
636
636
 
637
637
  it('preserves generic type args in interface extends for Volar mappings', () => {
@@ -759,7 +759,7 @@ export component App() {
759
759
  }
760
760
  `;
761
761
 
762
- const result = compile(source, 'test.tsrx', { mode: 'client' }).js.code;
762
+ const result = compile(source, 'test.tsrx', { mode: 'client' }).code;
763
763
 
764
764
  // Template children should take precedence - explicit children prop should be removed
765
765
  expect((result.match(/children:/g) || []).length).toBe(1);
@@ -800,7 +800,7 @@ export component App() {
800
800
  }
801
801
  `;
802
802
  const result = compile(source, 'test.tsrx', { mode: 'client' });
803
- const code = result.js.code;
803
+ const code = result.code;
804
804
 
805
805
  // The constructor's compiled output should contain __block = _$_.scope()
806
806
  expect(code).toContain('__block');
@@ -1016,7 +1016,7 @@ export component App() {
1016
1016
  }
1017
1017
  `;
1018
1018
 
1019
- const result = compile(source, 'test.tsrx', { mode: 'client' }).js.code;
1019
+ const result = compile(source, 'test.tsrx', { mode: 'client' }).code;
1020
1020
 
1021
1021
  expect(result).toContain('_$_.normalize_children(');
1022
1022
  });
@@ -1054,7 +1054,7 @@ export component App() {
1054
1054
  }
1055
1055
  `;
1056
1056
 
1057
- const result = compile(source, 'test.tsrx', { mode: 'client' }).js.code;
1057
+ const result = compile(source, 'test.tsrx', { mode: 'client' }).code;
1058
1058
 
1059
1059
  expect(result).toContain('_$_.spread_props(');
1060
1060
  });
@@ -12,7 +12,7 @@ const errorMap = new ErrorMap();`;
12
12
 
13
13
  const result = compile(source, 'test.tsrx', { mode: 'client' });
14
14
 
15
- expect(result.js.code).toMatchSnapshot();
15
+ expect(result.code).toMatchSnapshot();
16
16
  });
17
17
 
18
18
  it('removes type assertions from function parameters and leaves default values', () => {
@@ -23,7 +23,7 @@ function getString(e: string = 'test') {
23
23
 
24
24
  const result = compile(source, 'test.tsrx', { mode: 'client' });
25
25
 
26
- expect(result.js.code).toMatchSnapshot();
26
+ expect(result.code).toMatchSnapshot();
27
27
  });
28
28
 
29
29
  it('removes class TypeScript syntax from JS output', () => {
@@ -39,8 +39,8 @@ class PrintEvent implements BaseEvent {
39
39
 
40
40
  const result = compile(source, 'test.tsrx', { mode: 'client' });
41
41
 
42
- expect(result.js.code).not.toContain('implements');
43
- expect(result.js.code).toMatchSnapshot();
42
+ expect(result.code).not.toContain('implements');
43
+ expect(result.code).toMatchSnapshot();
44
44
  });
45
45
 
46
46
  it('removes class extends type arguments from JS output', () => {
@@ -52,8 +52,8 @@ class PrintEvent implements BaseEvent {
52
52
 
53
53
  const result = compile(source, 'test.tsrx', { mode: 'client' });
54
54
 
55
- expect(result.js.code).not.toContain('Map<string, string>');
56
- expect(result.js.code).toContain('class StringMap extends Map');
57
- expect(result.js.code).toMatchSnapshot();
55
+ expect(result.code).not.toContain('Map<string, string>');
56
+ expect(result.code).toContain('class StringMap extends Map');
57
+ expect(result.code).toMatchSnapshot();
58
58
  });
59
59
  });
@@ -385,10 +385,10 @@ export component App() {
385
385
  }
386
386
  </style>
387
387
  }`;
388
- const { js } = compile(source, 'test.tsrx');
388
+ const { code } = compile(source, 'test.tsrx');
389
389
 
390
- expect(js.code).toContain('highlight');
391
- expect(js.code).toMatch(/tsrx-[a-z0-9]+/);
390
+ expect(code).toContain('highlight');
391
+ expect(code).toMatch(/tsrx-[a-z0-9]+/);
392
392
  });
393
393
 
394
394
  it('inlines scoped class strings for server mode', () => {
@@ -405,10 +405,10 @@ export component App() {
405
405
  }
406
406
  </style>
407
407
  }`;
408
- const { js } = compile(source, 'test.tsrx', { mode: 'server' });
408
+ const { code } = compile(source, 'test.tsrx', { mode: 'server' });
409
409
 
410
- expect(js.code).toContain('highlight');
411
- expect(js.code).toMatch(/tsrx-[a-z0-9]+/);
410
+ expect(code).toContain('highlight');
411
+ expect(code).toMatch(/tsrx-[a-z0-9]+/);
412
412
  });
413
413
  });
414
414
  });
@@ -59,7 +59,7 @@ describe('for statements', () => {
59
59
  });
60
60
 
61
61
  it('does not emit JavaScript continue in for...of skip callbacks', () => {
62
- const { js } = compile(
62
+ const { code } = compile(
63
63
  `component App() {
64
64
  const items = ['Item 1', '', 'Item 3'];
65
65
  const skipped = [];
@@ -76,9 +76,9 @@ describe('for statements', () => {
76
76
  { mode: 'client' },
77
77
  );
78
78
 
79
- expect(js.code).toContain('skipped.push(\'skip\')');
80
- expect(js.code).not.toContain('continue;');
81
- expect(js.code).not.toMatch(/continue;\s*return/);
79
+ expect(code).toContain('skipped.push(\'skip\')');
80
+ expect(code).not.toContain('continue;');
81
+ expect(code).not.toMatch(/continue;\s*return/);
82
82
  });
83
83
 
84
84
  it('renders a simple dynamic array', () => {
@@ -51,14 +51,14 @@ function buildComponents() {
51
51
  const clientResult = compile(source, file, {
52
52
  mode: 'client',
53
53
  });
54
- writeFileSync(join(clientOutDir, outputName), '// @ts-nocheck\n' + clientResult.js.code);
54
+ writeFileSync(join(clientOutDir, outputName), '// @ts-nocheck\n' + clientResult.code);
55
55
 
56
56
  // Compile for server
57
57
  const serverResult = compile(source, file, {
58
58
  mode: 'server',
59
59
  });
60
60
  // Transform imports to use server runtime
61
- const serverCode = transformServerImports(serverResult.js.code);
61
+ const serverCode = transformServerImports(serverResult.code);
62
62
  writeFileSync(join(serverOutDir, outputName), '// @ts-nocheck\n' + serverCode);
63
63
 
64
64
  console.log(`Compiled ${file} -> client & server`);
@@ -10,7 +10,7 @@ const errorMap = new ErrorMap();`;
10
10
 
11
11
  const result = compile(source, 'test.tsrx', { mode: 'server' });
12
12
 
13
- expect(result.js.code).toMatchSnapshot();
13
+ expect(result.code).toMatchSnapshot();
14
14
  });
15
15
 
16
16
  it('removes type assertions from function parameters and leaves default values', () => {
@@ -21,7 +21,7 @@ function getString(e: string = 'test') {
21
21
 
22
22
  const result = compile(source, 'test.tsrx', { mode: 'server' });
23
23
 
24
- expect(result.js.code).toMatchSnapshot();
24
+ expect(result.code).toMatchSnapshot();
25
25
  });
26
26
 
27
27
  it('removes class TypeScript syntax from JS output', () => {
@@ -37,8 +37,8 @@ class PrintEvent implements BaseEvent {
37
37
 
38
38
  const result = compile(source, 'test.tsrx', { mode: 'server' });
39
39
 
40
- expect(result.js.code).not.toContain('implements');
41
- expect(result.js.code).toMatchSnapshot();
40
+ expect(result.code).not.toContain('implements');
41
+ expect(result.code).toMatchSnapshot();
42
42
  });
43
43
 
44
44
  it('removes class extends type arguments from JS output', () => {
@@ -50,9 +50,9 @@ class PrintEvent implements BaseEvent {
50
50
 
51
51
  const result = compile(source, 'test.tsrx', { mode: 'server' });
52
52
 
53
- expect(result.js.code).not.toContain('Map<string, string>');
54
- expect(result.js.code).toContain('class StringMap extends Map');
55
- expect(result.js.code).toMatchSnapshot();
53
+ expect(result.code).not.toContain('Map<string, string>');
54
+ expect(result.code).toContain('class StringMap extends Map');
55
+ expect(result.code).toMatchSnapshot();
56
56
  });
57
57
 
58
58
  it('throws error for interpolating children as text in SSR mode', () => {
@@ -81,7 +81,7 @@ export default component A() {
81
81
  </div>
82
82
  }`;
83
83
 
84
- const result = compile(source, 'test.tsrx', { mode: 'server' }).js.code;
84
+ const result = compile(source, 'test.tsrx', { mode: 'server' }).code;
85
85
 
86
86
  expect(result).toContain(`_$_.output_push('Hello')`);
87
87
  expect(result).not.toContain(`"Hello";`);
@@ -96,7 +96,7 @@ export default component A() {
96
96
  { mode: 'server' },
97
97
  );
98
98
 
99
- expect(result.js.code).toContain(`_$_.output_push('Rock &amp; "Roll"')`);
99
+ expect(result.code).toContain(`_$_.output_push('Rock &amp; "Roll"')`);
100
100
  });
101
101
 
102
102
  it('emits anonymous component expressions as arrows in SSR output', () => {
@@ -105,7 +105,7 @@ const Inline = component(props) => {
105
105
  <div>{props.x}</div>
106
106
  }
107
107
  `;
108
- const result = compile(source, 'anonymous-component.tsrx', { mode: 'server' }).js.code;
108
+ const result = compile(source, 'anonymous-component.tsrx', { mode: 'server' }).code;
109
109
 
110
110
  expect(result).toContain('const Inline = (props) => {');
111
111
  expect(result).not.toContain('function Inline');
@@ -118,7 +118,7 @@ const Inline = component(props) {
118
118
  <div>{props.x}</div>
119
119
  }
120
120
  `;
121
- const result = compile(source, 'anonymous-component.tsrx', { mode: 'server' }).js.code;
121
+ const result = compile(source, 'anonymous-component.tsrx', { mode: 'server' }).code;
122
122
 
123
123
  expect(result).toContain('const Inline = function (props) {');
124
124
  expect(result).not.toContain('function Inline');
@@ -162,7 +162,7 @@ export component App() {
162
162
  }
163
163
  `;
164
164
 
165
- const result = compile(source, 'test.tsrx', { mode: 'server' }).js.code;
165
+ const result = compile(source, 'test.tsrx', { mode: 'server' }).code;
166
166
 
167
167
  // Template children should take precedence - explicit children prop should be removed
168
168
  expect((result.match(/children:/g) || []).length).toBe(1);
@@ -206,7 +206,7 @@ module server {
206
206
  }`;
207
207
 
208
208
  const result = compile(source, 'test.tsrx', { mode: 'server' });
209
- expect(result.js.code).toMatchSnapshot();
209
+ expect(result.code).toMatchSnapshot();
210
210
  });
211
211
 
212
212
  it('compiles imports from module server as server-call wrappers', () => {
@@ -225,9 +225,9 @@ export component App() {
225
225
  }`;
226
226
 
227
227
  const result = compile(source, 'test.tsrx', { mode: 'server' });
228
- expect(result.js.code).toContain('const getUser = function (...args)');
229
- expect(result.js.code).toContain('return _$_server_$_.loadUser(...args)');
230
- expect(result.js.code).toContain('export const _$_server_$_');
228
+ expect(result.code).toContain('const getUser = function (...args)');
229
+ expect(result.code).toContain('return _$_server_$_.loadUser(...args)');
230
+ expect(result.code).toContain('export const _$_server_$_');
231
231
  });
232
232
 
233
233
  it('throws when server exports are used through direct member access', () => {
@@ -300,7 +300,7 @@ export component App() {
300
300
  }
301
301
  `;
302
302
 
303
- const result = compile(source, 'test.tsrx', { mode: 'server' }).js.code;
303
+ const result = compile(source, 'test.tsrx', { mode: 'server' }).code;
304
304
 
305
305
  expect(result).toContain('_$_.normalize_children(');
306
306
  });
@@ -318,7 +318,7 @@ export component App() {
318
318
  }
319
319
  `;
320
320
 
321
- const result = compile(source, 'test.tsrx', { mode: 'server' }).js.code;
321
+ const result = compile(source, 'test.tsrx', { mode: 'server' }).code;
322
322
 
323
323
  expect(result).toContain('...props');
324
324
  });
@@ -189,8 +189,8 @@ describe('HTML nesting validation', () => {
189
189
 
190
190
  const result = compile(source, 'test.tsrx', { mode: 'server', dev: true });
191
191
 
192
- expect(result.js.code).toContain('_$_.push_element');
193
- expect(result.js.code).toContain('_$_.pop_element');
192
+ expect(result.code).toContain('_$_.push_element');
193
+ expect(result.code).toContain('_$_.pop_element');
194
194
  });
195
195
 
196
196
  it('does not emit push_element or pop_element in non-dev mode', () => {
@@ -204,8 +204,8 @@ describe('HTML nesting validation', () => {
204
204
 
205
205
  const result = compile(source, 'test.tsrx', { mode: 'server', dev: false });
206
206
 
207
- expect(result.js.code).not.toContain('push_element');
208
- expect(result.js.code).not.toContain('pop_element');
207
+ expect(result.code).not.toContain('push_element');
208
+ expect(result.code).not.toContain('pop_element');
209
209
  });
210
210
 
211
211
  it('emits push_element with correct tag name', () => {
@@ -217,7 +217,7 @@ describe('HTML nesting validation', () => {
217
217
 
218
218
  const result = compile(source, 'test.tsrx', { mode: 'server', dev: true });
219
219
 
220
- expect(result.js.code).toContain('_$_.push_element(\'button\'');
220
+ expect(result.code).toContain('_$_.push_element(\'button\'');
221
221
  });
222
222
 
223
223
  it('does not emit push_element for client mode', () => {
@@ -229,7 +229,7 @@ describe('HTML nesting validation', () => {
229
229
 
230
230
  const result = compile(source, 'test.tsrx', { mode: 'client', dev: true });
231
231
 
232
- expect(result.js.code).not.toContain('push_element');
232
+ expect(result.code).not.toContain('push_element');
233
233
  });
234
234
  });
235
235
  });
@@ -275,11 +275,11 @@ export component App() {
275
275
  }
276
276
  </style>
277
277
  }`;
278
- const { js } = compile(source, 'test.tsrx', { mode: 'server' });
278
+ const { code } = compile(source, 'test.tsrx', { mode: 'server' });
279
279
 
280
- expect(js.code).toContain('highlight');
281
- expect(js.code).toMatch(/tsrx-[a-z0-9]+/);
282
- expect(js.code).toContain('register_css');
280
+ expect(code).toContain('highlight');
281
+ expect(code).toMatch(/tsrx-[a-z0-9]+/);
282
+ expect(code).toContain('register_css');
283
283
  });
284
284
 
285
285
  it('includes CSS hash in rendered HTML', async () => {