0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
Commit Graph

30380 Commits

Author SHA1 Message Date
daemon1024
1cc1ca4297 fs: update validateOffsetLengthRead in utils.js
PR-URL: https://github.com/nodejs/node/pull/32896
Fixes: https://github.com/nodejs/node/issues/32871
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
2020-04-23 11:14:29 +03:00
bcoe
6a07eca49c
http2: wait for secureConnect before initializing
PR-URL: https://github.com/nodejs/node/pull/32958
Fixes: https://github.com/nodejs/node/issues/32922
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-04-22 18:22:46 -07:00
Guy Bedford
e767ed0558 module: exports not exported for null resolutions
PR-URL: https://github.com/nodejs/node/pull/32838
Reviewed-By: Jan Krems <jan.krems@gmail.com>
2020-04-22 15:48:44 -07:00
Gerhard Stoebich
ecc18f5709 doc: set module version 83 to node 14
Clearly state the modules version 83 is official node 14, similar as
it is done for other major node versions.

PR-URL: https://github.com/nodejs/node/pull/32975
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2020-04-22 10:37:19 +02:00
Robert Nagy
ea87809bb6 stream: fix _final and 'prefinish' timing
This PR fixes a few different things:

The timing of 'prefinish' depends on whether or not
_final is defined. In on case the event is emitted
synchronously with end() and otherwise asynchronously.

_final is currently unecessarily called asynchronously
which forces implementors to use 'prefinish' as a hack
to emulate synchronous behaviour. Furthermore, this hack
is subtly broken due to the above issue.

Refs: https://github.com/nodejs/node/issues/31401
Refs: https://github.com/nodejs/node/pull/32763#discussion_r407041983

PR-URL: https://github.com/nodejs/node/pull/32780
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-04-22 09:40:03 +02:00
Gus Caplan
d08bd41248
doc: add more info to v14 changelog
PR-URL: https://github.com/nodejs/node/pull/32979
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2020-04-21 22:15:48 -05:00
Myles Borins
09a50d3c5a
module: improve error for invalid package targets
For targets that are strings that do not start with `./` or `/` the
error will now have additional information about what the programming
error is.

Closes: https://github.com/nodejs/node/issues/32034

PR-URL: https://github.com/nodejs/node/pull/32052
Fixes: https://github.com/nodejs/node/issues/32034
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Signed-off-by: Myles Borins <myles.borins@gmail.com>
2020-04-21 21:48:14 -04:00
Anna Henningsen
7be5f58638 tools: fix mkcodecache when run with ASAN
Fixes: https://github.com/nodejs/node/issues/32835

PR-URL: https://github.com/nodejs/node/pull/32850
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2020-04-22 00:40:40 +00:00
James M Snell
14aa313186
tls: move getAllowUnauthorized to internal/options
Make it so that the allow unauthorized warning can be easily reused
by the QUIC impl once that lands.

Extracted from https://github.com/nodejs/node/pull/32379

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

PR-URL: https://github.com/nodejs/node/pull/32917
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-04-21 17:21:45 -07:00
James M Snell
91ca22106c http2: refactor and cleanup http2
* cleanup constants in http2 binding
  The error constants were just doing some weird things. Cleanup
  and improve maintainability.
* simplify settings to reduce duplicate code
* improve style consistency and correctness
  Use snake_case for getters and setters at c++ level,
  avoid unnecessary use of enums,
  use consistent style for exported vs. internal constants,
  avoid unnecessary memory info reporting,
  use setters/getters for flags_ for improved code readability
* make EmitStatistics function private
* un-nest Http2Settings and Http2Ping
* refactoring and cleanup of Http2Settings and Http2Ping
* avoid ** syntax for readability
  The **session and **stream syntax for getting the underlying
  nghttp2 pointers is not ideal for readability
* use const references for Http2Priority
* remove unnecessary GetStream function
* refactor Http2Scope to use BaseObjectPtr
* move utility function to anonymous namespace
* refactor and simplify Origins
* Use an AllocatedBuffer instead of MaybeStackBuffer
* Use a const reference instead of pointer
* use BaseObjectPtr for Http2Streams map
* move MemoryInfo impl to cc

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

