0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

30097 Commits

Author SHA1 Message Date
Bartosz Sosnowski
eb553a473b
test: unflake async-hooks/test-statwatcher
On Windows 2016 under high load further change events can be emitted
after writing the 5 bytes is reported. Updating the mtime of the file
can be reported as a separate change. This will increase the "before"
count, but not the "w1HookCount" since we removed the listener.

This makes the test keep the listeners until the end of the test.

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

PR-URL: https://github.com/nodejs/node/pull/32484
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-29 22:33:33 +02:00
Ling Samuel
bc28daa9f7
doc: rename cve_management_process.md to fit doc style guide
PR-URL: https://github.com/nodejs/node/pull/32456
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-29 22:32:44 +02:00
Anna Henningsen
c0668fec2a
doc: add missing changes: entry for mkdir
Refs: https://github.com/nodejs/node/pull/31530

PR-URL: https://github.com/nodejs/node/pull/32490
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2020-03-29 22:31:56 +02:00
Ben Noordhuis
037f8448be
build: disable -Wattributes warnings on aix
Disable the following compiler warning:

    warning: visibility attribute not supported in this
    configuration; ignored [-Wattributes]

This is gcc complaining about `__attribute((visibility("default"))`
in static library builds. Legitimate but harmless (and uninteresting)
and it drowns out more relevant warnings.

PR-URL: https://github.com/nodejs/node/pull/32419
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-03-29 22:30:31 +02:00
Daniel Bevenius
cd1db2db48
src: fix compiler warnings in node_report_module
Currently, the following compiler warnings are generated:
../src/node_report_module.cc:
In function ‘void report::ShouldReportOnFatalError(
    const v8::FunctionCallbackInfo<v8::Value>&)’:
../src/node_report_module.cc:132:16: warning:
unused variable ‘env’ [-Wunused-variable]
  132 |   Environment* env = Environment::GetCurrent(info);
      |                ^~~
../src/node_report_module.cc:
In function ‘void report::SetReportOnFatalError(
    const v8::FunctionCallbackInfo<v8::Value>&)’:
../src/node_report_module.cc:138:16: warning:
unused variable ‘env’ [-Wunused-variable]
  138 |   Environment* env = Environment::GetCurrent(info);
      |                ^~~

This commit removes the unused variables.

PR-URL: https://github.com/nodejs/node/pull/32498
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-28 14:41:14 +01:00
James M Snell
05aa67aa21
console: fixup error message
Use "options.inspectOptions" instead of just "inspectOptions"

Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32475
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-03-28 14:37:32 +01:00
James M Snell
7d3791a3a4
fs: fixup error message for invalid options.recursive
Use "options.recursive" instead of just "recursive"

Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32472
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-03-28 14:36:27 +01:00
himself65
a744dad589
src: remove excess v8 namespace
PR-URL: https://github.com/nodejs/node/pull/32191
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-28 14:34:35 +01:00
Rich Trott
2565442ac0 test: use Promise.all() in test-cluster-net-listen-ipv6only-false
Use Promise.all() instead of countdown in
test-cluster-net-listen-ipv6only-false.

Signed-off-by: Rich Trott <rtrott@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32398
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-03-27 23:16:20 -07:00
Rich Trott
a1686e00ab test: replace Map with Array in test-cluster-net-listen-ipv6only-false
Signed-off-by: Rich Trott <rtrott@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32398
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-03-27 23:16:18 -07:00
Gabriel Schulhof
fa3fd78c88 src: simplify large pages mapping code
* Introduce `OnScopeLeave` handler for cleaning up mmap()ed range(s).
* Factor out failure scenario at the bottom of the function with
  `fail` label for use with `goto`.
* Do not allocate temporary range (`nmem`) on FreeBSD, because it is
  not used.

The intention is that the steps involved in re-mapping to large pages
become more clearly visible.

Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/nodejs/node/pull/32396
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: David Carlier <devnexen@gmail.com>
2020-03-27 19:44:40 -07:00
Rich Trott
436c71db66 test: revise test-http-client-default-headers-exist
* Remove assert.strictEqual where assert.ok suffices
* Replace countdown with Promise.all()

PR-URL: https://github.com/nodejs/node/pull/32493
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-03-27 16:58:56 -07:00
Alba Mendez
c399e2664b doc: add mildsunrise to collaborators
PR-URL: https://github.com/nodejs/node/pull/32525
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-03-28 00:42:39 +01:00
Anna Henningsen
c3204a8787
test: use common.buildType in embedding test
This un-breaks testing in the case of `./configure --debug-node`.

PR-URL: https://github.com/nodejs/node/pull/32422
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-27 17:29:41 +01:00
Juan José Arboleda
6791ac0a47
src: clean v8 namespaces in env.cc file
PR-URL: https://github.com/nodejs/node/pull/32374
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-03-27 17:28:51 +01:00
Xavier Stouder
191fb3c2f2
src: check for empty maybe local
Using ToLocalChecked on MaybeLocal without verifying it's empty
can lead to unattempted crash.

PR-URL: https://github.com/nodejs/node/pull/32339
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-27 17:25:32 +01:00
Anna Henningsen
1b1c2993a5
src: cleanup DestroyParam when Environment exits
Otherwise, this leaks memory if the weak callback is never called.

PR-URL: https://github.com/nodejs/node/pull/32421
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-27 16:04:44 +01:00
Matheus Marchini
7c66f4544a
build: drop Travis in favor of Actions
GitHub Actions is running all tests already present on Travis, as well
as building on more platforms (OS X and Windows). With Travis we're also
getting timeouts more frequently than with Actions, which gives the
false impression tests are failing (making it harder to triage PRs ready
to merge).

To make our config simpler, CI.yml and pythonpackage.yml got merged. The
coverage is also increased by running tests on OS X.

Signed-off-by: Matheus Marchini <mmarchini@netflix.com>

PR-URL: https://github.com/nodejs/node/pull/32450
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2020-03-27 16:02:57 +01:00
James M Snell
ca19d553cf
http: fixup options.method error message
Use `options.method` instead of just `method`

Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32471
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-03-27 16:01:24 +01:00
James M Snell
a0578714bf
repl: fixup error message
Use "cmd.action" instead of just "action" for ERR_INVALID_ARG_TYPE

Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32474
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-03-27 15:59:43 +01:00
Robert Nagy
1428a92492
stream: make pipeline try to wait for 'close'
Pipeline uses eos which will invoke the callback
on 'finish' and 'end' before all streams have been
fully destroyed.

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

PR-URL: https://github.com/nodejs/node/pull/32158
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-03-27 15:55:21 +01:00
unknown
cba9f2e7a2
doc: add link to DNS definition
PR-URL: https://github.com/nodejs/node/pull/32228
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2020-03-27 15:53:01 +01:00
Myles Borins
113c04c524
2020-03-26 Version 13.12.0 (Current)
macOS package notarization and a change in builder configuration:

The macOS binaries for this release, and future 13.x releases, are now
being compiled on macOS 10.15 (Catalina) with Xcode 11 to support
package notarization, a requirement for installing on .pkg files on
macOS 10.15 and later. Previous builds of Node.js 13.x were compiled on
macOS 10.11 (El Capitan) with Xcode 10. As binaries are still being
compiled to support a minimum of macOS 10.10 (Yosemite) we do not
anticipate this having a negative impact on Node.js 13.x users with
older versions of macOS.

Notable changes:

* build:
  * macOS package notarization (Rod Vagg)
    https://github.com/nodejs/node/pull/31459
* deps:
  * upgrade npm to 6.14.4 (Ruy Adorno)
    https://github.com/nodejs/node/pull/32495
  * update to uvwasi 0.0.6 (Colin Ihrig)
    https://github.com/nodejs/node/pull/32309
  * upgrade to libuv 1.35.0 (Colin Ihrig)
    https://github.com/nodejs/node/pull/32204
* lib:
  * add --disable-proto option to cli (Gus Caplan)
    https://github.com/nodejs/node/pull/32279
* node_report:
  * move diagnostic reports to stable (Colin Ihrig)
    https://github.com/nodejs/node/pull/32242
* worker:
  * allow URL in Worker constructor (Antoine du HAMEL)
    https://github.com/nodejs/node/pull/31664
* util:
  * use a global symbol for `util.promisify.custom` (ExE Boss)
    https://github.com/nodejs/node/pull/31672

PR-URL: https://github.com/nodejs/node/pull/32376
2020-03-26 18:49:28 -04:00
Robert Nagy
0d0f151a46
stream: emit 'pause' on unpipe
unpipe should use pause() instead of mutating
state.flowing directly so that pausing side
effects such as emitting 'pause' are properly
performed.

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

PR-URL: https://github.com/nodejs/node/pull/32476
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-03-26 14:48:18 -04:00
Ruy Adorno
b2e1a01516
deps: upgrade npm to 6.14.4
PR-URL: https://github.com/nodejs/node/pull/32495
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2020-03-26 13:28:08 -04:00
Rich Trott
498415b4ab
doc: remove extraneous sentence in events.md
Since the previous sentence describes `10` as a default, and the
following sentence explains how to modify that default, it is
unnecessary to explain that "Obviously, not all events should be limited
to just 10 listeners."

PR-URL: https://github.com/nodejs/node/pull/32457
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2020-03-26 10:23:33 -04:00
Rich Trott
7e4381318b
doc: remove unnecessary "obvious(ly)" modifiers in esm.md
Remove "obvious" and "obviously" in two places in esm.md. It may be
obvious to some, but likely not everyone or else it probably wouldn't be
worth mentioning/documenting.

PR-URL: https://github.com/nodejs/node/pull/32457
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2020-03-26 10:23:31 -04:00
Rich Trott
bdfbbf6c68
doc: trim wording in n-api.md text about exceptions
PR-URL: https://github.com/nodejs/node/pull/32457
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2020-03-26 10:23:29 -04:00
Victor
afb5639119
doc: update async_hooks.md
Typo `runAndReturn` -> `runSyncAndReturn`

PR-URL: https://github.com/nodejs/node/pull/32382
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-26 10:20:49 -04:00
AshCripps
a621608f12 build: update macos deployment target to 10.13 for 14.x
Update the macos deployment target to 10.13 (High Sierra) for Node 14

refs: https://github.com/nodejs/build/issues/2168

PR-URL: https://github.com/nodejs/node/pull/32454
Refs: https://github.com/nodejs/build/issues/2168
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-26 09:41:06 -04:00
Rich Trott
f0a33d99ec doc: simplify and correct example descriptions in net.md
Instead of indicating that examples show lines to change in previous
examples, present the examples as standalone items. They suffice on
their own.

In the first of these, it says to change "the second line" of a previous
example, but if it were literally changed to the provided line, it would
result in a syntax error.

In the second of these, it gives the wrong line to change.

All of this is unnecessary and probably makes the examples harder to
follow. So simplify and treat each one as a separate example.

PR-URL: https://github.com/nodejs/node/pull/32451
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-25 23:15:20 -07:00
himself65
dade90db9c src: enhance C++ sprintf utility
PR-URL: https://github.com/nodejs/node/pull/32385
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
2020-03-25 19:46:11 -07:00
Anna Henningsen
b950daf836 src: use single ObjectTemplate for TextDecoder
`ObjectTemplate`s are not garbage-collected like regular objects
(for some reason). It is sufficient to create a single template
anyway, so do that to address the memory leak.

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

PR-URL: https://github.com/nodejs/node/pull/32426
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2020-03-26 02:37:46 +00:00
Harshitha KP
2fa74e3e38 report: handle on-fatalerror better
--report-on-fatalerror was not honored properly, as there was no
way to check the value which was stored in the Environment pointer
which can be inaccessible under certain fatal error situations.

Move the flag out of Environment pointer so that this is doable.

Co-authored-by: Shobhit Chittora schittora@paypal.com

PR-URL: https://github.com/nodejs/node/pull/32207
Fixes: https://github.com/nodejs/node/issues/31576
Refs: https://github.com/nodejs/node/pull/29881
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2020-03-25 12:43:45 -07:00
Robert Nagy
388cef61e8 stream: align stream.Duplex with net.Socket
stream.Duplex and net.Socket slightly differs in behavior.

Especially when it comes to the case where one side never
becomes readable or writable. This aligns Duplex with the
behavior of Socket.

PR-URL: https://github.com/nodejs/node/pull/32139
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-25 15:20:22 +01:00
Robert Nagy
05f1df5200 stream: fix pipeline with dest in objectMode
pipeline did not support destination with generator
that does not return strings or buffers.

PR-URL: https://github.com/nodejs/node/pull/32414
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-03-25 14:46:10 +01:00
Robert Nagy
9e3eddc75d stream: add pipeline test for destroy of returned stream
Adds a test to ensure that destroying the returned stream
of pipeline will cause a premature close error.

PR-URL: https://github.com/nodejs/node/pull/32425
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-03-25 12:56:09 +01:00
Michael Dawson
f4153c2fe7 doc: add new TSC members
Refs: https://github.com/nodejs/TSC/issues/829
Refs: https://github.com/nodejs/TSC/issues/832
Refs: https://github.com/nodejs/TSC/issues/831

Signed-off-by: Michael Dawson <michael_dawson@ca.ibm.com>

