Skip to content

Commit fcecd7c

Browse files
authored
chore(react-start,solid-start): update imports to use router-core (#3703)
Update start package imports after much router code has been moved to the agnostic router-core package.
1 parent e9f7efc commit fcecd7c

23 files changed

+40
-32
lines changed

packages/react-start-client/src/StartClient.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Await, RouterProvider } from '@tanstack/react-router'
22
import { hydrate } from './ssr-client'
3-
import type { AnyRouter } from '@tanstack/react-router'
3+
import type { AnyRouter } from '@tanstack/router-core'
44

55
let hydrationPromise: Promise<void | Array<Array<void>>> | undefined
66

packages/react-start-client/src/ssr-client.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@ import { startSerializer } from './serializer'
66
import type {
77
AnyRouter,
88
ControllablePromise,
9-
MakeRouteMatch,
10-
} from '@tanstack/react-router'
11-
12-
import type {
139
DeferredPromiseState,
10+
MakeRouteMatch,
1411
Manifest,
1512
RouteContextOptions,
1613
} from '@tanstack/router-core'

packages/react-start-config/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
},
5353
"dependencies": {
5454
"@tanstack/react-router": "workspace:^",
55+
"@tanstack/router-core": "workspace:^",
5556
"@tanstack/router-generator": "workspace:^",
5657
"@tanstack/router-plugin": "workspace:^",
5758
"@tanstack/server-functions-plugin": "workspace:^",

packages/react-start-config/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import type {
2828
TanStackStartOutputConfig,
2929
} from './schema.js'
3030
import type { App as VinxiApp } from 'vinxi'
31-
import type { Manifest } from '@tanstack/react-router'
31+
import type { Manifest } from '@tanstack/router-core'
3232
import type * as vite from 'vite'
3333

3434
export type {

packages/react-start-server/src/StartServer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react'
22
import { RouterProvider } from '@tanstack/react-router'
3-
import type { AnyRouter } from '@tanstack/react-router'
3+
import type { AnyRouter } from '@tanstack/router-core'
44

55
export function StartServer<TRouter extends AnyRouter>(props: {
66
router: TRouter

packages/react-start-server/src/createRequestHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { createMemoryHistory } from '@tanstack/history'
22
import { mergeHeaders } from '@tanstack/react-start-client'
33
import { attachRouterServerSsrUtils, dehydrateRouter } from './ssr-server'
44
import type { HandlerCallback } from './handlerCallback'
5-
import type { AnyRouter, Manifest } from '@tanstack/react-router'
5+
import type { AnyRouter, Manifest } from '@tanstack/router-core'
66

77
export type RequestHandler<TRouter extends AnyRouter> = (
88
cb: HandlerCallback<TRouter>,

packages/react-start-server/src/createStartHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { eventHandler, getResponseHeaders, toWebRequest } from 'h3'
44
import { attachRouterServerSsrUtils, dehydrateRouter } from './ssr-server'
55
import type { HandlerCallback } from './handlerCallback'
66
import type { EventHandlerResponse, H3Event } from 'h3'
7-
import type { AnyRouter, Manifest } from '@tanstack/react-router'
7+
import type { AnyRouter, Manifest } from '@tanstack/router-core'
88

99
export type CustomizeStartHandler<
1010
TRouter extends AnyRouter,

packages/react-start-server/src/handlerCallback.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { EventHandlerResponse } from 'h3'
2-
import type { AnyRouter } from '@tanstack/react-router'
2+
import type { AnyRouter } from '@tanstack/router-core'
33

44
export interface HandlerCallback<
55
TRouter extends AnyRouter,

packages/react-start-server/src/ssr-server.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ import type {
1515
ResolvePromiseState,
1616
SsrMatch,
1717
} from '@tanstack/react-start-client'
18-
import type { AnyRouteMatch, AnyRouter } from '@tanstack/react-router'
19-
import type { DeferredPromise, Manifest } from '@tanstack/router-core'
18+
import type {
19+
AnyRouteMatch,
20+
AnyRouter,
21+
DeferredPromise,
22+
Manifest,
23+
} from '@tanstack/router-core'
2024

2125
export type ServerExtractedEntry =
2226
| ServerExtractedStream

packages/react-start-server/src/transformStreamWithRouter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ReadableStream } from 'node:stream/web'
22
import { Readable } from 'node:stream'
3-
import { createControlledPromise } from '@tanstack/react-router'
4-
import type { AnyRouter } from '@tanstack/react-router'
3+
import { createControlledPromise } from '@tanstack/router-core'
4+
import type { AnyRouter } from '@tanstack/router-core'
55

66
export function transformReadableStreamWithRouter(
77
router: AnyRouter,

packages/react-start-server/src/tsrScript.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ControllablePromise } from '@tanstack/react-router'
1+
import type { ControllablePromise } from '@tanstack/router-core'
22
import type { StartSsrGlobal } from '@tanstack/react-start-client'
33

44
const __TSR_SSR__: StartSsrGlobal = {

packages/solid-start-client/src/StartClient.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Await, HeadContent, RouterProvider } from '@tanstack/solid-router'
22
import { hydrate } from './ssr-client'
3-
import type { AnyRouter } from '@tanstack/solid-router'
3+
import type { AnyRouter } from '@tanstack/router-core'
44
import type { JSXElement } from 'solid-js'
55

66
let hydrationPromise: Promise<void | Array<Array<void>>> | undefined

packages/solid-start-client/src/ssr-client.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@ import { startSerializer } from './serializer'
66
import type {
77
AnyRouter,
88
ControllablePromise,
9-
MakeRouteMatch,
10-
} from '@tanstack/solid-router'
11-
12-
import type {
139
DeferredPromiseState,
10+
MakeRouteMatch,
1411
Manifest,
1512
RouteContextOptions,
1613
} from '@tanstack/router-core'

packages/solid-start-config/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
},
5353
"dependencies": {
5454
"@tanstack/solid-router": "workspace:^",
55+
"@tanstack/router-core": "workspace:^",
5556
"@tanstack/router-generator": "workspace:^",
5657
"@tanstack/router-plugin": "workspace:^",
5758
"@tanstack/server-functions-plugin": "workspace:^",

packages/solid-start-config/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import type {
2828
TanStackStartOutputConfig,
2929
} from './schema.js'
3030
import type { App as VinxiApp } from 'vinxi'
31-
import type { Manifest } from '@tanstack/solid-router'
31+
import type { Manifest } from '@tanstack/router-core'
3232
import type * as vite from 'vite'
3333

3434
export type {

packages/solid-start-server/src/StartServer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
useAssets,
88
} from 'solid-js/web'
99
import { MetaProvider } from '@solidjs/meta'
10-
import type { AnyRouter } from '@tanstack/solid-router'
10+
import type { AnyRouter } from '@tanstack/router-core'
1111

1212
export function ServerHeadContent() {
1313
const tags = useTags()

packages/solid-start-server/src/createRequestHandler.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import { createMemoryHistory } from '@tanstack/history'
22
import { mergeHeaders } from '@tanstack/solid-start-client'
33
import { attachRouterServerSsrUtils, dehydrateRouter } from './ssr-server'
44
import type { HandlerCallback } from './handlerCallback'
5-
import type { AnyRouter } from '@tanstack/solid-router'
6-
import type { Manifest } from '@tanstack/router-core'
5+
import type { AnyRouter, Manifest } from '@tanstack/router-core'
76

87
export type RequestHandler<TRouter extends AnyRouter> = (
98
cb: HandlerCallback<TRouter>,

packages/solid-start-server/src/createStartHandler.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { eventHandler, getResponseHeaders, toWebRequest } from 'h3'
44
import { attachRouterServerSsrUtils, dehydrateRouter } from './ssr-server'
55
import type { HandlerCallback } from './handlerCallback'
66
import type { EventHandlerResponse, H3Event } from 'h3'
7-
import type { AnyRouter } from '@tanstack/solid-router'
8-
import type { Manifest } from '@tanstack/router-core'
7+
import type { AnyRouter, Manifest } from '@tanstack/router-core'
98

109
export type CustomizeStartHandler<
1110
TRouter extends AnyRouter,

packages/solid-start-server/src/handlerCallback.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { EventHandlerResponse } from 'h3'
2-
import type { AnyRouter } from '@tanstack/solid-router'
2+
import type { AnyRouter } from '@tanstack/router-core'
33

44
export interface HandlerCallback<
55
TRouter extends AnyRouter,

packages/solid-start-server/src/ssr-server.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ import type {
1515
ResolvePromiseState,
1616
SsrMatch,
1717
} from '@tanstack/solid-start-client'
18-
import type { AnyRouteMatch, AnyRouter } from '@tanstack/solid-router'
19-
import type { DeferredPromise, Manifest } from '@tanstack/router-core'
18+
import type {
19+
AnyRouteMatch,
20+
AnyRouter,
21+
DeferredPromise,
22+
Manifest,
23+
} from '@tanstack/router-core'
2024

2125
export type ServerExtractedEntry =
2226
| ServerExtractedStream

packages/solid-start-server/src/transformStreamWithRouter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ReadableStream } from 'node:stream/web'
2-
import { createControlledPromise } from '@tanstack/solid-router'
3-
import type { AnyRouter } from '@tanstack/solid-router'
2+
import { createControlledPromise } from '@tanstack/router-core'
3+
import type { AnyRouter } from '@tanstack/router-core'
44

55
export function transformReadableStreamWithRouter(
66
router: AnyRouter,

packages/solid-start-server/src/tsrScript.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ControllablePromise } from '@tanstack/solid-router'
1+
import type { ControllablePromise } from '@tanstack/router-core'
22
import type { StartSsrGlobal } from '@tanstack/solid-start-client'
33

44
const __TSR_SSR__: StartSsrGlobal = {

pnpm-lock.yaml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)