Skip to content

feat!: node.js 26 support - #2007

Open
dianager wants to merge 9 commits into
masterfrom
nodejs-26
Open

feat!: node.js 26 support#2007
dianager wants to merge 9 commits into
masterfrom
nodejs-26

Conversation

@dianager

@dianager dianager commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

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

Summary

This PR updates restify for Node.js 26 support and modernizes deprecated Node.js APIs and dependencies. It raises the supported runtime baseline to Node.js 22+, updates CI to test Node.js 22/24/26, removes deprecated SPDY support, and replaces legacy URL/request APIs with modern platform APIs.

Changes

Node.js 26 support

  • Raise engines.node from >=10.0.0 to >=22.0.0.
  • Update README supported versions to Node.js 22.x, 24.x, and 26.x.
  • Update CI test matrix from Node.js 14/16/18/20 to 22/24/26.
  • Update GitHub Actions versions used in CI.

Removed deprecated SPDY support

  • Remove the spdy dependency.
  • Remove SPDY server option documentation.
  • Remove SPDY example and test certificate fixtures.

Deprecated Node.js API replacements

  • Replace request.connection usage with request.socket.
  • Replace deprecated request.abort() usage with request.destroy().
  • Replace deprecated new Buffer() / Buffer() usage.
  • Replace module.parent checks in benchmarks/test helpers with require.main === module.
  • Replace uuid dependency usage with crypto.randomUUID().

URL API modernization

  • Replace deprecated url.resolve() and url.parse() paths with WHATWG URL.
  • Update req.getUrl() to return/cache a URL instance.
  • Preserve correct raw query behavior via req.getQuery().
  • Update redirect URL construction to use URL / URLSearchParams.
  • Preserve duplicate query parameters during redirects.
  • Improve handling for relative redirects, explicit host/port redirects, and OPTIONS *.

Dependency updates

  • Upgrade find-my-way to ^9.6.0.
  • Upgrade qs to ^6.15.2.
  • Upgrade send to ^1.2.1.
  • Upgrade inquirer to ^8.2.7.
  • Remove production dependency on uuid.

Query/body parsing

  • Add arrayLimit option support for URL-encoded body parsing.
  • Add throwOnLimitExceeded support for query parsing and URL-encoded body parsing.
  • Surface qs limit errors as InvalidContentError.

Routing

  • Add useSemicolonDelimiter option to preserve optional semicolon-delimited path segment behavior with newer find-my-way.
  • Add router tests for matrix parameter behavior with and without useSemicolonDelimiter.

Tests and docs

  • Update tests for Node.js 26 behavior and modern URL APIs.
  • Add coverage for req.getUrl(), req.absoluteUri(), redirects, duplicate query params, OPTIONS *, and semicolon-delimited routing.
  • Fix benchmark tests by calling next() from handlers.
  • Regenerate API documentation for updated options and behavior.

Breaking Changes

  • Drops support for Node.js versions below 22.
  • Removes deprecated SPDY support and the spdy dependency.
  • Updates routing behavior dependencies through find-my-way@9; semicolon-delimited path segment stripping now requires useSemicolonDelimiter: true.
  • Updates query/body parsing behavior through qs@6.15.2, including optional limit-error behavior.

Validation

  • CI matrix updated to Node.js 22.x, 24.x, and 26.x.
  • Test coverage updated for request URL parsing, redirect behavior, query/body parser limits, routing semicolon handling, and deprecated API replacements.

dianager and others added 9 commits July 16, 2026 11:59
Co-authored-by: dvinakur <dvinakur@netflix.com>
Co-authored-by: dvinakur <dvinakur@netflix.com>
* feat: replace request.connection with request.socket

* feat: replace request.abort() with request.destroy()

* feat: replace deprecated new Buffer() and Bufffer() functions

---------

Co-authored-by: dvinakur <dvinakur@netflix.com>
* feat!: support Node.js 26

* feat: remove Node.js 20 from CI matrix

* feat: add Node.js 22 to CI matrix

* feat: update actions/checkout version to v7

---------

Co-authored-by: dvinakur <dvinakur@netflix.com>
* feat: remove production vulnerabilities

* feat: replace uuid for crypto

---------

Co-authored-by: dvinakur <dvinakur@netflix.com>
Co-authored-by: dvinakur <dvinakur@netflix.com>
#1996)

* feat: replace deprecated url.resolve() and url.parse() with WHATWG URL

* fix: replace parseUrlQuery and formatUrl for URL

* fix: change finalUri.query generation

* fix: fix redirect logic

* feat: update dependencies (#2002)

* feat: remove production vulnerabilities

* feat: replace uuid for crypto

---------

Co-authored-by: dvinakur <dvinakur@netflix.com>

* fix: update comments

* feat: add caching for absoluteUri

---------

Co-authored-by: dvinakur <dvinakur@netflix.com>
* feat!: upgrade qs

* feat: add arrayLimit option for bodyParser plugin

* feat: add throwOnLimitExceeded option for queryParser and bodyParser plugins

* feat: update documentation

---------

Co-authored-by: dvinakur <dvinakur@netflix.com>
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.

1 participant