File tree Expand file tree Collapse file tree 15 files changed +455
-385
lines changed Expand file tree Collapse file tree 15 files changed +455
-385
lines changed Original file line number Diff line number Diff line change @@ -20,14 +20,12 @@ jobs:
20
20
- uses : actions/checkout@v4
21
21
22
22
- uses : pnpm/action-setup@v3
23
- with :
24
- # https://github.com/pnpm/pnpm/issues/8953
25
- version : 9.15.3
26
23
27
- - name : Use Node.js 20
24
+ - name : Use Node.js from .nvmrc
28
25
uses : actions/setup-node@v4
29
26
with :
30
- node-version : 20
27
+ node-version-file : " .nvmrc"
28
+ registry-url : " https://registry.npmjs.org"
31
29
cache : " pnpm"
32
30
33
31
- name : Install dependencies
Original file line number Diff line number Diff line change @@ -16,15 +16,13 @@ jobs:
16
16
uses : actions/checkout@v3
17
17
18
18
- uses : pnpm/action-setup@v3
19
- with :
20
- # https://github.com/pnpm/pnpm/issues/8953
21
- version : 9.15.3
22
19
23
20
- name : Use Node.js from nvmrc
24
21
uses : actions/setup-node@v4
25
22
with :
26
23
node-version-file : " .nvmrc"
27
24
registry-url : " https://registry.npmjs.org"
25
+ cache : " pnpm"
28
26
29
27
- name : Install Dependencies
30
28
run : pnpm i --frozen-lockfile
Original file line number Diff line number Diff line change 10
10
jobs :
11
11
tests :
12
12
name : " 🧪 Tests"
13
- runs-on : ubuntu-22 .04
13
+ runs-on : ubuntu-24 .04
14
14
steps :
15
15
- uses : actions/checkout@v3
16
16
- uses : pnpm/action-setup@v4
17
+
18
+ - name : Use Node.js from nvmrc
19
+ uses : actions/setup-node@v4
17
20
with :
18
- # https://github.com/pnpm/pnpm/issues/8953
19
- version : 9.15.3
21
+ node-version-file : " .nvmrc"
22
+ registry-url : " https://registry.npmjs.org"
23
+ cache : " pnpm"
20
24
21
25
- name : Install project dependencies
22
26
run : pnpm i
@@ -36,18 +40,22 @@ jobs:
36
40
working-directory : .
37
41
runTests : false
38
42
39
- - name : E2E Firefox
43
+ - name : E2E Chromium
40
44
uses : cypress-io/github-action@v6
41
45
with :
42
46
install : false
43
47
working-directory : packages/tests
44
- start : pnpm start
45
- browser : firefox
48
+ start : pnpm start --host 127.0.0.1 --port 3000
49
+ wait-on : ' http://127.0.0.1:3000'
50
+ browser : chromium
46
51
47
- - name : E2E Chromium
52
+ - name : E2E Firefox
48
53
uses : cypress-io/github-action@v6
49
54
with :
50
55
install : false
51
56
working-directory : packages/tests
52
- start : pnpm start
53
- browser : chromium
57
+ start : pnpm start --host 127.0.0.1 --port 3000
58
+ wait-on : ' http://127.0.0.1:3000'
59
+ browser : firefox
60
+
61
+
Original file line number Diff line number Diff line change @@ -46,14 +46,12 @@ jobs:
46
46
- uses : actions/checkout@v4
47
47
48
48
- uses : pnpm/action-setup@v3
49
- with :
50
- # https://github.com/pnpm/pnpm/issues/8953
51
- version : 9.15.3
52
49
53
- - name : Use Node.js ${{ matrix.node-version }}
50
+ - name : Use Node.js from .nvmrc
54
51
uses : actions/setup-node@v4
55
52
with :
56
- node-version : ${{ matrix.node-version }}
53
+ node-version-file : " .nvmrc"
54
+ registry-url : " https://registry.npmjs.org"
57
55
cache : " pnpm"
58
56
59
57
- name : Install dependencies
Original file line number Diff line number Diff line change 40
40
},
41
41
"dependencies" : {},
42
42
"engines" : {
43
- "pnpm" : " ^9.0.0"
44
- }
43
+ "pnpm" : " ^9.15.0" ,
44
+ "node" : " >=22"
45
+ },
46
+ "packageManager" : " pnpm@9.15.0"
45
47
}
Original file line number Diff line number Diff line change 1
1
import { defineConfig } from "@solidjs/start/config" ;
2
2
3
- export default defineConfig ( {
4
- ssr : false
5
- } ) ;
3
+ export default defineConfig ( ) ;
Original file line number Diff line number Diff line change
1
+ describe ( "hydration" , ( ) => {
2
+ it ( "should have interactivity" , ( ) => {
3
+ cy . visit ( "/" ) ;
4
+ cy . get ( "#counter-button" ) . trigger ( "click" )
5
+ cy . get ( "#counter-output" ) . contains ( "1" ) ;
6
+ } ) ;
7
+
8
+ it ( "should have isServer false in the client" , ( ) => {
9
+ cy . visit ( "/client-only" ) ;
10
+ cy . get ( "#server-fn-test" ) . contains ( '{"clientWithIsServer":false}' ) ;
11
+ } ) ;
12
+ } ) ;
Original file line number Diff line number Diff line change 1
1
describe ( "server-function" , ( ) => {
2
- it ( "should have isServer false in the client" , ( ) => {
3
- cy . visit ( "/" ) ;
4
- cy . get ( "#server-fn-test" ) . contains ( '{"clientWithIsServer":false}' ) ;
5
- } ) ;
6
2
it ( "should have isServer true in the server function - nested" , ( ) => {
7
3
cy . visit ( "/is-server-nested" ) ;
8
4
cy . get ( "#server-fn-test" ) . contains ( '{"serverFnWithIsServer":true}' ) ;
Original file line number Diff line number Diff line change 23
23
"@vitest/ui" : " 3.0.5" ,
24
24
"jsdom" : " ^25.0.1" ,
25
25
"lodash" : " ^4.17.21" ,
26
- "solid-js" : " ^1.9.4 " ,
26
+ "solid-js" : " ^1.9.5 " ,
27
27
"vinxi" : " ^0.5.3" ,
28
- "vite-plugin-solid" : " ^2.11.1 " ,
28
+ "vite-plugin-solid" : " ^2.11.6 " ,
29
29
"vitest" : " 3.0.5"
30
30
},
31
31
"engines" : {
Original file line number Diff line number Diff line change @@ -12,7 +12,10 @@ export default function App() {
12
12
< Title > SolidStart - Basic</ Title >
13
13
< ul >
14
14
< li >
15
- < a href = "/" > Client</ a >
15
+ < a href = "/" > Basic</ a >
16
+ </ li >
17
+ < li >
18
+ < a href = "/client-only" > Client-Only</ a >
16
19
</ li >
17
20
< li >
18
21
< a href = "/is-server-nested" > isserver (nested)</ a >
Original file line number Diff line number Diff line change
1
+ import { createSignal } from "solid-js" ;
2
+
3
+ export default function App ( ) {
4
+ const [ counter , setCounter ] = createSignal < number > ( 0 ) ;
5
+
6
+ return (
7
+ < main >
8
+ < span id = "counter-output" > { counter ( ) } </ span >
9
+ < button id = "counter-button" onClick = { ( ) => setCounter ( n => n + 1 ) } > one more</ button >
10
+ </ main >
11
+ ) ;
12
+ }
Original file line number Diff line number Diff line change
1
+ import { createSignal } from "solid-js" ;
2
+ import { isServer } from "solid-js/web" ;
3
+
4
+
5
+ export default function ClientOnlyComponent ( ) {
6
+ const [ output , setOutput ] = createSignal < { clientWithIsServer ?: boolean ; } > ( { } ) ;
7
+
8
+ setOutput ( prev => ( { ...prev , clientWithIsServer : isServer } ) ) ;
9
+
10
+ return (
11
+ < main >
12
+ < span id = "server-fn-test" > { JSON . stringify ( output ( ) ) } </ span >
13
+ </ main > )
14
+ }
Original file line number Diff line number Diff line change
1
+ import { clientOnly } from "@solidjs/start" ;
2
+
3
+ const Component = clientOnly ( ( ) => import ( './_component' ) )
4
+
5
+ export default function App ( ) {
6
+
7
+ return (
8
+ < >
9
+ < Component />
10
+ </ >
11
+ ) ;
12
+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments