Commit Graph
32561 Commits
Author SHA1 Message Date
Pranshu Jethmalani e85fbb778d http2: fix typos in core.js
PR-URL: https://github.com/nodejs/node/pull/36719
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Yash Ladha <yash@yashladha.in>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-01-12 07:10:33 -05:00
Rich Trott 9f7fbcc64d test: add coverage for breakLength one-column array
Add coverage for breakLength option resulting in a single-column array
display.

Refs: https://coverage.nodejs.org/coverage-0b6d3070a176d437/lib/internal/util/inspect.js.html#L1277

PR-URL: https://github.com/nodejs/node/pull/36657
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-01-12 07:10:32 -05:00
Joseph Hackman 954a36947d http: make HEAD method to work with keep-alive
Fixes: https://github.com/nodejs/node/issues/28438

PR-URL: https://github.com/nodejs/node/pull/34231
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-01-12 07:10:32 -05:00
Thiago Padilha 9bc2cec848 child_process: add 'overlapped' stdio flag
The 'overlapped' value sets the UV_OVERLAPPED_PIPE libuv flag in the
child process stdio.

Fixes: https://github.com/nodejs/node/issues/29238

PR-URL: https://github.com/nodejs/node/pull/29412
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-01-12 07:10:31 -05:00
James M Snell 8b43388903 src: reduce duplicated boilerplate with new env utility fn
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/36536
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2021-01-12 07:10:31 -05:00
James M Snell 214dbac8ff doc: clarify undocumented stream properties
Fixes: https://github.com/nodejs/node/issues/28592
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/36715
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-01-12 07:10:30 -05:00
James M Snell 242ce19346 doc: document common warning types
Fixes: https://github.com/nodejs/node/issues/24987
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/36713
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-01-12 07:10:30 -05:00
Adrien Maret 92af50327e process: add direct access to rss without iterating pages
Accessing the rss value through memoryUsage() can be expensive
because this method will also generate  memory usage statistics
by iterating on each page.
This commit intend to offer a more direct access to rss value.

Refs: #33384

PR-URL: https://github.com/nodejs/node/pull/34291
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-01-12 07:10:30 -05:00
Kevin Locke d3dc124575 doc: update emitClose default for fs streams
The default for the `emitClose` option was changed from `false` to
`true` by nodejs/node#31408 which landed in f0d2df4 for v14.0.0.
This commit updates the fs doc to match the current behavior.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>

PR-URL: https://github.com/nodejs/node/pull/36653
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2021-01-12 07:10:29 -05:00
Andrey Pechkurov 181bd0510f doc: improve ALS.enterWith and exit descriptions
PR-URL: https://github.com/nodejs/node/pull/36705
Refs: https://github.com/nodejs/node/issues/36683
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-01-12 07:10:29 -05:00
Daijiro Wachi 9eff709c23 test: update wpt interfaces
Refs: https://github.com/web-platform-tests/wpt/pull/26992

PR-URL: https://github.com/nodejs/node/pull/36659
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-01-12 07:10:28 -05:00
Daijiro Wachi a7f743f5cc test: update wpt resources
Refs: https://github.com/web-platform-tests/wpt/pull/26824

PR-URL: https://github.com/nodejs/node/pull/36659
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-01-12 07:10:28 -05:00
Daijiro Wachi 4acc2732f9 test: update wpt encoding
Refs: https://github.com/web-platform-tests/wpt/pull/26385

PR-URL: https://github.com/nodejs/node/pull/36659
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-01-12 07:10:28 -05:00
Daijiro Wachi 986d5aca44 test: update wpt url
Refs: https://github.com/web-platform-tests/wpt/pull/26643

PR-URL: https://github.com/nodejs/node/pull/36659
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-01-12 07:10:27 -05:00
Nitzan Uziely 02dbcc4317 net: support abortSignal in server.listen
PR-URL: https://github.com/nodejs/node/pull/36623
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-01-12 07:10:27 -05:00
ZiJian Liu 833e614682 test: increase coverage for diagnostics_channel
1. test subscribe with invalid args
https://coverage.nodejs.org/coverage-21f2e8859dfbf09f/lib/diagnostics_channel.js.html#L27

2. test create channel with invalid args
https://coverage.nodejs.org/coverage-21f2e8859dfbf09f/lib/diagnostics_channel.js.html#L98

PR-URL: https://github.com/nodejs/node/pull/36602
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Pooja D P <Pooja.D.P@ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yash Ladha <yash@yashladha.in>
2021-01-12 07:10:27 -05:00
raisinten a53997e6c0 src: fix leading backslash bug in URL
The associated condition mentioned in the URL parsing algorithm of the
WHATWG URL Standard is:
url is special and c is U+005C (\)
So, `special_back_slash` must be updated whenever `special` is updated.

