The `doc` directory had not had any editorconfig rules applied which can
lead to tab indentation in editors. This unifies the rules to use 2-space
as the default. Additionally, all rules are now sorted alphabetically.
PR-URL: https://github.com/nodejs/node/pull/23163
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
This vagueness of 'may' has caused a great deal of confusion.
See https://stackoverflow.com/questions/8887318
PR-URL: https://github.com/nodejs/node/pull/23143
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
V8 CodeEventHandler, V8 CpuProfiler, Linux perf and the
`--interpreted-frames-native-stack`, `--prof` and `--prof-process` flags
satisfies our Diagnostics Support requirements for Tier 3. V8
CodeEventHandler and CpuProfiler are tested as part of our V8 CI, and
`Linux perf` / `--interpreted-frames-native-stack` are tested by
`test/v8-updates/test-linux-perf.js`. `--prof` and `--prof-process` are
tested in Node.js test suite.
PR-URL: https://github.com/nodejs/node/pull/22915
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
internal/cluster/utils.js exported a handles object, which was
used in a test. That test, test-cluster-disconnect-handles.js,
was removed in https://github.com/nodejs/node/pull/12495. This
commit moves the handles object to the only file in the codebase
that still uses it.
PR-URL: https://github.com/nodejs/node/pull/23131
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/23120
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit removes the locale.h header as it does not look like it is
used.
PR-URL: https://github.com/nodejs/node/pull/23120
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Using `util.inherits()` adds a `super_` property to the constructor
and inspecting that constructor is going to show that property even
though it's not useful for the user.
Therefore the property is now set as non-enumerable and such entries
are not visible by default when using `console.log()` or
`util.inspect()`.
PR-URL: https://github.com/nodejs/node/pull/23107
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit adds the --quiet flag to cpplint to avoid informational
output like:
Done processing src/node.cc
...
PR-URL: https://github.com/nodejs/node/pull/23075
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Currently, the --quiet option for cpplint will generate the following
error:
$ tools/cpplint.py --quiet src/node.cc
Traceback (most recent call last):
File "tools/cpplint.py", line 6529, in <module>
main()
File "tools/cpplint.py", line 6497, in main
filenames = ParseArguments(sys.argv[1:])
File "tools/cpplint.py", line 6437, in ParseArguments
logger.addHandler(logging.FileHandler(val, mode='wb'))
File "/python2.7/logging/__init__.py", line 911, in __init__
StreamHandler.__init__(self, self._open())
File "/python2.7/logging/__init__.py", line 941, in _open
stream = open(self.baseFilename, self.mode)
IOError: [Errno 21] Is a directory: '/Users/danielbevenius/work/nodejs/node
This commit moves the FileHandler that currently exists in the quiet
option to the logfile clause. It looks like this issue came about when
merging in commit fee4d3ab90 ("tools:
merge custom cpplint with cpplint v1.3.0").
PR-URL: https://github.com/nodejs/node/pull/23075
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Remove unnecessary @echo commands from Makefile.
These were originally comments but were changed to @echo in 6bc43aeea7.
They aren't terribly useful so let's remove them.
PR-URL: https://github.com/nodejs/node/pull/23129
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Few lambdas in src/node_file.cc uses conventional
pointers, turn those into unique_ptr semantics
PR-URL: https://github.com/nodejs/node/pull/23124
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
We generally avoid using `auto` if not necessary. This
formalizes this rules by writing them down in the C++ style guide.
PR-URL: https://github.com/nodejs/node/pull/23028
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
PR-URL: https://github.com/nodejs/node/pull/23166
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
There's a global.gc() invoked in an interval, and a second one in a
req.setTimeout() callback. Remove the one in the callback. I'm not sure
how competing global.gc() calls might result in a deadlock, but it seems
plausible and empirical testing confirms that it makes the test
reliable.
Fixes: https://github.com/nodejs/node/issues/23067
PR-URL: https://github.com/nodejs/node/pull/23139
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/22800
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
modified the `-` CLI option help text for
improved readability.
PR-URL: https://github.com/nodejs/node/pull/23016
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
use more idiomatic expressions with RAII primitives,
instead of old style goto
PR-URL: https://github.com/nodejs/node/pull/23014
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
test-gc-http-client-connaborted is resource-intensive. It times out a
lot on CI. Move to sequential.
PR-URL: https://github.com/nodejs/node/pull/23091
Fixes: https://github.com/metadata
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Use 'lstat' to determine type of directory entry.
This is more consistent with the type returned from the readdir binding.
Also use 'path.join' over 'path.resolve' because 'name' is not absolute.
PR-URL: https://github.com/nodejs/node/pull/22808
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
OpenSSL enables this feature by default, but BoringSSL doesn't. This
change makes it so that when building node with BoringSSL, the
behaviour matches OpenSSL's.
PR-URL: https://github.com/nodejs/node/pull/22110
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Displaying a message about building addons before building docs can be
confusing when troubleshooting. (This just happened to me.) Move the
message about building addons to just before the step for building
addons.
PR-URL: https://github.com/nodejs/node/pull/23114
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
In test-http2-session-timeout, provide the number of requests that
occurred when the test fails.
PR-URL: https://github.com/nodejs/node/pull/23058
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
In test-http2-session-timeout, setImmediate() is used to wrap makeReq().
makeReq() is asynchronous and setImmediate() is not necessary.
PR-URL: https://github.com/nodejs/node/pull/23058
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Aliases are very cheap to maintain, so an unconditional runtime
deprecation that affects existing ecosystem code is not
a good idea. This commit turns the runtime deprecation into
a `--pending-deprecation` one.
Fixes: https://github.com/nodejs/node/issues/23013
PR-URL: https://github.com/nodejs/node/pull/23017
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
It became hard to follow what was actually happening in the
algorithm. This adds comments to improve the situation.
PR-URL: https://github.com/nodejs/node/pull/23048
Refs: https://github.com/nodejs/node/issues/22763
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Assertion errors that produce a diff show a diff for identical entries
in case one side of the comparison has more object properties than the
other one. Those lines are now taken into account and will not show up
as diverging lines anymore.
Refs: https://github.com/nodejs/node/issues/22763
PR-URL: https://github.com/nodejs/node/pull/23048
Refs: https://github.com/nodejs/node/issues/22763
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
In case reference (un)equal objects fail in assertion, it should be
clear that it is about the reference equality and not about the
object properties. This is fixed by improving the message in such
cases.
Refs: https://github.com/nodejs/node/issues/22763
PR-URL: https://github.com/nodejs/node/pull/23056
Refs: https://github.com/nodejs/node/issues/22763
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Added test that callback should be called when error occurs
in dns.lookupall().
PR-URL: https://github.com/nodejs/node/pull/22985
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Remove ERR_INDEX_OUT_OF_RANGE in favor of ERR_OUT_OF_RANGE which is
capable of providing more detail. (In one instance, use
ERR_BUFFER_OUT_OF_BOUNDS which is more accurate in that one instance.)
PR-URL: https://github.com/nodejs/node/pull/22969
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Update the Collaborator Guide to use the assert team for notifications
on assert module issues and pull requests.
PR-URL: https://github.com/nodejs/node/pull/23085
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: https://github.com/nodejs/node/pull/23044
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Boxstarter asks for elevation to install packages, but not to install
Boxstarter itself. Thus, run all the commands from an elevated
PowerShell.
Refs: https://github.com/nodejs/node/pull/22645
PR-URL: https://github.com/nodejs/node/pull/22988
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>