PR-URL: https://github.com/nodejs/node/pull/32473
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-03-24 21:27:56 -07:00
Richard Lau
066bdec643
doc: fix lint warning in doc/api/esm.md
Signed-off-by: Richard Lau <riclau@uk.ibm.com>

PR-URL: https://github.com/nodejs/node/pull/32462
Refs: https://github.com/nodejs/node/pull/31479
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-03-24 14:35:35 -04:00
James M Snell
d0c0e20bc2 test: refactoring / cleanup on child-process tests
PR-URL: https://github.com/nodejs/node/pull/32078
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2020-03-24 11:21:00 -07:00
Rich Trott
c78d3f2256 doc: improve wording in vm.md
Simplify complex sentence. Remove use of "straightforward".

PR-URL: https://github.com/nodejs/node/pull/32427
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-03-24 10:24:37 -07:00
Rich Trott
43922a55ea doc: improve wording in esm.md
Simplify complex sentence. Remove use of "straightforward".

PR-URL: https://github.com/nodejs/node/pull/32427
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-03-24 10:24:34 -07:00
Richard Lau
f467b9b5e2
build: annotate markdown lint failures in pull requests
Add a problem matcher for output from remark-lint to our lint-md GitHub
Actions CI workflow so that any markdown linter failures are annotated
in the pull request in the web UI.

Signed-off-by: Richard Lau <riclau@uk.ibm.com>

PR-URL: https://github.com/nodejs/node/pull/32391
Refs: https://github.com/actions/toolkit/blob/master/docs/problem-matchers.md
Refs: https://github.com/actions/toolkit/blob/master/docs/commands.md#problem-matchers
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
2020-03-24 12:21:03 -04:00
Eric Dobbertin
f92df33832
doc: import clarifications with links to MDN
PR-URL: https://github.com/nodejs/node/pull/31479
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2020-03-24 12:14:39 -04:00
Robert Nagy
eeccd52b4e net: make readable/writable start as true
`net.Socket` is slightly breaking stream invariants by
having readable/writable going from `false` to `true`.
Streams assume that readable/writable starts out `true`
and then goes to `false` through `push(null)`/`end()`
after which it never goes back to `true`, e.g. once a
stream is `writable == false` it is assumed it will
never become `true`.

This PR changes 2 things:

Unless explicitly set to `false` through options:

- starts as `readable`/`writable` `true` by default.
- uses `push(null)`/`end()` to set `readable`/`writable`
  to `false`. Note that this would cause the socket to
  emit the `'end'`/`'finish'` events, which it did not
  do previously.

In the case it is explicitly set to `false` through
options` it is assumed to never become `true`.

PR-URL: https://github.com/nodejs/node/pull/32272
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-24 09:45:25 +01:00
Rich Trott
96f06e6482 test: use mustCall in place of countdown in timers test
Use common.mustCall() in place of countdown in
test-timers-immediate-unref.

PR-URL: https://github.com/nodejs/node/pull/32416
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-03-23 22:54:13 -07:00
Rod Vagg
10d8e2687e
doc: add note re term-size commit on top of npm
Until npm updates update-notifier to a newer version, the dependency
tree will contain a version of term-size that has an unsigned macOS
binary. This will fail .pkg notarization and will result in failed
release builds. We built and signed a term-size and contributed it back
to the project for this purpose, but the dependency chain is long enough
that it's not likely to be included in a new npm very quickly.
Until it is, we need to cherry-pick commit d2f08a1bdb ontop of any npm
updates to master and any other release branch that includes
notarization.

PR-URL: https://github.com/nodejs/node/pull/32403
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2020-03-24 13:22:32 +11:00
Anna Henningsen
668bc11c1b
src: delete BaseObjectWeakPtr data when pointee is gone
Fix the condition for deleting the underlying data pointed to by
a `BaseObjectWeakPtr`, which erroneously skipped that deletion
when `ptr->get()` was `nullptr`. This fixes a memory leak reported
by some of the tests.

Refs: https://github.com/nodejs/node/pull/30374#issuecomment-601848973

PR-URL: https://github.com/nodejs/node/pull/32393
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-03-23 12:06:24 -07:00
Anna Henningsen
f2b0fb270d
src: simplify IsolateData shortcut accesses
PR-URL: https://github.com/nodejs/node/pull/32407
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
2020-03-23 11:04:11 -07:00
Anna Henningsen
678e1be6aa
src: delete CallbackInfo when cleared from cleanup hook
Fixes: https://github.com/nodejs/node/issues/32400

PR-URL: https://github.com/nodejs/node/pull/32405
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-23 11:02:04 -07:00