Fixes: https://github.com/nodejs/node/issues/36559

PR-URL: https://github.com/nodejs/node/pull/36613
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-01-12 07:10:26 -05:00
James M Snell edf8c6de5a doc: add note about uncloneable objects
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/36534
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2021-01-12 07:10:26 -05:00
Antoine du Hamel f0a9c53bec errors: refactor to use more primordials
PR-URL: https://github.com/nodejs/node/pull/36651
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yash Ladha <yash@yashladha.in>
2021-01-12 07:10:25 -05:00
Michaël Zasso d2b9e7cb01 string_decoder: throw ERR_STRING_TOO_LONG for UTF-8
String::NewFromUtf8 doesn't generate an exception in V8 when the string
is too long but is guaranteed to return an empty MaybeLocal only in
that case. Generate a Node.js exception when it happens.

Fixes: https://github.com/nodejs/node/issues/35676

PR-URL: https://github.com/nodejs/node/pull/36661
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-01-12 07:10:25 -05:00
raisinten d5e1b82125 fs: accept non-32-bit length in writeBuffer
Since `length` is `size_t`, it can accept 64-bit integers too.

Refs: https://man7.org/linux/man-pages/man2/write.2.html
Fixes: https://github.com/nodejs/node/issues/36643

PR-URL: https://github.com/nodejs/node/pull/36667
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yash Ladha <yash@yashladha.in>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
2021-01-12 07:10:25 -05:00
ZiJian Liu 5cb8b16452 url: fix url.format with ipv6 hostname
Fixes: https://github.com/nodejs/node/issues/36654

PR-URL: https://github.com/nodejs/node/pull/36665
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Yash Ladha <yash@yashladha.in>
2021-01-12 07:10:24 -05:00
Rich Trott f0dfe57bd1 test: add already-aborted-controller test for spawn()
PR-URL: https://github.com/nodejs/node/pull/36644
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2021-01-12 07:10:24 -05:00
Rich Trott b98cc51be2 child_process: reduce abort handler code duplication
Move duplicate abort handler logic into a separate function.

PR-URL: https://github.com/nodejs/node/pull/36644
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2021-01-12 07:10:24 -05:00
Rich Trott 78d4d91e54 child_process: treat already-aborted controller as aborting
If an AbortController passed to execfile() is already aborted, use the
same behavior as if the controller was aborted after calling execfile().
This mimics the behavior of fetch in the browser.

PR-URL: https://github.com/nodejs/node/pull/36644
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2021-01-12 07:10:23 -05:00
Rich Trott d5d56ec3d4 test: add test for reused AbortController with execfile()
Test that reusing an aborted AbortController with execfile() results in
immediate SIGTERM.

PR-URL: https://github.com/nodejs/node/pull/36644
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2021-01-12 07:10:23 -05:00
Robert Nagy 190ddced46 stream: only use legacy close listeners if not willEmitClose
Some streams that willEmitClose unecessarily fallback to legacy
events.

PR-URL: https://github.com/nodejs/node/pull/36649
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-01-12 07:10:23 -05:00
Dr 651e7d27b7 doc: document http.IncomingMessage behaviour change
Add to the history table that the `destroyed` value returns `true` after
the incoming data is consumed.

Refs: https://github.com/nodejs/node/issues/36617
Refs: https://github.com/nodejs/node/pull/33035

PR-URL: https://github.com/nodejs/node/pull/36641
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2021-01-12 07:10:22 -05:00
Brian White eb6b38639a lib: remove unused code
PR-URL: https://github.com/nodejs/node/pull/36632
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2021-01-12 07:10:22 -05:00
ZiJian Liu 7fe1b5ef5a lib: refactor to use validateCallback
PR-URL: https://github.com/nodejs/node/pull/36609
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-01-12 07:10:22 -05:00
Matteo Collina 1fc30a84ac stream,zlib: do not use _stream_* anymore
PR-URL: https://github.com/nodejs/node/pull/36618
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-01-12 07:10:21 -05:00
Yash Ladha 72b0ab0739 doc: add yashLadha to collaborator
Fixes: https://github.com/nodejs/node/issues/36500

PR-URL: https://github.com/nodejs/node/pull/36666

Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Pooja D P <Pooja.D.P@ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-01-12 07:10:21 -05:00
Pooja D P bb4f8c8732 lib: use more primordials in shared validators
PR-URL: https://github.com/nodejs/node/pull/36552
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-01-12 07:10:20 -05:00
Antoine du Hamel 64bf2f229e util: refactor to use more primordials
PR-URL: https://github.com/nodejs/node/pull/36265
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-01-12 07:10:20 -05:00
raisinten 857b98eed9 build: fix unknown warning option
warning: unknown warning option '-Wno-int-in-bool-context';
did you mean '-Wno-gnu-include-next'? [-Wunknown-warning-option]
1 warning generated.

