Shelley Vohr
e38eede0e5
lib: load fewer builtins when bootstrapping without a snapshot
...
Contexts that are not deserialized from the built-in snapshot -- worker
threads, and the main context of embedders that create their own
isolate or of `node --no-node-snapshot` -- compile (with the code cache
at best) every builtin the bootstrap touches, so each eagerly required
builtin is startup time (~0.15-0.4 ms apiece). A number of them are only
required eagerly so that they end up in the snapshot, or for features
the bootstrap path never uses.
Load lazily what those paths do not need:
- is_main_thread.js: preload util, url, the ESM loader (translators,
resolver, module_job/map, source maps, node:module, vm modules, mime,
data_url, the TypeScript stripper), internal/blob and
internal/dns/utils only while building a snapshot; they load on first
use otherwise.
- fs: internal/blob (+ internal/encoding and its tables) is only used
by fs.openAsBlob().
- internal/url: internal/data_url (+ internal/mime) is only used by the
Buffer-returning file URL helpers.
- internal/process/execution, the CommonJS loader, esm/translators and
esm/load: the TypeScript stripper and data: URL helpers are only
needed for TypeScript sources / data: URLs.
- pre_execution: internal/dns/utils (+ internal/net) is only needed up
front to validate an explicit --dns-result-order or to register the
resolver's snapshot serializer; the default order becomes the
variable's initializer.
- internal/worker: event_loop_utilization and error_serdes are only
needed once a sub-worker's ELU is read or it reports an error.
- worker_threads: `locks` is defined lazily, like util's lazy exports.
Main-thread startup with the snapshot is unchanged (the same modules
are preloaded into it; the bootstrap-modules test lists are adjusted).
A bare worker compiles 95 -> 83 builtins (cold start -5%); without the
snapshot an empty CommonJS entry point compiles 76 -> 59 builtins and an
empty ES module entry point 76 -> 69.
Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/65329
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Aviv Keller <me@aviv.sh >
2026-08-22 17:07:39 +00:00
Lazizbek Ergashev
da2d6178a6
dns: validate address type in lookupService
...
Signed-off-by: Lazizbek Ergashev <lazerg2@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/64878
Fixes: https://github.com/nodejs/node/issues/64877
Reviewed-By: theanarkh <theratliter@gmail.com >
Reviewed-By: Tim Perry <pimterry@gmail.com >
2026-08-21 00:50:05 +00:00
René
e2d7b34164
dns: validate port range in setServers()
...
Signed-off-by: Renegade334 <contact.9a5d6388@renegade334.me.uk >
PR-URL: https://github.com/nodejs/node/pull/65021
Reviewed-By: Aviv Keller <me@aviv.sh >
Reviewed-By: Tim Perry <pimterry@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2026-08-07 15:06:02 +02:00
Antoine du Hamel
5520388f3b
lib: use assignFunctionName util where it makes sense
...
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/64515
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Tim Perry <pimterry@gmail.com >
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk >
Reviewed-By: Jordan Harband <ljharb@gmail.com >
2026-07-17 11:00:54 +00:00
Matteo Collina
7dafafa242
dns,net: reject hostnames with embedded NUL bytes
...
Refs: https://hackerone.com/reports/3656716
PR-URL: https://github.com/nodejs-private/node-private/pull/868
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
CVE-ID: CVE-2026-48930
2026-06-18 06:29:24 +02:00
Filip Skokan
9413368cf3
dns: coerce -0 to +0 in lookup and resolver inputs
...
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/63556
Reviewed-By: Jordan Harband <ljharb@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2026-05-31 14:25:28 +00:00
Livia Medeiros
46dc5d7c9f
lib: prefer call() over apply() if argument list is not array
...
PR-URL: https://github.com/nodejs/node/pull/60796
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-11-23 08:45:46 +00:00
Yagiz Nizipli
0fd1ecded6
meta: enable jsdoc/check-tag-names rule
...
PR-URL: https://github.com/nodejs/node/pull/58521
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2025-07-18 09:28:21 +00:00
theanarkh
c44fa8d0b6
dns: support max timeout
...
PR-URL: https://github.com/nodejs/node/pull/58440
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2025-07-10 15:50:43 +00:00
James M Snell
a5f9ca1f77
dns: move falsy hostname in lookup to end-of-life
...
It's been deprecated for ~7 years. It's time.
PR-URL: https://github.com/nodejs/node/pull/58619
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2025-06-13 12:47:23 +00:00
Deokjin Kim
baf989ba11
dns: remove redundant code using common variable
...
`validFamilies` variable is defined 2 times, so remove
redundant code by defining `validFamilies` in util. Plus,
apply the same approach to `validDnsOrders` because it's
also used multiple times.
PR-URL: https://github.com/nodejs/node/pull/57386
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
2025-03-11 13:54:00 +00:00
Rithvik Vibhu
ef91595e2f
dns: add TLSA record query and parsing
...
PR-URL: https://github.com/nodejs/node/pull/52983
Refs: https://github.com/nodejs/node/issues/39569
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
2025-02-18 10:37:48 -08:00
Nathan Baulch
4c045351c1
lib: fix typos
...
PR-URL: https://github.com/nodejs/node/pull/55065
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2024-09-25 14:35:18 +00:00
Aviv Keller
574f2dd517
lib: prefer optional chaining
...
PR-URL: https://github.com/nodejs/node/pull/55045
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2024-09-24 19:48:15 +00:00
Antoine du Hamel
231548b5cf
lib: enforce ASCII order in error code imports
...
PR-URL: https://github.com/nodejs/node/pull/52625
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2024-04-23 17:05:38 +00:00
Antoine du Hamel
a596af0819
tools: add lint rule to keep primordials in ASCII order
...
PR-URL: https://github.com/nodejs/node/pull/52592
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2024-04-21 16:53:08 +00:00
Paolo Insogna
7e89369166
dns: add order option and support ipv6first
...
PR-URL: https://github.com/nodejs/node/pull/52492
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-04-17 15:24:28 +00:00
Luigi Pinca
053f36855a
dns: call handle.setServers() with a valid array
...
`handle.setServers()` takes an array, not a string.
PR-URL: https://github.com/nodejs/node/pull/50811
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2023-11-21 20:56:02 +00:00
Aras Abbasi
83e6350b82
errors: improve hideStackFrames
...
PR-URL: https://github.com/nodejs/node/pull/49990
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-11-11 16:25:08 +00:00
Geoffrey Booth
7517c9f95b
module, esm: jsdoc for modules files
...
PR-URL: https://github.com/nodejs/node/pull/49523
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-09-19 02:48:24 +00:00
Yagiz Nizipli
8b5cd3248d
dns: call ada::idna::to_ascii directly from c++
...
PR-URL: https://github.com/nodejs/node/pull/47920
Fixes: https://github.com/nodejs/performance/issues/77
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2023-05-10 16:04:35 +00:00
btea
2ac5e9889a
dns: expose getDefaultResultOrder
...
PR-URL: https://github.com/nodejs/node/pull/46973
Fixes: https://github.com/nodejs/node/issues/46919
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
2023-04-26 08:56:04 +00:00
Antoine du Hamel
ab8942848b
lib: enforce use of trailing commas
...
PR-URL: https://github.com/nodejs/node/pull/46881
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2023-03-06 10:44:14 +01:00
Antoine du Hamel
fe514bf960
lib: enforce use of trailing commas for functions
...
PR-URL: https://github.com/nodejs/node/pull/46629
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2023-02-14 18:45:16 +01:00
Jordan Harband
757c104147
tools: add prefer-proto rule
...
fixup: add support for `Object.create(null)`
fixup: extend to any 1-argument Object.create call
fixup: add tests
PR-URL: https://github.com/nodejs/node/pull/46083
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-01-10 05:38:36 +00:00
Joyee Cheung
265ea1e74e
bootstrap: lazy load non-essential modules
...
It turns out that even with startup snapshots, there is a non-trivial
overhead for loading internal modules. This patch makes the loading
of the non-essential modules lazy again.
Caveat: we have to make some of the globals lazily-loaded too,
so the WPT runner is updated to test what the state of the global
scope is after the globals are accessed (and replaced with the
loaded value).
PR-URL: https://github.com/nodejs/node/pull/45659
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Tierney Cyren <hello@bnb.im >
2022-12-09 22:37:35 +00:00
Joyee Cheung
8821860f11
dns: support dns module in the snapshot
...
For the initial iteration, only the default resolver can be
serialized/deserialized. If `dns.setServers()` has been
called, we'll preserve the configured DNS servers in the snapshot.
We can consider exposing the serialization method if it becomes
necessary for user-land snapshots.
PR-URL: https://github.com/nodejs/node/pull/44633
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-09-29 01:58:21 +08:00
Yagiz Nizipli
572d55645c
dns: remove unnecessary parameter from validateOneOf
...
PR-URL: https://github.com/nodejs/node/pull/44635
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com >
2022-09-17 11:44:02 +00:00
Joyee Cheung
12fb94c78c
dns: refactor default resolver
...
This patch refactors the DNS default resolver code to make it
easier to be included in a snapshot:
- The code specific for the callback-based DNS resolver are not
in a separate module to make the dependency clearer (it's not
actually needed if the user only ever loads `dns/promises`)
- The common part of the callback-based resolver and the promise-
based resolver is now ResolverBase. The other two user-facing
resolvers are now subclasses of ResolverBase. The default
Resolver is constructed with just ResolverBase. This would
be fine as the default resolver is never actually exposed
to the user-land and it has been working using duck-typing anyway.
- Move the construction of Resolver subclasses into a common
method `createResolverClass()` to reduce code duplication.
The two subclasses now also share the same base constructor.
This would make it possible for them to also share code
for snapshot support later.
- `--dns-result-order` is now queried and refreshed during
pre-execution. To avoid loading the cares_wrap binding unnecessarily
the loading of the binding is also made lazy.
PR-URL: https://github.com/nodejs/node/pull/44541
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2022-09-13 13:36:08 +00:00
theanarkh
60898eed65
lib: add diagnostics channel and perf hooks detail
...
PR-URL: https://github.com/nodejs/node/pull/43984
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2022-07-29 14:27:16 +01:00
jiahao.si
b0285836f7
dns: fix getServers return undefined
...
PR-URL: https://github.com/nodejs/node/pull/43922
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2022-07-24 11:18:20 +01:00
Antoine du Hamel
a055337a02
lib: refactor to avoid unsafe regex primordials
...
PR-URL: https://github.com/nodejs/node/pull/43475
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2022-06-27 17:16:06 +02:00
Feng Yu
3847617f55
dns: make promise API fully constructed from lib/internal/dns/promises
...
PR-URL: https://github.com/nodejs/node/pull/43227
Refs: https://github.com/nodejs/node/discussions/43198
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2022-06-20 19:58:45 +01:00
Feng Yu
dc53c29b97
dns: export error code constants from dns/promises
...
PR-URL: https://github.com/nodejs/node/pull/43176
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-06-18 13:54:31 +01:00
theanarkh
85f8821f4d
net,dns: move hasObserver out of perf function
...
move the hasObserver out of startPerf and stopPerf
to avoid generating useless objects when these are no observer
PR-URL: https://github.com/nodejs/node/pull/43217
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2022-06-09 05:32:46 +01:00
Antoine du Hamel
06d8606960
lib: use null-prototype objects for property descriptors
...
Refs: https://github.com/nodejs/node/pull/42921
PR-URL: https://github.com/nodejs/node/pull/43270
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2022-06-03 09:23:58 +01:00
mawaregetsuka
419669cb79
lib: refactor validateInt32 and validateUint32
...
PR-URL: https://github.com/nodejs/node/pull/43071
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-05-22 17:44:12 +02:00
Antoine du Hamel
08773e3c04
dns: remove dns.lookup and dnsPromises.lookup options type coercion
...
PR-URL: https://github.com/nodejs/node/pull/41431
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2022-04-12 05:50:11 +02:00
Rich Trott
49547abe99
lib: prepare files for no-var lint rule
...
PR-URL: https://github.com/nodejs/node/pull/42573
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2022-04-04 10:53:28 +00:00
theanarkh
e5200392a2
net,dns: trace tcp connection and dns by perf_hooks
...
use the perf_hooks to trace the time spent by net.connect, dns.lookup,
dns.lookupService, dns.resolvexxx.
PR-URL: https://github.com/nodejs/node/pull/42390
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2022-03-29 16:43:28 +01:00
Yoshiki Kurihara
feafea1154
lib: fix consistency of methods that emit warnings
...
PR-URL: https://github.com/nodejs/node/pull/41249
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Mestery <mestery@protonmail.com >
2022-01-21 23:53:53 +00:00
Voltrex
7c77db0243
dns: refactor and use validators
...
The logical NOT operator and validators should be used where
appropriate.
PR-URL: https://github.com/nodejs/node/pull/40022
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Qingyu Deng <i@ayase-lab.com >
2021-09-18 16:13:56 +02:00
Voltrex
eb44d19a18
dns: cleanup validation
...
The `validateString()` validator should cleanup the validation and
keep consistency.
PR-URL: https://github.com/nodejs/node/pull/40061
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-09-16 22:42:42 +00:00
Antoine du Hamel
f182b9b29f
dns: runtime deprecate type coercion of dns.lookup options
...
PR-URL: https://github.com/nodejs/node/pull/39793
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2021-09-15 16:59:10 +00:00
Ben Noordhuis and treysis
1b2749ecbe
dns: default to verbatim=true in dns.lookup()
...
Switch the default from `ipv4first` to `verbatim` (return them exactly
as the resolver sent them to us).
PR-URL: https://github.com/nodejs/node/pull/39987
Fixes: https://github.com/nodejs/node/issues/31566
Refs: https://github.com/nodejs/node/issues/6307
Refs: https://github.com/nodejs/node/pull/20710
Refs: https://github.com/nodejs/node/pull/38099
Co-authored-by: treysis <treysis@gmx.net >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2021-09-12 21:05:35 +02:00
Luan Devecchi
38d3c487e4
dns: add "tries" option to Resolve options
...
PR-URL: https://github.com/nodejs/node/pull/39610
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2021-08-06 10:31:18 +00:00
Ouyang Yadong
d8797f5994
dns: allow --dns-result-order to change default dns verbatim
...
Allow the `--dns-result-order` option to change the default value
of verbatim in `dns.lookup()`. This is useful when running
Node.js in ipv6-only environments to avoid possible ENETUNREACH
errors.
PR-URL: https://github.com/nodejs/node/pull/38099
Refs: https://github.com/nodejs/node/issues/31566
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2021-06-02 19:28:05 +02:00
ZiJian Liu
08dd4b1723
lib: refactor to use validateString
...
PR-URL: https://github.com/nodejs/node/pull/37006
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-01-22 19:56:34 -08:00
ZiJian Liu
e279304954
lib: refactor to use validateArray
...
PR-URL: https://github.com/nodejs/node/pull/36982
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-01-20 22:41:00 +01:00
Antoine du Hamel
96b4950dca
dns: refactor to use more primordials
...
PR-URL: https://github.com/nodejs/node/pull/36314
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-12-07 19:40:52 +00:00