Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
176 commits
Select commit Hold shift + click to select a range
0b02876
copy react-router
birkskyum Jan 26, 2025
60c4b08
update
birkskyum Jan 26, 2025
d13b47a
Move forward branch
birkskyum Jan 29, 2025
7ac11ba
cleanup
birkskyum Jan 29, 2025
4da5d56
cleanup
birkskyum Jan 29, 2025
8dee923
add publish
birkskyum Jan 29, 2025
1971f77
bump deps
birkskyum Jan 29, 2025
7f29d86
ci: apply automated fixes
autofix-ci[bot] Jan 29, 2025
0405759
remove unused imports
birkskyum Jan 30, 2025
79dab5f
ci: apply automated fixes
autofix-ci[bot] Jan 30, 2025
e86c3b8
bump vite plugin solid
birkskyum Jan 30, 2025
2c7ae0a
fix imports
birkskyum Jan 30, 2025
876235f
ci: apply automated fixes
autofix-ci[bot] Jan 30, 2025
6c707c4
remove react lint from solid-router
birkskyum Jan 30, 2025
0db5fb1
fix types
birkskyum Jan 30, 2025
f7e5e48
ci: apply automated fixes
autofix-ci[bot] Jan 30, 2025
5813df2
add structuralSharing
birkskyum Jan 30, 2025
c416034
downgrade vite plugin solid
birkskyum Jan 30, 2025
06589f0
fix scroll-restoration in solid-router
birkskyum Jan 30, 2025
7ccb51e
fix Transitioner
birkskyum Jan 30, 2025
75dfb77
fix imports from ScrollRestoration
birkskyum Jan 30, 2025
0be6e43
Fix tests
brenelz Feb 3, 2025
08aedaf
Fix more tests
brenelz Feb 3, 2025
e195769
Remove the react $$typeof
birkskyum Feb 3, 2025
29ecb75
add accessors to useLocation
birkskyum Feb 3, 2025
d5ca430
add remountDeps
birkskyum Feb 3, 2025
8c896fc
cleanup
birkskyum Feb 3, 2025
8ab2fed
remove tanstack/store
birkskyum Feb 3, 2025
1cc727f
format
birkskyum Feb 3, 2025
a36b380
add missing call to setupScrollRestoration
birkskyum Feb 3, 2025
4df7b43
format
birkskyum Feb 3, 2025
4dbf586
add optional
birkskyum Feb 3, 2025
55ee181
align match component
birkskyum Feb 3, 2025
ff937e2
make matches a signal
birkskyum Feb 3, 2025
b8dd284
Bump vite-plugin-solid to stable
birkskyum Feb 3, 2025
a72c063
add missing await
birkskyum Feb 3, 2025
dc5e382
Fix unknown error
brenelz Feb 5, 2025
baf5744
Tweak the tests to call functions
brenelz Feb 5, 2025
f51a2d4
remove unused vars
birkskyum Feb 5, 2025
43bd95f
fix lockfile
birkskyum Feb 5, 2025
c940f47
Down to 25 failures
brenelz Feb 6, 2025
57aa38e
Remove .only
brenelz Feb 6, 2025
d6303da
call search()
birkskyum Feb 6, 2025
e1af7d7
remove the structuralSharing
birkskyum Feb 6, 2025
b961839
fix type test
birkskyum Feb 6, 2025
fc05003
fix structuralSharing
birkskyum Feb 6, 2025
eb4414e
comment out structured sharing validation check
birkskyum Feb 6, 2025
1b39164
fix typings
birkskyum Feb 6, 2025
26e2e46
comment out serialization check
birkskyum Feb 6, 2025
18a5349
comment out serialization check
birkskyum Feb 6, 2025
3ceee8c
cleanup
birkskyum Feb 6, 2025
cc65a1d
improve types of useSearch
birkskyum Feb 6, 2025
11c09df
fix "when setting search params with 2 parallel navigate calls"
birkskyum Feb 6, 2025
38dd837
fix useParams
birkskyum Feb 6, 2025
767b5d0
fix types
birkskyum Feb 6, 2025
d24d7eb
fix useParams types
birkskyum Feb 6, 2025
ccd4722
cleanup debug
birkskyum Feb 6, 2025
494a3f6
fix link data loader
birkskyum Feb 6, 2025
726a1a8
fix data loader signal
birkskyum Feb 6, 2025
213844d
fix type test
birkskyum Feb 6, 2025
ffcb383
fix Link "when navigating away from a route with a loader that errors"
birkskyum Feb 6, 2025
59214c3
setup on() simpler
birkskyum Feb 6, 2025
06cb37b
make initial load a createRenderEffect
birkskyum Feb 6, 2025
92f3e09
Fix some link preload tests
brenelz Feb 6, 2025
5894886
add accessor to UseMatchRoute
birkskyum Feb 6, 2025
35580f2
fix: when navigating to /posts with a beforeLoad that returns context
birkskyum Feb 6, 2025
29fefc1
call parentRouteId
birkskyum Feb 6, 2025
644e534
re-enable invariant
birkskyum Feb 6, 2025
00e7695
fix when navigating from /invoices to ./invoiceId and the current rou…
birkskyum Feb 6, 2025
6ffb248
use memo for prev
birkskyum Feb 6, 2025
89d26ec
remove browserhistory workaround
birkskyum Feb 6, 2025
eab3858
fix "after a navigation, should have emitted the "onResolved" event …
birkskyum Feb 6, 2025
6e496bc
skip remount
birkskyum Feb 6, 2025
d66f421
add types to useSearch
birkskyum Feb 6, 2025
76392c1
fix search middleware
birkskyum Feb 7, 2025
7f1f8d4
don't need a getter
birkskyum Feb 7, 2025
4715a18
sync react-router
birkskyum Feb 7, 2025
d313072
solid kitchen sink
birkskyum Feb 7, 2025
2e06e05
add the example to workspace
birkskyum Feb 7, 2025
040453c
lockfile
birkskyum Feb 7, 2025
a8aec01
fix solid kitchensink name
birkskyum Feb 7, 2025
98b2f69
add solid template
birkskyum Feb 7, 2025
a8e3ac1
fix example
birkskyum Feb 7, 2025
f11e49c
rename react to solid
birkskyum Feb 7, 2025
e919620
work on example
birkskyum Feb 7, 2025
700e308
add accessor
birkskyum Feb 8, 2025
5cf5a41
fix type tests
birkskyum Feb 8, 2025
06f5846
Fix login in example
brenelz Feb 8, 2025
0285e43
Don't destructure
brenelz Feb 8, 2025
5ec1289
Fix stuck on pending component
brenelz Feb 8, 2025
3972a55
Fix where loaderData can be undefined
brenelz Feb 8, 2025
15a562d
Use For component
brenelz Feb 8, 2025
4e7f483
More refactor
brenelz Feb 8, 2025
5ad5523
Hacky way to fix loading spinner
brenelz Feb 9, 2025
06b3fdc
Fix one test
brenelz Feb 9, 2025
f558f4b
Better MatchRoute fix
brenelz Feb 9, 2025
73cdf4b
Down to 1 failing test
brenelz Feb 11, 2025
4c845d9
Fix last test
brenelz Feb 11, 2025
18d989c
cleanup subscription
birkskyum Feb 11, 2025
15ee599
lockfile
birkskyum Feb 11, 2025
e8a8da4
eslint
birkskyum Feb 11, 2025
265f8ca
ci: apply automated fixes
autofix-ci[bot] Feb 11, 2025
aaca44e
fix router-core lint
birkskyum Feb 11, 2025
4c8e597
ci: apply automated fixes
autofix-ci[bot] Feb 11, 2025
432a040
add e2e test for solid-router
birkskyum Feb 11, 2025
b7ab1d7
ci: apply automated fixes
autofix-ci[bot] Feb 11, 2025
e813e85
work on solid-router e2e suites
birkskyum Feb 11, 2025
e9d8d8a
fix comment
birkskyum Feb 11, 2025
f291fbe
use solid-virtualizer
birkskyum Feb 11, 2025
ad25e72
work on scroll-restauration
birkskyum Feb 11, 2025
f7bd19b
work on scroll-restauration
birkskyum Feb 11, 2025
0ab4849
skip react-specific useRenderEffect test
birkskyum Feb 11, 2025
594d8e8
fix errorcomponent being used before it's defined
birkskyum Feb 11, 2025
2bdaf59
set solid target for esbuild
birkskyum Feb 11, 2025
cb3f0ac
ci: apply automated fixes
autofix-ci[bot] Feb 11, 2025
4bcc59d
fix rspack tests
birkskyum Feb 11, 2025
6198798
fix query tets
birkskyum Feb 11, 2025
6b8a3ae
add solid-query example
birkskyum Feb 11, 2025
00b5ca0
use memo for post
birkskyum Feb 11, 2025
5cb7cfa
add memo for posts
birkskyum Feb 11, 2025
b025942
fix example
birkskyum Feb 11, 2025
22f43e3
add jsx compiler flags to esbuild commands
birkskyum Feb 12, 2025
db0096b
add esbuild-plugin-solid
birkskyum Feb 13, 2025
5c1a3de
Fix some e2e
brenelz Feb 15, 2025
e342ffe
ci: apply automated fixes
autofix-ci[bot] Feb 17, 2025
d9eb1f4
port #3423 from react-router
birkskyum Feb 17, 2025
ad7486e
fix useLoaderData test-d
birkskyum Feb 17, 2025
2c7c66a
add codeSplitGroupings
birkskyum Feb 17, 2025
52188fa
Scroll restoration fixes
brenelz Feb 17, 2025
3d1d02f
add asset headcontent script
birkskyum Feb 18, 2025
9ebe216
remove solid-router-copy
birkskyum Feb 18, 2025
d341127
fix react use
birkskyum Feb 18, 2025
4986327
fix scroll restoration test
birkskyum Feb 18, 2025
bc67d1a
skip esbuild because it's broken in react-router
birkskyum Feb 18, 2025
39a3406
wait for timeout
birkskyum Feb 18, 2025
8e0ba45
update scroll-restoration to match react
birkskyum Feb 18, 2025
cd279ae
useLocation
birkskyum Feb 18, 2025
68f55f9
use on() in match
birkskyum Feb 18, 2025
ff5c5c9
align useNavigate with react-router
birkskyum Feb 18, 2025
b299b9d
lockfile
birkskyum Feb 18, 2025
5c7e81e
fix Scripts test
birkskyum Feb 18, 2025
b902d11
align __TSR_SSR__ in ScriptOnce
birkskyum Feb 18, 2025
7eaf408
remove solid-router from publish
birkskyum Feb 18, 2025
f1a8fe2
lint
birkskyum Feb 18, 2025
c650546
ci: apply automated fixes
autofix-ci[bot] Feb 18, 2025
0ab045a
align to react-router
birkskyum Feb 18, 2025
5713924
port over "exclude props from state equality check to prevent history…
birkskyum Feb 18, 2025
e2ad6b7
align with react-router
birkskyum Feb 18, 2025
8d8cf92
add shouldThrow
birkskyum Feb 18, 2025
01f922c
fix typePrimitives
birkskyum Feb 18, 2025
b067785
use searchStr to fix the search middleware
birkskyum Feb 18, 2025
19dbdb1
ci: add solid-router to the labeler
SeanCassiere Feb 19, 2025
1084bb2
use patched vite-plugin-solid
birkskyum Feb 19, 2025
7cc24d2
eslint
birkskyum Feb 19, 2025
e13227a
ci: apply automated fixes
autofix-ci[bot] Feb 19, 2025
22d24f9
use vite-plugin-solid 2.11.2
birkskyum Feb 19, 2025
b023452
remove only modifier
birkskyum Feb 19, 2025
0da0272
move vite-plugin-solid peerDep to router-plugin
birkskyum Feb 19, 2025
db31eb4
use latest vite-plugin-solid
birkskyum Feb 19, 2025
6745677
move vitest to root
birkskyum Feb 19, 2025
f814b14
bump vitest
birkskyum Feb 19, 2025
4c2e06c
revert onRendered
birkskyum Feb 19, 2025
ac85277
lint
birkskyum Feb 19, 2025
6b5afda
add to publish
birkskyum Feb 19, 2025
5edeeda
fix scroll restoration
birkskyum Feb 19, 2025
953f152
ci: apply automated fixes
autofix-ci[bot] Feb 19, 2025
c7a47c6
align version with react-router
birkskyum Feb 19, 2025
1ef59bb
sync to react-router
birkskyum Feb 20, 2025
51173c8
sync with react-router
birkskyum Feb 20, 2025
5d4195e
sync navigate tests to react-router
birkskyum Feb 20, 2025
1d6f987
ci: apply automated fixes
autofix-ci[bot] Feb 20, 2025
bf9c311
use Solid.JSX.Element consistently instead of Solid.JSXElement
birkskyum Feb 20, 2025
a409043
remove irrelevant test
birkskyum Feb 20, 2025
22434de
ci: apply automated fixes
autofix-ci[bot] Feb 20, 2025
84281d3
remove unused suite
birkskyum Feb 20, 2025
5ce0ae3
lint
birkskyum Feb 20, 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: 2 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
- 'packages/router-vite-plugin/**/*'
'package: server-functions-plugin':
- 'packages/server-functions-plugin/**/*'
'package: solid-router':
- 'packages/solid-router/**/*'
'package: start':
- 'packages/start/**/*'
'package: start-api-routes':
Expand Down
10 changes: 10 additions & 0 deletions e2e/solid-router/basic-esbuild-file-based/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules
.DS_Store
dist
dist-ssr
*.local

