Skip to content

SolidJS driver for TanStack Start #3522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 124 commits into from
Mar 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
d11d7e0
solid-start-client
birkskyum Feb 22, 2025
0d96c2f
solid-start-server
birkskyum Feb 22, 2025
2559ca4
solid-start-client
birkskyum Feb 22, 2025
75d1a98
tanstack solid-start
birkskyum Feb 22, 2025
ebc6bd1
ci: apply automated fixes
autofix-ci[bot] Feb 22, 2025
5647d66
cleanup
birkskyum Feb 22, 2025
8d0eb6d
fix the workspace
birkskyum Feb 22, 2025
48402b0
class
birkskyum Feb 22, 2025
d9c5987
ci: apply automated fixes
autofix-ci[bot] Feb 22, 2025
8282fff
work on solid-start-client
birkskyum Feb 22, 2025
a71c06b
ci: apply automated fixes
autofix-ci[bot] Feb 22, 2025
7511df6
rebase
birkskyum Feb 23, 2025
4b01d4f
ci: apply automated fixes
autofix-ci[bot] Feb 23, 2025
a377c8e
work on solid basic e2e
birkskyum Feb 24, 2025
b285aa0
ci: apply automated fixes
autofix-ci[bot] Feb 24, 2025
519f23f
use agnostic start
birkskyum Feb 24, 2025
23a18e2
ci: apply automated fixes
autofix-ci[bot] Feb 24, 2025
45ad2c9
fix default config for solid-start
birkskyum Feb 24, 2025
2240789
ci: apply automated fixes
autofix-ci[bot] Feb 24, 2025
6f2a30d
fix syntax
birkskyum Feb 24, 2025
e775037
ci: apply automated fixes
autofix-ci[bot] Feb 24, 2025
d31d7cc
work on agnostic packages
birkskyum Feb 24, 2025
570d4f4
add solid-start-api-routers and solid-start-server-functions-ssr
birkskyum Feb 24, 2025
d018486
fix solid-start-config
birkskyum Feb 24, 2025
b7da45b
improve solid-start/basic e2e
birkskyum Feb 24, 2025
1073de9
ci: apply automated fixes
autofix-ci[bot] Feb 24, 2025
bf40998
fix tailwind
birkskyum Feb 24, 2025
fd12f74
ci: apply automated fixes
autofix-ci[bot] Feb 24, 2025
c42d818
disable react-refresh for solid
birkskyum Feb 24, 2025
b12bca3
solid-refresh
birkskyum Feb 24, 2025
b581141
ci: apply automated fixes
autofix-ci[bot] Feb 24, 2025
4a939df
Fix use hydration
brenelz Feb 24, 2025
544d8be
add back react-refresh
birkskyum Feb 24, 2025
2b80efc
fix malforemd html error
birkskyum Feb 24, 2025
47ea9b1
format
birkskyum Feb 24, 2025
a2ab150
remove head/body
birkskyum Feb 24, 2025
cfd8dca
remove api routes
birkskyum Feb 24, 2025
cb86817
working hydration
birkskyum Feb 25, 2025
8a4dc91
ci: apply automated fixes
autofix-ci[bot] Feb 25, 2025
72575f3
cleanup e2e/solid-start/basic
birkskyum Feb 25, 2025
079a58c
ci: apply automated fixes
autofix-ci[bot] Feb 25, 2025
6b24e23
add separate solid-start-router-manifest
birkskyum Feb 25, 2025
b0f8768
use simple error component
birkskyum Feb 25, 2025
911fd9e
ci: apply automated fixes
autofix-ci[bot] Feb 25, 2025
4ae479b
add vite-plugin-solid
brenelz Feb 25, 2025
fe7ecec
use prev from setCount
birkskyum Feb 25, 2025
4781c0b
ci: apply automated fixes
autofix-ci[bot] Feb 25, 2025
049a4e1
Fix api routes
brenelz Feb 25, 2025
69079ec
add solid-start-plugin
birkskyum Feb 25, 2025
31cf329
import solid-start-plugin
birkskyum Feb 25, 2025
83b0cb9
lock
birkskyum Feb 25, 2025
b278779
revert change
birkskyum Feb 25, 2025
7b1978c
revert change
birkskyum Feb 25, 2025
bea3b28
revert change react-refresh
birkskyum Feb 25, 2025
049a8f7
Fix streaming and hydration
brenelz Feb 25, 2025
f7be374
ci: apply automated fixes
autofix-ci[bot] Feb 25, 2025
3aabdde
add timeout for redirect tests
birkskyum Feb 26, 2025
a03a7ad
ci: apply automated fixes
autofix-ci[bot] Feb 26, 2025
9abcf82
fix: correctly render and hydrate app shell
XiNiHa Feb 26, 2025
ac311d4
remove 3s timeout from redirect test
birkskyum Feb 27, 2025
e01e022
add publish
birkskyum Feb 27, 2025
638a1cd
lockfile
birkskyum Feb 27, 2025
e1b1c33
ci: apply automated fixes
autofix-ci[bot] Feb 27, 2025
cc543a2
lint
birkskyum Feb 27, 2025
a4d2e81
add e2e/solid-start/webbsite
birkskyum Feb 27, 2025
e663e2e
ci: apply automated fixes
autofix-ci[bot] Feb 27, 2025
ec0448f
add server-functions
birkskyum Feb 27, 2025
fbda817
ci: apply automated fixes
autofix-ci[bot] Feb 27, 2025
6d46d7f
work on server functions
birkskyum Feb 27, 2025
d6d3a53
cleanup
birkskyum Feb 27, 2025
04ea5b1
add basic-tsr-config
birkskyum Feb 27, 2025
910ffaf
scroll retoration
birkskyum Feb 27, 2025
fefc097
ci: apply automated fixes
autofix-ci[bot] Feb 27, 2025
c68bef0
update package name
birkskyum Feb 27, 2025
08fef43
solid-start basic auth
birkskyum Feb 27, 2025
cbc23a2
ci: apply automated fixes
autofix-ci[bot] Feb 27, 2025
211c6d2
use createSignal
birkskyum Feb 27, 2025
6f13793
move definition order
birkskyum Feb 27, 2025
836ba2d
fix consistent server-function test
birkskyum Feb 27, 2025
9adea8f
ci: apply automated fixes
autofix-ci[bot] Feb 27, 2025
8c05b73
call multipartResult
birkskyum Feb 27, 2025
4bdddbd
call cookie
birkskyum Feb 27, 2025
5c12c70
ci: apply automated fixes
autofix-ci[bot] Feb 27, 2025
38c524a
test correctly
birkskyum Feb 27, 2025
dbadad9
use dynamic
birkskyum Feb 27, 2025
86c3912
make basic-tsr-config test more strict
birkskyum Feb 27, 2025
61d86c2
defer tsr config issue to react-router
birkskyum Feb 27, 2025
a70239a
use results() in template
birkskyum Feb 27, 2025
3a7d662
fix env-only test
birkskyum Feb 27, 2025
99f2ad6
fix serialize form test
birkskyum Feb 27, 2025
e9724de
fix ref
birkskyum Feb 27, 2025
12ab5e0
fix multipart test
birkskyum Feb 27, 2025
3e25ae5
fix solid router test
Feb 27, 2025
5640f60
fix scroll restoration test
Feb 27, 2025
14b80a1
align with react-start-client
birkskyum Feb 27, 2025
e63f2af
add server function raw response
birkskyum Feb 27, 2025
ff1db2f
fix import
birkskyum Feb 27, 2025
66154b1
fix server function tests
Feb 28, 2025
bc74b98
fix server function tests
Feb 28, 2025
2fbafed
format
birkskyum Feb 28, 2025
9690a30
align with #3605
birkskyum Feb 28, 2025
fe93868
comment out start packages from publish.js
birkskyum Feb 28, 2025
64921f2
add e2e tests for updating meta tags in client side navigation
birkskyum Feb 28, 2025
d782a63
ci: apply automated fixes
autofix-ci[bot] Feb 28, 2025
2953a47
add to nav test
birkskyum Feb 28, 2025
1409a85
ci: apply automated fixes
autofix-ci[bot] Feb 28, 2025
d9ed5d4
Get @solidjs/meta working
brenelz Mar 1, 2025
98baae4
revert changes to react
birkskyum Mar 1, 2025
445aeac
newline
birkskyum Mar 1, 2025
b3712fe
fix lockfile
birkskyum Mar 1, 2025
fac83a0
skip solid-router nav test
birkskyum Mar 1, 2025
6f7e445
format
birkskyum Mar 1, 2025
f190c7a
fix client navigation head tag updates for solid-router
birkskyum Mar 1, 2025
0aa9487
remove .only
birkskyum Mar 1, 2025
17611e0
move ServerHeadContent to solid-start-server
birkskyum Mar 1, 2025
ab1a999
ci: apply automated fixes
autofix-ci[bot] Mar 1, 2025
0a2eac5
remove basic auth
birkskyum Mar 1, 2025
d08a20a
lock
birkskyum Mar 1, 2025
78e3d91
fix version mismatch
Mar 1, 2025
3fe58fb
remove react easlint from solid-start-server
birkskyum Mar 1, 2025
a6bf521
ci: apply automated fixes
autofix-ci[bot] Mar 1, 2025
22e5015
use solid 1.9.5
birkskyum Mar 1, 2025
198a44a
lockfile
birkskyum Mar 1, 2025
910b612
remove --compat from preview release flow
birkskyum Mar 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ jobs:
- name: Build Packages
run: pnpm run build:all
- name: Publish Previews
run: pnpx pkg-pr-new publish --pnpm --compact './packages/*' --template './examples/*/*'
run: pnpx pkg-pr-new publish --pnpm './packages/*' --template './examples/*/*'
22 changes: 22 additions & 0 deletions e2e/solid-start/basic/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
node_modules
package-lock.json
yarn.lock

