Skip to content

Conversation

mmarchini
Copy link
Contributor

Node.js added closed getter-only property to streams. This commit deprecates req.closed to avoid monkey-patching something that might be used in Node.js core or user-land libraries.
req.connectionState() === 'close' can be used to achieve the same result moving forward. req.closed will be removed on Restify 10 to open way to support Node.js v18.

Pre-Submission Checklist

  • Opened an issue discussing these changes before opening the PR
  • Ran the linter and tests via make prepush
  • Included comprehensive and convincing tests for changes

Issues

Closes:

  • Issue #
  • Issue #
  • Issue #

Summarize the issues that discussed these changes

Changes

What does this PR do?

Node.js added `closed` getter-only property to streams. This commit
deprecates req.closed to avoid monkey-patching something that might be
used in Node.js core or user-land libraries.
`req.connectionState() === 'close'` can be used to achieve the same
result moving forward. req.closed will be removed on Restify 10 to open
way to support Node.js v18.
@mmarchini mmarchini merged commit c15111f into restify:master Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants