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

30880 Commits

Author SHA1 Message Date
Lucas Holmquist
8e080c14cf fs: support util.promisify for fs.readv
PR-URL: https://github.com/nodejs/node/pull/33590
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-05-30 10:17:31 -07:00
sapics
a437a84f80 doc: fix urls to avoid redirection
Replace redirected urls with the final ones.
Replace http urls with https ones.

PR-URL: https://github.com/nodejs/node/pull/33614
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-05-30 10:01:57 -07:00
Daniel Bevenius
c4cced0c80
src: use MaybeLocal.ToLocal instead of IsEmpty worker
This commit suggest using MaybeLocal.ToLocal and passing in the
Local<String> node_opts. It also introduces a variable, arg_v8, of type
Local<String> to enable the use of ToLocal.

The motivation for doing this is that the following
MaybeLocal::ToLocalChecked and MaybeLocal::FromMaybe calls can then be
avoided.

PR-URL: https://github.com/nodejs/node/pull/33599
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-05-30 18:46:19 +02:00
Gus Caplan
b4ede54a7d
napi: add __wasm32__ guards
PR-URL: https://github.com/nodejs/node/pull/33597
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-05-30 11:42:06 -05:00
rickyes
d79c330186 http2: refactor state code validation for the http2Stream class
PR-URL: https://github.com/nodejs/node/pull/33535
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-05-30 13:00:41 +08:00
Robert Nagy
b0b268f5a2 test: fix flaky fs-construct test
Fixes: https://github.com/nodejs/node/issues/33607

PR-URL: https://github.com/nodejs/node/pull/33625
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-05-30 04:40:17 +02:00
Benjamin Gruenbaum
2d071e767d events: fix event-target enumerable keys
PR-URL: https://github.com/nodejs/node/pull/33616
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-05-30 04:38:46 +02:00
Benjamin Gruenbaum
56e44601d2 events: add tests, better toString
PR-URL: https://github.com/nodejs/node/pull/33622
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-05-30 04:38:10 +02:00
AshCripps
697bcd9e3f cli: add alias for report-directory to make it consistent
Currently every other cli option uses "dir" to reference a directory
so add an alias to allow for conistency.

PR-URL: https://github.com/nodejs/node/pull/33587
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-05-30 04:33:31 +02:00
Tom Nagle
5e77c67369 doc: improve buffer.md a tiny bit
PR-URL: https://github.com/nodejs/node/pull/33547
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-05-30 04:28:53 +02:00
cjihrig
e3b54b4d1c wasi: allow WASI stdio to be configured
This commit adds stdin, stderr, and stdout options to WASI, which
allow the stdio streams to be configured.

PR-URL: https://github.com/nodejs/node/pull/33544
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-05-30 04:28:02 +02:00
Derek Lewis
e2d3230565 doc: normalize Markdown code block info strings
Prior to this commit, Markdown fenced code blocks in Markdown
files had inconsistent info strings. This has been corrected to
standardize on the one shown in the CommonMark spec.

Refs: 1103710025/spec.txt (L131)

PR-URL: https://github.com/nodejs/node/pull/33542
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-05-30 04:27:31 +02:00
Maciej Kacper Jagiełło
01c4455de7 build: add --v8-lite-mode flag
PR-URL: https://github.com/nodejs/node/pull/33541
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-05-30 04:26:57 +02:00
Derek Lewis
4a8f6b6331 doc: normalize JavaScript code block info strings
Prior to this commit, JavaScript fenced code blocks in Markdown files
had inconsistent info strings. This has been corrected to standardize
on the one with the highest frequency in the doc/api/ dir.

Stats:
>  'js' => 1091,
>  'javascript' => 2,

