mirror of
https://github.com/ArthurDanjou/trpc-nuxt.git
synced 2026-01-14 12:14:40 +01:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 25e09b2e30 | |||
| 0612716187 | |||
|
|
55712e3027 | ||
|
|
0fec55a3ae | ||
|
|
8f9e398ae2 | ||
|
|
092e3495fd |
26
CHANGELOG.md
26
CHANGELOG.md
@@ -1,6 +1,32 @@
|
||||
# Changelog
|
||||
|
||||
|
||||
## v0.10.12
|
||||
|
||||
[compare changes](https://github.com/wobsoriano/trpc-nuxt/compare/v0.10.11...v0.10.12)
|
||||
|
||||
### 🩹 Fixes
|
||||
|
||||
- Expect ofetch missing error response type ([8f9e398](https://github.com/wobsoriano/trpc-nuxt/commit/8f9e398))
|
||||
|
||||
### 💅 Refactors
|
||||
|
||||
- Explicitly copy headers to custom fetcher ([0fec55a](https://github.com/wobsoriano/trpc-nuxt/commit/0fec55a))
|
||||
|
||||
### 📖 Documentation
|
||||
|
||||
- Add response caching page ([9808375](https://github.com/wobsoriano/trpc-nuxt/commit/9808375))
|
||||
- Fix missing title ([057c8f8](https://github.com/wobsoriano/trpc-nuxt/commit/057c8f8))
|
||||
- Fix incorrect syntax ([230422b](https://github.com/wobsoriano/trpc-nuxt/commit/230422b))
|
||||
|
||||
### 📦 Build
|
||||
|
||||
- **deps:** Bump ofetch to 1.3.2 ([092e349](https://github.com/wobsoriano/trpc-nuxt/commit/092e349))
|
||||
|
||||
### ❤️ Contributors
|
||||
|
||||
- Wobsoriano ([@wobsoriano](http://github.com/wobsoriano))
|
||||
|
||||
## v0.10.11
|
||||
|
||||
[compare changes](https://github.com/wobsoriano/trpc-nuxt/compare/v0.10.10...v0.10.11)
|
||||
|
||||
@@ -2,21 +2,21 @@
|
||||
"name": "nuxt-app",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxt dev",
|
||||
"generate": "nuxt generate",
|
||||
"preview": "nuxt preview",
|
||||
"postinstall": "nuxt prepare"
|
||||
"build": "nuxi build",
|
||||
"dev": "nuxi dev",
|
||||
"generate": "nuxi generate",
|
||||
"preview": "nuxi preview",
|
||||
"postinstall": "nuxi prepare"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nuxt/devtools": "latest",
|
||||
"@types/node": "^20.4.2",
|
||||
"nuxt": "^3.6.5"
|
||||
"@types/node": "20.5.7",
|
||||
"nuxt": "^3.7.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@trpc/client": "^10.35.0",
|
||||
"@trpc/server": "^10.35.0",
|
||||
"@trpc/client": "^10.38.1",
|
||||
"@trpc/server": "^10.38.1",
|
||||
"trpc-nuxt": "workspace:*",
|
||||
"zod": "^3.21.4"
|
||||
"zod": "^3.22.2"
|
||||
}
|
||||
}
|
||||
|
||||
28
package.json
28
package.json
@@ -3,7 +3,7 @@
|
||||
"description": "End-to-end typesafe APIs in Nuxt applications.",
|
||||
"type": "module",
|
||||
"packageManager": "pnpm@8.6.9",
|
||||
"version": "0.10.11",
|
||||
"version": "0.10.12",
|
||||
"license": "MIT",
|
||||
"sideEffects": false,
|
||||
"exports": {
|
||||
@@ -35,23 +35,23 @@
|
||||
"update-deps": "taze -w && pnpm i"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@trpc/client": "^10.26.0",
|
||||
"@trpc/server": "^10.26.0"
|
||||
"@trpc/client": "^10.38.1",
|
||||
"@trpc/server": "^10.38.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"h3": "^1.8.0",
|
||||
"ofetch": "^1.2.0",
|
||||
"h3": "^1.8.1",
|
||||
"ofetch": "^1.3.3",
|
||||
"ohash": "^1.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nuxt/eslint-config": "^0.1.1",
|
||||
"@trpc/client": "^10.37.1",
|
||||
"@trpc/server": "^10.37.1",
|
||||
"@nuxt/eslint-config": "^0.2.0",
|
||||
"@trpc/client": "^10.38.1",
|
||||
"@trpc/server": "^10.38.1",
|
||||
"changelogen": "^0.5.5",
|
||||
"eslint": "^8.45.0",
|
||||
"eslint": "^8.48.0",
|
||||
"taze": "^0.11.2",
|
||||
"tsup": "7.2.0",
|
||||
"typescript": "^5.1.6"
|
||||
"typescript": "^5.2.2"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
@@ -74,9 +74,9 @@
|
||||
],
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
"nuxt": "3.6.5",
|
||||
"@trpc/client": "10.37.1",
|
||||
"@trpc/server": "10.37.1"
|
||||
"nuxt": "3.7.0",
|
||||
"@trpc/client": "10.38.1",
|
||||
"@trpc/server": "10.38.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,21 +2,21 @@
|
||||
"name": "playground",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxt dev",
|
||||
"generate": "nuxt generate",
|
||||
"preview": "nuxt preview",
|
||||
"postinstall": "nuxt prepare"
|
||||
"build": "nuxi build",
|
||||
"dev": "nuxi dev",
|
||||
"generate": "nuxi generate",
|
||||
"preview": "nuxi preview",
|
||||
"postinstall": "nuxi prepare"
|
||||
},
|
||||
"dependencies": {
|
||||
"@trpc/client": "^10.37.1",
|
||||
"@trpc/server": "^10.37.1",
|
||||
"@trpc/client": "10.38.1",
|
||||
"@trpc/server": "10.38.1",
|
||||
"superjson": "^1.13.1",
|
||||
"trpc-nuxt": "workspace:*",
|
||||
"zod": "^3.21.4"
|
||||
"zod": "^3.22.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.4.2",
|
||||
"nuxt": "3.6.5"
|
||||
"@types/node": "20.5.7",
|
||||
"nuxt": "3.7.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { createNuxtApiHandler } from 'trpc-nuxt'
|
||||
import { appRouter } from '@/server/trpc/routers'
|
||||
import { createContext } from '@/server/trpc/context'
|
||||
import { appRouter } from '../../trpc/routers'
|
||||
import { createContext } from '../../trpc/context'
|
||||
|
||||
export default createNuxtApiHandler({
|
||||
router: appRouter,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { z } from 'zod'
|
||||
import { publicProcedure, router } from '../trpc'
|
||||
import { $fetch } from 'ofetch'
|
||||
|
||||
const baseURL = 'https://jsonplaceholder.typicode.com'
|
||||
|
||||
|
||||
3
playground/server/tsconfig.json
Normal file
3
playground/server/tsconfig.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "../.nuxt/tsconfig.server.json"
|
||||
}
|
||||
3225
pnpm-lock.yaml
generated
3225
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -14,6 +14,7 @@ function customFetch(input: RequestInfo | URL, init?: RequestInit & { method: 'G
|
||||
})
|
||||
.then(response => ({
|
||||
...response,
|
||||
headers: response.headers,
|
||||
json: () => Promise.resolve(response._data)
|
||||
}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user