Skip to content

Commit

Permalink
template/koa-rest-api: koa-bodyparser => @koa/bodyparser (#1605)
Browse files Browse the repository at this point in the history
Co-authored-by: Aaron Moat <[email protected]>
  • Loading branch information
72636c and AaronMoat authored Sep 29, 2024
1 parent 3ee31b9 commit 8efb513
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 31 deletions.
5 changes: 5 additions & 0 deletions .changeset/afraid-gifts-behave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'skuba': patch
---

template/koa-rest-api: Switch from `koa-bodyparser` to `@koa/bodyparser`
55 changes: 27 additions & 28 deletions pnpm-lock.yaml

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

4 changes: 2 additions & 2 deletions template/koa-rest-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"test:watch": "skuba test --watch"
},
"dependencies": {
"@koa/bodyparser": "^5.1.1",
"@koa/router": "^13.0.0",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/core": "^1.25.0",
Expand All @@ -24,7 +25,6 @@
"@seek/logger": "^9.0.0",
"hot-shots": "^10.0.0",
"koa": "^2.13.4",
"koa-bodyparser": "^4.3.0",
"koa-compose": "^4.1.0",
"seek-datadog-custom-metrics": "^4.6.3",
"seek-koala": "^7.0.0",
Expand All @@ -33,8 +33,8 @@
},
"devDependencies": {
"@types/chance": "^1.1.3",
"@types/co-body": "^6.1.3",
"@types/koa": "^2.13.4",
"@types/koa-bodyparser": "^5.0.2",
"@types/koa__router": "^12.0.0",
"@types/node": "^20.16.5",
"@types/supertest": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion template/koa-rest-api/src/framework/bodyParser.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import bodyParser from 'koa-bodyparser';
import { bodyParser } from '@koa/bodyparser';

export const jsonBodyParser = bodyParser({ enableTypes: ['json'] });

0 comments on commit 8efb513

Please sign in to comment.