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

27557 Commits

Author SHA1 Message Date
Juan Roa
41fad84035
doc: add example for chmod in fs.md
PR-URL: https://github.com/nodejs/node/pull/28365
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-07-03 22:24:49 +02:00
Felipe
c03df4c75d
doc: provide an example to fs.stat()
Provided a small example along its output using fs.stat() to check the
stats on two different paths, one a directory and the other a txt file.

PR-URL: https://github.com/nodejs/node/pull/28381
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-03 22:21:10 +02:00
Julian Correa
8df76e6d47
test: fix assertion argument order in test-https-agent.js
PR-URL: https://github.com/nodejs/node/pull/28383
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-07-03 22:17:41 +02:00
James M Snell
f5f8a18831
worker: assign missing deprecation code
PR-URL: https://github.com/nodejs/node/pull/28395
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2019-07-03 22:13:54 +02:00
Benoît Zugmeyer
46a73b9409
readline: fix position computation
The implementation of _getDisplayPos, used to compute the cursor
position and to find out how many lines to clear up when re-rendering
the readline output, was counting each line (except the last one) from
the input as one row, even if they were wraping.  This caused some
rendering issues when the 'prompt' have at least one wide line ending
with a newline char, duplicating the lines at the top of the prompt when
calling _refreshLine (ex: when the user hits backspace).

This patch fixes the issue by computing the real rows count for each new
line in the input string.

PR-URL: https://github.com/nodejs/node/pull/28272
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-07-03 22:04:05 +02:00
Kelvin Jin
285e036ab6 src: configure v8 isolate with uv_get_constrained_memory
This change adds the ability to set the memory ceiling for a Node.js
process according to a memory limit set by cgroups (via
uv_get_constrained_memory), which is used by docker containers to set
resource constraints. Previously we would use the physical memory size
to estimate the necessary V8 heap sizes, but the physical memory size is
not necessarily the correct limit, e.g. if the process is running inside
a docker container or is otherwise constrained.

Non-Linux systems shouldn't be affected.

PR-URL: https://github.com/nodejs/node/pull/27508
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-07-03 09:38:45 -07:00
cjihrig
492037ab80
test: increase test-resource-usage.js validation
This commit adds an assertion checking the exact field names
returned by process.resourceUsage(). This ensures that no new
fields accidentally slip into the returned object in the future.

PR-URL: https://github.com/nodejs/node/pull/28498
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-03 10:54:07 -04:00
Michaël Zasso
fcf8fe9f1a
2019-07-03, Version 12.6.0 (Current)
Notable changes:

* build:
  * Experimental support for building Node.js on MIPS architecture
    is back. https://github.com/nodejs/node/pull/27992
* child_process:
  * The promisified versions of `child_process.exec` and
    `child_process.execFile` now both return a `Promise` which has the
	child instance attached to their `child` property.
	https://github.com/nodejs/node/pull/28325
* deps:
  * Updated libuv to 1.30.1. https://github.com/nodejs/node/pull/28449,
    https://github.com/nodejs/node/pull/28511
    * Support for the Haiku platform has been added.
    * The maximum `UV_THREADPOOL_SIZE` has been increased from 128 to
	  1024.
    * `uv_fs_copyfile()` now works properly when the source and
	  destination files are the same.
* process:
  * A new method, `process.resourceUsage()` was added. It returns
    resource usage for the current process, such as CPU time.
	https://github.com/nodejs/node/pull/28018
* src:
  * Fixed an issue related to stdio that could lead to a crash of the
    process in some circumstances.
	https://github.com/nodejs/node/pull/28490
* stream:
  * Added a `writableFinished` property to writable streams. It
    indicates that all the data has been flushed to the underlying
	system. https://github.com/nodejs/node/pull/28007
* worker:
  * Fixed an issue that prevented worker threads to listen for data on
    stdin. https://github.com/nodejs/node/pull/28153