PR-URL: https://github.com/nodejs/node/pull/33531
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
2020-05-30 04:22:04 +02:00
Ruben Bridgewater
f7626866d5 doc: outline when origin is set to unhandledRejection
The `uncaughtException` listener's origin argument was ambiguous
about unhandled rejections. This should clarify when origin is set
to `'unhandledRejection'`.

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

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/33530
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-05-30 04:21:21 +02:00
cjihrig
cd9bc20cb4 doc: add --experimental-top-level-await to man page
PR-URL: https://github.com/nodejs/node/pull/33529
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2020-05-30 04:20:20 +02:00
Ruben Bridgewater
4bdab881b8 console: name console functions appropriately
The current name of most of the global console functions is
"bound consoleCall". This is changed to the actual functions name
e.g., "log" or "error".

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/33524
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2020-05-30 04:19:27 +02:00
Ruben Bridgewater
87629d7e7c console: mark special console properties as non-enumerable
This makes sure internal console properties are not visible during
default inspection. They are still visible when inspecting the
console with `showHidden` set to `true`.

These properties are confusing while working with the REPL and easily
show up.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/33524
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2020-05-30 04:19:18 +02:00
Ruben Bridgewater
b61249e32d console: remove dead code
This check is always truthy. Thus, it's removed.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/33524
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2020-05-30 04:19:14 +02:00
Ruben Bridgewater
6cc94b2d7f errors: fully inspect errors on exit
This makes sure errors are fully inspected during exit. That is
important to provide as many debugging information to the user as
possible.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/33523
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-05-30 04:18:16 +02:00
Richard Townsend
ce025d9233 build: zlib build error on Windows on Arm
Zlib's SIMD optimizations are not supported in MSVC, so fall back to the
C versions for now.

PR-URL: https://github.com/nodejs/node/pull/33511
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-05-30 04:17:21 +02:00
Richard Townsend
54e5c36e73 build: fix GetCurrentThreadStackLimits error on Windows on Arm
GetCurrentThreadStackLimits is a fairly new API, so it requires a
_WIN32_WINNT value of at least 0x0602 to compile successfully.

Change-Id: Ib3bc24513453aa37bee68f4a6999cefc26947cb1

PR-URL: https://github.com/nodejs/node/pull/33511
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-05-30 04:17:17 +02:00
Pranshu Srivastava
99abaf9658 http2: add writable* properties to compat api
added writableHighWaterMark, writableLength, and writableFinished
properties with test.

Refs: https://github.com/nodejs/node/issues/29829

PR-URL: https://github.com/nodejs/node/pull/33506
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-05-30 04:04:09 +02:00
Pranshu Srivastava
df31f71f1e http2: header field valid checks
checks validity for request, writeHead, and setHeader methods

PR-URL: https://github.com/nodejs/node/pull/33193
Refs: https://github.com/nodejs/node/issues/29829
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-05-30 03:56:27 +02:00
João Reis
2c0a4fab11 win: allow skipping the supported platform check
Fixes: https://github.com/nodejs/node/issues/33034

PR-URL: https://github.com/nodejs/node/pull/33176
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-05-30 03:54:27 +02:00
Pranshu Srivastava
de35c030b5 http2: add type checks for Http2ServerResponse.end
Refs: https://github.com/nodejs/node/issues/29829

