PSA: Express v5 incompatibility
- Dominant language
- JavaScript
- Stars
- 21.2k
- Forks
- 1.5k
- Avg merge
- 4h 57m
- Merged PRs (30d)
- 14
Description
### Runtime
node.js
### Runtime version
Any
### Module version
Any
### Used with
Express v5
### Any other relevant information
Mix of a public service announcement and a question regarding Express v5 compatibility.
There are seemingly innumerable documents published about how to do exciting things like validate Express' `req.query` using Joi, which in Express v4, works a treat.
Hoping to avoid others running into what I ran into this morning, `req.query` is immutable in Express v5, which effectively kills the usual approaches; curious if anyone's come up with a clever compatibility solution for this, as at this point, I can describe several promising approaches that don't work.
### How can we help?
```js
const foo = schema.validate(req.query);
```
```
TypeError: Cannot set property query of # which has only a getter
```
Contributor guide
Assessment
This issue has not been assessed yet.