0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00
router/packages/solid-router/tests
Flo d6a77e1d6b
refactor(router-core): flatten loadMatches (#4961)
This PR *should* be a no-op. Just restructuring the code to have all the
functions used by `loadMatches` at the same level, instead of nested
callbacks. In order to still have access to the data that was previously
in scope because of nesting, we use a `innerLoadContext` object, which
is basically just the arguments of `loadMatches`, and a few mutables.

However, in order to do so, we have to rearrange promises in an area
that is sensitive to any microtask order change, and we did change some
of them. So this is not *really* a no-op, even though this does not
attempt any optimization.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- New Features
- Smoother navigations with predictable pending states and minimum
display durations.
  - More consistent head/meta updates after route loading.
- Bug Fixes
- More reliable redirects and 404 handling, including during preloading
and SSR.
  - Reduced UI flicker by refining pending and preloading behavior.
- Refactor
- Reworked the routing load pipeline for improved performance,
stability, and SSR behavior.
- Streamlined before-load steps for clearer, more consistent execution.
- Tests
  - Updated tests to reflect the new loading flow.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
History 2025-08-15 23:19:56 +02:00
..
lazy refactor(router-core): begin migrating types from react-router and solid-router to router-core (#3538) 2025-02-23 23:18:16 +01:00
server tests(solid-router): enable ClientOnly SSR test (#4666) 2025-07-16 19:58:35 +02:00
blocker.test.tsx feat(solid-router): Add a SolidJS driver for TanStack Router (#3276) 2025-02-20 17:11:39 +01:00
ClientOnly.test.tsx tests(solid-router): enable ClientOnly SSR test (#4666) 2025-07-16 19:58:35 +02:00
createLazyRoute.test.tsx feat(solid-router): Add a SolidJS driver for TanStack Router (#3276) 2025-02-20 17:11:39 +01:00
disableGlobalCatchBoundary.test.tsx feat(react-router): add disableGlobalCatchBoundary option (#4765) 2025-07-26 22:45:20 +02:00
errorComponent.test.tsx feat(solid-router): Add a SolidJS driver for TanStack Router (#3276) 2025-02-20 17:11:39 +01:00
fileRoute.test-d.tsx refactor(router-core): begin migrating types from react-router and solid-router to router-core (#3538) 2025-02-23 23:18:16 +01:00
fileRoute.test.ts feat(solid-router): Add a SolidJS driver for TanStack Router (#3276) 2025-02-20 17:11:39 +01:00
index.test.tsx feat(solid-router): Add a SolidJS driver for TanStack Router (#3276) 2025-02-20 17:11:39 +01:00
link.bench.tsx feat(solid-router): Add a SolidJS driver for TanStack Router (#3276) 2025-02-20 17:11:39 +01:00
link.test-d.tsx feat(solid-router): Add a SolidJS driver for TanStack Router (#3276) 2025-02-20 17:11:39 +01:00
link.test.tsx test(solid-router): add test from #4930 (#4941) 2025-08-13 13:36:12 +12:00
loaders.test.tsx feat(solid-router): Add a SolidJS driver for TanStack Router (#3276) 2025-02-20 17:11:39 +01:00
Matches.test-d.tsx refactor(router-core): migrate matches and route options to core (#3552) 2025-02-24 23:17:58 +01:00
Matches.test.tsx feat(solid-router): Add a SolidJS driver for TanStack Router (#3276) 2025-02-20 17:11:39 +01:00
navigate.test.tsx fix: allow relative navigate without from (#3654) 2025-03-04 10:11:48 +01:00
redirect.test.tsx refactor(history): use TSR_key namespace in state for hash (#4356) 2025-06-23 14:48:54 +12:00
redirects.test-d.tsx feat(solid-router): Add a SolidJS driver for TanStack Router (#3276) 2025-02-20 17:11:39 +01:00
route.test-d.tsx feat: Merge alpha to main (#4365) 2025-06-10 23:19:32 +02:00
route.test.tsx feat: Add style to HeadContent (#4559) 2025-07-02 00:28:12 +02:00
routeApi.test-d.tsx perf: improve ts perf for Route.Link (#4104) 2025-05-07 01:31:10 +02:00
routeContext.test.tsx feat(solid-router): Add a SolidJS driver for TanStack Router (#3276) 2025-02-20 17:11:39 +01:00
router.test-d.tsx refactor(router-core): move AnyRoute and AnyRouter to router-core (#3640) 2025-03-04 21:48:58 +01:00
router.test.tsx fix(router-core): reset statusCode to 200 on navigation start (#4664) 2025-07-18 00:25:35 +02:00
RouterProvider.test-d.tsx feat(solid-router): Add a SolidJS driver for TanStack Router (#3276) 2025-02-20 17:11:39 +01:00
Scripts.test.tsx fix(react-router, solid-router): make head function scripts load properly (#4323) 2025-06-18 22:03:06 +02:00
searchMiddleware.test.tsx refactor(router-core): move AnyRoute and AnyRouter to router-core (#3640) 2025-03-04 21:48:58 +01:00
setupTests.tsx chore: silence error in test (#4794) 2025-07-26 23:05:17 +02:00
Transitioner.test.tsx refactor(router-core): flatten loadMatches (#4961) 2025-08-15 23:19:56 +02:00
useBlocker.test-d.tsx feat(solid-router): Add a SolidJS driver for TanStack Router (#3276) 2025-02-20 17:11:39 +01:00
useBlocker.test.tsx fix(solid-router): Change <Link/>, <Block/> properties to be reactive (#4314) 2025-06-11 20:47:39 +02:00
useCanGoBack.test.tsx feat(solid-router): Add a SolidJS driver for TanStack Router (#3276) 2025-02-20 17:11:39 +01:00
useLoaderData.test-d.tsx feat(solid-router): Add a SolidJS driver for TanStack Router (#3276) 2025-02-20 17:11:39 +01:00
useLocation.test-d.tsx feat(solid-router): Add a SolidJS driver for TanStack Router (#3276) 2025-02-20 17:11:39 +01:00
useMatch.test-d.tsx refactor(router-core): migrate matches and route options to core (#3552) 2025-02-24 23:17:58 +01:00
useMatch.test.tsx feat(solid-router): Add a SolidJS driver for TanStack Router (#3276) 2025-02-20 17:11:39 +01:00
useNavigate.test-d.tsx feat(solid-router): Add a SolidJS driver for TanStack Router (#3276) 2025-02-20 17:11:39 +01:00
useNavigate.test.tsx fix(router-core): resolve with basepath if to is not supplied (#4472) 2025-06-23 11:23:57 +12:00
useParams.test-d.tsx feat(solid-router): Add a SolidJS driver for TanStack Router (#3276) 2025-02-20 17:11:39 +01:00
useRouteContext.test-d.tsx feat(solid-router): Add a SolidJS driver for TanStack Router (#3276) 2025-02-20 17:11:39 +01:00
useRouterState.test-d.tsx feat(solid-router): Add a SolidJS driver for TanStack Router (#3276) 2025-02-20 17:11:39 +01:00
useSearch.test-d.tsx feat(solid-router): Add a SolidJS driver for TanStack Router (#3276) 2025-02-20 17:11:39 +01:00
utils.ts feat(solid-router): Add a SolidJS driver for TanStack Router (#3276) 2025-02-20 17:11:39 +01:00