* meta:
  * Added Jiawen Geng (https://github.com/gengjiawen) to collaborators.
    https://github.com/nodejs/node/pull/28322

PR-URL: https://github.com/nodejs/node/pull/28508
2019-07-03 15:53:31 +02:00
Gabriel Schulhof
d3b10f66bd src: use thread_local to declare modpending
The pointer used to hold an incoming dynamically loaded module's
`node::node_module` structure needs to be thread-local. So far this was
done with `uv_key_set()` and `uv_key_get()`. The language now supports
the `thread_local` keyword which makes implementing this a lot cleaner.

PR-URL: https://github.com/nodejs/node/pull/28456
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-07-02 16:14:59 -07:00
Rod Vagg
3ab457ec15 doc: fix link from bootstrap README to BUILDING
PR-URL: https://github.com/nodejs/node/pull/28504
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-07-02 16:02:27 -07:00
cjihrig
cce78bbdf5
doc: format try...catch consistently
PR-URL: https://github.com/nodejs/node/pull/28481
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-07-02 14:06:01 -04:00
cjihrig
ea73666850
deps: upgrade to libuv 1.30.1
This upgrade is a small patch release, fixing compilation
errors on Android, Cygwin, and uClibc - none of which are
tested in the CI.

PR-URL: https://github.com/nodejs/node/pull/28511
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-07-02 13:25:23 -04:00
cjihrig
5ab24edb02
doc: remove unnecessary stability specifiers
If a top level module is listed as Stable, there is no need to
call out individual components of that module as Stable. The
extra text is just distracting.

PR-URL: https://github.com/nodejs/node/pull/28485
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-07-02 13:13:03 -04:00
cjihrig
e1f27efebf
doc: address missing paren
The closing paren was missing. Move to using commas instead.

PR-URL: https://github.com/nodejs/node/pull/28483
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2019-07-02 12:17:02 -04:00
gengjiawen
83c1e173ea src: remove redundant return
PR-URL: https://github.com/nodejs/node/pull/28189
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-07-02 16:08:33 +08:00
gengjiawen
4e09fd7276 build: change ASM compiler url to https
PR-URL: https://github.com/nodejs/node/pull/28189
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-07-02 16:08:29 +08:00
NickNaso
9868126546 build: expose napi_build_version variable
Expose `napi_build_version` to allow `node-gyp` to make it
available for building native addons.

Fixes: https://github.com/nodejs/node-gyp/issues/1745
Refs: https://github.com/nodejs/abi-stable-node/issues/371
PR-URL: https://github.com/nodejs/node/pull/27835
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-07-01 22:07:42 -07:00
Rich Trott
e008ca8b93 test: fix flaky test-vm-timeout-escape-nexttick
PR-URL: https://github.com/nodejs/node/pull/28461
Fixes: https://github.com/nodejs/node/issues/24120
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-07-02 06:49:40 +02:00
Sam Roberts
3c9c89df12 test: skip tests related to CI failures on AIX
These tests seem to trigger failures in the entire CI job (not just the
test) on AIX. Skip them to see if that helps alleviate spurious failures
in node-test-commit-aix (and the upstream PR and commit test jobs).

See:
- https://github.com/nodejs/build/issues/1820#issuecomment-505998851
- https://github.com/nodejs/build/issues/1847#issuecomment-504210708

PR-URL: https://github.com/nodejs/node/pull/28469
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-02 06:41:30 +02:00
Rich Trott
c9c8408f81 tools: update unified-args to 7.0.0 for md-lint CLI
Update unified-args from 6.0.0 to 7.0.0 for
tools/node-lint-md-cli-rollup. This removes a vulnerable package
(set-value@0.4.3) from the dependencies.

Refs: https://app.snyk.io/vuln/SNYK-JS-SETVALUE-450213

PR-URL: https://github.com/nodejs/node/pull/28434
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2019-07-01 21:34:11 -07:00
Sam Roberts
ed14aa6d51 tools: move python code out of jenkins shell
https://ci.nodejs.org/job/node-test-commit-v8-linux/configure echoes
python code into tools and runs it. Move these scripts into tools for
better maintainability.

Once this lands and is back-ported into LTS branches a bunch of shell
code can be deleted from the job.

PR-URL: https://github.com/nodejs/node/pull/28458
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-02 06:08:03 +02:00
Sam Roberts
e669b8154c tools: fix v8 testing with devtoolset on ppcle
The devtoolset doesn't use or set the CXX, etc, env vars, so ignore them
if not present.

PR-URL: https://github.com/nodejs/node/pull/28458
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-02 06:07:37 +02:00
Rod Vagg
b12528f349
doc: merge bootstrap/README.md into BUILDING.md
plus some minor tweaks

PR-URL: https://github.com/nodejs/node/pull/28465
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
2019-07-02 11:36:26 +10:00
Ben Noordhuis
1095635a8a
src: don't abort on EIO when restoring tty
EIO has been observed to be returned by the Linux kernel under some
circumstances. Reading through drivers/tty/tty_io*.c, it seems to
indicate the tty went away. Of course none of this is documented.

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

PR-URL: https://github.com/nodejs/node/pull/28490
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
2019-07-01 19:48:28 -05:00
kball
85496e94d3
lib: fix stack overflow check to not break on primitives
PR-URL: https://github.com/nodejs/node/pull/28338
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-07-02 01:55:58 +02:00
estrada9166
367ada49f1
test: add test to doesNotThrow; validate if actual with regex
Refs: https://coverage.nodejs.org/coverage-1a4f27ae21698d0c/lib/assert.js.html#L736

PR-URL: https://github.com/nodejs/node/pull/28355
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-07-02 00:40:07 +02:00
estrada9166
6e9d795642
test: add tests to assert.ok and improve coverage
Refs: https://coverage.nodejs.org/coverage-1a4f27ae21698d0c/lib/assert.js.html#L364

PR-URL: https://github.com/nodejs/node/pull/28355
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-07-02 00:40:01 +02:00
Luigi Pinca
26b048effb http2: remove square brackets from parsed hostname
Make `http2.connect()` work when using URLs with literal IPv6
addresses.

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

PR-URL: https://github.com/nodejs/node/pull/28406
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2019-07-01 18:26:10 +02:00
cjihrig
9b77be4814
doc: fix swapedOut typo
This corrects a typo in the process.resourceUsage() docs. The
field is named swappedOut, not swapedOut.

PR-URL: https://github.com/nodejs/node/pull/28497
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-07-01 11:21:44 -04:00
vmarchaud
6271ef005e
process: expose uv_rusage on process.resourcesUsage()
As discussed in https://github.com/nodejs/diagnostics/issues/161,
the core should expose important metrics about the runtime, this PR's
goal is to let user get the number of io request made, and lower level
mertrics like the page faults and context switches.

PR-URL: https://github.com/nodejs/node/pull/28018
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-07-01 16:02:17 +02:00
David Carlier
20d099af7a src: fix small memory leak
PR-URL: https://github.com/nodejs/node/pull/28452
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-30 14:31:10 -07:00
Guy Bedford
4565292a77 esm: ensure cwd-relative imports for module --eval
PR-URL: https://github.com/nodejs/node/pull/28389
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-06-30 13:21:09 -04:00
silverwind
a173173398
tools: change editorconfig's 'ignore' to 'unset'
According to https://editorconfig.org/#supported-properties the
canonical way to disable a property is to set it to 'unset'. We did use
'ignore' and this generally works because tools ignore unknown values
but some of them like `eclint` are picky on it.

PR-URL: https://github.com/nodejs/node/pull/28440
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-30 16:15:30 +02:00
cjihrig
8772da6ea8
deps: upgrade to libuv 1.30.0
Notable changes:

- Support for the Haiku platform has been added.
- The maximum UV_THREADPOOL_SIZE has been increased from
  128 to 1024.
- uv_fs_copyfile() now works properly when the source and
  destination files are the same.

PR-URL: https://github.com/nodejs/node/pull/28449
Fixes: https://github.com/nodejs/node/issues/27746
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-06-29 11:00:36 -04:00
Sam Roberts
334bac79eb test: reset validity dates of expired certs
PR-URL: https://github.com/nodejs/node/pull/28473
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-06-28 16:14:36 -07:00
cjihrig
f9632041dc
http2: propagate session destroy code to streams
Currently, when an HTTP2 session is destroyed with a code, that
code is not propagated to the destroy() call of the session's
streams. This commit forwards any code used to destroy a session
to its corresponding streams.

PR-URL: https://github.com/nodejs/node/pull/28435
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-28 15:20:29 -04:00
Anna Henningsen
bf7edaa3c9 test: do not use fixed port in async-hooks/test-httparser-reuse
Otherwise this was failing on machines which already had a service
running on port 3000.

PR-URL: https://github.com/nodejs/node/pull/28312
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-27 23:40:30 -07:00
Daniel Bevenius
d9da0a9912 tools: remove unused using declarations
PR-URL: https://github.com/nodejs/node/pull/28422
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-06-28 05:13:12 +02:00
Daniel Bevenius
d8a536176d tools: remove out-of-date code-cache-path comment
This commit removes the comment in cache_builder.cc regarding the usage
of --code-cache-path with configure.

Commit 14df42fd00 ("build: run
`mkcodecache` as an action") deprecated this option and it is always
set to yes (unless cross compiling).

PR-URL: https://github.com/nodejs/node/pull/28419
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-06-28 05:10:46 +02:00
Daniel Bevenius
fcf2da098a tools: fix typo in js2c.py
PR-URL: https://github.com/nodejs/node/pull/28417
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-06-28 05:05:20 +02:00
Anna Henningsen
d11b5382d6 test: use assert() in N-API async test
The `Execute()` callback is not allowed to call into JS, so
we should use `assert()` instead of potentially throwing JS errors.

PR-URL: https://github.com/nodejs/node/pull/28423
Fixes: https://github.com/nodejs/help/issues/1998
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-06-28 04:56:34 +02:00
cjihrig
6045fbbb5e
doc: reformat for-await-of
Instead of `for`-`await`-`of`, prefer `for await...of`.

PR-URL: https://github.com/nodejs/node/pull/28425
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-06-27 13:52:17 -04:00
cjihrig
d22fbbe942
doc: update readline asyncIterator docs
This commit:
- Removes an unnecessary stability index entry. These generally
  are not included for Stable entries.
- Remove mention of experimental status that is not true anymore.
- Remove use of "we"
- Remove use of relative time phrasing.
- Misc cleanup.

PR-URL: https://github.com/nodejs/node/pull/28425
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-06-27 13:51:51 -04:00
Gus Caplan
fd3a0d3137
doc: add links to 12.5.0 changelog notable changes
PR-URL: https://github.com/nodejs/node/pull/28450
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-27 10:49:49 -05:00
Ruben Bridgewater
af3cc714f9
2019-06-27, Version 12.5.0 (Current)
Notable changes:

* build:
  * The startup time is reduced by enabling V8 snapshots by default
    https://github.com/nodejs/node/pull/28181
* deps:
  * Updated `V8` to 7.5.288.22 https://github.com/nodejs/node/pull/27375
    * The numeric separator (v8.dev/features/numeric-separators) feature is now
      enabled by default
  * Updated `OpenSSL` to 1.1.1c https://github.com/nodejs/node/pull/28211
* inspector:
  * The `--inspect-publish-uid` flag was added to specify ways of the inspector
    web socket url exposure https://github.com/nodejs/node/pull/27741
* n-api:
  * Accessors on napi_define_* are now ECMAScript-compliant
    https://github.com/nodejs/node/pull/27851
* report:
  * The cpu info got added to the report output
    https://github.com/nodejs/node/pull/28188
* src:
  * Restore the original state of the stdio file descriptors on exit to prevent
    leaving stdio in raw or non-blocking mode
    https://github.com/nodejs/node/pull/24260
* tools,gyp:
  * Introduce MSVS 2019 https://github.com/nodejs/node/pull/27375
* util:
  * inspect:
    * Array grouping became more compact and uses more columns than before
      https://github.com/nodejs/node/pull/28059
      https://github.com/nodejs/node/pull/28070
    * Long strings will not be split at 80 characters anymore. Instead they will
      be split on new lines https://github.com/nodejs/node/pull/28055
* worker:
  * `worker.terminate()` now returns a promise and using the callback is
    deprecated https://github.com/nodejs/node/pull/28021

PR-URL: https://github.com/nodejs/node/pull/28268
2019-06-27 15:55:50 +02:00
cjihrig
63a5cd87ea
doc: clean up isDead() example
This commit removes extra whitespace and some awkward text
containing typos from the cluster worker.isDead() code
sample.

PR-URL: https://github.com/nodejs/node/pull/28421
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-06-27 09:47:36 -04:00
Joyee Cheung
94454927f6
process: split routines used to enhance fatal exception stack traces
Previously the enhancement were done right after emitting
`'uncaughtException'`, which meant by the time we knew the
exception was fatal in C++, the error.stack had already been
patched.

This patch moves those routines to be called later during the
fatal exception handling, and split them into two stages:
before and after the inspector is notified by the invocation of
`V8Inspector::exceptionThrown`. We now expand the stack to include
additional informations about unhandled 'error' events before
the inspector is notified, but delay the highlighting of the
frames until after the inspector is notified, so that the
ANSI escape sequences won't show up in the inspector console.

PR-URL: https://github.com/nodejs/node/pull/28308
Fixes: https://github.com/nodejs/node/issues/28287
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2019-06-27 20:22:08 +08:00
Ruben Bridgewater
ed8fc7e11d
tools: update eslint
This updates eslint from v6.0.0-alpha.2 to v6.0.1

This also removes eslint-disable comments about `bigint` typeof
checks. Those would otherwise have caused linting errors now that
`bigint` is accepted as valid entry.

PR-URL: https://github.com/nodejs/node/pull/28173
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-06-27 11:57:19 +02:00
Robert Nagy
63a0f4cdd3 doc: clarify response.finished
PR-URL: https://github.com/nodejs/node/pull/28411
Refs: https://github.com/jshttp/on-finished/issues/30
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-26 21:47:25 -07:00
Rich Trott
cf9a7f2dce tools: update remark-preset-lint-node to 1.7.0
This update enables linting for "note that" in our docs. That phrase is
almost always superfluous. Sentences are almost always clearer and
stronger without it.

PR-URL: https://github.com/nodejs/node/pull/28393
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2019-06-26 21:19:48 -07:00