The `-Wint-in-bool-context` diagnostic is not enabled by default,
so no additional option is needed.

PR-URL: https://github.com/nodejs/node/pull/36629
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-01-12 07:10:14 -05:00
ZiJian Liu f81556563a test: increase coverage for internal/error_serdes.js
test serializeError with getter property

Refs: https://coverage.nodejs.org/coverage-73a21e4c06d5781d/lib/internal/error_serdes.js.html#L49

PR-URL: https://github.com/nodejs/node/pull/36628
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-01-12 07:10:07 -05:00
Antoine du Hamel 181bad58d3 lib: add primordials.SafeArrayIterator
PR-URL: https://github.com/nodejs/node/pull/36532
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-01-12 07:10:07 -05:00
Antoine du Hamel a4d64f967a https: refactor to use more primordials
PR-URL: https://github.com/nodejs/node/pull/36195
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-01-12 07:10:07 -05:00
François-Denis Gonthier ffaa8c1735 build: do not "exit" a script meant to be "source"d
Running exit in a script meant to be sourced means the user shell will
exit, which prevents seeing the error message, and is generally very
annoying.
Fix the "android-configure" script to use "return" instead of "exit".

PR-URL: https://github.com/nodejs/node/pull/35520
Fixes: https://github.com/nodejs/node/issues/35519
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-01-12 07:10:06 -05:00
ZiJian Liu 9156f430b5 http: remove dead code from internal/http.js
PR-URL: https://github.com/nodejs/node/pull/36630
Refs: https://github.com/nodejs/node/pull/32329
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-01-12 07:10:03 -05:00
ZiJian Liu 8b7336b072 quic,timers: refactor to use validateAbortSignal
PR-URL: https://github.com/nodejs/node/pull/36604
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2021-01-12 07:09:29 -05:00
Rich Trott 8a0cdb3b4e doc: alphabetize http response properties
All the properties are already in alphabetical order except for
createPushResponse(). Move that property to the alphabetical location in
the list.

PR-URL: https://github.com/nodejs/node/pull/36631
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-01-12 07:09:29 -05:00
Rich Trott ff4674b033 doc: correct callback parameter type for createPushResponse()
Refs: https://github.com/nodejs/node/issues/22322#issuecomment-749348347

PR-URL: https://github.com/nodejs/node/pull/36631
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-01-12 07:09:29 -05:00
Rich Trott 8ad3455ae3 tools: revise install.py for minor improvements
* Use an with block for reading the config file.
Refs: https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files

* Use explicit blank return to make it clear that the return value is
  not actually used and that it is being used for flow control only..

PR-URL: https://github.com/nodejs/node/pull/36626
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
2021-01-12 07:09:28 -05:00
Rich Trott 34d1d791e5 test: improve coverage for util.inspect() with classes
Refs: https://github.com/nodejs/node/pull/36622#pullrequestreview-558721102

PR-URL: https://github.com/nodejs/node/pull/36625
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2021-01-12 07:09:28 -05:00
Rich Trott 1f3bc5ed73 test: increase runInAsyncScope() coverage
We don't appear to have any test coverage for passing the `thisArg`
argument to `runInAsyncScope()`. Test coverage stats seem to bear this
out. Add a test for it.

PR-URL: https://github.com/nodejs/node/pull/36624
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-01-12 07:09:27 -05:00
Rich Trott f623d5d377 doc: use _code name_ rather than _codename_
This is excrutiatingly minor, but every authoritative resource I've
checked (which is to say, a few dictionaries) uses "code name" primarily
or exclusively. Let's follow suit.

PR-URL: https://github.com/nodejs/node/pull/36611
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2021-01-12 07:09:27 -05:00
raisinten 6e338dac3c lib: refactor to use more primordials in internal/encoding.js
PR-URL: https://github.com/nodejs/node/pull/36480
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Pooja D P <Pooja.D.P@ibm.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-01-12 07:09:27 -05:00
Michael Chen 1ed517c176 doc: document return value of https.request
Add missing topic about what https.request() returns.

PR-URL: https://github.com/nodejs/node/pull/36370
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Pooja D P <Pooja.D.P@ibm.com>
2021-01-12 07:09:26 -05:00
Michaël Zasso b367d5a61d tools: update gyp-next to v0.7.0
Refs: https://github.com/nodejs/gyp-next/releases/tag/v0.7.0

PR-URL: https://github.com/nodejs/node/pull/36580
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
2021-01-12 07:09:26 -05:00