GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — lib,src: deduplicate code by jasnell · Pull Request #67495 · nodejs/node

Conversation

@jasnell

@jasnell jasnell commented Nov 15, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Overall simplification. Deduplicate a number of JS and C++ bits.

See each individual commit.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
jasnell added 10 commits November 15, 2026 18:15
@jasnell
crypto: share asymmetric WebCrypto key import logic
20b7092
The RSA, EC, CFRG, ML-DSA, and ML-KEM importKey implementations each
duplicated the handling of the 'KeyObjectHandle', 'spki', and 'pkcs8'
formats. Move it into a shared importAsymmetricKeyHandle() helper in
webcrypto_util, with an optional hook that ML-DSA and ML-KEM use to
reject PKCS#8 keys without a seed.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
@jasnell
crypto: deduplicate WebCrypto SPKI/PKCS#8 exporter lookup
f7600f8
exportKeySpki() and exportKeyPkcs8() contained identical switch
statements mapping the algorithm name to its export function. Move
the lookup into a shared getAsymmetricKeyExporter() helper.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
@jasnell
http: share insecureHTTPParser/httpValidation option handling
6ee2b90
ClientRequest and Server duplicated the validation of the
insecureHTTPParser and httpValidation options, including the check
that they are mutually exclusive. Move it into a shared
setHttpParserOptions() helper in internal/http.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
@jasnell
util: share helpers between debounce() and throttle()
a67e6f0
util.debounce() and util.throttle() duplicated the construction of the
AbortError used for cancel()/abort, and the property definitions for
the returned function's control methods, state getters, length, and
name. Move both into internal/util/wrapped_function.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
@jasnell
stream: deduplicate string chunk encoding in web stream adapters
4d08981
The Writable and Duplex adapters created from web streams duplicated
the logic that encodes string chunks as a Uint8Array before writing
them to the WritableStream. Move it into a shared encodeStringChunk()
helper.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
@jasnell
sqlite: share SQLTagStore statement preparation
fb46319
SQLTagStore::Run(), Iterate(), Get(), and All() each duplicated the
database state checks, statement preparation, and parameter binding.
Move them into a shared PrepareForExecution() helper.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
@jasnell
url: share URLPattern exec() and test() argument parsing
d3abda5
URLPattern::Exec() and URLPattern::Test() duplicated the parsing of the
input and baseURL arguments. Move it into a shared
ParseURLPatternMatchArgs() helper.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
@jasnell
buffer: share search range logic between indexOf implementations
20697a9
IndexOfString() and IndexOfBuffer() duplicated the computation of the
search range and the early returns for empty needles, empty haystacks,
and out-of-range offsets. Move it into a shared
GetIndexOfSearchRange() helper.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
@jasnell
crypto: share digest length handling between HashInit overloads
f36de12
The two Hash::HashInit() overloads duplicated the logic that
determines the digest length and validates the requested XOF output
length after the digest context is initialized. Move it into a shared
FinishHashInit() helper.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
@jasnell
crypto: add TicketHmacCtx alias for TLS ticket key callbacks
5bb76ef
The SecureContext ticket key callback signatures repeated the same
backend-specific preprocessor block to select between EVP_MAC_CTX and
HMAC_CTX. Define the type once as TicketHmacCtx and use it instead.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
@nodejs-github-bot

nodejs-github-bot commented Nov 15, 2026

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto
  • @nodejs/http
  • @nodejs/net
  • @nodejs/sqlite
  • @nodejs/url
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. labels Nov 15, 2026
@jasnell
jasnell requested review from aduh95 and panva November 15, 2026 18:20
@codecov

codecov Bot commented Nov 15, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.13333% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.68%. Comparing base (d105ef7) to head (5bb76ef).
⚠️ Report is 17 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/webstreams/adapters.js 45.45% 12 Missing ⚠️
src/node_buffer.cc 85.71% 0 Missing and 7 partials ⚠️
src/node_url_pattern.cc 92.59% 0 Missing and 2 partials ⚠️
src/node_sqlite.cc 94.44% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #67495      +/-   ##
==========================================
+ Coverage   90.67%   90.68%   +0.01%     
==========================================
  Files         799      800       +1     
  Lines      280245   280134     -111     
  Branches    54125    54079      -46     
