Skip to content

Commit 8b01931

Browse files
Merge pull request #17 from dillonstreator/chore/upgrade-express-5
Upgrade to Express 5
2 parents 8beb047 + 6bc64ac commit 8b01931

5 files changed

Lines changed: 143 additions & 178 deletions

File tree

.changeset/express-5-upgrade.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"template-node-express": major
3+
---
4+
5+
Upgrade to Express 5 and remove `express-async-errors`, relying on Express 5's built-in async error handling.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A minimal production-ready node HTTP server with [`Express`](https://expressjs.c
88
✅ Properly configured request payload size limiting to help prevent Denial of Service attack vectors \
99
`AbortSignal` propagation to prevent unnecessary work (includes example and test) \
1010
✅ Validation with [`express-validator`](https://express-validator.github.io/docs) \
11-
✅ Async error forwarding to default error handler with [`express-async-errors`](https://github.com/davidbanham/express-async-errors) \
11+
✅ Async error forwarding to the default error handler (built into Express 5) \
1212
✅ Structured logging with [`pino`](https://github.com/pinojs/pino) \
1313
✅ Rich request logging middleware including request id, trace id, context propagation, and more \
1414
✅ Testing with [`jest`](https://github.com/jestjs/jest), [`supertest`](https://github.com/forwardemail/supertest), and [`fetch-mock`](https://github.com/wheresrhys/fetch-mock) \

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@changesets/cli": "^2.31.1",
2626
"@jest/globals": "^29.7.0",
2727
"@types/compression": "^1.8.1",
28-
"@types/express": "^4.17.23",
28+
"@types/express": "^5.0.6",
2929
"@types/jest": "^29.5.14",
3030
"@types/node": "^20.19.9",
3131
"@types/request-ip": "^0.0.41",
@@ -47,8 +47,7 @@
4747
"@opentelemetry/sdk-trace-base": "^2.9.0",
4848
"@opentelemetry/semantic-conventions": "^1.43.0",
4949
"compression": "^1.8.1",
50-
"express": "^4.22.2",
51-
"express-async-errors": "^3.1.1",
50+
"express": "^5.2.1",
5251
"express-validator": "^7.3.2",
5352
"helmet": "^8.1.0",
5453
"http-graceful-shutdown": "^3.1.16",
@@ -60,6 +59,7 @@
6059
"protobufjs"
6160
],
6261
"overrides": {
62+
"@types/express": "^5.0.6",
6363
"js-yaml": "^3.15.0",
6464
"form-data": "^4.0.6",
6565
"protobufjs": "^7.6.3",

0 commit comments

Comments
 (0)