.DS_Store
.cache
.env
.vercel
.output
.vinxi

/build/
/api/
/server/build
/public/build
.vinxi
# Sentry Config File
.env.sentry-build-plugin
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
4 changes: 4 additions & 0 deletions e2e/solid-start/basic/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/build
**/public
pnpm-lock.yaml
routeTree.gen.ts
12 changes: 12 additions & 0 deletions e2e/solid-start/basic/app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from '@tanstack/solid-start/config'
import tsConfigPaths from 'vite-tsconfig-paths'

export default defineConfig({
vite: {
plugins: [
tsConfigPaths({
projects: ['./tsconfig.json'],
}),
],
},
})
6 changes: 6 additions & 0 deletions e2e/solid-start/basic/app/api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import {
createStartAPIHandler,
defaultAPIFileRouteHandler,
} from '@tanstack/solid-start/api'

export default createStartAPIHandler(defaultAPIFileRouteHandler)
8 changes: 8 additions & 0 deletions e2e/solid-start/basic/app/client.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/// <reference types="vinxi/types/client" />
import { hydrate } from 'solid-js/web'
import { StartClient } from '@tanstack/solid-start'
import { createRouter } from './router'

const router = createRouter()

hydrate(() => <StartClient router={router} />, document.body)
8 changes: 8 additions & 0 deletions e2e/solid-start/basic/app/components/CustomMessage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export function CustomMessage({ message }: { message: string }) {
return (
<div class="py-2">
<div class="italic">This is a custom message:</div>
<p>{message}</p>
</div>
)
}
53 changes: 53 additions & 0 deletions e2e/solid-start/basic/app/components/DefaultCatchBoundary.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import {
ErrorComponent,
Link,
rootRouteId,
useMatch,
useRouter,
} from '@tanstack/solid-router'
import type { ErrorComponentProps } from '@tanstack/solid-router'