==========================================
- Hits       254100   254037      -63     
+ Misses      16280    16252      -28     
+ Partials     9865     9845      -20     
Files with missing lines Coverage Δ
lib/internal/crypto/cfrg.js 95.45% <100.00%> (-0.31%) ⬇️
lib/internal/crypto/ec.js 96.78% <100.00%> (-0.16%) ⬇️
lib/internal/crypto/ml_dsa.js 97.19% <100.00%> (-0.14%) ⬇️
lib/internal/crypto/ml_kem.js 94.95% <100.00%> (-0.25%) ⬇️
lib/internal/crypto/rsa.js 94.64% <100.00%> (-0.29%) ⬇️
lib/internal/crypto/webcrypto.js 98.09% <100.00%> (-0.04%) ⬇️
lib/internal/crypto/webcrypto_util.js 98.28% <100.00%> (+0.22%) ⬆️
lib/internal/http.js 93.20% <100.00%> (+0.67%) ⬆️
lib/internal/http/client.js 97.10% <100.00%> (-0.05%) ⬇️
lib/internal/http/server.js 96.66% <100.00%> (-0.04%) ⬇️
... and 12 more

... and 21 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

araujogui
araujogui approved these changes Nov 16, 2026
View reviewed changes

@araujogui araujogui left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

SQLite LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jasnell jasnell added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 16, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 16, 2026
@nodejs-github-bot

This comment was marked as outdated.

Sign in to view
panva
panva approved these changes Nov 16, 2026
View reviewed changes

@panva panva left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

node:crypto and Web Cryptography LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@panva panva added the commit-queue-rebase PRs the Commit Queue should land as multiple self-contained commits. label Nov 16, 2026
ronag
ronag approved these changes Nov 16, 2026
View reviewed changes
@panva panva added author ready PRs with CI started, the required approvals, and no outstanding review comments. resume-ci Add this label to resume the latest eligible Jenkins CI run on a PR with an approving review. labels Nov 16, 2026
@github-actions github-actions Bot removed the resume-ci Add this label to resume the latest eligible Jenkins CI run on a PR with an approving review. label Nov 16, 2026
@nodejs-github-bot

nodejs-github-bot commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/79173/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@panva panva added the commit-queue PRs queued for automated landing through the Commit Queue. label Nov 16, 2026
Ethan-Arrowood
Ethan-Arrowood approved these changes Nov 16, 2026
View reviewed changes

@Ethan-Arrowood Ethan-Arrowood left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM on behalf of http 👾

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
bjohansebas
bjohansebas approved these changes Nov 16, 2026
View reviewed changes

