0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-18 19:34:24 +00:00
Commit graph

6,488 commits

Author SHA1 Message Date
Tanner Linsley
4a2bb0412d release: v1.35.3 v1.35.3 2024-06-06 09:52:19 +00:00
Dominik Dorfmeister
e82984b9fc
fix: Revert "fix: from was being ignored when the pathname included params or a pathless route (#1703)" (#1716)
This reverts commit 56a3100e7d.

# Conflicts:
#	packages/react-router/tests/link.test.tsx
2024-06-06 11:50:22 +02:00
Tanner Linsley
3bd1cdfaca release: v1.35.2 v1.35.2 2024-06-06 08:49:08 +00:00
Dominik Dorfmeister
d7395adb4d
fix: ensure that trailingSlashes don't break path matching (#1711)
* fix: ensure that trailingSlashes don't break path matching

* chore: this wasn't on purpose

* fix: make `removeTrailingSlash` account for basepath

* test: tests for basepath

* refactor: consolidate how we handle basepath replacing

* test: matrix tests with different basepaths for utils

* refactor: revert basereplace
2024-06-06 10:47:31 +02:00
Sean Cassiere
9bb0148cef
test(react-router): check the availability of the route context after a redirect on the first load (#1710)
* test(react-router): check in component-land about redirects

* test(react-router): do the same for the beforeLoad and loader spots

* chore: whoops

* test: make sure the pathnames are checked
2024-06-06 02:25:31 +12:00
Sean Cassiere
07a6fdeb96
test(react-router): check the route context at beforeLoad, loader, and component (#1708)
* test(react-router): initial tests for checking the route context

* chore: some comments so I know where I'm at

* test(react-router): make sure that context modification works

* chore: remove the element ids to simplify things

* chore: use simple naming for this stuff

* test(react-router): making sur the mock fn is only called once
2024-06-06 01:34:16 +12:00
Tanner Linsley
295a5c3595 release: v1.35.1 v1.35.1 2024-06-04 19:07:32 +00:00
Christopher Horobin
56a3100e7d
fix: from was being ignored when the pathname included params or a pathless route (#1703)
* fix: `from` was being ignored when the pathname included params or a pathless route

* tests: change description of test to match current location

* fix: apply changes to useNavigate and redirect, also add more tests

* chore: inline looseRoutesByPath
2024-06-04 20:57:08 +02:00
Tanner Linsley
cde4ca98af release: v1.35.0 v1.35.0 2024-06-04 18:45:05 +00:00
Christopher Horobin
b79690b2af
feat: merge unions for search and params for Link when from and to are loose (#1696)
* feat: merge unions for `search` and `params` `Link` is not strict

* chore: remove union to intersection
2024-06-04 20:43:36 +02:00
Tanner Linsley
341af21952 release: v1.34.9 v1.34.9 2024-06-01 06:08:45 +00:00
Manuel Schiller
050d89fa8a
fix: correctly resolve path in useMatchRoute if layout route is used (#1690) 2024-06-01 08:07:21 +02:00
Manuel Schiller
d2eec98542
fix: use Record<string, unknown> as default type for TSearchSchemaInput (#1684) 2024-05-31 18:05:33 +02:00
Aditya Pandey
cf64ed3481
Fix Playwright E2E CI step (#1678)
* Run server within Github CI

* Give unique package name

* Set proper shas for affected packages

* Move start server command to playwright config

* Remove test:e2e

* Move up replay installation, remove `test:e2e` script

* Add e2e targets

* Empty commit

* Empty commit

* Hardcode public version of REPLAY_API_KEY secret
2024-05-30 20:42:42 -06:00
Tanner Linsley
9e4b1db679 examples: init trellaux
# Conflicts:
#	pnpm-lock.yaml
2024-05-30 12:32:41 -06:00
Leonardo Montini
85f5e7be1b
docs: mention how to disable the plugin in tests (#1682)
* docs: mention how to disable the plugin in tests

* docs: improve phrasing
2024-05-30 20:07:30 +02:00
Tanner Linsley
634da2ba76 release: v1.34.8 v1.34.8 2024-05-30 17:18:39 +00:00
Manuel Schiller
6a44da8d68
fix: do not assign path to virtual routes for route groups (#1683)
fixes #1681
2024-05-30 19:17:15 +02:00
Tanner Linsley
2c80cfe260 release: v1.34.7 v1.34.7 2024-05-29 19:56:34 +00:00
Leo Y. Li
f11cd07d6e
fix(react-router): only instantiate the confirmation promise when required in the useBlocker hook (#1669)
* fix: only instantiate the confirmation promise when required (useBlocker)

* fix: prettier
2024-05-29 21:53:57 +02:00
Tanner Linsley
aab0e40082 release: v1.34.6 v1.34.6 2024-05-29 19:29:44 +00:00
Christopher Horobin
ef77cccd58
fix(react-router): merge params, context, search and loaderData with strict: false (#1664)
* feat: merge context, params, search and loaderData when `strict` is false

- objects in context, params, search and loaderData will be merged into object with all properties optional.
- if objects contain conflicting properties they are resolved with unions
- if some unions contain primitives, tuples or arrays they are ignored and are a part of a union

* chore: use `undefined` instead of `{}` for default TLoaderData
2024-05-29 21:27:51 +02:00
Aditya Pandey
8239c01457
test: add playwright testing with CI to start-basic (#1673)
* Add playwright

* Add CI action

* Update lockfile with pnpm version 8.15.8

---------

Co-authored-by: Jason Laster <jason.laster.11@gmail.com>
2024-05-28 14:04:33 -06:00
Tanner Linsley
eeaaeebab0 release: v1.34.5 v1.34.5 2024-05-28 17:37:24 +00:00
Tanner Linsley
2b0135bc7e fix: add onBeforeNavigate event 2024-05-28 11:34:56 -06:00
Tanner Linsley
2f3b28c3a7 release: v1.34.4 v1.34.4 2024-05-27 12:51:20 +00:00
Dominik Dorfmeister
3c66fb545d
fix(router-devtools): make router a peerDependency of the devtools (#1671)
* fix: make router a peerDependency of the devtools

* fix: formatting
2024-05-27 14:49:51 +02:00
Tanner Linsley
04bcc3e19f release: v1.34.3 v1.34.3 2024-05-27 04:58:36 +00:00
Tanner Linsley
0be110012c fix: no more weird streaming APIs, just use suspense + streaming 2024-05-26 22:56:02 -06:00
Tanner Linsley
9102d45730 release: v1.34.2 v1.34.2 2024-05-26 21:26:55 +00:00
Tanner Linsley
317f1eb108 fix: SSR redirects 2024-05-26 15:24:25 -06:00
Tanner Linsley
75424dc004 release: v1.34.1 v1.34.1 2024-05-26 20:16:30 +00:00
Tanner Linsley
1d677df94a fix(start): abstract SSR event handling 2024-05-26 14:08:53 -06:00
Tanner Linsley
de02c1d374 fix: deprecate stream transformation in favor of auto-streaming with <Await>/useAwaited 2024-05-26 14:08:53 -06:00
Tanner Linsley
0f60403cb9 fix: do not use react transitions on the server 2024-05-26 14:08:53 -06:00
Tanner Linsley
075c6b3a50 examples: update start example 2024-05-26 14:08:53 -06:00
Tanner Linsley
a648285a9c release: v1.34.0 v1.34.0 2024-05-25 11:50:59 +00:00
Leonardo Montini
28aa8fb04e
feat(react-router): improve the blocker functionality for use with custom UI (#1649)
* feat: return async resolver from useBlocker hook

* feat: pass async resolvers to children on Block component

* fix: types and always reset promise

* docs: update example with custom UI

* refactor: namings

* docs: toggle between custom ui and default

* feat: expose status and refactor hook props

* feat: support current API

* feat: custom blocker should take precendence over the manual promise blocker

* test: unit test on condition to avoid breaking changes with the new API

* docs: deprecate old syntax and update the docs

* docs: create useBlocker API reference

* fix: deprecated interface
2024-05-25 13:49:08 +02:00
Sean Cassiere
92f4a09b9b
test(react-router): use React.act to contain warnings thrown by router.test.tsx (#1667) 2024-05-25 12:47:02 +12:00
Sean Cassiere
9fb0bde795
docs(examples): cleanup the "kitchen-sink*" examples (#1663)
Just some housekeeping for the kitchen sink examples that have become a bit messy over time.
2024-05-24 23:55:16 +12:00
Hiep Nguyen
dbb5641c9a
docs(examples): inline the PickAsRequired type in the "kitchen-sink-react-query" example (#1660) 2024-05-24 22:11:47 +12:00
Tanner Linsley
89467a5e22 release: v1.33.12 v1.33.12 2024-05-24 10:08:08 +00:00
Sean Cassiere
4c67e76a3e
fix(router-generator): conflicting prettier outputs (#1661)
* style: prettier

* test(react-router): try using `it`

* chore: undo those test trys

* fix(router-generator): remove unnecessary line breaks

* fix(router-generator): closer to what it was earlier

* fix(router-generator): dont conflict with tsr project prettier for snapshots
2024-05-24 22:06:05 +12:00
Tanner Linsley
55adc136b9 examples: test vercel link 2024-05-23 17:22:52 -06:00
Tanner Linsley
cab6c3958f release: v1.33.11 v1.33.11 2024-05-23 23:16:24 +00:00
Tanner Linsley
6219cb80a9 fix: include all files in preloads 2024-05-23 17:14:15 -06:00
Tanner Linsley
1d901caea9 release: v1.33.10 v1.33.10 2024-05-23 22:40:56 +00:00
Tanner Linsley
e0a7545ad1 fix: modulepreload 2024-05-23 16:39:01 -06:00
Tanner Linsley
59afb56cb5 release: v1.33.9 v1.33.9 2024-05-23 22:23:17 +00:00
Tanner Linsley
f0056b556b fix: dedupe and key meta 2024-05-23 16:20:47 -06:00