/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
24 changes: 24 additions & 0 deletions e2e/solid-router/basic-esbuild-file-based/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
<script src="https://unpkg.com/@tailwindcss/browser@4"></script>
<style type="text/tailwindcss">
html {
color-scheme: light dark;
}
* {
@apply border-gray-200 dark:border-gray-800;
}
body {
@apply bg-gray-50 text-gray-950 dark:bg-gray-900 dark:text-gray-200;
}
</style>
</head>
<body>
<div id="app"></div>
<script type="module" src="/dist/main.js"></script>
</body>
</html>
26 changes: 26 additions & 0 deletions e2e/solid-router/basic-esbuild-file-based/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "tanstack-router-e2e-solid-basic-esbuild-file-based",
"private": true,
"type": "module",
"scripts": {
"dev": "esbuild src/main.tsx --jsx=preserve --jsx-import-source=solid-js --serve=5601 --bundle --outfile=dist/main.js --watch --servedir=.",
"build": "esbuild src/main.tsx --jsx=preserve --jsx-import-source=solid-js --bundle --outfile=dist/main.js && tsc --noEmit",
"serve": "esbuild src/main.tsx --jsx=preserve --jsx-import-source=solid-js --bundle --outfile=dist/main.js --servedir=.",
"start": "dev",
"test:e2e": "playwright test --project=chromium"
},
"dependencies": {
"@tanstack/router-plugin": "workspace:^",
"@tanstack/solid-router": "workspace:^",
"@tanstack/zod-adapter": "workspace:^",
"redaxios": "^0.5.1",
"solid-js": "^1.9.4",
"zod": "^3.24.1"
},
"devDependencies": {
"@playwright/test": "^1.50.1",
"@tanstack/router-e2e-utils": "workspace:^",
"esbuild": "^0.25.0",
"esbuild-plugin-solid": "^0.6.0"
}
}
34 changes: 34 additions & 0 deletions e2e/solid-router/basic-esbuild-file-based/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { defineConfig, devices } from '@playwright/test'
import { derivePort } from '@tanstack/router-e2e-utils'
import packageJson from './package.json' with { type: 'json' }