export function DefaultCatchBoundary({ error }: ErrorComponentProps) {
const router = useRouter()
const isRoot = useMatch({
strict: false,
select: (state) => state.id === rootRouteId,
})

console.error(error)

return (
<div class="min-w-0 flex-1 p-4 flex flex-col items-center justify-center gap-6">
<ErrorComponent error={error} />
<div class="flex gap-2 items-center flex-wrap">
<button
onClick={() => {
router.invalidate()
}}
class={`px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded text-white uppercase font-extrabold`}
>
Try Again
</button>
{isRoot() ? (
<Link
to="/"
class={`px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded text-white uppercase font-extrabold`}
>
Home
</Link>
) : (
<Link
to="/"
class={`px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded text-white uppercase font-extrabold`}
onClick={(e) => {
e.preventDefault()
window.history.back()
}}
>
Go Back
</Link>
)}
</div>
</div>
)
}
25 changes: 25 additions & 0 deletions e2e/solid-start/basic/app/components/NotFound.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Link } from '@tanstack/solid-router'

export function NotFound({ children }: { children?: any }) {
return (
<div class="space-y-2 p-2" data-testid="default-not-found-component">
<div class="text-gray-600 dark:text-gray-400">
{children || <p>The page you are looking for does not exist.</p>}
</div>
<p class="flex items-center gap-2 flex-wrap">
<button
onClick={() => window.history.back()}
class="bg-emerald-500 text-white px-2 py-1 rounded uppercase font-black text-sm"
>
Go back
</button>
<Link
to="/"
class="bg-cyan-600 text-white px-2 py-1 rounded uppercase font-black text-sm"
>
Start Over
</Link>
</p>
</div>
)
}
5 changes: 5 additions & 0 deletions e2e/solid-start/basic/app/components/PostErrorComponent.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { ErrorComponent, ErrorComponentProps } from '@tanstack/solid-router'

