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
2 changes: 1 addition & 1 deletion e2e/react-start/basic-react-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"@vitejs/plugin-react": "^4.3.4",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"vite-tsconfig-paths": "^5.1.4"
Expand Down
2 changes: 1 addition & 1 deletion e2e/react-start/basic-tsr-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@types/node": "^22.10.2",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"typescript": "^5.7.2"
}
}
2 changes: 1 addition & 1 deletion e2e/react-start/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@types/react-dom": "^19.0.3",
"@vitejs/plugin-react": "^4.3.4",
"combinate": "^1.1.11",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"vite": "^7.1.7",
Expand Down
5 changes: 3 additions & 2 deletions e2e/react-start/custom-basepath/express-server.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import express from 'express'
import { toNodeHandler } from 'srvx/node'
import type { NodeHttp1Handler } from 'srvx'

const DEVELOPMENT = process.env.NODE_ENV === 'development'
const PORT = Number.parseInt(process.env.PORT || '3000')
Expand All @@ -17,7 +18,7 @@ if (DEVELOPMENT) {
try {
const { default: serverEntry } =
await viteDevServer.ssrLoadModule('./src/server.ts')
const handler = toNodeHandler(serverEntry.fetch)
const handler = toNodeHandler(serverEntry.fetch) as NodeHttp1Handler
await handler(req, res)
} catch (error) {
if (typeof error === 'object' && error instanceof Error) {
Expand All @@ -28,7 +29,7 @@ if (DEVELOPMENT) {
})
} else {
const { default: handler } = await import('./dist/server/server.js')
const nodeHandler = toNodeHandler(handler.fetch)
const nodeHandler = toNodeHandler(handler.fetch) as NodeHttp1Handler
app.use('/custom/basepath', express.static('dist/client'))
app.use(async (req, res, next) => {
try {
Expand Down
2 changes: 1 addition & 1 deletion e2e/react-start/custom-basepath/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@types/react-dom": "^19.0.3",
"@vitejs/plugin-react": "^4.3.4",
"cross-env": "^10.0.0",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"tsx": "^4.20.3",
"typescript": "^5.7.2",
Expand Down
2 changes: 1 addition & 1 deletion e2e/react-start/scroll-restoration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@types/react-dom": "^19.0.3",
"@vitejs/plugin-react": "^4.3.4",
"combinate": "^1.1.11",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"vite-tsconfig-paths": "^5.1.4"
Expand Down
2 changes: 1 addition & 1 deletion e2e/react-start/selective-ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"@vitejs/plugin-react": "^4.3.4",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2"
}
Expand Down
2 changes: 1 addition & 1 deletion e2e/react-start/serialization-adapters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"@vitejs/plugin-react": "^4.3.4",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"@vitejs/plugin-react": "^4.3.4",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"vite-tsconfig-paths": "^5.1.4"
Expand Down
2 changes: 1 addition & 1 deletion e2e/react-start/server-functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@types/react-dom": "^19.0.3",
"@vitejs/plugin-react": "^4.3.4",
"combinate": "^1.1.11",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"vite-tsconfig-paths": "^5.1.4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"@vitejs/plugin-react": "^4.3.4",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"vite-tsconfig-paths": "^5.1.4"
Expand Down
2 changes: 1 addition & 1 deletion e2e/react-start/server-routes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@types/react-dom": "^19.0.3",
"@vitejs/plugin-react": "^4.3.4",
"combinate": "^1.1.11",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"vite-tsconfig-paths": "^5.1.4"
Expand Down
2 changes: 1 addition & 1 deletion e2e/react-start/streaming-ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@types/node": "^22.10.2",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"typescript": "^5.7.2"
}
}
2 changes: 1 addition & 1 deletion e2e/react-start/virtual-routes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@types/react-dom": "^19.0.3",
"@vitejs/plugin-react": "^4.3.4",
"combinate": "^1.1.11",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"vite-tsconfig-paths": "^5.1.4"
Expand Down
2 changes: 1 addition & 1 deletion e2e/react-start/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"@vitejs/plugin-react": "^4.3.4",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"vite": "^7.1.7",
Expand Down
2 changes: 1 addition & 1 deletion e2e/solid-start/basic-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@types/node": "^22.10.2",
"dotenv": "^17.2.3",
"prisma": "^7.0.0",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"vite-plugin-solid": "^2.11.10",
Expand Down
2 changes: 1 addition & 1 deletion e2e/solid-start/basic-solid-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@tailwindcss/vite": "^4.1.18",
"@tanstack/router-e2e-utils": "workspace:^",
"@types/node": "^22.10.2",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"vite-plugin-solid": "^2.11.10",
Expand Down
2 changes: 1 addition & 1 deletion e2e/solid-start/basic-tsr-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"devDependencies": {
"@tanstack/router-e2e-utils": "workspace:^",
"@types/node": "^22.10.2",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"typescript": "^5.7.2",
"vite-plugin-solid": "^2.11.10",
"vite-tsconfig-paths": "^5.1.4"
Expand Down
2 changes: 1 addition & 1 deletion e2e/solid-start/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@types/js-cookie": "^3.0.6",
"@types/node": "^22.10.2",
"combinate": "^1.1.11",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"vite-plugin-solid": "^2.11.10",
Expand Down
5 changes: 3 additions & 2 deletions e2e/solid-start/custom-basepath/express-server.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import express from 'express'
import { toNodeHandler } from 'srvx/node'
import type { NodeHttp1Handler } from 'srvx'

const DEVELOPMENT = process.env.NODE_ENV === 'development'
const PORT = Number.parseInt(process.env.PORT || '3000')
Expand All @@ -17,7 +18,7 @@ if (DEVELOPMENT) {
try {
const { default: serverEntry } =
await viteDevServer.ssrLoadModule('./src/server.ts')
const handler = toNodeHandler(serverEntry.fetch)
const handler = toNodeHandler(serverEntry.fetch) as NodeHttp1Handler
await handler(req, res)
} catch (error) {
if (typeof error === 'object' && error instanceof Error) {
Expand All @@ -28,7 +29,7 @@ if (DEVELOPMENT) {
})
} else {
const { default: handler } = await import('./dist/server/server.js')
const nodeHandler = toNodeHandler(handler.fetch)
const nodeHandler = toNodeHandler(handler.fetch) as NodeHttp1Handler
app.use('/custom/basepath', express.static('dist/client'))
app.use(async (req, res, next) => {
try {
Expand Down
2 changes: 1 addition & 1 deletion e2e/solid-start/custom-basepath/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@types/express": "^5.0.3",
"@types/node": "^22.10.2",
"cross-env": "^10.0.0",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"tsx": "^4.20.3",
"typescript": "^5.7.2",
Expand Down
2 changes: 1 addition & 1 deletion e2e/solid-start/scroll-restoration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@tanstack/router-e2e-utils": "workspace:^",
"@types/node": "^22.10.2",
"combinate": "^1.1.11",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"vite-plugin-solid": "^2.11.10",
Expand Down
2 changes: 1 addition & 1 deletion e2e/solid-start/selective-ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"devDependencies": {
"@tailwindcss/vite": "^4.1.18",
"@tanstack/router-e2e-utils": "workspace:^",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"vite": "^7.1.7",
Expand Down
2 changes: 1 addition & 1 deletion e2e/solid-start/serialization-adapters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@tailwindcss/vite": "^4.1.18",
"@tanstack/router-e2e-utils": "workspace:^",
"@types/node": "^22.10.2",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"vite-plugin-solid": "^2.11.9"
Expand Down
2 changes: 1 addition & 1 deletion e2e/solid-start/server-functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@types/js-cookie": "^3.0.6",
"@types/node": "^22.10.2",
"combinate": "^1.1.11",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"vite-plugin-solid": "^2.11.10",
Expand Down
2 changes: 1 addition & 1 deletion e2e/solid-start/server-routes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@types/js-cookie": "^3.0.6",
"@types/node": "^22.10.2",
"combinate": "^1.1.11",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"vite-plugin-solid": "^2.11.10",
Expand Down
2 changes: 1 addition & 1 deletion e2e/solid-start/virtual-routes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@tanstack/router-e2e-utils": "workspace:^",
"@types/node": "^22.10.2",
"combinate": "^1.1.11",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"vite-plugin-solid": "^2.11.10",
Expand Down
2 changes: 1 addition & 1 deletion e2e/solid-start/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@tailwindcss/vite": "^4.1.18",
"@tanstack/router-e2e-utils": "workspace:^",
"@types/node": "^22.10.2",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"vite-plugin-solid": "^2.11.10",
Expand Down
2 changes: 1 addition & 1 deletion e2e/vue-start/basic-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@types/node": "^22.10.2",
"dotenv": "^17.2.3",
"prisma": "^7.0.0",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"@vitejs/plugin-vue": "^6.0.3",
Expand Down
2 changes: 1 addition & 1 deletion e2e/vue-start/basic-tsr-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"devDependencies": {
"@tanstack/router-e2e-utils": "workspace:^",
"@types/node": "^22.10.2",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"typescript": "^5.7.2",
"@vitejs/plugin-vue": "^6.0.3",
"@vitejs/plugin-vue-jsx": "^5.1.2",
Expand Down
2 changes: 1 addition & 1 deletion e2e/vue-start/basic-vue-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@tailwindcss/vite": "^4.1.18",
"@tanstack/router-e2e-utils": "workspace:^",
"@types/node": "^22.10.2",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"@vitejs/plugin-vue": "^6.0.3",
Expand Down
2 changes: 1 addition & 1 deletion e2e/vue-start/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@vitejs/plugin-vue": "^5.2.4",
"@vitejs/plugin-vue-jsx": "^4.1.2",
"combinate": "^1.1.11",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"vite-tsconfig-paths": "^5.1.4"
Expand Down
5 changes: 3 additions & 2 deletions e2e/vue-start/custom-basepath/express-server.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import express from 'express'
import { toNodeHandler } from 'srvx/node'
import type { NodeHttp1Handler } from 'srvx'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

cat -n e2e/vue-start/custom-basepath/express-server.ts

Repository: TanStack/router

Length of output: 1685


🌐 Web query:

srvx 0.10.0 toNodeHandler return type TypeScript

💡 Result:

toNodeHandler returns a Node.js request listener: (req: http.IncomingMessage, res: http.ServerResponse) => void — i.e. a standard Node (IncomingMessage, ServerResponse) => void handler. [1][2]

Sources:

  • h3 utils / adapters (toNodeHandler description). [1]
  • h3 bundled entry showing toNodeHandler export and Node handler mapping. [2]

🏁 Script executed:

# Search for srvx package and its types
find . -name "package.json" -type f | xargs grep -l '"srvx"' | head -5

Repository: TanStack/router

Length of output: 289


🏁 Script executed:

# Check if srvx types are available in node_modules or type definitions
fd -e d.ts -e ts "srvx" --type f | grep -E "(node_modules|types)" | head -10

Repository: TanStack/router

Length of output: 41


🌐 Web query:

srvx NodeHttp1Handler type definition

💡 Result:

I couldn't find a public definition for "NodeHttp1Handler" named type tied to srvx. Can you tell me where you saw that type (file/repo/link) or paste the surrounding code? With that I can fetch or reconstruct the exact TypeScript definition.


🏁 Script executed:

# Check srvx version in the e2e project
cat e2e/vue-start/custom-basepath/package.json

Repository: TanStack/router

Length of output: 1157


🏁 Script executed:

# Search for any other uses of NodeHttp1Handler in the codebase
rg "NodeHttp1Handler" --type ts --type tsx

Repository: TanStack/router

Length of output: 86


🏁 Script executed:

# Search for srvx imports to understand how it's being used
rg "from 'srvx" --type ts --type tsx -A 2

Repository: TanStack/router

Length of output: 86


🏁 Script executed:

# Search for NodeHttp1Handler without file type restrictions
rg "NodeHttp1Handler"

Repository: TanStack/router

Length of output: 1075


🏁 Script executed:

# Search for srvx imports more broadly
rg "from 'srvx" -A 2

Repository: TanStack/router

Length of output: 2405


🌐 Web query:

srvx npm package 0.10.0 NodeHttp1Handler type

💡 Result:

I don’t have enough detail — are you asking for (A) the TypeScript type definition of NodeHttp1Handler exported by srvx@0.10.0, (B) how to import/use NodeHttp1Handler with srvx, or (C) help resolving a specific TypeScript/compile error involving NodeHttp1Handler? If (C), paste the error.


🌐 Web query:

srvx npm package github repository

💡 Result:

The srvx repository is on GitHub: https://github.com/h3js/srvx. [1]

NPM package page for srvx (package "srvx")—links to the same repository and docs at srvx.h3.dev. [2]


🏁 Script executed:

# Check if there are any type definition files in the project that might define NodeHttp1Handler
rg "type NodeHttp1Handler"

Repository: TanStack/router

Length of output: 41


🏁 Script executed:

# Check if there's a tsconfig or types configuration that might help
find . -name "tsconfig.json" -type f | xargs grep -l "types" | head -3

Repository: TanStack/router

Length of output: 226


🌐 Web query:

site:github.com/h3js/srvx NodeHttp1Handler

💡 Result:

I searched the h3js/srvx repository and related package pages — there is no file, symbol, or reference named "NodeHttp1Handler" in that repo. Sources checked: the srvx GitHub repo and its npm/docs pages. [1][2]

Sources:

  • h3js/srvx repository (code listing). [1]
  • srvx documentation / npm listing. [2]

🌐 Web query:

srvx toNodeHandler type signature TypeScript definition

💡 Result:

The toNodeHandler adapter converts a fetch-style handler (Request => Response | Promise) to a Node.js HTTP handler (IncomingMessage, ServerResponse) => void | Promise.

TypeScript-style signature (concise):

  • Input handler type: (req: Request) => Response | Promise
  • Output Node handler type: (req: import("node:http").IncomingMessage, res: import("node:http").ServerResponse) => void | Promise

Sources: h3 docs (adapters / toNodeHandler) and h3 distribution exports. [1][2]

References:
[1] h3 — More utils / Adapters (toNodeHandler).
[2] h3 distribution (exports showing toNodeHandler).


🏁 Script executed:

# Search for where NodeHttp1Handler might be defined locally
rg "NodeHttp1Handler\s*=" --type ts

Repository: TanStack/router

Length of output: 41


🏁 Script executed:

# Check type definitions in packages
find . -path ./node_modules -prune -o -name "*.d.ts" -type f -print | xargs grep -l "NodeHttp1Handler" 2>/dev/null

Repository: TanStack/router

Length of output: 43


🏁 Script executed:

# Check the actual srvx export - maybe it's under a different name
rg "export.*type.*Handler" packages/ e2e/ | grep -i "http\|node"

Repository: TanStack/router

Length of output: 41


🏁 Script executed:

# Check if the project even compiles - look for build errors or type check results
find . -name "tsconfig.json" -path "*/e2e/vue-start/custom-basepath*" -exec cat {} \;

Repository: TanStack/router

Length of output: 648


🏁 Script executed:

# Search for any .d.ts files that might define this type
find . -type f -name "*.d.ts" | head -20

Repository: TanStack/router

Length of output: 1221


🌐 Web query:

srvx h3 nodejs handler type exports what is exported

💡 Result:

Short answer: srvx exports a runtime-compatible fetch handler API (use export default { fetch(request) { ... } }) and also exports the extended ServerRequest type (request.ip etc.) plus the serve helper for programmatic Node.js use. See the Fetch Handler / Guide. [1][2]

Sources:
[1] srvx Fetch Handler docs — mentions fetch handler and ServerRequest.
[2] srvx Getting Started / guide — shows export default handler and serve usage.


Remove the non-existent type assertion or define NodeHttp1Handler locally.

NodeHttp1Handler is imported from 'srvx' but doesn't exist in that package. The type assertions on lines 21 and 32 cast to a non-existent type, which defeats the purpose of TypeScript strict mode and the coding guideline requiring "extensive type safety." The actual return type of toNodeHandler() is (req: IncomingMessage, res: ServerResponse) => void | Promise<void>. Either remove the assertions if the return type is already correct, or define NodeHttp1Handler locally to match the expected signature.

Also applies to: 21-21, 32-32

🤖 Prompt for AI Agents
In e2e/vue-start/custom-basepath/express-server.ts around lines 3, 21 and 32:
the file imports a non-existent NodeHttp1Handler from 'srvx' and then casts to
that type on lines 21 and 32; remove the faulty import and the two casts, or
alternatively declare a local type alias matching the actual signature "(req:
IncomingMessage, res: ServerResponse) => void | Promise<void>" (export/type
alias at top) and use that local type instead of NodeHttp1Handler so TypeScript
strict mode is satisfied and the toNodeHandler() return is correctly typed.


const DEVELOPMENT = process.env.NODE_ENV === 'development'
const PORT = Number.parseInt(process.env.PORT || '3000')
Expand All @@ -17,7 +18,7 @@ if (DEVELOPMENT) {
try {
const { default: serverEntry } =
await viteDevServer.ssrLoadModule('./src/server.ts')
const handler = toNodeHandler(serverEntry.fetch)
const handler = toNodeHandler(serverEntry.fetch) as NodeHttp1Handler
await handler(req, res)
} catch (error) {
if (typeof error === 'object' && error instanceof Error) {
Expand All @@ -28,7 +29,7 @@ if (DEVELOPMENT) {
})
} else {
const { default: handler } = await import('./dist/server/server.js')
const nodeHandler = toNodeHandler(handler.fetch)
const nodeHandler = toNodeHandler(handler.fetch) as NodeHttp1Handler
app.use('/custom/basepath', express.static('dist/client'))
app.use(async (req, res, next) => {
try {
Expand Down
2 changes: 1 addition & 1 deletion e2e/vue-start/custom-basepath/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@types/express": "^5.0.3",
"@types/node": "^22.10.2",
"cross-env": "^10.0.0",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"tsx": "^4.20.3",
"typescript": "^5.7.2",
Expand Down
2 changes: 1 addition & 1 deletion e2e/vue-start/scroll-restoration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@tanstack/router-e2e-utils": "workspace:^",
"@types/node": "^22.10.2",
"combinate": "^1.1.11",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"@vitejs/plugin-vue": "^6.0.3",
Expand Down
2 changes: 1 addition & 1 deletion e2e/vue-start/selective-ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"devDependencies": {
"@tailwindcss/vite": "^4.1.18",
"@tanstack/router-e2e-utils": "workspace:^",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"vite": "^7.1.7",
Expand Down
2 changes: 1 addition & 1 deletion e2e/vue-start/serialization-adapters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"devDependencies": {
"@tailwindcss/vite": "^4.1.18",
"@tanstack/router-e2e-utils": "workspace:^",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"vite": "^7.1.7",
Expand Down
2 changes: 1 addition & 1 deletion e2e/vue-start/server-functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@types/js-cookie": "^3.0.6",
"@types/node": "^22.10.2",
"combinate": "^1.1.11",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"@vitejs/plugin-vue": "^6.0.3",
Expand Down
2 changes: 1 addition & 1 deletion e2e/vue-start/server-routes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@types/js-cookie": "^3.0.6",
"@types/node": "^22.10.2",
"combinate": "^1.1.11",
"srvx": "^0.9.8",
"srvx": "^0.10.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.7.2",
"@vitejs/plugin-vue": "^6.0.3",
Expand Down
Loading
Loading