PR-URL: https://github.com/nodejs/node/pull/32884
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2020-04-21 13:39:55 -07:00
Myles Borins
46ec9ab7d8
module: partial doc removal of --experimental-modules
This removes `--experimental-modules` from showing up in `node -h`
and also removes the documentation from the man pages.

It will still work as a no-op, and is still included in cli.md

Refs: https://github.com/nodejs/modules/issues/502

PR-URL: https://github.com/nodejs/node/pull/32915
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-21 16:13:11 -04:00
Edward Elric
438514d36a doc: fix typo in security-release-process.md
PR-URL: https://github.com/nodejs/node/pull/32926
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2020-04-21 12:57:30 -05:00
Beth Griggs
372c7cc3c2
2020-04-21, Version 14.0.0 (Current)
Deprecations:

- (SEMVER-MAJOR) crypto: move pbkdf2 without digest to EOL
  (James M Snell) [#31166](https://github.com/nodejs/node/pull/31166)
- (SEMVER-MAJOR) fs: deprecate closing FileHandle on garbage collection
  (James M Snell) [#28396](https://github.com/nodejs/node/pull/28396)
- (SEMVER-MAJOR) http: move OutboundMessage.prototype.flush to EOL
  (James M Snell) [#31164](https://github.com/nodejs/node/pull/31164)
- (SEMVER-MAJOR) lib: move GLOBAL and root aliases to EOL
  (James M Snell) [#31167](https://github.com/nodejs/node/pull/31167)
- (SEMVER-MAJOR) os: move tmpDir() to EOL
  (James M Snell)[#31169](https://github.com/nodejs/node/pull/31169)
- (SEMVER-MAJOR) src: remove deprecated wasm type check
  (Clemens Backes) [#32116](https://github.com/nodejs/node/pull/32116)
- (SEMVER-MAJOR) stream: move \_writableState.buffer to EOL
  (James M Snell) [#31165](https://github.com/nodejs/node/pull/31165)
- (SEMVER-MINOR) doc: deprecate process.mainModule
  (Antoine du HAMEL) [#32232](https://github.com/nodejs/node/pull/32232)
- (SEMVER-MINOR) doc: deprecate process.umask() with no arguments
  (Colin Ihrig) [#32499](https://github.com/nodejs/node/pull/32499)

ECMAScript Modules - Experimental Warning Removal:

- module: remove experimental modules warning
  (Guy Bedford) [#31974](https://github.com/nodejs/node/pull/31974)

In Node.js 13 we removed the need to include the --experimental-modules
flag, but when running EcmaScript Modules in Node.js, this would still
result in a warning ExperimentalWarning: The ESM module loader is
experimental.

As of Node.js 14 there is no longer this warning when using ESM in
Node.js. However, the ESM implementation in Node.js remains
experimental. As per our stability index: “The feature is not subject
to Semantic Versioning rules. Non-backward compatible changes or
removal may occur in any future release.” Users should be cautious when
using the feature in production environments.

Please keep in mind that the implementation of ESM in Node.js differs
from the developer experience you might be familiar with. Most
transpilation workflows support features such as optional file
extensions or JSON modules that the Node.js ESM implementation does not
support. It is highly likely that modules from transpiled environments
will require a certain degree of refactoring to work in Node.js. It is
worth mentioning that many of our design decisions were made with two
primary goals. Spec compliance and Web Compatibility. It is our belief
that the current implementation offers a future proof model to
authoring ESM modules that paves the path to Universal JavaScript.
Please read more in our documentation.

The ESM implementation in Node.js is still experimental but we do believe
that we are getting very close to being able to call ESM in Node.js
“stable”. Removing the warning is a huge step in that direction.

New V8 ArrayBuffer API:

* **src**: migrate to new V8 ArrayBuffer API
  (Thang Tran) [#30782](https://github.com/nodejs/node/pull/30782)

Multiple ArrayBuffers pointing to the same base address are no longer
allowed by V8. This may impact native addons.

Toolchain and Compiler Upgrades:

- (SEMVER-MAJOR) build: update macos deployment target to 10.13 for 14.x
  (AshCripps)[#32454](https://github.com/nodejs/node/pull/32454)
- (SEMVER-MAJOR) doc: update cross compiler machine for Linux armv7
  (Richard Lau) [#32812](https://github.com/nodejs/node/pull/32812)
- (SEMVER-MAJOR) doc: update Centos/RHEL releases use devtoolset-8
  (Richard Lau) [#32812](https://github.com/nodejs/node/pull/32812)
- (SEMVER-MAJOR) doc: remove SmartOS from official binaries
  (Richard Lau) [#32812](https://github.com/nodejs/node/pull/32812)
- (SEMVER-MAJOR) win: block running on EOL Windows versions
  (João Reis) [#31954](https://github.com/nodejs/node/pull/31954)

It is expected that there will be an ABI mismatch on ARM between the
Node.js binary and native addons. Native addons are only broken if they
interact with `std::shared_ptr`. This is expected to be fixed in a
later version of Node.js 14.
- [#30786](https://github.com/nodejs/node/issues/30786)

Update to V8 8.1:

- (SEMVER-MAJOR) deps: update V8 to 8.1.307.20
  (Matheus Marchini) [#32116](https://github.com/nodejs/node/pull/32116)

Other Notable Changes:

- cli, report: move --report-on-fatalerror to stable
  (Colin Ihrig) [#32496](https://github.com/nodejs/node/pull/32496)
- deps: upgrade to libuv 1.37.0
  (Colin Ihrig) [#32866](https://github.com/nodejs/node/pull/32866)
- fs: add fs/promises alias module
  (Gus Caplan) [#31553](https://github.com/nodejs/node/pull/31553)

PR-URL: https://github.com/nodejs/node/pull/32181
2020-04-21 15:50:14 +01:00
Matt Kulukundis
10cc254790 src: fix null deref in AllocatedBuffer::clear
An empty buffer can have a null environment.  Previously, we were
getting away with with this, but -fsanitize=null in clang caught it.

PR-URL: https://github.com/nodejs/node/pull/32892
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2020-04-21 07:38:04 -07:00
William Armiros
4299e976ec doc: corrected ERR_SOCKET_CANNOT_SEND message
PR-URL: https://github.com/nodejs/node/pull/32847
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2020-04-21 09:08:50 -05:00
Andrey Pechkurov
7893c70970 test: mark test-child-process-fork-args as flaky on Windows
PR-URL: https://github.com/nodejs/node/pull/32950
Refs: https://github.com/nodejs/node/issues/32863
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2020-04-21 12:56:03 +03:00
karan singh virdi
b53cae32d3 doc: fix usage of folder and directory terms in fs.md
This commit fixes the interchangeably usage of "folder" and "directory"
terms in fs.md

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

PR-URL: https://github.com/nodejs/node/pull/32919
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-04-21 10:27:18 +03:00
雨夜带刀
c3554307c6 doc: fix typo in zlib.md
PR-URL: https://github.com/nodejs/node/pull/32901
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2020-04-20 18:54:46 -05:00
rickyes
33a5cd5450 fs: extract kWriteFileMaxChunkSize constant
PR-URL: https://github.com/nodejs/node/pull/32640
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
2020-04-20 20:16:05 +03:00
rickyes
f250adb28f perf_hooks: remove unnecessary assignment when name is undefined
PR-URL: https://github.com/nodejs/node/pull/32910
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-20 17:35:02 +03:00
Michaël Zasso
3664807fc0
deps: patch V8 to 8.1.307.30
PR-URL: https://github.com/nodejs/node/pull/32693
Refs: https://github.com/v8/v8/compare/8.1.307.26...8.1.307.28
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2020-04-20 14:12:14 +02:00
cjihrig
4af0598134
deps: upgrade to libuv 1.37.0
Notable changes:

- The UV_UDP_RECVMMSG flag has been added. This flag is now
  required in order to utilize recvmmsg(). This was added in
  response to a regression introduced in 1.35.0 and 1.36.0.

PR-URL: https://github.com/nodejs/node/pull/32866
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2020-04-19 20:25:46 -04:00
cjihrig
df8cf44e24
deps: upgrade to libuv 1.36.0
Notable changes:

- gyp support has been removed.
- recvmmsg messages are returned in the correct order.
- IBMi cmake support has been added.
- uv_fs_lutime() has been added.
- uv_fs_statfs() on Windows properly handles file paths.

PR-URL: https://github.com/nodejs/node/pull/32866
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2020-04-19 20:25:46 -04:00
Rich Trott
5c347887d9 doc: synch SECURITY.md with website
Refs: https://github.com/nodejs/nodejs.org/pull/3106#issuecomment-614258785

PR-URL: https://github.com/nodejs/node/pull/32903
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-04-19 12:02:42 -07:00
Gabriel Schulhof
d26ca06c16 n-api: detect deadlocks in thread-safe function
We introduce status `napi_would_deadlock` to be used as a return status
by `napi_call_threadsafe_function` if the call is made with
`napi_tsfn_blocking` on the main thread and the queue is full.

Fixes: https://github.com/nodejs/node/issues/32615
Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
PR-URL: https://github.com/nodejs/node/pull/32860
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
2020-04-19 10:07:00 -07:00
Juan José Arboleda
250060a050 src: remove validation of unreachable code
Based on https://github.com/nodejs/help/issues/2600#issuecomment-612857153
the condition (amount < 0) won't be possible.

PR-URL: https://github.com/nodejs/node/pull/32818
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2020-04-19 09:24:09 -05:00
Jesus Hernandez
a6a15fefb6 fs: remove unnecessary else statement
PR-URL: https://github.com/nodejs/node/pull/32662
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2020-04-19 07:58:44 +02:00
David Daza
83f7bb441f lib: remove unnecesary else block
The if statement inside the _writeHostObject function
returns an expression which makes the else block unnecessary.

PR-URL: https://github.com/nodejs/node/pull/32644
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2020-04-18 16:33:34 -05:00
Vadzim Zieńka
8a3fa32a1f stream: close iterator in Readable.from
Call iterator.return() if not all of its values are consumed.

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

PR-URL: https://github.com/nodejs/node/pull/32844
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
2020-04-18 21:28:17 +02:00
Robert Nagy
fd10be4b54 stream: inline unbuffered _write
PR-URL: https://github.com/nodejs/node/pull/32886
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-04-18 21:10:40 +02:00
Robert Nagy
73f3072ffb stream: simplify Writable.end()
Simplifies Writable.end() by inlining and
de-duplicating code.

PR-URL: https://github.com/nodejs/node/pull/32882
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-04-18 21:07:26 +02:00
Rich Trott
f67601cd77 doc: add tsc-agenda to onboarding labels list
PR-URL: https://github.com/nodejs/node/pull/32832
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-04-18 05:34:16 -07:00
Nimit
4986286446 test: changed function to arrow function
Convert callback functions that are anonymous
to arrow functions for better readability.
Also adjusted the `this` object in places where
that was required.

PR-URL: https://github.com/nodejs/node/pull/32875
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-04-18 08:08:28 +05:30
Nimit
e231e1a0d8 src: elevate v8 namespaces
elevate v8 namespaces. Leverage `using` semantics
for repeated usage of v8 artifacts.

PR-URL: https://github.com/nodejs/node/pull/32872
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
2020-04-18 08:04:45 +05:30
Anna Henningsen
1ce906c16b tools: decrease timeout in test.py
This fixes the following crash on Windows for me. I don't know
why this I only started to see this now, but anyway, the new timeout
value is still longer than a week and a half.

    File "tools/test.py", line 1725, in <module>
        sys.exit(Main())
    File "tools/test.py", line 1701, in Main
        if RunTestCases(cases_to_run, options.progress, \
          options.j, options.flaky_tests):
    File "tools/test.py", line 923, in RunTestCases
        return progress.Run(tasks)
    File "tools/test.py", line 145, in Run
        thread.join(timeout=10000000)
    File "C:\Users\anna\AppData\Local\Programs\Python\Python38-32\ \
      lib\threading.py", line 1015, in join
        self._wait_for_tstate_lock(timeout=max(timeout, 0))
    File "C:\Users\anna\AppData\Local\Programs\Python\Python38-32\ \
      lib\threading.py", line 1027, in _wait_for_tstate_lock
        elif lock.acquire(block, timeout):
    OverflowError: timeout value is too large

PR-URL: https://github.com/nodejs/node/pull/32868
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Zeyu Yang <himself65@outlook.com>

Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
2020-04-18 07:59:45 +05:30
Juan José Arboleda
392bba4ec5 src: remove redundant v8::HeapSnapshot namespace
PR-URL: https://github.com/nodejs/node/pull/32854
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-04-17 20:42:58 -05:00
Michael Dawson
2abec12838 doc: add N-API version 6 to table
We missed adding version 6 to the compatibility
table when we defined version 6. Add it along with the
versions that we know will include version 6.

PR-URL: https://github.com/nodejs/node/pull/32829
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
2020-04-17 15:35:26 -04:00
Juan José Arboleda
8e55c277bf doc: add juanarbol as collaborator
PR-URL: https://github.com/nodejs/node/pull/32906
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-04-17 14:10:12 -05:00
Guy Bedford
22b6997aba
module: remove experimental modules warning
PR-URL: https://github.com/nodejs/node/pull/31974
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2020-04-17 12:26:12 -04:00
William Bonawentura
5e807c1fd2
doc: missing brackets
PR-URL: https://github.com/nodejs/node/pull/32657
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2020-04-17 12:19:39 -04:00
Qinhui Chen
6bcf968401 module: fix memory leak when require error occurs
Delete useless module in parent module: parent.children array
when error occurs, so that it can be garbage collected.

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

PR-URL: https://github.com/nodejs/node/pull/32837
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
2020-04-17 12:35:00 +03:00
Daniel Bevenius
88560ce593 src: remove unused using in node_worker.cc
This commit removes unused using declarations in
src/node_worker.cc.

PR-URL: https://github.com/nodejs/node/pull/32840
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-17 11:06:53 +02:00
Michael Dawson
5a4f24e7e1 doc: improve consistency in usage of NULL
- add backticks around use of NULL
- convert from null to NULL where we mean
  NULL

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

PR-URL: https://github.com/nodejs/node/pull/32726
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Christopher Hiller <boneskull@boneskull.com>
2020-04-16 17:12:37 -04:00
Richard Lau
6d77df840c
build: remove .git folders when testing V8
When running `make test-v8` V8's `gclient sync` converts folders
under `deps/v8/third_party` into git repositories. Unfortunately
the files that were checked in under `deps/v8/third_party/zlib`
have been modified from the upstream Chromium repository (some
files have been deleted and there are whitespace differences in
some of the files that were kept) so whenever the Node.js source
tree is hard reset/checked out `gclient sync` notices there are
unstaged changes as the files in the Node.js source tree do not
match those of the upstream Chromium third party zlib commit.

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

PR-URL: https://github.com/nodejs/node/pull/32877
Refs: https://github.com/nodejs/build/issues/2256
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-04-16 14:06:04 -07:00
Gabriel Schulhof
d3d5eca657 Revert "n-api: detect deadlocks in thread-safe function"
This reverts commit aeb7084fe6.

The solution creates incorrect behaviour on Windows.

Re: https://github.com/nodejs/node-addon-api/pull/697#issuecomment-612993476
Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
PR-URL: https://github.com/nodejs/node/pull/32880
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2020-04-16 12:52:12 -07:00
daemon1024
a9da65699a test: replace console.log/error() with debuglog
PR-URL: https://github.com/nodejs/node/pull/32692
Fixes: https://github.com/nodejs/node/issues/32678
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-04-16 15:31:48 +03:00
Robert Nagy
4a6a5c3453 stream: improve comments regarding end() errors
Cleans up comments and TODOs and tries to provide a
more detail description in regards to error behavior
of end().

PR-URL: https://github.com/nodejs/node/pull/32839
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-16 09:29:42 +02:00
Robert Nagy
15cc2b652b stream: update comment to indicate unused API
destroy w/ callback was previously used by node
core. This is no longer the case and the
comments should reflect this to avoid confusion.

PR-URL: https://github.com/nodejs/node/pull/32808
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-04-16 09:26:50 +02:00
Xu Meng
b61488fe24
test: only detect uname on supported os
To skip some tests on IBMi PASE, we use
uname to detect the true os name, but
on Windows machines there is no uname
available.

PR-URL: https://github.com/nodejs/node/pull/32833
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2020-04-16 08:58:37 +05:30
Robert Nagy
0bd5595509 stream: simplify Transform stream implementation
Significantly simplified Transform stream implementation by
using mostly standard stream code.

PR-URL: https://github.com/nodejs/node/pull/32763
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-04-15 21:25:42 +02:00