Skip to content

net: validate host name for server listen - #54470

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
jazelly:validate-square-bracket-host
Aug 25, 2024
Merged

net: validate host name for server listen#54470
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
jazelly:validate-square-bracket-host

Conversation

@jazelly

Copy link
Copy Markdown
Member

Fixes: #54441

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/net

@nodejs-github-botnodejs-github-bot added needs-ci PRs that need a full CI run. net Issues and PRs related to the net subsystem. labels Aug 21, 2024
@jazelly
jazellyforce-pushed the validate-square-bracket-host branch from 9a98517 to a4b1c6eCompareAugust 21, 2024 05:29
@jazelly
jazellyforce-pushed the validate-square-bracket-host branch from a4b1c6e to 859a003CompareAugust 21, 2024 06:31
Comment threadlib/net.js Outdated
@jazelly
jazellyforce-pushed the validate-square-bracket-host branch 2 times, most recently from 205e03b to 4036852CompareAugust 21, 2024 07:31
@jazellyjazelly changed the title net: validate host name with square bracketsnet: validate host name for server listenAug 21, 2024
@codecov

codecovBot commented Aug 21, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.33%. Comparing base (e4f61de) to head (9e8f849).
Report is 48 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@## main #54470 +/- ##
========================================
Coverage 87.33% 87.33% ========================================
Files 648 649 +1 Lines 182321 182532 +211 Branches 34971 35029 +58 ========================================
+ Hits 159222 159421 +199 - Misses 16374 16392 +18 + Partials 6725 6719 -6 
FilesCoverage Δ
lib/net.js92.66% <100.00%> (+0.02%)⬆️

... and 52 files with indirect coverage changes

Comment threadlib/net.js Outdated
Comment threadtest/parallel/test-net-server-listen-options.js Outdated
@jazelly
jazellyforce-pushed the validate-square-bracket-host branch 2 times, most recently from 9785834 to 6ff4d74CompareAugust 21, 2024 12:58
@jazelly

Copy link
Copy Markdown
MemberAuthor

PR comments addressed. Seems like this PR is more like validating host with regex. I have added extra test cases to cover the happy paths

Comment threadtest/parallel/test-net-server-listen-options.js Outdated
@jakecastellijakecastelli added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 22, 2024
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 22, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@mcollinamcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@mcollina

Copy link
Copy Markdown
Member

I have a rough feeling this might be semver-major. What was the error that was produced before this patch?

@jazelly

Copy link
Copy Markdown
MemberAuthor

What was the error that was produced before this patch?

before it goes to dns look up and fails there

node:events:497
throw er; // Unhandled 'error' event
^
Error: getaddrinfo ENOTFOUND [::]
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:26)
Emitted 'error' event on Server instance at:
at GetAddrInfoReqWrap.doListen [as callback] (node:net:2132:12)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:17) {
errno: -3008,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: '[::]'
}

Comment threadtest/parallel/test-net-server-listen-options.js Outdated
@jazelly
jazellyforce-pushed the validate-square-bracket-host branch from a050a83 to f2119eaCompareAugust 22, 2024 13:40
@mcollinamcollina added the semver-major PRs that contain breaking changes and should be released in the next major version. label Aug 22, 2024
Fixes: nodejs#54441
Co-authored-by: Luigi Pinca <luigipinca@gmail.com>
@jazelly
jazellyforce-pushed the validate-square-bracket-host branch from f2119ea to 9e8f849CompareAugust 22, 2024 23:50
@jakecastellijakecastelli added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 23, 2024
@jakecastellijakecastelli added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. labels Aug 23, 2024
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 25, 2024
@nodejs-github-bot
nodejs-github-bot merged commit 52322aa into nodejs:mainAug 25, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 52322aa

