Skip to content

feat!: upgrade to Node.js 26 - #246

Merged
dianager merged 10 commits into
masterfrom
node26
Aug 27, 2026
Merged

feat!: upgrade to Node.js 26#246
dianager merged 10 commits into
masterfrom
node26

Conversation

@dianager

@dianager dianager commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Migrates restify-clients toward Node.js 22/24/26 support.

Changes

  • Updates supported Node runtime to >=22.0.0.

  • Updates release workflow Node version to Node 22.

  • Upgrades test Restify dependency to 12.0.0-rc.0.

  • Updates Restify-backed tests for Restify 12 APIs:

    • restify.plugins.*
    • clients.bunyan.serializers
    • Restify 12 handler signatures
    • body parser behavior changes
    • redirect route compatibility
  • Replaces deprecated Node APIs:

    • new Buffer(...) -> Buffer.from(...)
    • req.connection access now prefers req.socket
  • Replaces uuid dependency usage with native crypto.randomUUID().

  • Removes direct uuid production dependency.

  • Adds URL behavior coverage for:

    • proxy URL parsing
    • proxy auth decoding
    • URL credentials sent as Basic auth
  • Replaces weak embedded TLS test key with shared Node 26-compatible TLS fixtures.

  • Moves external HTTPS timing test to a local TLS server for deterministic test behavior.

  • Updates migration plan with current Node 26 status, resolved deprecations, and production audit notes.

Breaking Changes

  • Drops support for Node.js versions below 22.
  • Test/development dependency behavior changes due to Restify 12 upgrade.
  • uuid is no longer installed as a direct dependency of this package. Consumers should not rely on transitive/direct availability of uuid from restify-clients.

Verification

  • Node 26 full test suite passed with thrown deprecations:

NODE_OPTIONS=--throw-deprecation make test

@dianager
dianager marked this pull request as draft August 25, 2026 11:10
@dianager
dianager marked this pull request as ready for review August 25, 2026 17:19
dvinakur and others added 2 commits August 26, 2026 11:16
* feat: replace travis with github actions

---------

Co-authored-by: dvinakur <dvinakur@netflix.com>
@dianager
dianager requested a review from mason-albert August 26, 2026 09:47
@coveralls

coveralls commented Aug 26, 2026

Copy link
Copy Markdown

Coverage Status

Coverage is 88.863%node26 into master. No base build found for master.

Comment thread package.json
},
"license": "MIT",
"engines": {
"node": ">=22.0.0"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we jump 24 instead of 22? Want to be consistent and seeing that's what we did here: Netflix/nerror#21 (comment)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason why I decided to leave 22 that this version is still in maintenance. I did the same for restify.

Comment thread lib/index.js
* @public
* @function createClient
* @param {Object} options an options object
* @param {Object | String} options an options object or URL string

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to add String as an accepted type?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the JSDoc because the code already supports both forms:

createJsonClient({ url: 'https://example.com' })
createJsonClient('https://example.com')

normalizeOptions() explicitly handles strings by converting them to { url: string }, so documenting options as only {Object}
was inaccurate.

This is documentation only. It does not change runtime behavior or break callers.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we need to leave this type without changes?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, I think this is good then.

@dianager
dianager merged commit ed653f6 into master Aug 27, 2026
6 checks passed
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.

3 participants