Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fuzzy-carpets-enter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tanstack/start-client-core': patch
---

refactor(start-client-core): use a more explicit typing to `CustomFetch` type
5 changes: 5 additions & 0 deletions .changeset/loud-tigers-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tanstack/router-plugin': patch
---

refactor(router-plugin): upgrade unplugin to `v3`
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { fetchAuth } from '~/library/server'

const CONVEX_URL = import.meta.env.VITE_CONVEX_URL
if (!CONVEX_URL) {
console.error('missing envar CONVEX_URL')
throw new Error('missing envar CONVEX_URL')
}

// Set up Convex client with auth
Expand Down
2 changes: 1 addition & 1 deletion packages/router-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"@tanstack/router-utils": "workspace:*",
"@tanstack/virtual-file-routes": "workspace:*",
"chokidar": "^3.6.0",
"unplugin": "^2.1.2",
"unplugin": "^3.0.0",
"zod": "^3.24.2"
},
"devDependencies": {
Expand Down
8 changes: 7 additions & 1 deletion packages/start-client-core/src/createServerFn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,13 @@ export interface RequiredFetcher<
): Promise<Awaited<TResponse>>
}

export type CustomFetch = typeof globalThis.fetch
// Ideally, this type should just be `export type CustomFetch = typeof globalThis.fetch`, but that conflicts with the type overrides the `bun-types` package - a dependency of unplugin.
// Relevant bun issues:
// - https://github.com/oven-sh/bun/issues/23500
// - https://github.com/oven-sh/bun/issues/23741
export type CustomFetch = typeof fetch extends (...args: infer A) => infer R
? (...args: A) => R
: never

export type FetcherBaseOptions = {
headers?: HeadersInit
Expand Down
35 changes: 9 additions & 26 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading