0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00
Commit graph

6,614 commits

Author SHA1 Message Date
SeanCassiere
7ab6f5694f
docs(router): update link to create-tsrouter-app options 2025-04-25 19:09:37 +12:00
Tanner Linsley
a3c8bfed69 release: v1.117.2 v1.117.2 2025-04-25 05:04:54 +00:00
Sean Cassiere
6fcf118785
fix(router-plugin): do not split the pendingComponent (#4047)
This change, makes it so that the `pendingComponent` is no longer
code-split by default when using the `automaticCodeSplitting` feature.

With this change, both the `loader` and `pendingComponent` will not be
code-split by _default_.
2025-04-25 17:00:34 +12:00
Tanner Linsley
5bf73eaa85 release: v1.117.1 v1.117.1 2025-04-24 21:11:24 +00:00
Manuel Schiller
afdafcf63a
fix: pending component handling for initial load (#4044) 2025-04-24 23:09:47 +02:00
Tanner Linsley
fff694147b
Update overview.md 2025-04-23 15:20:59 -06:00
Tanner Linsley
bbbcb9c6ff
Update overview.md 2025-04-23 13:12:44 -06:00
Tanner Linsley
3cbb3e8492 release: v1.117.0 v1.117.0 2025-04-23 01:48:48 +00:00
Burak Can
1f2642bf28
feat(router-core): allow dynamic ViewTransition types (#4031)
Co-authored-by: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com>
2025-04-23 13:41:23 +12:00
Mikaël Sévigny
431dec2c26
docs(start): remove trailing commas from "build-from-scratch" (#4029)
Co-authored-by: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com>
2025-04-23 13:22:58 +12:00
Tanner Linsley
82eb7b6919 release: v1.116.3 v1.116.3 2025-04-22 23:18:36 +00:00
Christopher Horobin
9cb671967f
fix(start-client-core): fix no implicit any in validators (#4032) 2025-04-23 01:17:13 +02:00
Sean Cassiere
fc1f362e92
test(router-core): cases for interpolatePath and matchPathname (#4024) 2025-04-21 19:54:57 +12:00
Tanner Linsley
231230e22e release: v1.116.2 v1.116.2 2025-04-19 22:34:14 +00:00
Diogo Carmo
2760a56b5d
fix(start-client-core): export OptionalFetcher type (#4001)
Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
2025-04-20 10:27:01 +12:00
Matthew Pirocchi
d57f9f5cc6
docs(start): complete the server functions - mutation example (#3992)
Co-authored-by: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com>
2025-04-17 20:13:24 +12:00
M. Fahad Sohail
afbeb9ea16
docs(router): fix broken links on the file-naming-conventions guide (#3998)
Co-authored-by: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com>
2025-04-17 20:04:46 +12:00
FatahChan
8085969ae3
docs(router): list "parallel routes" in the comparison (#3995) 2025-04-16 09:31:52 +12:00
Eduardo Bouças
afe29b9ad8
examples: Replace redaxios with native fetch (#4000)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-04-15 18:32:35 +02:00
Fitim Bytyqi
9a4af7cf91
docs: improves react/solid quick-start docs (#3994)
addition fixes from #3961
2025-04-15 01:38:51 +02:00
Ezekiel Keator
3cba9989d2
docs: correct start server git link (#3991) 2025-04-14 19:55:22 +02:00
Tanner Linsley
6e183bae4f release: v1.116.1 v1.116.1 2025-04-13 21:20:12 +00:00
Valentin Kunz
4b7212c564
fix(router-plugin): avoid blocking rspack and webpack during build (#3980) 2025-04-14 09:12:45 +12:00
Seongbin Kim
112438412c
docs(router): broken link to "SSR" from "Deferred Data Loading" guide (#3984) 2025-04-14 09:11:21 +12:00
Yiwan
d4a4e96b62
docs(router): add comment for vite plugin order (#3986)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-04-14 09:10:42 +12:00
Tanner Linsley
d843f83057 release: v1.116.0 v1.116.0 2025-04-13 19:59:11 +00:00
Zac Rosenbauer
f0138f80b0
feat(react-router): Export ClientOnly (#3969)
Exposes the `ClientOnly` component for preventing rendering & hydration
errors.

## Background

When you attempt to prevent content from rendering using something like
`typeof document !== 'undefined'` as that type of conditional will cause
hydration errors.

## API

```tsx
import { ClientOnly, createRoute } from '@tanstack/react-router'
import { Charts, FallbackCharts } from './charts-that-break-server-side-rendering'

const Route = createRoute({
  // ... other route options
  path: '/dashboard',
  component: Dashboard,
})

function Dashboard() {
  return (
    <div>
      <p>Dashboard</p>
      <ClientOnly fallback={<FallbackCharts />}>
        <Charts />
      </ClientOnly>
    </div>
  )
}
```

> [!NOTE]
> This component as is (other than I removed the `children` as a
`function`) in production on [joggr.io](https://joggr.io)

---------

Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
Co-authored-by: Ahmed Abdelbaset <A7med3bdulBaset@gmail.com>
Co-authored-by: Birk Skyum <birk.skyum@pm.me>
2025-04-13 10:50:44 +02:00
Tanner Linsley
af455d812f release: v1.115.3 v1.115.3 2025-04-11 17:19:44 +00:00
Fred Brandt
e3404881ae
fix(router-core): accept AnyRouter in redirect (#3979)
The migration to `router-core` made the `redirect` function
more restrictive since it _only_ used the `RegisteredRouter`.

This change makes it so that it accepts `AnyRouter` with it
defaulting to the `RegisteredRouter`. Also, `TTo` also
needed to be changed, since the first generic became optional.
2025-04-11 21:30:40 +12:00
Sean Cassiere
b886a7d357
chore(examples): move the WorkOS content to src (#3972) 2025-04-10 21:14:55 +12:00
Nick Nisi
f9c343e0b5
chore(examples): add TanStack Start WorkOS example (#3966)
Co-authored-by: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com>
2025-04-10 20:41:57 +12:00
Fitim Bytyqi
09e87448b5
docs: devtools installation (#3961)
Edits the way devtools are installed
2025-04-08 13:02:00 +02:00
Tanner Linsley
03a1cb05bb release: v1.115.2 v1.115.2 2025-04-07 20:27:37 +00:00
Denys Isaichenko
9bd706c07e
fix(react-router): fix issue with scroll restoration (#3918)
fixes https://github.com/TanStack/router/issues/3680

It seems like `resolvedLocation` does not always point to the latest
location state in the ref callback; sometimes it points to the previous
location and `onRendered` is not triggered.

Also this fix detaches `onRendered` event from the scroll restoration
feature.
2025-04-07 22:18:25 +02:00
Birk Skyum
7bc761ba8a
chore(examples): Update solid query examples (#3956) 2025-04-07 13:31:42 +02:00
Tanner Linsley
f087b1a7de release: v1.115.1 v1.115.1 2025-04-06 09:21:36 +00:00
Sean Cassiere
6b99e3f85a
refactor(start-client-core): hash the static filenames (#3947)
This change hashes the generated filnames for the JSON blobs that used
for static server function RPC calls.

So it goes from being
```
/__tsr/staticServerFnCache/app_routes_nav_posts_stub_tsx--loadPostServerFn_createServerFn_handler__-this-is-a-post-slug-.json
```

to

```
/__tsr/staticServerFnCache/00e9f7af882c994097f011e6492f2a30e8754bb0.json
```

This has an added benefit of ensuring that the `sha1` hash names are
always the same in character length.
2025-04-06 21:10:43 +12:00
Tanner Linsley
361d32b2d5 release: v1.115.0 v1.115.0 2025-04-06 04:50:31 +00:00
SeanCassiere
e213f1224c
feat: RELEASE_ALL
RELEASE_ALL
2025-04-06 16:49:08 +12:00
Sean Cassiere
ad4ec75e77
chore(examples): change types for input arguments for auth examples (#3946) 2025-04-06 16:46:54 +12:00
Ethan Shumate
a41e7cf6e5
chore(examples): do not use GET to send credentials (#3945)
Fixes #3944

---

Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
2025-04-06 16:41:35 +12:00
Marvin ROGER
30c49e1328
fix(router-core): search parsing of + using URLSearchParams (#3894)
Closes #3655

Switch out our `qss` implementation from its manual solution
over to using `URLSearchParams` for handling
encoding/decoding while still retaining the same interface.

---------

Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
2025-04-06 16:23:28 +12:00
Kid
d1e78bb5f6
docs(router): fix broken link to example in authenticated routes guide (#3937) 2025-04-05 13:53:14 +13:00
renovate[bot]
1bb39b96ad
chore(deps): update dependency vite to v6.1.4 [security] (#3939)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [vite](https://vite.dev)
([source](https://redirect.github.com/vitejs/vite/tree/HEAD/packages/vite))
| [`6.1.3` ->
`6.1.4`](https://renovatebot.com/diffs/npm/vite/6.1.3/6.1.4) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/vite/6.1.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vite/6.1.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vite/6.1.3/6.1.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vite/6.1.3/6.1.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

### GitHub Vulnerability Alerts

####
[CVE-2025-31486](https://redirect.github.com/vitejs/vite/security/advisories/GHSA-xcj6-pq6g-qj4x)

### Summary

The contents of arbitrary files can be returned to the browser.

### Impact

Only apps explicitly exposing the Vite dev server to the network (using
--host or [server.host config
option](https://vitejs.dev/config/server-options.html#server-host)) are
affected..

### Details

#### `.svg`

Requests ending with `.svg` are loaded at this line.

037f801075/packages/vite/src/node/plugins/asset.ts (L285-L290)
By adding `?.svg` with `?.wasm?init` or with `sec-fetch-dest: script`
header, the restriction was able to bypass.

This bypass is only possible if the file is smaller than
[`build.assetsInlineLimit`](https://vite.dev/config/build-options.html#build-assetsinlinelimit)
(default: 4kB) and when using Vite 6.0+.

#### relative paths

The check was applied before the id normalization. This allowed requests
to bypass with relative paths (e.g. `../../`).

### PoC

```bash
npm create vite@latest
cd vite-project/
npm install
npm run dev
```

send request to read `etc/passwd`

```bash
curl 'http://127.0.0.1:5173/etc/passwd?.svg?.wasm?init'
```

```bash
curl 'http://127.0.0.1:5173/@&#8203;fs/x/x/x/vite-project/?/../../../../../etc/passwd?import&?raw'
```

---

### Release Notes

<details>
<summary>vitejs/vite (vite)</summary>

###
[`v6.1.4`](https://redirect.github.com/vitejs/vite/releases/tag/v6.1.4)

[Compare
Source](https://redirect.github.com/vitejs/vite/compare/v6.1.3...v6.1.4)

Please refer to
[CHANGELOG.md](https://redirect.github.com/vitejs/vite/blob/v6.1.4/packages/vite/CHANGELOG.md)
for details.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "" (UTC), Automerge - At any time (no
schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/TanStack/router).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMjcuMyIsInVwZGF0ZWRJblZlciI6IjM5LjIyNy4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-04 21:59:55 +00:00
Tanner Linsley
359d19a115 Update partners 2025-04-04 13:29:24 -06:00
Sean Cassiere
bdcf4f7f89
test(router-generator): check filenames starting with a number (#3935) 2025-04-04 14:18:14 +13:00
TN
37fc7e82df
docs: Update scroll-restoration.md (#3934)
Fix typo
2025-04-04 01:35:41 +02:00
SeanCassiere
03ac067c32
chore(root): switch from fs.rmdir to fs.rm 2025-04-03 15:54:25 +13:00
Tanner Linsley
dfa641dc9c release: v1.114.34 v1.114.34 2025-04-02 22:52:22 +00:00
Sean Cassiere
084d42f48f
fix(react-router): missing Symbol declaration for HMR in root route (#3923)
Similar to #3821, the React Symbol declaration was missing on the
`RootRoute` class.

fixes #3917
2025-04-03 11:49:00 +13:00