RafaelGSS added a commit that referenced this pull request Oct 9, 2024
Semver-Major Commits:
assert,util:
* (SEMVER-MAJOR) change WeakMap and WeakSet comparison handling (Cristian Barlutiu) #53495
buffer:
* (SEMVER-MAJOR) throw when writing beyond buffer" (Robert Nagy) #54588
* (SEMVER-MAJOR) make File cloneable (Matthew Aitken) #47613
build:
* (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #54536
* (SEMVER-MAJOR) disable ICF for mksnapshot (Leszek Swirski) #54077
* (SEMVER-MAJOR) include v8-sandbox.h header in distribution (Michaël Zasso) #54077
* (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #54077
* (SEMVER-MAJOR) warn for GCC versions earlier than 12.2 (Michaël Zasso) #54081
* (SEMVER-MAJOR) drop experimental support for Windows <10 (Michaël Zasso) #54079
* (SEMVER-MAJOR) remove support for 32-bit Windows (Michaël Zasso) #53184
* (SEMVER-MAJOR) compile with C++20 support (Michaël Zasso) #45427
child_process:
* (SEMVER-MAJOR) remove unused internal event (Rich Trott) #53793
cli:
* (SEMVER-MAJOR) remove deprecated V8 flag (Omer Katz) #54761
* (SEMVER-MAJOR) move --trace-atomics-wait to eol (Marco Ippolito) #52747
* (SEMVER-MAJOR) remove --no-experimental-global-customevent flag (Daeyeon Jeong) #52723
* (SEMVER-MAJOR) remove --no-experimental-fetch flag (Filip Skokan) #52611
* (SEMVER-MAJOR) remove --no-experimental-global-webcrypto flag (Filip Skokan) #52564
crypto:
* (SEMVER-MAJOR) runtime deprecate crypto.fips (Yagiz Nizipli) #55019
* (SEMVER-MAJOR) remove ERR_CRYPTO_SCRYPT_INVALID_PARAMETER (Tobias Nießen) #53305
* (SEMVER-MAJOR) move DEP0182 to runtime deprecation (Tobias Nießen) #52552
deps:
* (SEMVER-MAJOR) V8: cherry-pick 97199f686e2f (Michaël Zasso) #54536
* (SEMVER-MAJOR) V8: cherry-pick 01a47f3ffff2 (Michaël Zasso) #54536
* (SEMVER-MAJOR) patch V8 to support older Clang versions (Michaël Zasso) #54536
* (SEMVER-MAJOR) always define V8_NODISCARD as no-op (Michaël Zasso) #54536
* (SEMVER-MAJOR) fix FP16 bitcasts.h (Stefan Stojanovic) #54536
* (SEMVER-MAJOR) patch V8 to support compilation with MSVC (StefanStojanovic) #54536
* (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #54536
* (SEMVER-MAJOR) disable V8 concurrent sparkplug compilation (Michaël Zasso) #54536
* (SEMVER-MAJOR) always define V8_EXPORT_PRIVATE as no-op (Michaël Zasso) #54536
* (SEMVER-MAJOR) update V8 to 12.9.202.18 (Michaël Zasso) #54536
* (SEMVER-MAJOR) remove bogus V8 DCHECK (Michaël Zasso) #54077
* (SEMVER-MAJOR) V8: cherry-pick 00e9eeb3fb2c (Michaël Zasso) #54077
* (SEMVER-MAJOR) V8: cherry-pick b1397772c70c (Michaël Zasso) #54077
* (SEMVER-MAJOR) V8: cherry-pick 35888fee7bba (Joyee Cheung) #54077
* (SEMVER-MAJOR) always define V8_NODISCARD as no-op (Michaël Zasso) #54077
* (SEMVER-MAJOR) fix FP16 bitcasts.h (Stefan Stojanovic) #54077
* (SEMVER-MAJOR) V8: revert CL 5331688 (Michaël Zasso) #54077
* (SEMVER-MAJOR) patch V8 to support compilation with MSVC (StefanStojanovic) #54077
* (SEMVER-MAJOR) silence internal V8 deprecation warning (Michaël Zasso) #54077
* (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #54077
* (SEMVER-MAJOR) avoid compilation error with ASan (Michaël Zasso) #54077
* (SEMVER-MAJOR) disable V8 concurrent sparkplug compilation (Michaël Zasso) #54077
* (SEMVER-MAJOR) always define V8_EXPORT_PRIVATE as no-op (Michaël Zasso) #54077
* (SEMVER-MAJOR) update V8 to 12.8.374.13 (Michaël Zasso) #54077
doc:
* (SEMVER-MAJOR) reflect toolchains used for official binaries (Richard Lau) #54967
* (SEMVER-MAJOR) use gcc 12 on AIX for Node.js >=23 (Richard Lau) #54338
esm:
* (SEMVER-MAJOR) export 'module.exports' on ESM CJS wrapper (Guy Bedford) #53848
events:
* (SEMVER-MAJOR) set EventEmitterAsyncResource fields private (Yagiz Nizipli) #54889
fs:
* (SEMVER-MAJOR) adjust typecheck for `type` in `fs.symlink()` (Livia Medeiros) #49741
* (SEMVER-MAJOR) runtime deprecate `dirent.path` (Antoine du Hamel) #51050
lib:
* (SEMVER-MAJOR) validate signals with interface converter (Jason Zhang) #54965
* (SEMVER-MAJOR) implement interface converter in webidl (Jason Zhang) #54965
* (SEMVER-MAJOR) expose global CloseEvent (Matthew Aitken) #53355
net:
* (SEMVER-MAJOR) validate host name for server listen (Jason Zhang) #54470
path:
* (SEMVER-MAJOR) fix bugs and inconsistencies (Hüseyin Açacak) #54224
process:
* (SEMVER-MAJOR) remove `process.assert` (Aviv Keller) #55035
src:
* (SEMVER-MAJOR) update NODE_MODULE_VERSION to 131 (Michaël Zasso) #54536
* (SEMVER-MAJOR) stop using deprecated fields of `v8::FastApiCallbackOptions` (Andreas Haas) #54077
* (SEMVER-MAJOR) remove dependency on wrapper-descriptor-based CppHeap (Joyee Cheung) #54077
* (SEMVER-MAJOR) add source location to v8::TaskRunner (François Doray) #54077
* (SEMVER-MAJOR) update NODE_MODULE_VERSION to 129 (Michaël Zasso) #54077
* (SEMVER-MAJOR) do not use soon-to-be-deprecated V8 API (Igor Sheludko) #53174
* (SEMVER-MAJOR) add UV_PIPE_NO_TRUNCATE for bind in pipe_wrap.cc (theanarkh) #52347
stream:
* (SEMVER-MAJOR) pipe to a closed or destroyed stream is not allowed in pipeline (jakecastelli) #53241
string_decoder:
* (SEMVER-MAJOR) refactor encoding validation (Yagiz Nizipli) #54957
test:
* (SEMVER-MAJOR) update v8-stats test for V8 12.6 (Michaël Zasso) #54077
test_runner:
* (SEMVER-MAJOR) detect only tests when --test is not used (Colin Ihrig) #54881
* (SEMVER-MAJOR) always make spec the default reporter (Colin Ihrig) #54548
* (SEMVER-MAJOR) expose lcov reporter as newable function (Chemi Atlow) #52403
timers:
* (SEMVER-MAJOR) emit warning if delay is negative or NaN (jakecastelli) #46678
tls:
* (SEMVER-MAJOR) fix 'ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED' typo (Aviv Keller) #52627
tools:
* (SEMVER-MAJOR) add additonal include dirs for V8 on AIX (Abdirahim Musse) #54536
* (SEMVER-MAJOR) update V8 gypfiles for 12.8 (Michaël Zasso) #54077
* (SEMVER-MAJOR) update V8 gypfiles for 12.7 (Richard Lau) #54077
* (SEMVER-MAJOR) update V8 gypfiles for 12.6 (Michaël Zasso) #54077
util:
* (SEMVER-MAJOR) move util.log to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isPrimitive to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isFunction to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isError to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isDate to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isObject to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isRegExp to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isUndefined to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isSymbol to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isString to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isNumber to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isNullOrUndefined to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isNull to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isBuffer to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isBoolean to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util._extend to eol (marco-ippolito) #52744
zlib:
* (SEMVER-MAJOR) remove `zlib.bytesRead` (Yagiz Nizipli) #55020
PR-URL: #55338
RafaelGSS added a commit that referenced this pull request Oct 11, 2024
Semver-Major Commits:
assert,util:
* (SEMVER-MAJOR) change WeakMap and WeakSet comparison handling (Cristian Barlutiu) #53495
buffer:
* (SEMVER-MAJOR) throw when writing beyond buffer" (Robert Nagy) #54588
* (SEMVER-MAJOR) make File cloneable (Matthew Aitken) #47613
build:
* (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #54536
* (SEMVER-MAJOR) disable ICF for mksnapshot (Leszek Swirski) #54077
* (SEMVER-MAJOR) include v8-sandbox.h header in distribution (Michaël Zasso) #54077
* (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #54077
* (SEMVER-MAJOR) warn for GCC versions earlier than 12.2 (Michaël Zasso) #54081
* (SEMVER-MAJOR) drop experimental support for Windows <10 (Michaël Zasso) #54079
* (SEMVER-MAJOR) remove support for 32-bit Windows (Michaël Zasso) #53184
* (SEMVER-MAJOR) compile with C++20 support (Michaël Zasso) #45427
child_process:
* (SEMVER-MAJOR) remove unused internal event (Rich Trott) #53793
cli:
* (SEMVER-MAJOR) remove deprecated V8 flag (Omer Katz) #54761
* (SEMVER-MAJOR) move --trace-atomics-wait to eol (Marco Ippolito) #52747
* (SEMVER-MAJOR) remove --no-experimental-global-customevent flag (Daeyeon Jeong) #52723
* (SEMVER-MAJOR) remove --no-experimental-fetch flag (Filip Skokan) #52611
* (SEMVER-MAJOR) remove --no-experimental-global-webcrypto flag (Filip Skokan) #52564
crypto:
* (SEMVER-MAJOR) runtime deprecate crypto.fips (Yagiz Nizipli) #55019
* (SEMVER-MAJOR) remove ERR_CRYPTO_SCRYPT_INVALID_PARAMETER (Tobias Nießen) #53305
* (SEMVER-MAJOR) move DEP0182 to runtime deprecation (Tobias Nießen) #52552
deps:
* (SEMVER-MAJOR) V8: cherry-pick 97199f686e2f (Michaël Zasso) #54536
* (SEMVER-MAJOR) V8: cherry-pick 01a47f3ffff2 (Michaël Zasso) #54536
* (SEMVER-MAJOR) patch V8 to support older Clang versions (Michaël Zasso) #54536
* (SEMVER-MAJOR) always define V8_NODISCARD as no-op (Michaël Zasso) #54536
* (SEMVER-MAJOR) fix FP16 bitcasts.h (Stefan Stojanovic) #54536
* (SEMVER-MAJOR) patch V8 to support compilation with MSVC (StefanStojanovic) #54536
* (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #54536
* (SEMVER-MAJOR) disable V8 concurrent sparkplug compilation (Michaël Zasso) #54536
* (SEMVER-MAJOR) always define V8_EXPORT_PRIVATE as no-op (Michaël Zasso) #54536
* (SEMVER-MAJOR) update V8 to 12.9.202.18 (Michaël Zasso) #54536
* (SEMVER-MAJOR) remove bogus V8 DCHECK (Michaël Zasso) #54077
* (SEMVER-MAJOR) V8: cherry-pick 00e9eeb3fb2c (Michaël Zasso) #54077
* (SEMVER-MAJOR) V8: cherry-pick b1397772c70c (Michaël Zasso) #54077
* (SEMVER-MAJOR) V8: cherry-pick 35888fee7bba (Joyee Cheung) #54077
* (SEMVER-MAJOR) always define V8_NODISCARD as no-op (Michaël Zasso) #54077
* (SEMVER-MAJOR) fix FP16 bitcasts.h (Stefan Stojanovic) #54077
* (SEMVER-MAJOR) V8: revert CL 5331688 (Michaël Zasso) #54077
* (SEMVER-MAJOR) patch V8 to support compilation with MSVC (StefanStojanovic) #54077
* (SEMVER-MAJOR) silence internal V8 deprecation warning (Michaël Zasso) #54077
* (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #54077
* (SEMVER-MAJOR) avoid compilation error with ASan (Michaël Zasso) #54077
* (SEMVER-MAJOR) disable V8 concurrent sparkplug compilation (Michaël Zasso) #54077
* (SEMVER-MAJOR) always define V8_EXPORT_PRIVATE as no-op (Michaël Zasso) #54077
* (SEMVER-MAJOR) update V8 to 12.8.374.13 (Michaël Zasso) #54077
doc:
* (SEMVER-MAJOR) reflect toolchains used for official binaries (Richard Lau) #54967
* (SEMVER-MAJOR) use gcc 12 on AIX for Node.js >=23 (Richard Lau) #54338
esm:
* (SEMVER-MAJOR) export 'module.exports' on ESM CJS wrapper (Guy Bedford) #53848
events:
* (SEMVER-MAJOR) set EventEmitterAsyncResource fields private (Yagiz Nizipli) #54889
fs:
* (SEMVER-MAJOR) adjust typecheck for `type` in `fs.symlink()` (Livia Medeiros) #49741
* (SEMVER-MAJOR) runtime deprecate `dirent.path` (Antoine du Hamel) #51050
lib:
* (SEMVER-MAJOR) validate signals with interface converter (Jason Zhang) #54965
* (SEMVER-MAJOR) implement interface converter in webidl (Jason Zhang) #54965
* (SEMVER-MAJOR) expose global CloseEvent (Matthew Aitken) #53355
net:
* (SEMVER-MAJOR) validate host name for server listen (Jason Zhang) #54470
path:
* (SEMVER-MAJOR) fix bugs and inconsistencies (Hüseyin Açacak) #54224
process:
* (SEMVER-MAJOR) remove `process.assert` (Aviv Keller) #55035
src:
* (SEMVER-MAJOR) update NODE_MODULE_VERSION to 131 (Michaël Zasso) #54536
* (SEMVER-MAJOR) stop using deprecated fields of `v8::FastApiCallbackOptions` (Andreas Haas) #54077
* (SEMVER-MAJOR) remove dependency on wrapper-descriptor-based CppHeap (Joyee Cheung) #54077
* (SEMVER-MAJOR) add source location to v8::TaskRunner (François Doray) #54077
* (SEMVER-MAJOR) update NODE_MODULE_VERSION to 129 (Michaël Zasso) #54077
* (SEMVER-MAJOR) do not use soon-to-be-deprecated V8 API (Igor Sheludko) #53174
* (SEMVER-MAJOR) add UV_PIPE_NO_TRUNCATE for bind in pipe_wrap.cc (theanarkh) #52347
stream:
* (SEMVER-MAJOR) pipe to a closed or destroyed stream is not allowed in pipeline (jakecastelli) #53241
string_decoder:
* (SEMVER-MAJOR) refactor encoding validation (Yagiz Nizipli) #54957
test:
* (SEMVER-MAJOR) update v8-stats test for V8 12.6 (Michaël Zasso) #54077
test_runner:
* (SEMVER-MAJOR) detect only tests when --test is not used (Colin Ihrig) #54881
* (SEMVER-MAJOR) always make spec the default reporter (Colin Ihrig) #54548
* (SEMVER-MAJOR) expose lcov reporter as newable function (Chemi Atlow) #52403
timers:
* (SEMVER-MAJOR) emit warning if delay is negative or NaN (jakecastelli) #46678
tls:
* (SEMVER-MAJOR) fix 'ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED' typo (Aviv Keller) #52627
tools:
* (SEMVER-MAJOR) add additonal include dirs for V8 on AIX (Abdirahim Musse) #54536
* (SEMVER-MAJOR) update V8 gypfiles for 12.8 (Michaël Zasso) #54077
* (SEMVER-MAJOR) update V8 gypfiles for 12.7 (Richard Lau) #54077
* (SEMVER-MAJOR) update V8 gypfiles for 12.6 (Michaël Zasso) #54077
util:
* (SEMVER-MAJOR) move util.log to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isPrimitive to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isFunction to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isError to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isDate to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isObject to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isRegExp to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isUndefined to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isSymbol to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isString to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isNumber to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isNullOrUndefined to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isNull to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isBuffer to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isBoolean to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util._extend to eol (marco-ippolito) #52744
zlib:
* (SEMVER-MAJOR) remove `zlib.bytesRead` (Yagiz Nizipli) #55020
PR-URL: #55338
RafaelGSS added a commit that referenced this pull request Oct 16, 2024
Semver-Major Commits:
assert,util:
* (SEMVER-MAJOR) change WeakMap and WeakSet comparison handling (Cristian Barlutiu) #53495
buffer:
* (SEMVER-MAJOR) throw when writing beyond buffer" (Robert Nagy) #54588
* (SEMVER-MAJOR) make File cloneable (Matthew Aitken) #47613
build:
* (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #54536
* (SEMVER-MAJOR) disable ICF for mksnapshot (Leszek Swirski) #54077
* (SEMVER-MAJOR) include v8-sandbox.h header in distribution (Michaël Zasso) #54077
* (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #54077
* (SEMVER-MAJOR) warn for GCC versions earlier than 12.2 (Michaël Zasso) #54081
* (SEMVER-MAJOR) drop experimental support for Windows <10 (Michaël Zasso) #54079
* (SEMVER-MAJOR) remove support for 32-bit Windows (Michaël Zasso) #53184
* (SEMVER-MAJOR) compile with C++20 support (Michaël Zasso) #45427
child_process:
* (SEMVER-MAJOR) remove unused internal event (Rich Trott) #53793
cli:
* (SEMVER-MAJOR) remove deprecated V8 flag (Omer Katz) #54761
* (SEMVER-MAJOR) move --trace-atomics-wait to eol (Marco Ippolito) #52747
* (SEMVER-MAJOR) remove --no-experimental-global-customevent flag (Daeyeon Jeong) #52723
* (SEMVER-MAJOR) remove --no-experimental-fetch flag (Filip Skokan) #52611
* (SEMVER-MAJOR) remove --no-experimental-global-webcrypto flag (Filip Skokan) #52564
crypto:
* (SEMVER-MAJOR) runtime deprecate crypto.fips (Yagiz Nizipli) #55019
* (SEMVER-MAJOR) remove ERR_CRYPTO_SCRYPT_INVALID_PARAMETER (Tobias Nießen) #53305
* (SEMVER-MAJOR) move DEP0182 to runtime deprecation (Tobias Nießen) #52552
deps:
* (SEMVER-MAJOR) V8: cherry-pick 97199f686e2f (Michaël Zasso) #54536
* (SEMVER-MAJOR) V8: cherry-pick 01a47f3ffff2 (Michaël Zasso) #54536
* (SEMVER-MAJOR) patch V8 to support older Clang versions (Michaël Zasso) #54536
* (SEMVER-MAJOR) always define V8_NODISCARD as no-op (Michaël Zasso) #54536
* (SEMVER-MAJOR) fix FP16 bitcasts.h (Stefan Stojanovic) #54536
* (SEMVER-MAJOR) patch V8 to support compilation with MSVC (StefanStojanovic) #54536
* (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #54536
* (SEMVER-MAJOR) disable V8 concurrent sparkplug compilation (Michaël Zasso) #54536
* (SEMVER-MAJOR) always define V8_EXPORT_PRIVATE as no-op (Michaël Zasso) #54536
* (SEMVER-MAJOR) update V8 to 12.9.202.18 (Michaël Zasso) #54536
* (SEMVER-MAJOR) remove bogus V8 DCHECK (Michaël Zasso) #54077
* (SEMVER-MAJOR) V8: cherry-pick 00e9eeb3fb2c (Michaël Zasso) #54077
* (SEMVER-MAJOR) V8: cherry-pick b1397772c70c (Michaël Zasso) #54077
* (SEMVER-MAJOR) V8: cherry-pick 35888fee7bba (Joyee Cheung) #54077
* (SEMVER-MAJOR) always define V8_NODISCARD as no-op (Michaël Zasso) #54077
* (SEMVER-MAJOR) fix FP16 bitcasts.h (Stefan Stojanovic) #54077
* (SEMVER-MAJOR) V8: revert CL 5331688 (Michaël Zasso) #54077
* (SEMVER-MAJOR) patch V8 to support compilation with MSVC (StefanStojanovic) #54077
* (SEMVER-MAJOR) silence internal V8 deprecation warning (Michaël Zasso) #54077
* (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #54077
* (SEMVER-MAJOR) avoid compilation error with ASan (Michaël Zasso) #54077
* (SEMVER-MAJOR) disable V8 concurrent sparkplug compilation (Michaël Zasso) #54077
* (SEMVER-MAJOR) always define V8_EXPORT_PRIVATE as no-op (Michaël Zasso) #54077
* (SEMVER-MAJOR) update V8 to 12.8.374.13 (Michaël Zasso) #54077
doc:
* (SEMVER-MAJOR) reflect toolchains used for official binaries (Richard Lau) #54967
* (SEMVER-MAJOR) use gcc 12 on AIX for Node.js >=23 (Richard Lau) #54338
esm:
* (SEMVER-MAJOR) export 'module.exports' on ESM CJS wrapper (Guy Bedford) #53848
events:
* (SEMVER-MAJOR) set EventEmitterAsyncResource fields private (Yagiz Nizipli) #54889
fs:
* (SEMVER-MAJOR) adjust typecheck for `type` in `fs.symlink()` (Livia Medeiros) #49741
* (SEMVER-MAJOR) runtime deprecate `dirent.path` (Antoine du Hamel) #51050
lib:
* (SEMVER-MAJOR) validate signals with interface converter (Jason Zhang) #54965
* (SEMVER-MAJOR) implement interface converter in webidl (Jason Zhang) #54965
* (SEMVER-MAJOR) expose global CloseEvent (Matthew Aitken) #53355
net:
* (SEMVER-MAJOR) validate host name for server listen (Jason Zhang) #54470
path:
* (SEMVER-MAJOR) fix bugs and inconsistencies (Hüseyin Açacak) #54224
process:
* (SEMVER-MAJOR) remove `process.assert` (Aviv Keller) #55035
src:
* (SEMVER-MAJOR) update NODE_MODULE_VERSION to 131 (Michaël Zasso) #54536
* (SEMVER-MAJOR) stop using deprecated fields of `v8::FastApiCallbackOptions` (Andreas Haas) #54077
* (SEMVER-MAJOR) remove dependency on wrapper-descriptor-based CppHeap (Joyee Cheung) #54077
* (SEMVER-MAJOR) add source location to v8::TaskRunner (François Doray) #54077
* (SEMVER-MAJOR) update NODE_MODULE_VERSION to 129 (Michaël Zasso) #54077
* (SEMVER-MAJOR) do not use soon-to-be-deprecated V8 API (Igor Sheludko) #53174
* (SEMVER-MAJOR) add UV_PIPE_NO_TRUNCATE for bind in pipe_wrap.cc (theanarkh) #52347
stream:
* (SEMVER-MAJOR) pipe to a closed or destroyed stream is not allowed in pipeline (jakecastelli) #53241
string_decoder:
* (SEMVER-MAJOR) refactor encoding validation (Yagiz Nizipli) #54957
test:
* (SEMVER-MAJOR) update v8-stats test for V8 12.6 (Michaël Zasso) #54077
test_runner:
* (SEMVER-MAJOR) detect only tests when --test is not used (Colin Ihrig) #54881
* (SEMVER-MAJOR) always make spec the default reporter (Colin Ihrig) #54548
* (SEMVER-MAJOR) expose lcov reporter as newable function (Chemi Atlow) #52403
timers:
* (SEMVER-MAJOR) emit warning if delay is negative or NaN (jakecastelli) #46678
tls:
* (SEMVER-MAJOR) fix 'ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED' typo (Aviv Keller) #52627
tools:
* (SEMVER-MAJOR) add additonal include dirs for V8 on AIX (Abdirahim Musse) #54536
* (SEMVER-MAJOR) update V8 gypfiles for 12.8 (Michaël Zasso) #54077
* (SEMVER-MAJOR) update V8 gypfiles for 12.7 (Richard Lau) #54077
* (SEMVER-MAJOR) update V8 gypfiles for 12.6 (Michaël Zasso) #54077
util:
* (SEMVER-MAJOR) move util.log to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isPrimitive to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isFunction to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isError to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isDate to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isObject to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isRegExp to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isUndefined to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isSymbol to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isString to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isNumber to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isNullOrUndefined to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isNull to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isBuffer to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isBoolean to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util._extend to eol (marco-ippolito) #52744
zlib:
* (SEMVER-MAJOR) remove `zlib.bytesRead` (Yagiz Nizipli) #55020
PR-URL: #55338
RafaelGSS added a commit that referenced this pull request Oct 16, 2024
Semver-Major Commits:
assert,util:
* (SEMVER-MAJOR) change WeakMap and WeakSet comparison handling (Cristian Barlutiu) #53495
buffer:
* (SEMVER-MAJOR) throw when writing beyond buffer" (Robert Nagy) #54588
* (SEMVER-MAJOR) make File cloneable (Matthew Aitken) #47613
build:
* (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #54536
* (SEMVER-MAJOR) disable ICF for mksnapshot (Leszek Swirski) #54077
* (SEMVER-MAJOR) include v8-sandbox.h header in distribution (Michaël Zasso) #54077
* (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #54077
* (SEMVER-MAJOR) warn for GCC versions earlier than 12.2 (Michaël Zasso) #54081
* (SEMVER-MAJOR) drop experimental support for Windows <10 (Michaël Zasso) #54079
* (SEMVER-MAJOR) remove support for 32-bit Windows (Michaël Zasso) #53184
* (SEMVER-MAJOR) compile with C++20 support (Michaël Zasso) #45427
child_process:
* (SEMVER-MAJOR) remove unused internal event (Rich Trott) #53793
cli:
* (SEMVER-MAJOR) remove deprecated V8 flag (Omer Katz) #54761
* (SEMVER-MAJOR) move --trace-atomics-wait to eol (Marco Ippolito) #52747
* (SEMVER-MAJOR) remove --no-experimental-global-customevent flag (Daeyeon Jeong) #52723
* (SEMVER-MAJOR) remove --no-experimental-fetch flag (Filip Skokan) #52611
* (SEMVER-MAJOR) remove --no-experimental-global-webcrypto flag (Filip Skokan) #52564
crypto:
* (SEMVER-MAJOR) runtime deprecate crypto.fips (Yagiz Nizipli) #55019
* (SEMVER-MAJOR) remove ERR_CRYPTO_SCRYPT_INVALID_PARAMETER (Tobias Nießen) #53305
* (SEMVER-MAJOR) move DEP0182 to runtime deprecation (Tobias Nießen) #52552
deps:
* (SEMVER-MAJOR) V8: cherry-pick 97199f686e2f (Michaël Zasso) #54536
* (SEMVER-MAJOR) V8: cherry-pick 01a47f3ffff2 (Michaël Zasso) #54536
* (SEMVER-MAJOR) patch V8 to support older Clang versions (Michaël Zasso) #54536
* (SEMVER-MAJOR) always define V8_NODISCARD as no-op (Michaël Zasso) #54536
* (SEMVER-MAJOR) fix FP16 bitcasts.h (Stefan Stojanovic) #54536
* (SEMVER-MAJOR) patch V8 to support compilation with MSVC (StefanStojanovic) #54536
* (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #54536
* (SEMVER-MAJOR) disable V8 concurrent sparkplug compilation (Michaël Zasso) #54536
* (SEMVER-MAJOR) always define V8_EXPORT_PRIVATE as no-op (Michaël Zasso) #54536
* (SEMVER-MAJOR) update V8 to 12.9.202.18 (Michaël Zasso) #54536
* (SEMVER-MAJOR) remove bogus V8 DCHECK (Michaël Zasso) #54077
* (SEMVER-MAJOR) V8: cherry-pick 00e9eeb3fb2c (Michaël Zasso) #54077
* (SEMVER-MAJOR) V8: cherry-pick b1397772c70c (Michaël Zasso) #54077
* (SEMVER-MAJOR) V8: cherry-pick 35888fee7bba (Joyee Cheung) #54077
* (SEMVER-MAJOR) always define V8_NODISCARD as no-op (Michaël Zasso) #54077
* (SEMVER-MAJOR) fix FP16 bitcasts.h (Stefan Stojanovic) #54077
* (SEMVER-MAJOR) V8: revert CL 5331688 (Michaël Zasso) #54077
* (SEMVER-MAJOR) patch V8 to support compilation with MSVC (StefanStojanovic) #54077
* (SEMVER-MAJOR) silence internal V8 deprecation warning (Michaël Zasso) #54077
* (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #54077
* (SEMVER-MAJOR) avoid compilation error with ASan (Michaël Zasso) #54077
* (SEMVER-MAJOR) disable V8 concurrent sparkplug compilation (Michaël Zasso) #54077
* (SEMVER-MAJOR) always define V8_EXPORT_PRIVATE as no-op (Michaël Zasso) #54077
* (SEMVER-MAJOR) update V8 to 12.8.374.13 (Michaël Zasso) #54077
doc:
* (SEMVER-MAJOR) reflect toolchains used for official binaries (Richard Lau) #54967
* (SEMVER-MAJOR) use gcc 12 on AIX for Node.js >=23 (Richard Lau) #54338
esm:
* (SEMVER-MAJOR) export 'module.exports' on ESM CJS wrapper (Guy Bedford) #53848
events:
* (SEMVER-MAJOR) set EventEmitterAsyncResource fields private (Yagiz Nizipli) #54889
fs:
* (SEMVER-MAJOR) adjust typecheck for `type` in `fs.symlink()` (Livia Medeiros) #49741
* (SEMVER-MAJOR) runtime deprecate `dirent.path` (Antoine du Hamel) #51050
lib:
* (SEMVER-MAJOR) validate signals with interface converter (Jason Zhang) #54965
* (SEMVER-MAJOR) implement interface converter in webidl (Jason Zhang) #54965
* (SEMVER-MAJOR) expose global CloseEvent (Matthew Aitken) #53355
net:
* (SEMVER-MAJOR) validate host name for server listen (Jason Zhang) #54470
path:
* (SEMVER-MAJOR) fix bugs and inconsistencies (Hüseyin Açacak) #54224
process:
* (SEMVER-MAJOR) remove `process.assert` (Aviv Keller) #55035
src:
* (SEMVER-MAJOR) update NODE_MODULE_VERSION to 131 (Michaël Zasso) #54536
* (SEMVER-MAJOR) stop using deprecated fields of `v8::FastApiCallbackOptions` (Andreas Haas) #54077
* (SEMVER-MAJOR) remove dependency on wrapper-descriptor-based CppHeap (Joyee Cheung) #54077
* (SEMVER-MAJOR) add source location to v8::TaskRunner (François Doray) #54077
* (SEMVER-MAJOR) update NODE_MODULE_VERSION to 129 (Michaël Zasso) #54077
* (SEMVER-MAJOR) do not use soon-to-be-deprecated V8 API (Igor Sheludko) #53174
* (SEMVER-MAJOR) add UV_PIPE_NO_TRUNCATE for bind in pipe_wrap.cc (theanarkh) #52347
stream:
* (SEMVER-MAJOR) pipe to a closed or destroyed stream is not allowed in pipeline (jakecastelli) #53241
string_decoder:
* (SEMVER-MAJOR) refactor encoding validation (Yagiz Nizipli) #54957
test:
* (SEMVER-MAJOR) update v8-stats test for V8 12.6 (Michaël Zasso) #54077
test_runner:
* (SEMVER-MAJOR) detect only tests when --test is not used (Colin Ihrig) #54881
* (SEMVER-MAJOR) always make spec the default reporter (Colin Ihrig) #54548
* (SEMVER-MAJOR) expose lcov reporter as newable function (Chemi Atlow) #52403
timers:
* (SEMVER-MAJOR) emit warning if delay is negative or NaN (jakecastelli) #46678
tls:
* (SEMVER-MAJOR) fix 'ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED' typo (Aviv Keller) #52627
tools:
* (SEMVER-MAJOR) add additonal include dirs for V8 on AIX (Abdirahim Musse) #54536
* (SEMVER-MAJOR) update V8 gypfiles for 12.8 (Michaël Zasso) #54077
* (SEMVER-MAJOR) update V8 gypfiles for 12.7 (Richard Lau) #54077
* (SEMVER-MAJOR) update V8 gypfiles for 12.6 (Michaël Zasso) #54077
util:
* (SEMVER-MAJOR) move util.log to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isPrimitive to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isFunction to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isError to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isDate to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isObject to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isRegExp to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isUndefined to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isSymbol to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isString to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isNumber to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isNullOrUndefined to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isNull to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isBuffer to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util.isBoolean to eol (marco-ippolito) #52744
* (SEMVER-MAJOR) move util._extend to eol (marco-ippolito) #52744
zlib:
* (SEMVER-MAJOR) remove `zlib.bytesRead` (Yagiz Nizipli) #55020
PR-URL: #55338
@jazelly
jazelly deleted the validate-square-bracket-host branch November 25, 2024 22:07
logaretm added a commit to logaretm/graphql-js that referenced this pull request Apr 17, 2026
Wraps parse() with the graphql:parse channel when any subscribers are
attached. The published context carries the Source (or string) handed to
parse() so APM tools can record the GraphQL source on their span.
Adds two shared helpers on src/diagnostics.ts used by every subsequent
emission site:
maybeTraceSync(name, ctxFactory, fn)
maybeTracePromise(name, ctxFactory, fn)
They share a shouldTrace gate that uses hasSubscribers !== false so
runtimes without an aggregated hasSubscribers getter (notably Node 18,
see nodejs/node#54470) still publish; Node's traceSync/tracePromise gate
each sub-channel internally. Context construction is lazy through the
factory so the no-subscriber path allocates nothing beyond the closure.
logaretm added a commit to logaretm/graphql-js that referenced this pull request Apr 24, 2026
Wraps parse() with the graphql:parse channel when any subscribers are
attached. The published context carries the Source (or string) handed to
parse() so APM tools can record the GraphQL source on their span.
Adds two shared helpers on src/diagnostics.ts used by every subsequent
emission site:
maybeTraceSync(name, ctxFactory, fn)
maybeTracePromise(name, ctxFactory, fn)
They share a shouldTrace gate that uses hasSubscribers !== false so
runtimes without an aggregated hasSubscribers getter (notably Node 18,
see nodejs/node#54470) still publish; Node's traceSync/tracePromise gate
each sub-channel internally. Context construction is lazy through the
factory so the no-subscriber path allocates nothing beyond the closure.
logaretm added a commit to logaretm/graphql-js that referenced this pull request Apr 27, 2026
Wraps parse() with the graphql:parse channel when any subscribers are
attached. The published context carries the Source (or string) handed to
parse() so APM tools can record the GraphQL source on their span.
Adds two shared helpers on src/diagnostics.ts used by every subsequent
emission site:
maybeTraceSync(name, ctxFactory, fn)
maybeTracePromise(name, ctxFactory, fn)
They share a shouldTrace gate that uses hasSubscribers !== false so
runtimes without an aggregated hasSubscribers getter (notably Node 18,
see nodejs/node#54470) still publish; Node's traceSync/tracePromise gate
each sub-channel internally. Context construction is lazy through the
factory so the no-subscriber path allocates nothing beyond the closure.
yaacovCR pushed a commit to logaretm/graphql-js that referenced this pull request Apr 27, 2026
Wraps parse() with the graphql:parse channel when any subscribers are
attached. The published context carries the Source (or string) handed to
parse() so APM tools can record the GraphQL source on their span.
Adds two shared helpers on src/diagnostics.ts used by every subsequent
emission site:
maybeTraceSync(name, ctxFactory, fn)
maybeTracePromise(name, ctxFactory, fn)
They share a shouldTrace gate that uses hasSubscribers !== false so
runtimes without an aggregated hasSubscribers getter (notably Node 18,
see nodejs/node#54470) still publish; Node's traceSync/tracePromise gate
each sub-channel internally. Context construction is lazy through the
factory so the no-subscriber path allocates nothing beyond the closure.
yaacovCR pushed a commit to logaretm/graphql-js that referenced this pull request May 1, 2026
Wraps parse() with the graphql:parse channel when any subscribers are
attached. The published context carries the Source (or string) handed to
parse() so APM tools can record the GraphQL source on their span.
Adds two shared helpers on src/diagnostics.ts used by every subsequent
emission site:
maybeTraceSync(name, ctxFactory, fn)
maybeTracePromise(name, ctxFactory, fn)
They share a shouldTrace gate that uses hasSubscribers !== false so
runtimes without an aggregated hasSubscribers getter (notably Node 18,
see nodejs/node#54470) still publish; Node's traceSync/tracePromise gate
each sub-channel internally. Context construction is lazy through the
factory so the no-subscriber path allocates nothing beyond the closure.
logaretm added a commit to logaretm/graphql-js that referenced this pull request May 14, 2026
Wraps parse() with the graphql:parse channel when any subscribers are
attached. The published context carries the Source (or string) handed to
parse() so APM tools can record the GraphQL source on their span.
Adds two shared helpers on src/diagnostics.ts used by every subsequent
emission site:
maybeTraceSync(name, ctxFactory, fn)
maybeTracePromise(name, ctxFactory, fn)
They share a shouldTrace gate that uses hasSubscribers !== false so
runtimes without an aggregated hasSubscribers getter (notably Node 18,
see nodejs/node#54470) still publish; Node's traceSync/tracePromise gate
each sub-channel internally. Context construction is lazy through the
factory so the no-subscriber path allocates nothing beyond the closure.
yaacovCR pushed a commit to logaretm/graphql-js that referenced this pull request Jun 1, 2026
Wraps parse() with the graphql:parse channel when any subscribers are
attached. The published context carries the Source (or string) handed to
parse() so APM tools can record the GraphQL source on their span.
Adds two shared helpers on src/diagnostics.ts used by every subsequent
emission site:
maybeTraceSync(name, ctxFactory, fn)
maybeTracePromise(name, ctxFactory, fn)
They share a shouldTrace gate that uses hasSubscribers !== false so
runtimes without an aggregated hasSubscribers getter (notably Node 18,
see nodejs/node#54470) still publish; Node's traceSync/tracePromise gate
each sub-channel internally. Context construction is lazy through the
factory so the no-subscriber path allocates nothing beyond the closure.
yaacovCR pushed a commit to logaretm/graphql-js that referenced this pull request Jun 1, 2026
Wraps parse() with the graphql:parse channel when any subscribers are
attached. The published context carries the Source (or string) handed to
parse() so APM tools can record the GraphQL source on their span.
Adds two shared helpers on src/diagnostics.ts used by every subsequent
emission site:
maybeTraceSync(name, ctxFactory, fn)
maybeTracePromise(name, ctxFactory, fn)
They share a shouldTrace gate that uses hasSubscribers !== false so
runtimes without an aggregated hasSubscribers getter (notably Node 18,
see nodejs/node#54470) still publish; Node's traceSync/tracePromise gate
each sub-channel internally. Context construction is lazy through the
factory so the no-subscriber path allocates nothing beyond the closure.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.needs-ciPRs that need a full CI run.netIssues and PRs related to the net subsystem.semver-majorPRs that contain breaking changes and should be released in the next major version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

server.listen's bind argument does not accept [::] for ipv6

8 participants

@jazelly@nodejs-github-bot@mcollina@ShogunPanda@lpinca@mertcanaltin@avivkeller@jakecastelli