PR-URL: https://github.com/nodejs/node/pull/33146
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-05-30 03:45:37 +02:00
Zeke Sikelianos
f08174c9fb doc: update ``txt `fandamental and ``raw code blocks
These are changed to either ```text or ```console.

PR-URL: https://github.com/nodejs/node/pull/33028
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-05-30 03:43:39 +02:00
Shelley Vohr
0ff3819481
src: don't use semicolon outside function
PR-URL: https://github.com/nodejs/node/pull/33592
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-05-29 12:44:50 -07:00
Richard Lau
69612b70da
build: fix python-version selection with actions
s/PYTHON\_VERSION/python-version

Refs: https://github.com/actions/setup-python
Refs: https://github.com/nodejs/node/pull/32609

PR-URL: https://github.com/nodejs/node/pull/33589
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2020-05-29 12:50:59 -04:00
Pranshu Srivastava
c095808e73 http2: use Object.create(null) for getHeaders
refactor `getHeaders` to initialize headers using
`Object.create(null)`

Refs: https://github.com/nodejs/node/issues/29829

PR-URL: https://github.com/nodejs/node/pull/33188
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sebastiaan Deckers <sebdeckers83@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-05-29 10:23:31 +02:00
Gabriel Schulhof
6a1df3b5af n-api: remove napi_env::CallIntoModuleThrow
Give `napi_env::CallIntoModule` the thrower used by
`CallIntoModuleThrow` as its default second argument. That way we do
not need two different methods on `napi_env` for calling into the
addon.

PR-URL: https://github.com/nodejs/node/pull/33570
Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2020-05-28 13:28:56 -07:00
Ash Cripps
fb33b673f1 meta: add flaky test issue template
Add a flaky test issue template to ensure that enough information is
provided for investigation

PR-URL: https://github.com/nodejs/node/pull/33500
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2020-05-28 10:49:12 -07:00
himself65
f19a576f6c http: simplify Agent initialization
PR-URL: https://github.com/nodejs/node/pull/33551
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2020-05-28 22:18:55 +08:00
Richard Lau
05db68245b
tools: fix check-imports.py to match on word boundaries
`check-imports.py` was missing some unused `using` statements as it
was not matching on word boundaries (e.g. `MaybeLocal` was considered
a use of `Local`). Fix that and add some unit tests (which required
the script to be renamed to drop the `-` so it could be imported into
the test script).

PR-URL: https://github.com/nodejs/node/pull/33268
Refs: https://github.com/nodejs/node/issues/29226
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2020-05-28 10:02:46 -04:00
Daniel Bevenius
4a20cc937f
src: remove unused using declarations
This commit removes the unused using declarations reported by lint-cpp.

PR-URL: https://github.com/nodejs/node/pull/33268
Refs: https://github.com/nodejs/node/issues/29226
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2020-05-28 10:02:14 -04:00
James M Snell
785842a053 events: initial implementation of experimental EventTarget
See documentation changes for details

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

PR-URL: https://github.com/nodejs/node/pull/33556
Refs: https://github.com/nodejs/node/pull/33527
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
2020-05-28 06:31:58 -07:00
Daniel Bevenius
47044a91c6 src: use MaybeLocal.ToLocal instead of IsEmpty
This commit suggest using MaybeLocal.ToLocal and passing in the
Local<Function> fn.

The motivation for doing this is that the following
MaybeLocal.ToLocalChecked call can then be avoided.

PR-URL: https://github.com/nodejs/node/pull/33554
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-05-28 06:14:48 +02:00
Daniel Bevenius
27d347b56b src: use NewFromUtf8Literal in GetLinkedBinding
This commit changes the usage of NewFromUtf8 to NewFromUtf8Literal.

The motivation for this change is that NewFromUtf8Literal is a templated
function that takes a char[N] argument so the length of the string can
be asserted at compile time, avoiding length checks that NewFromUtf8
performs.

My understanding is that since these checks can be performed at compile
time, checking that the string is not zero and checking that it is not
greater than kMaxLength, this function does not have to return a
MaybeLocal<String> and can return a Local<String> meaning that the
additional ToLocalChecked call is avoided.

PR-URL: https://github.com/nodejs/node/pull/33552
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-05-28 06:01:50 +02:00
Jan Krems
d12d5ef3ef module: remove dynamicInstantiate loader hook
The dynamicInstantiate loader hook requires that the hooks run in the
same global scope as the code being loaded. We don't want to commit to
this being true in the future. It stops us from sharing hooks between
multiple worker threads or isolating loader hook from the application
code.

Using `getSource` and `getGlobalPreloadCode` the same use cases should
be covered.

PR-URL: https://github.com/nodejs/node/pull/33501
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
2020-05-27 16:38:38 -07:00
Robert Nagy
54b36e401d fs: reimplement read and write streams using stream.construct
Refs: #23133

PR-URL: https://github.com/nodejs/node/pull/29656
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
2020-05-27 10:24:33 +02:00
Robert Nagy
fb8cc72e73 stream: construct
Provide a standardized way of asynchronously creating and
initializing resources before performing any work.

Refs: https://github.com/nodejs/node/issues/29314

PR-URL: https://github.com/nodejs/node/pull/29656
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
2020-05-27 10:24:05 +02:00
Robert Nagy
9949a2e1e3 test: make flaky test stricter
Make assertions in flaky test stricter to possibly
make it easier to determine the root cause.

Refs: https://github.com/nodejs/node/issues/4066

PR-URL: https://github.com/nodejs/node/pull/33539
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-05-26 16:08:58 +02:00
Michaël Zasso
dcc112b7f7
2020-05-26, Version 12.17.0 'Erbium' (LTS)
Notable changes:

* ECMAScript Modules - `--experimental-modules` flag removal
* AsyncLocalStorage API (experimental)
* REPL previews
* REPL reverse-i-search
* REPL substring-based search
* Error monitoring
  * Monitoring `error` events
  * Monitoring uncaught exceptions
* File system APIs
  * New function: `fs.readv`
  * Optional parameters in `fs.read`
* Console `groupIndentation` option
* `maxStringLength` option for `util.inspect()`
* Stable N-API release 6
* Stable diagnostic reports
* Increase of the default server headers timeout
* New `--trace-sigint` CLI flag
* Various crypto APIs now support Diffie-Hellman secrets
* Added support for the `dns.ALL` flag in `dns.lookup()`
* Added a new experimental API to interact with Source Map V3 data
* Added support for passing a `transferList` along with `workerData` to
  the `Worker` constructor

PR-URL: https://github.com/nodejs/node/pull/33197
2020-05-26 15:55:39 +02:00
himself65
5007611294 src: use const in constant args.Length()
PR-URL: https://github.com/nodejs/node/pull/33555
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2020-05-25 19:30:26 +02:00
Eli Schwartz
b21556d28b build: fix inability to detect correct python command in configure
The "which" utility is not guaranteed to be installed, and if it is, its
behavior is not portable.

Conversely, the "command -v" shell builtin is required to exist in all
POSIX 2008 compliant shells, and is thus guaranteed to work everywhere.

Examples of open-source shells likely to be installed as /bin/sh on
Linux, which implement the 12-year-old standard: ash, bash, busybox,
dash, ksh, mksh and zsh.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>

PR-URL: https://github.com/nodejs/node/pull/32925
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-05-25 19:24:28 +02:00
Thomas
5e4c025567 build: fix makefile script on windows
On Windows there is a program "find.exe" located in
C:\Windows\System32, which is usually in the PATH before
MSYS version of that program (required for running makefile).
The Windows version of the program uses different CLI syntax,
which results in errors like

  "File not found - *node_modules*"

This commit specifies the full path to the program, which is also
properly handled by MSYS on Windows.

PR-URL: https://github.com/nodejs/node/pull/33136
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2020-05-25 19:23:09 +02:00
Osher
e30a651937 http: tidy up exposure of header validation
PR-URL: https://github.com/nodejs/node/pull/33371
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-05-25 19:21:57 +02:00
Ruben Bridgewater
e24731cb70 util: fix inspection of class instance prototypes
To achieve this, some internal custom inspect functions had to be
changed. They relied upon the former behavior.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/33449
Fixes: https://github.com/nodejs/node/issues/33419
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2020-05-25 19:20:48 +02:00
Ben Bucksch
2f00ca42bf crypto: fix wrong error message
When calling `crypto.sign()`, if the `key` parameter object is
missing the `key` property, the error message is wrong.

Before the fix:
TypeError [ERR_INVALID_ARG_TYPE]: The "key" argument must be of
type string or an instance of Buffer, TypedArray, DataView, or
KeyObject. Received an instance of Object

Expected:
TypeError [ERR_INVALID_ARG_TYPE]: The "key.key property" argument
must be of type string or an instance of Buffer, TypedArray,
DataView, or KeyObject. Received undefined

This seems like a copy&paste bug. Somebody copied from the end of
the function, where this is correct, to here, where it's wrong.

PR-URL: https://github.com/nodejs/node/pull/33482
Fixes: https://github.com/nodejs/node/issues/33480
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
2020-05-25 19:15:05 +02:00
Derek Lewis
5632ff66cd doc: normalize shell code block info strings
Prior to this commit, shell fenced code blocks in Markdown files had
inconsistent info strings. This has been corrected to standarize on
the one with the highest frequency in the doc/api/ dir.

Stats:
> 'console' => 54,
> 'shell' => 2,

PR-URL: https://github.com/nodejs/node/pull/33486
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-05-25 19:12:38 +02:00