PR-URL: https://github.com/nodejs/node/pull/21712
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Port of the V8 internal v8::tracing::TracedValue that allows
structured data to be included in the trace event. The v8 class
is not exported in the public API so we cannot use it directly.
This is a simplified and slightly modified port. This commit only
adds the class, it does not add uses of it. Those will come in
separate PRs/commits.
PR-URL: https://github.com/nodejs/node/pull/21475
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
The Console Standard specifies that console.countReset()
should emit some type of a warning when given a label that
has no previous account associated with it. This PR brings
node's implementation of console.countReset() up-to-spec and
adds a test asserting that a warning is emitted.
Fixes: https://github.com/nodejs/node/issues/20524
PR-URL: https://github.com/nodejs/node/pull/21649
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Both `Params` and `SetDictionary` take `ZCtx` as an arg, so just make
them both instance methods on `ZCtx`.
PR-URL: https://github.com/nodejs/node/pull/21702
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Fixes a TODO comment.
PR-URL: https://github.com/nodejs/node/pull/21720
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/21731
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Simple utility command line argument for setting the process
title on process startup.
PR-URL: https://github.com/nodejs/node/pull/21477
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
To increase fs readstream coverage, added test to check error when
option.start or end is not safe integer.
PR-URL: https://github.com/nodejs/node/pull/21704
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Updates the module.children description in the docs to match current
functionality in that it will only contain the modules required for the
first time by this module.
Fixes: https://github.com/nodejs/node/issues/9371
PR-URL: https://github.com/nodejs/node/pull/21672
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Now worker.on('exit') reports correct exit code (1) if worker has exited
with uncaught exception.
Fixes: https://github.com/nodejs/node/issues/21707
PR-URL: https://github.com/nodejs/node/pull/21713
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Provide a custom memory allocator for zlib, and track
memory allocated by the library with it.
Right now this “only” makes reported external memory
usage (much) more accurate and protects against zlib
memory leaks, but it generally will enable us to give
more accurate memory usage statistics for zlib.
PR-URL: https://github.com/nodejs/node/pull/21608
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Order declarations:
* public modules in alphabetical order
* internal modules in alphabetical order
* process.binding() calls in alphabetical order
* exports in alphabetical order
PR-URL: https://github.com/nodejs/node/pull/21689
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
The old error code `ERR_HTTP2_STREAM_CLOSED` was removed in commit
0babd181a0 (pull request #17406), and the
testcase for http2stream.pushStream was changed accordingly, but the
documentation change was overlooked.
This commit fixes it and aligns the documentation with the testcase.
This is a part of the fixes hinted by #21470, which includes some tests
for error codes usage and documentation and enforces a stricter format.
Refs: https://github.com/nodejs/node/pull/21470
Refs: https://github.com/nodejs/node/pull/17406
PR-URL: https://github.com/nodejs/node/pull/21487
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This removes unsupported versions from the table, as those might confuse
people, execially given the
> Release versions displayed in **bold** text represent the most
> recent actively supported release.
remark below.
It was inconsistent to keep some of the EOL entries in the table while
removing others (v5.x, v7.x) -- this commit takes care of that.
Instead, release status is hinted in the branch list above, highlighting
two main branches -- Current and Active LTS.
Also update the link to the Release repo.
Refs: https://github.com/nodejs/Release/pull/351
PR-URL: https://github.com/nodejs/node/pull/21612
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
A loop that generates a long array is resulting in a RangeError. Moving
to Array.prototype.fill() along with the ** operator instead of using a
loop fixes the issue.
PR-URL: https://github.com/nodejs/node/pull/21681
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Notes:
1) Removed a number of root properties that did not seem relevant:
source, desc, and introduced_in. There no longer is a source, and
the other two are from the first include and do not reflect the
entire API.
2) As with https://github.com/nodejs/node/issues/20100, the current
"desc" properties sometimes contained in-page links, other times
referenced another page, and often did not match the links in the
original HTML or JSON file. I chose to standardize on external links
as "desc" values are isolated snippets as opposed to all.html which
can be viewed as a standalone and self contained document.
3) Eliminated preprocessing for @include entirely, including the test
case for this function.
4) _toc.md was renamed to index.md.
5) index comments no longer appear in embedded TOCs (left hand side
column in the generated documentation.
PR-URL: https://github.com/nodejs/node/pull/21637
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Avoid using `v8::FunctionTemplate::New()` when using
`v8::Function::New()` suffices. This ensures that individual functions
can be gc-ed and that functions can be created dynamically without
running out of memory.
PR-URL: https://github.com/nodejs/node/pull/21688
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Kyle Farnung <kfarnung@microsoft.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
1) Add missing unit tests by `ucs-2` in different kinds of cases.
2) Add missing unit tests by `usc-2` in different kinds of cases.
3) Fix a bug:We cannot find `ucs-2` in `case 5`'s `if` condition after
`toLowerCase()`
PR-URL: https://github.com/nodejs/node/pull/21455
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1. Reorder some sections alphabetically.
2. Fix some heading levels.
3. Express a type of a property more formally.
PR-URL: https://github.com/nodejs/node/pull/21709
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
We refer to them only as _error-first callbacks_ in our docs. We don't
call them _Node.js style callbacks_ so let's take this opporutnity to
keep things a bit more concise
PR-URL: https://github.com/nodejs/node/pull/21701
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
A loop that generates a long array is resulting in a RangeError. Moving
to Array.prototype.fill() along with the ** operator instead of using a
loop fixes the issue.
PR-URL: https://github.com/nodejs/node/pull/21658
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Adds require('inspector').console, mapping it to the original
global.console of V8. This enables applications to send messages to
the inspector console programmatically.
Fixes: https://github.com/nodejs/node/issues/21651
PR-URL: https://github.com/nodejs/node/pull/21659
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Links in crypto.md table have been autolinking, but correct
Markdown processing will not autolink in block elements like tables.
Upcoming marked 0.4.0 will not autolink in this instance, so add the
links as anchor elements.
PR-URL: https://github.com/nodejs/node/pull/21678
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Remove "note that" from the fs documentation, along with other minor
nearby improvements.
Before:
Note that some characters are obscured by Strong Bad's head.
After:
Some characters are obscured by Strong Bad's head.
PR-URL: https://github.com/nodejs/node/pull/21646
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Merge the two duplicate entries for `napi_create_function()`.
Fixes: https://github.com/nodejs/node/issues/21606
PR-URL: https://github.com/nodejs/node/pull/21627/
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
This benchmark suite is added to measure the performance of n-api
function call with various type/number of arguments. The cases in
this suite are carefully selected to efficiently show the performance
trend.
PR-URL: https://github.com/nodejs/node/pull/21555
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Kyle Farnung <kfarnung@microsoft.com>
Make the text about CI runs in the COLLABORATOR_GUIDE more concise. Add
information about Resume Build which should generally be preferred over
Rebuild.
PR-URL: https://github.com/nodejs/node/pull/21645
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
* Move `napi_get_uv_event_loop` into the `NAPI_VERSION >= 2` section
* Move `napi_open_callback_scope`, `napi_close_callback_scope`,
`napi_fatal_exception`, `napi_add_env_cleanup_hook`, and
`napi_remove_env_cleanup_hook` into the `NAPI_VERSION >= 3` section
* Added a missing `added` property to `napi_get_uv_event_loop` in the
docs
* Added a `napiVersion` property to the docs and updated the parser and
generator to use it.
* Added usage documentation
PR-URL: https://github.com/nodejs/node/pull/19962
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Incoming set-cookie headers should be passed to user as array like in
http module.
Besides improving compatibility between http and http2 it avoids the
need to check if the type is an array or not in user code.
PR-URL: https://github.com/nodejs/node/pull/21360
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
I noticed that there were a few using declarations what were unused and
instead of just removing them, this commit removes all of them and uses
qualified names instead since they are in a header.
PR-URL: https://github.com/nodejs/node/pull/21634
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>