Conversation
delvedor
left a comment
There was a problem hiding this comment.
I think we should log a deprecation warning with fastify-warning when using req.coonnection instead of req.socket (which we should add).
+1 on deprecation warning |
Agreed. It'll be easier this time @humphd because we already have deprecations supported here :) |
We should also be sure to update the types making use of the |
* Add request.socket, deprecate request.connection * Add deprecation warning FSTDEP005 for request.connection on node 13.0.0+ * Switch to use request.socket internally * Update tests to use .socket * Update docs * Update types to deprecate connection, add socket * Bump light-my-request to 4.1.0
|
Sorry, I didn't realize that this needed to include both properties. I've made the adjustments, and now do a proper warning. I think I've found all the doc/test/type references, but please let me know if I'm missing something. This also fixes #2599 |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Checklist
npm run testandnpm run benchmarkand the Code of conduct
This fixes #2575, switching to use
request.socketover the deprecatedrequest.connection. It relies on fastify/light-my-request#99, and updateslight-my-requestto 4.1.0. I've also updatedrequest.test.jsto provide the requiredsocketand/orconnectionproperties as necessary.