const PORT = derivePort(packageJson.name)
const baseURL = `http://localhost:${PORT}`
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: './tests',
workers: 1,

reporter: [['line']],

use: {
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL,
},

webServer: {
command: `pnpm run build && pnpm run serve --serve=${PORT}`,
url: baseURL,
reuseExistingServer: !process.env.CI,
stdout: 'pipe',
},

projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
})
13 changes: 13 additions & 0 deletions e2e/solid-router/basic-esbuild-file-based/src/esbuild.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { TanStackRouterEsbuild } from '@tanstack/router-plugin/esbuild'
import { solidPlugin } from 'esbuild-plugin-solid'

export default {
// ...
plugins: [
TanStackRouterEsbuild({
target: 'solid',
autoCodeSplitting: true,
}),
solidPlugin(),
],
}
24 changes: 24 additions & 0 deletions e2e/solid-router/basic-esbuild-file-based/src/main.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { render } from 'solid-js/web'
import { RouterProvider, createRouter } from '@tanstack/solid-router'
import { routeTree } from './routeTree.gen'

// Set up a Router instance
const router = createRouter({
routeTree,
defaultPreload: 'intent',
defaultStaleTime: 5000,
scrollRestoration: true,
})

// Register things for typesafety
declare module '@tanstack/solid-router' {
interface Register {
router: typeof router
}
}

const rootElement = document.getElementById('app')!

if (!rootElement.innerHTML) {
render(() => <RouterProvider router={router} />, rootElement)
}
32 changes: 32 additions & 0 deletions e2e/solid-router/basic-esbuild-file-based/src/posts.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { notFound } from '@tanstack/solid-router'
import axios from 'redaxios'

export type PostType = {
id: string
title: string
body: string
}

export const fetchPost = async (postId: string) => {
console.info(`Fetching post with id ${postId}...`)
await new Promise((r) => setTimeout(r, 500))
const post = await axios
.get<PostType>(`https://jsonplaceholder.typicode.com/posts/${postId}`)
.then((r) => r.data)
.catch((err) => {
if (err.status === 404) {
throw notFound()
}
throw err
})

return post
}

export const fetchPosts = async () => {
console.info('Fetching posts...')
await new Promise((r) => setTimeout(r, 500))
return axios
.get<Array<PostType>>('https://jsonplaceholder.typicode.com/posts')
.then((r) => r.data.slice(0, 10))
}
Loading
Loading