export function PostErrorComponent({ error }: ErrorComponentProps) {
return <ErrorComponent error={error} />
}
26 changes: 26 additions & 0 deletions e2e/solid-start/basic/app/components/RedirectOnClick.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { useServerFn } from '@tanstack/solid-start'
import { throwRedirect } from './throwRedirect'

interface RedirectOnClickProps {
target: 'internal' | 'external'
reloadDocument?: boolean
externalHost?: string
}

export function RedirectOnClick({
target,
reloadDocument,
externalHost,
}: RedirectOnClickProps) {
const execute = useServerFn(throwRedirect)
return (
<button
data-testid="redirect-on-click"
onClick={() =>
execute({ data: { target, reloadDocument, externalHost } })
}
>
click me
</button>
)
}
5 changes: 5 additions & 0 deletions e2e/solid-start/basic/app/components/UserErrorComponent.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { ErrorComponent, ErrorComponentProps } from '@tanstack/solid-router'

export function UserErrorComponent({ error }: ErrorComponentProps) {
return <ErrorComponent error={error} />
}
20 changes: 20 additions & 0 deletions e2e/solid-start/basic/app/components/throwRedirect.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { redirect } from '@tanstack/solid-router'
import { createServerFn } from '@tanstack/solid-start'

export const throwRedirect = createServerFn()
.validator(
(opts: {
target: 'internal' | 'external'
reloadDocument?: boolean
externalHost?: string
}) => opts,
)
.handler((ctx) => {
if (ctx.data.target === 'internal') {
throw redirect({ to: '/posts', reloadDocument: ctx.data.reloadDocument })
}
const href = ctx.data.externalHost ?? 'http://example.com'
throw redirect({
href,
})
})
Loading