Skip to content

Fix TS builds, Lambda Runtime, Add Array input support, and fix tests #2

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
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
29 changes: 29 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"logToFile": true,
"configurations": [
{
"name": "Jest file",
"type": "node",
"request": "launch",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/jest",
"args": [
"${fileBasenameNoExtension}",
"--runInBand",
"--watch",
"--coverage=false",
"--no-cache"
],
"cwd": "${workspaceRoot}",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"sourceMaps": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
}
}
]
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"editor.tabSize": 2,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"workbench.colorCustomizations": {
"titleBar.activeBackground": "#8FCE0B",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ A procedure can accept a set of inputs via URL path parameters. You can add a pa

### Query parameters

Query & path parameter inputs are always accepted as a `string`. This library will attempt to [coerce](https://github.com/colinhacks/zod#coercion-for-primitives) your input values to the following primitive types out of the box: `number`, `boolean`, `bigint` and `date`. If you wish to support others such as `object`, `array` etc. please use [`z.preprocess()`](https://github.com/colinhacks/zod#preprocess).
Query & path parameter inputs are always accepted as a `string`. This library will attempt to [coerce](https://github.com/colinhacks/zod#coercion-for-primitives) your input `array` and `object` values to the following primitive types out of the box: `number`, `boolean`, `bigint` and `date`. If you wish to support others (such as nested `object`, `array`) etc. please use [`z.preprocess()`](https://github.com/colinhacks/zod#preprocess).

```typescript
// Router
Expand Down
4 changes: 2 additions & 2 deletions examples/with-express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dev": "ts-node-dev --respawn --transpile-only --exit-child ./src/index.ts"
},
"dependencies": {
"@trpc/server": "^10.27.1",
"@trpc/server": "^11.0.0-rc.502",
"cors": "^2.8.5",
"express": "^4.18.2",
"jsonwebtoken": "^9.0.0",
Expand All @@ -25,4 +25,4 @@
"ts-node-dev": "^2.0.0",
"typescript": "^5.0.4"
}
}
}
4 changes: 2 additions & 2 deletions examples/with-fastify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"dependencies": {
"@fastify/cors": "^8.2.1",
"@fastify/swagger": "^8.5.1",
"@trpc/server": "^10.27.1",
"@trpc/server": "^11.0.0-rc.502",
"fastify": "^4.17.0",
"jsonwebtoken": "^9.0.0",
"uuid": "^9.0.0",
Expand All @@ -24,4 +24,4 @@
"ts-node-dev": "^2.0.0",
"typescript": "^5.0.4"
}
}
}
4 changes: 2 additions & 2 deletions examples/with-interop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"version": "1.0.0",
"private": true,
"dependencies": {
"@trpc/server": "^10.27.1",
"@trpc/server": "^11.0.0-rc.502",
"zod": "^3.21.4"
},
"devDependencies": {
"@types/node": "^20.2.3",
"typescript": "^5.0.4"
}
}
}
4 changes: 2 additions & 2 deletions examples/with-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"lint": "next lint"
},
"dependencies": {
"@trpc/server": "^10.27.1",
"@trpc/server": "^11.0.0-rc.502",
"jsonwebtoken": "^9.0.0",
"next": "^13.4.3",
"nextjs-cors": "^2.1.2",
Expand All @@ -30,4 +30,4 @@
"eslint-config-next": "^13.4.3",
"typescript": "^5.0.4"
}
}
}
8 changes: 4 additions & 4 deletions examples/with-nuxtjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
},
"devDependencies": {
"@types/node": "^20.2.3",
"nuxt": "^3.5.1"
"nuxt": "^3.13.1"
},
"dependencies": {
"@trpc/server": "^10.27.1",
"trpc-nuxt": "^0.10.3"
"@trpc/server": "^11.0.0-rc.502",
"trpc-nuxt": "^0.11.0-beta.1"
}
}
}
4 changes: 2 additions & 2 deletions examples/with-serverless/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dev": "rimraf .build && serverless offline"
},
"dependencies": {
"@trpc/server": "^10.27.1",
"@trpc/server": "^11.0.0-rc.502",
"zod": "^3.21.4"
},
"devDependencies": {
Expand All @@ -16,4 +16,4 @@
"serverless-plugin-typescript": "^2.1.4",
"typescript": "^5.0.4"
}
}
}
Loading