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

6,689 commits

Author SHA1 Message Date
Sean Cassiere
f9448c2004
fix(router-plugin): generation for rspack/webpack builds should use the beforeRun compiler hook (#2971)
* fix(router-plugin): rsbuild to await generation using compiler hooks

* fix(router-plugin): webpack to await generation using compiler hooks
2024-12-10 13:39:27 +13:00
Tanner Linsley
bda3e0705a release: v1.87.3 v1.87.3 2024-12-10 00:18:55 +00:00
Manuel Schiller
caffc5ef61
fix(router-generator): do not register tsx import, instead use its API (#2970)
fixes #2968
2024-12-10 01:03:20 +01:00
Manuel Schiller
359ab154d1
fix(react-router): fix transitions (#2969)
* fix(react-router): fix transitions

fixes #2631
fixes #2082

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-10 00:12:22 +01:00
Sean Cassiere
950b80fe66
test(e2e): add rsbuild based sandboxed to the end-to-end testing suite (#2965)
* test(e2e): add rspack basic-file-based sandbox

* test(e2e): add rspack basic-virtual-named-export-config-file-based sandbox

* chore: checkin lockfile

* chore(e2e): switch to referencing the workspace versions

* chore(examples): upgrade rsbuild dependencies to latest

* chore(e2e): remove playwright test results from git history

* chore(root): fix lockfile

* chore(e2e): log out the port being mapped
2024-12-10 09:29:11 +13:00
renovate[bot]
3cd39dba4c
chore(deps): update all non-major dependencies (#2958)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-09 20:09:23 +00:00
Ben Durrant
ba80869ada
Remove variable check for createIsomorphicFn and envOnly functions. (#2960) 2024-12-09 19:30:43 +01:00
Ben Durrant
586cc7dbdb
golf json even harder (#2961) 2024-12-09 19:30:34 +01:00
Tanner Linsley
304fdbd9f5 release: v1.87.2 v1.87.2 2024-12-09 17:25:29 +00:00
Manuel Schiller
54dad5f872
fix(start): fix usage of use() with React 19 (#2963)
both router and react 19 were modifying the Promise object in a similar manner which caused a conflict.

See https://github.com/facebook/react/blob/v19.0.0/packages/react-reconciler/src/ReactFiberThenable.js#L162-L228 for how React 19 modifies the Promise object.

Both used an additional `status` property to track the Promise status, but router was using the value "success" and React was using the value "fulfilled" to mark a fulfilled Promise.

This change stores the router specific Promise tracking values using a symbol to avoid any potential collision.

fixes #2953
2024-12-09 18:24:04 +01:00
Ben Durrant
2663b94a81
chore(start): Avoid duplication for envOnly functions. (#2957) 2024-12-08 23:18:27 +01:00
Tanner Linsley
ad3f277334 release: v1.87.1 v1.87.1 2024-12-08 22:01:46 +00:00
Ben Durrant
85d9d797a7
fix(start): Fix json() helper merging of headers, and set up unit tests for @tanstack/start (#2956)
* Simplify json implementation and fix headers handling

* set up tests for start package

* Fix ssr script test

* Add test for json helper

* name test script consistently

* add name and watch options to test config

* add test script

* don't override existing Content-Type header
2024-12-08 22:57:41 +01:00
Manuel Schiller
58fd90827b
fix(start): pass through vite react plugin config options (#2955)
fixes #2952
2024-12-08 21:53:20 +01:00
Ben Durrant
402bae629a
fix(start): fix serverOnly implementation/types, and add clientOnly counterpart (#2954)
* Fix type of serverOnly and add clientOnly function

* Replace invalid invariant call with throwing an error, and support clientOnly

* only build handlers once and reuse

* write type test and make linter happy

* Add snapshot testing for serverOnly and clientOnly

* Write e2e tests

* use a single source of truth for tokens to transform and do dead code elimination after
2024-12-08 21:48:13 +01:00
Manuel Schiller
52e9d4fec7
fix(react-router): when ongoing beforeLoad failed, retry next time (#2949) 2024-12-08 19:13:46 +01:00
Adam Rackis
29619bfec8
docs: tweak server functions docs (#2951)
* start

* tweaks

* work

* work

* last tweak
2024-12-08 01:27:49 +01:00
Tanner Linsley
e9d4759ea1 release: v1.87.0 v1.87.0 2024-12-07 22:27:33 +00:00
Tanner Linsley
941ff2d131
fix(react-router): preloads (#2945)
* tests(react-router): add test for `preload` flag of `beforeLoad` and `loader`

* fix: preloads

* fix: simplify preload resolution

* fix missing !

---------

Co-authored-by: Manuel Schiller <manuel.schiller@caligano.de>
2024-12-07 23:24:29 +01:00
Adam Rackis
ef99aaba7b
docs: server function docs tweaks (#2948)
* start

* tweaks

* work

* work
2024-12-07 23:23:52 +01:00
David Turissini
44515a7325
test(router): adding test to verify route generation from tsr.config.json (#2866)
* adding a test to verify that json config files are reflected correctly

* clean up

* direct testing config

* ci: apply automated fixes

---------

Co-authored-by: David Turissini <davidturissini@Melissas-MacBook-Air.local>
Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-07 19:14:11 +01:00
Ben Durrant
eeea643f52
feat(start): createIsomorphicFn (#2942)
* Set up types for createIsomorphicFn

* do dead code analysis for serverOnly and createIsomorphicFn too

* add createIsomorphicFn to relevant regexes

* Add test files

* fix test name

* Add createIsomorphicFn compiler handling

* check for presence/lack of properties

* Add e2e test for isomorphic functions
2024-12-07 19:13:45 +01:00
강지영
a97729f76c
docs(devtools): update installation instructions (#2944) 2024-12-07 18:33:23 +01:00
Brady Blair
ba3386b72f
fix(create-router): await directory copy operation when copying template files (#2943) 2024-12-07 17:40:30 +01:00
autofix-ci[bot]
bfd590a2cf
ci: apply automated fixes 2024-12-07 05:21:06 +00:00
Tanner Linsley
8950ab2313 fix: add registerGlobalMiddleware
# Conflicts:
#	packages/start/src/client/createServerFn.ts
2024-12-06 22:20:10 -07:00
Tanner Linsley
3508300dd9 Merge branch 'main' of https://github.com/TanStack/router 2024-12-06 22:17:46 -07:00
Tanner Linsley
45fc0ef971 fix: active match preloads now save to state properly 2024-12-06 22:17:34 -07:00
Sean Cassiere
cebb221438
docs(router): update deferred data loading guide when using external libraries (#2940)
* docs(router): update deferred data loading guide when using external libraries
2024-12-07 12:11:48 +13:00
Sean Cassiere
8311780fe5
test(e2e): derive e2e testing ports from the package name (#2939)
* test(e2e): add the derivePort utility

* test(e2e): use the utility on start-basic and start-website

* test(e2e): use the utility on the remaining start sandboxes

* test(e2e): use the utility on the react-router sandboxes

* test(e2e): remove unneeded script from `basic-esbuild-file-based`
2024-12-07 10:53:11 +13:00
Tanner Linsley
0398fc0618 release: v1.86.1 v1.86.1 2024-12-06 17:34:13 +00:00
Gregory Collett
d44912aa74
fix(react-router): ensure links and scripts are available on routes created with createRoute (#2854)
* ensure that links and scripts are available on route, routes created with createFileRoute work routes created with createRoute did not

* test(react-router): check for head fn update

---------

Co-authored-by: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com>
2024-12-06 18:28:54 +01:00
Tanner Linsley
0a58c0fe27 release: v1.86.0 v1.86.0 2024-12-06 09:59:45 +00:00
Sean Cassiere
a0ac5ed3b0
feat(router-generator): define virtual routes using a route.ts file (#2933)
* feat(router-generator): define virtual routes using a `route.ts` file

* refactor(router-generator): passing in the root

* feat(router-cli): passing in the root

* feat(router-plugin): passing in the root

* test(router-generator): check the functionality

* test(e2e): end-to-end test for named exports

* docs(router): update the docs

* docs(router): add file paths to the virtual guide

* docs: forgot to add this path

* Update docs/framework/react/guide/virtual-file-routes.md
2024-12-06 22:58:18 +13:00
Tanner Linsley
b63d7ad5f4 release: v1.85.10 v1.85.10 2024-12-06 02:20:14 +00:00
Sean Cassiere
50f690900c
fix: remove hard locks on related packages (#2932) 2024-12-06 15:17:46 +13:00
Tanner Linsley
9f49952c0a release: v1.85.9 v1.85.9 2024-12-05 23:37:28 +00:00
Manuel Schiller
ef4a9498c0
fix: upgrade to vinxi 0.5 and vite 6 (#2923)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com>
2024-12-06 00:36:10 +01:00
Tanner Linsley
1a39728c31 release: v1.85.8 v1.85.8 2024-12-05 20:53:41 +00:00
Manuel Schiller
972d878233
fix(start): set default deployment preset to node-server (#2928) 2024-12-05 21:52:18 +01:00
Nicolas Beaussart
412f6640dc
chore: remove generated js from monorepo example (#2922) 2024-12-04 17:25:11 +01:00
renovate[bot]
2676c0a03c
chore(deps): lock file maintenance (#2896)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-04 02:20:11 +00:00
Tanner Linsley
3c6ab8caac release: v1.85.7 v1.85.7 2024-12-04 00:26:44 +00:00
Nicolas Stepien
b7e09ddb51
refactor(start): use the React.JSX type in renderRSC (#2906)
Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
2024-12-04 13:22:13 +13:00
Tanner Linsley
0bd13b769d release: v1.85.6 v1.85.6 2024-12-04 00:16:13 +00:00
SeanCassiere
d679455434
test(e2e): move server-fn tests back into base 2024-12-04 13:12:54 +13:00
Jade Devin Cabatlao
201ce5bde5
refactor(start): expose vinxi router middleware (#2893)
Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
2024-12-04 12:56:04 +13:00
Sean Cassiere
c7403a3c19
test(e2e): retrofit all e2e sandboxes tests to use open ports (#2914) 2024-12-04 11:11:57 +13:00
Tanner Linsley
720a328e7d release: v1.85.5 v1.85.5 2024-12-03 18:33:23 +00:00
Adrian Fernandez
6a675cc0cc
fix(start): Fix issue when sometimes resolvePromise tsr-once script gets deleted before running (#2912)
* Fix race condition for deferred loader

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-03 08:13:43 -07:00