@bjohansebas bjohansebas left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM, http part

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
nodejs-github-bot pushed a commit that referenced this pull request Nov 17, 2026
@jasnell @nodejs-github-bot
util: share helpers between debounce() and throttle()
67798df
util.debounce() and util.throttle() duplicated the construction of the
AbortError used for cancel()/abort, and the property definitions for
the returned function's control methods, state getters, length, and
name. Move both into internal/util/wrapped_function.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: #67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
@nodejs-github-bot nodejs-github-bot closed this Nov 17, 2026
nodejs-github-bot pushed a commit that referenced this pull request Nov 17, 2026
@jasnell @nodejs-github-bot
stream: deduplicate string chunk encoding in web stream adapters
3193305
The Writable and Duplex adapters created from web streams duplicated
the logic that encodes string chunks as a Uint8Array before writing
them to the WritableStream. Move it into a shared encodeStringChunk()
helper.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: #67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
nodejs-github-bot pushed a commit that referenced this pull request Nov 17, 2026
@jasnell @nodejs-github-bot
sqlite: share SQLTagStore statement preparation
82939b5
SQLTagStore::Run(), Iterate(), Get(), and All() each duplicated the
database state checks, statement preparation, and parameter binding.
Move them into a shared PrepareForExecution() helper.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: #67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
nodejs-github-bot pushed a commit that referenced this pull request Nov 17, 2026
@jasnell @nodejs-github-bot
url: share URLPattern exec() and test() argument parsing
1f46b75
URLPattern::Exec() and URLPattern::Test() duplicated the parsing of the
input and baseURL arguments. Move it into a shared
ParseURLPatternMatchArgs() helper.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: #67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
nodejs-github-bot pushed a commit that referenced this pull request Nov 17, 2026
@jasnell @nodejs-github-bot
buffer: share search range logic between indexOf implementations
58fc230
IndexOfString() and IndexOfBuffer() duplicated the computation of the
search range and the early returns for empty needles, empty haystacks,
and out-of-range offsets. Move it into a shared
GetIndexOfSearchRange() helper.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: #67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
nodejs-github-bot pushed a commit that referenced this pull request Nov 17, 2026
@jasnell @nodejs-github-bot
crypto: share digest length handling between HashInit overloads
430e4af
The two Hash::HashInit() overloads duplicated the logic that
determines the digest length and validates the requested XOF output
length after the digest context is initialized. Move it into a shared
FinishHashInit() helper.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: #67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
nodejs-github-bot pushed a commit that referenced this pull request Nov 17, 2026
@jasnell @nodejs-github-bot
crypto: add TicketHmacCtx alias for TLS ticket key callbacks
a625b01
The SecureContext ticket key callback signatures repeated the same
backend-specific preprocessor block to select between EVP_MAC_CTX and
HMAC_CTX. Define the type once as TicketHmacCtx and use it instead.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: #67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Nov 17, 2026
aduh95 pushed a commit that referenced this pull request Nov 19, 2026
@jasnell @aduh95
crypto: share asymmetric WebCrypto key import logic
3bda549
The RSA, EC, CFRG, ML-DSA, and ML-KEM importKey implementations each
duplicated the handling of the 'KeyObjectHandle', 'spki', and 'pkcs8'
formats. Move it into a shared importAsymmetricKeyHandle() helper in
webcrypto_util, with an optional hook that ML-DSA and ML-KEM use to
reject PKCS#8 keys without a seed.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: #67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 19, 2026
@jasnell @aduh95
crypto: deduplicate WebCrypto SPKI/PKCS#8 exporter lookup
ded11f3
exportKeySpki() and exportKeyPkcs8() contained identical switch
statements mapping the algorithm name to its export function. Move
the lookup into a shared getAsymmetricKeyExporter() helper.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: #67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 19, 2026
@jasnell @aduh95
http: share insecureHTTPParser/httpValidation option handling
d605804
ClientRequest and Server duplicated the validation of the
insecureHTTPParser and httpValidation options, including the check
that they are mutually exclusive. Move it into a shared
setHttpParserOptions() helper in internal/http.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: #67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 19, 2026
@jasnell @aduh95
util: share helpers between debounce() and throttle()
a204908
util.debounce() and util.throttle() duplicated the construction of the
AbortError used for cancel()/abort, and the property definitions for
the returned function's control methods, state getters, length, and
name. Move both into internal/util/wrapped_function.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: #67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 19, 2026
@jasnell @aduh95
stream: deduplicate string chunk encoding in web stream adapters
5ad0b32
The Writable and Duplex adapters created from web streams duplicated
the logic that encodes string chunks as a Uint8Array before writing
them to the WritableStream. Move it into a shared encodeStringChunk()
helper.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: #67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 19, 2026
@jasnell @aduh95
sqlite: share SQLTagStore statement preparation
79a8d33
SQLTagStore::Run(), Iterate(), Get(), and All() each duplicated the
database state checks, statement preparation, and parameter binding.
Move them into a shared PrepareForExecution() helper.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: #67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 19, 2026
@jasnell @aduh95
url: share URLPattern exec() and test() argument parsing
6d69404
URLPattern::Exec() and URLPattern::Test() duplicated the parsing of the
input and baseURL arguments. Move it into a shared
ParseURLPatternMatchArgs() helper.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: #67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 19, 2026
@jasnell @aduh95
buffer: share search range logic between indexOf implementations
8dc536f
IndexOfString() and IndexOfBuffer() duplicated the computation of the
search range and the early returns for empty needles, empty haystacks,
and out-of-range offsets. Move it into a shared
GetIndexOfSearchRange() helper.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: #67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 19, 2026
@jasnell @aduh95
crypto: share digest length handling between HashInit overloads
9121206
The two Hash::HashInit() overloads duplicated the logic that
determines the digest length and validates the requested XOF output
length after the digest context is initialized. Move it into a shared
FinishHashInit() helper.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: #67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 19, 2026
@jasnell @aduh95
crypto: add TicketHmacCtx alias for TLS ticket key callbacks
d070e62
The SecureContext ticket key callback signatures repeated the same
backend-specific preprocessor block to select between EVP_MAC_CTX and
HMAC_CTX. Define the type once as TicketHmacCtx and use it instead.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: #67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
@github-actions github-actions Bot mentioned this pull request Nov 24, 2026
2026-11-25, Version 27.0.0-alpha.0.2.0 (Alpha) #67757
Merged
gabylb pushed a commit to gabylb/node that referenced this pull request Nov 27, 2026
@jasnell @gabylb
crypto: share asymmetric WebCrypto key import logic
91765e9
The RSA, EC, CFRG, ML-DSA, and ML-KEM importKey implementations each
duplicated the handling of the 'KeyObjectHandle', 'spki', and 'pkcs8'
formats. Move it into a shared importAsymmetricKeyHandle() helper in
webcrypto_util, with an optional hook that ML-DSA and ML-KEM use to
reject PKCS#8 keys without a seed.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: nodejs#67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
gabylb pushed a commit to gabylb/node that referenced this pull request Nov 27, 2026
@jasnell @gabylb
crypto: deduplicate WebCrypto SPKI/PKCS#8 exporter lookup
a0531e8
exportKeySpki() and exportKeyPkcs8() contained identical switch
statements mapping the algorithm name to its export function. Move
the lookup into a shared getAsymmetricKeyExporter() helper.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: nodejs#67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
gabylb pushed a commit to gabylb/node that referenced this pull request Nov 27, 2026
@jasnell @gabylb
http: share insecureHTTPParser/httpValidation option handling
b4f01a2
ClientRequest and Server duplicated the validation of the
insecureHTTPParser and httpValidation options, including the check
that they are mutually exclusive. Move it into a shared
setHttpParserOptions() helper in internal/http.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: nodejs#67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
gabylb pushed a commit to gabylb/node that referenced this pull request Nov 27, 2026
@jasnell @gabylb
util: share helpers between debounce() and throttle()
9e8ed08
util.debounce() and util.throttle() duplicated the construction of the
AbortError used for cancel()/abort, and the property definitions for
the returned function's control methods, state getters, length, and
name. Move both into internal/util/wrapped_function.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: nodejs#67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
gabylb pushed a commit to gabylb/node that referenced this pull request Nov 27, 2026
@jasnell @gabylb
stream: deduplicate string chunk encoding in web stream adapters
aae1491
The Writable and Duplex adapters created from web streams duplicated
the logic that encodes string chunks as a Uint8Array before writing
them to the WritableStream. Move it into a shared encodeStringChunk()
helper.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: nodejs#67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
gabylb pushed a commit to gabylb/node that referenced this pull request Nov 27, 2026
@jasnell @gabylb
sqlite: share SQLTagStore statement preparation
b8ec877
SQLTagStore::Run(), Iterate(), Get(), and All() each duplicated the
database state checks, statement preparation, and parameter binding.
Move them into a shared PrepareForExecution() helper.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: nodejs#67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
gabylb pushed a commit to gabylb/node that referenced this pull request Nov 27, 2026
@jasnell @gabylb
url: share URLPattern exec() and test() argument parsing
a8b68ff
URLPattern::Exec() and URLPattern::Test() duplicated the parsing of the
input and baseURL arguments. Move it into a shared
ParseURLPatternMatchArgs() helper.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: nodejs#67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
gabylb pushed a commit to gabylb/node that referenced this pull request Nov 27, 2026
@jasnell @gabylb
buffer: share search range logic between indexOf implementations
7f01d3f
IndexOfString() and IndexOfBuffer() duplicated the computation of the
search range and the early returns for empty needles, empty haystacks,
and out-of-range offsets. Move it into a shared
GetIndexOfSearchRange() helper.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: nodejs#67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
gabylb pushed a commit to gabylb/node that referenced this pull request Nov 27, 2026
@jasnell @gabylb
crypto: share digest length handling between HashInit overloads
330f091
The two Hash::HashInit() overloads duplicated the logic that
determines the digest length and validates the requested XOF output
length after the digest context is initialized. Move it into a shared
FinishHashInit() helper.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: nodejs#67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
gabylb pushed a commit to gabylb/node that referenced this pull request Nov 27, 2026
@jasnell @gabylb
crypto: add TicketHmacCtx alias for TLS ticket key callbacks
1f73ec4
The SecureContext ticket key callback signatures repeated the same
backend-specific preprocessor block to select between EVP_MAC_CTX and
HMAC_CTX. Define the type once as TicketHmacCtx and use it instead.

Assisted-by: Claude
Signed-off-by: James M Snell <[email protected]>
PR-URL: nodejs#67495
Reviewed-By: Guilherme Araújo <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@panva panva panva approved these changes
@ronag ronag ronag approved these changes
@Ethan-Arrowood Ethan-Arrowood Ethan-Arrowood approved these changes
@araujogui araujogui araujogui approved these changes
@aduh95 aduh95 Awaiting requested review from aduh95
+1 more reviewer
@bjohansebas bjohansebas bjohansebas approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue-rebase PRs the Commit Queue should land as multiple self-contained commits. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@jasnell @nodejs-github-bot @panva @ronag @Ethan-Arrowood @araujogui @bjohansebas
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.