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

22996 Commits

Author SHA1 Message Date
Sam Ruby
40c85ff063 doc: declare all parameter types
PR-URL: https://github.com/nodejs/node/pull/21782
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-07-15 23:57:35 +03:00
Anna Henningsen
1009118d27
test: add heap snapshot tests
Add a number of tests that validate that heap snapshots
contain what we expect them to contain, and cross-check
against a JS version of our own embedder graphs.

PR-URL: https://github.com/nodejs/node/pull/21741
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-07-15 20:35:44 +02:00
Anna Henningsen
45ad8df318
src: make heap snapshot & embedder graph accessible for tests
Add methods that allow inspection of heap snapshots and a JS
version of our own embedder graph.

These can be used in tests and might also prove useful for
ad-hoc debugging. Usage requires `--expose-internals` and
prints a warning similar to our other modules whose primary
purpose is test support.

PR-URL: https://github.com/nodejs/node/pull/21741
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-07-15 20:35:41 +02:00
Anna Henningsen
266a7e6258
src: use V8 graph heap snapshot API
Transition to a newer, more flexible API for
heap snapshot creation.

This addresses a currently pending deprecation in the V8 API.

PR-URL: https://github.com/nodejs/node/pull/21741
Fixes: https://github.com/nodejs/node/issues/21633
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-07-15 20:35:35 +02:00
Anna Henningsen
d2a1408f11
deps: cherry-pick 555c811 from upstream V8
Original commit message:

    [api] Switch from `SetBuildEmbedderGraphCallback` to `AddBuildEmbedderGraphCallback`

    `SetBuildEmbedderGraphCallback`, unlike `SetWrapperClassInfoProvider`,
    assumes a monolithic embedder that can provide all necessary information.
    That is not the case for e.g. Node.js, which can e.g. provide multiple Node.js
    instances per V8 Isolate, as well as native addons that may allocate resources
    on their own.

    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: Ib53dfde82416dd69934b08623e27d674a483ac2d
    Reviewed-on: https://chromium-review.googlesource.com/1082441
    Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
    Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53545}

Refs: 555c811c0d

PR-URL: https://github.com/nodejs/node/pull/21741
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-07-15 20:35:32 +02:00
Anna Henningsen
4a58725c15
src: add iteration over all base objects to Environment
PR-URL: https://github.com/nodejs/node/pull/21741
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-07-15 20:35:29 +02:00
Ruben Bridgewater
e75163f73e doc: add my pronoun
PR-URL: https://github.com/nodejs/node/pull/21813
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-07-15 19:35:17 +02:00
Masashi Hirano
71ca076ca7
test: add filehandle sync() and datasync() tests
To increase test coverage for fs.promises,
added tests for filehandle.sync and filehandle.datasync.

PR-URL: https://github.com/nodejs/node/pull/20530
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-07-15 16:35:13 +02:00
Jon Moss
2faab111ef src: remove defunct timer_wrap file
Unused since the excellent refactoring in 2930bd,
which also removed `src/timer_wrap.cc` from `node.gyp`. If you try and
get at the binding on a v11.0-pre build, you'll get an error, since the
file is no longer in the GYP build.

```
Jonathans-MBP:node jon$ ./node -v
v11.0.0-pre
Jonathans-MBP:node jon$ ./node -e "process.binding('timer_wrap')"
internal/bootstrap/loaders.js:81
        mod = bindingObj[module] = getBinding(module);
                                   ^

Error: No such module: timer_wrap
    at process.binding (internal/bootstrap/loaders.js:81:36)
    at [eval]:1:9
    at Script.runInThisContext (vm.js:89:20)
    at Object.runInThisContext (vm.js:286:38)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at evalScript (internal/bootstrap/node.js:562:27)
    at startup (internal/bootstrap/node.js:248:9)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:595:3)
```

PR-URL: https://github.com/nodejs/node/pull/21777
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Refs: https://github.com/nodejs/node/pull/20894
2018-07-15 09:29:45 -04:00
AdityaSrivast
42bded83e8
fs: throw ERR_INVALID_ARG_VALUE when buffer being written is empty
Fixes: https://github.com/nodejs/node/issues/21193
PR-URL: https://github.com/nodejs/node/pull/21262
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-15 19:09:19 +08:00
Lance Ball
c7707a1cca
doc: update readme with my pronouns
PR-URL: https://github.com/nodejs/node/pull/21818
Refs: https://github.com/nodejs/node/issues/21803
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-07-15 11:06:33 +01:00
Vse Mozhet Byt
3ffbbd3eef doc: prevent some redirections
Replace some redirected URLs with the final ones.

PR-URL: https://github.com/nodejs/node/pull/21811
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-07-14 22:57:03 +03:00
Ruben Bridgewater
cee8677ac4
test: improve console table error output
The former error output was not readable in case of an error. This
improves it by splitting the lines and therefore creating a nice and
readable diff.

PR-URL: https://github.com/nodejs/node/pull/20960
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-07-14 14:04:47 +02:00
Ruben Bridgewater
8b0c6d8322
lib: refactor cli table
The cli table used multi line template strings which are normally
not used in our code base and it also upper cased a regular function
name. This is changed by this patch.

PR-URL: https://github.com/nodejs/node/pull/20960
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-07-14 14:04:38 +02:00
Denys Otrishko
7c2925e609
worker: exit after uncaught exception
Previously even after uncaught exception the worker would continue to
execute until there is no more work to do.

PR-URL: https://github.com/nodejs/node/pull/21739
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-07-14 12:04:54 +02:00
Denys Otrishko
19e10ec2e2
test: refactor process/worker exitCode tests
PR-URL: https://github.com/nodejs/node/pull/21739
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-07-14 12:04:53 +02:00
Denys Otrishko
35326f27fd
process: fix process.exitCode handling for fatalException
* set process.exitCode before calling 'exit' handlers so that there will
  not be a situation where process.exitCode !== code in 'exit' callback
  during uncaughtException handling
* don't ignore process.exitCode set in 'exit' callback when failed with
  uncaughtException and there is no uncaughtException listener

PR-URL: https://github.com/nodejs/node/pull/21739
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-07-14 12:04:53 +02:00
XhmikosR
998f9ffd42
src,tools: use https://nodejs.org URL when possible.
PR-URL: https://github.com/nodejs/node/pull/21719
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-07-14 11:57:59 +02:00
Anna Henningsen
1062ea4555
src: add comment on CallbackScope exception behaviour
PR-URL: https://github.com/nodejs/node/pull/21743
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-07-14 11:51:54 +02:00
Rich Trott
61cd101e12 doc: add "Edit on GitHub" link
Proof of concept for an "Edit on GitHub" link, inspired by the
Serverless docs.

One issue is that the link is to the version of the docs on the master
branch even if the person was reading a different version of the doc. I
don't consider that a big problem, although we can always remove the
link if it turns out to be a big problem. I don't think there is a good
solution. PRs need to be opened against the master branch generally.
Having a bunch of PRs against staging branches is probably not what we
want. If there's an update to one version of the doc, there will usually
be an update to other versions.

PR-URL: https://github.com/nodejs/node/pull/21703
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2018-07-13 20:37:05 -07:00
Rich Trott
6d60c93056 test: remove timer in fs.watchFile() test
The timer was there to address a race condition that has been removed
from the test. Remove it.

PR-URL: https://github.com/nodejs/node/pull/21694
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-07-13 18:39:03 -07:00
Rich Trott
8c305e1c2f test: fix flaky watchFile()
The regression that test-fs-watch-file-enoent-after-deletion was written
to test for involves whether or not the callback runs or not. Checking
what the file watcher reports unfortunately is subject to race
conditions on Windows (and possibly elsewhere) because the file watcher
returns control to the event loop before it may be receiving data from
the OS. So remove those assertions. The test still checks what it is
supposed to check, but is no longer subject to race conditions.

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

PR-URL: https://github.com/nodejs/node/pull/21694
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-07-13 18:38:52 -07:00
Eugene Ostroukhov
39977db7c0
inspector: split main thread interface from transport
Workers debugging will require interfacing between the "main" inspector
and per-worker isolate inspectors. This is consistent with what WS
interface does. This change is a refactoring change and does not change
the functionality.

PR-URL: https://github.com/nodejs/node/pull/21182
Fixes: https://github.com/nodejs/node/issues/21725
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-13 23:42:50 +02:00
Myles Borins
9374a83d69
deps: patch V8 to 6.7.288.49
PR-URL: https://github.com/nodejs/node/pull/21727
Refs: https://github.com/v8/v8/compare/6.7.288.46...6.7.288.49
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-07-13 16:10:13 -04:00
Myles Borins
7570ad58e9
doc: add policy for landing new npm releases
This change in policy sets clear terms for when / how npm releases
can be landed into master and how long they are expected to bake in the
ecosystem. This is to cover all release types of npm including semver-major
releases.

What Node.js releases the updates land into are at the discretion of the
release team.

PR-URL: https://github.com/nodejs/node/pull/21594
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-07-13 16:06:30 -04:00
Jon Moss
2d950701a1
test: fix weird string error
Previously getting this error when running `tap2junit` (what parses our
`.tap` files in CI):

```
Traceback (most recent call last):
  File "/usr/local/bin/tap2junit", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/tap2junit/__main__.py", line 46, in main
    result.to_file(args.output, [result], prettyprint=False)
  File "/usr/local/lib/python2.7/site-packages/junit_xml/__init__.py", line 289, in to_file
    test_suites, prettyprint=prettyprint, encoding=encoding)
  File "/usr/local/lib/python2.7/site-packages/junit_xml/__init__.py", line 257, in to_xml_string
    ts_xml = ts.build_xml_doc(encoding=encoding)
  File "/usr/local/lib/python2.7/site-packages/junit_xml/__init__.py", line 221, in build_xml_doc
    attrs['message'] = decode(case.skipped_message, encoding)
  File "/usr/local/lib/python2.7/site-packages/junit_xml/__init__.py", line 68, in decode
    ret = unicode(var)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 11: ordinal not in range(128)
```

PR-URL: https://github.com/nodejs/node/pull/21793
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-07-13 21:46:09 +02:00
Anna Henningsen
57e301539b
src: enable more detailed memory tracking
This will enable more detailed heap snapshots based on
a newer V8 API.

This commit itself is not tied to that API and could
be backported.

PR-URL: https://github.com/nodejs/node/pull/21742
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-13 19:53:15 +02:00
Anna Henningsen
36cc5f5caf
test: fix timeouts when running worker tests with --worker
These tests have been added after the original workers PR and
time out when run inside a worker by themselves.
This is needed for enabling `--worker` tests in our regular CI.

Refs: https://github.com/nodejs/build/issues/1318

PR-URL: https://github.com/nodejs/node/pull/21791
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-07-13 19:22:13 +02:00
Octavian Soldea
32cad739b1
build: enabling lto at configure
This modification allows for compiling with link time optimization (lto)
using the flag --enable-lto.

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

PR-URL: https://github.com/nodejs/node/pull/21677
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-07-13 19:03:00 +02:00
Sam Ruby
4d42083d1a
repl: make own properties shadow prototype properties
Previously, the code displayed properties backwards (e.g., showing
prototype properties before own properties).  It also did uniqueness
checks during this processing, so these checks were done backwards.

After this change, the properties continue to be displayed backwards,
but the uniqueness checks are done in the proper order.

See also: https://github.com/nodejs/node/issues/21586 which was
discovered during the testing of this fix.

Fixes: https://github.com/nodejs/node/issues/15199
PR-URL: https://github.com/nodejs/node/pull/21588
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-07-13 18:57:16 +02:00
killagu
949e885148
http: fix request with option timeout and agent
When request with both timeout and agent, timeout not
work. This patch will fix it, socket timeout will set
to request timeout before socket is connected, and
socket timeout will reset to agent timeout after
response end.

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

PR-URL: https://github.com/nodejs/node/pull/21204
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2018-07-13 18:44:03 +02:00
XadillaX
d462f8cfe3
doc: add OS X to instead of only macOS
The last OS X version is 10.11 El Captian, and the first macOS version
is 10.12 Sierra. So >= 10.8 < 10.10 is called OS X and >= 10.10 is
called OS X or macOS.

Refs: https://en.wikipedia.org/wiki/MacOS#Release_history

PR-URL: https://github.com/nodejs/node/pull/21033
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-13 18:42:06 +02:00
Jon Moss
45732c7c19 src: add HandleWrap::AddWrapMethods
Extracts common setters to a single location

PR-URL: https://github.com/nodejs/node/pull/21769
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-07-13 12:08:20 -04:00
Antoine du HAMEL
d2ee7d64aa crypto: remove deprecated legacy API
The `crypto.Credentials` legacy API has been Runtime deprecated since
v0.11.13 and users had been adviced to use `tls.SecureContext` instead.

PR-URL: https://github.com/nodejs/node/pull/21153
Fixes: https://github.com/nodejs/node/issues/20793
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-13 17:47:13 +03:00
Shailesh Shekhawat
3950a3e0b1 errors: fix undefined HTTP2 and tls errors
Includes implementation of tls, HTTP2 error with documentation.

PR-URL: https://github.com/nodejs/node/pull/21564
Refs: https://github.com/nodejs/node/issues/21440
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-07-13 17:41:42 +03:00
Sam Ruby
f9b739ebbc http: allow url and options to be passed to http*.request and http*.get
Fixes: https://github.com/nodejs/node/issues/20795
PR-URL: https://github.com/nodejs/node/pull/21616
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Ron Korving <ron@ronkorving.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-07-13 14:09:39 +01:00
Rich Trott
19bc893c75 tools: avoid global install of dmn for lint update
When updating ESLint, use npx to run dmn rather than installing dmn
globally.

PR-URL: https://github.com/nodejs/node/pull/21744
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-07-12 23:04:05 -07:00
Gus Caplan
8cae9b2ff8
tools: add no-duplicate-requires rule
PR-URL: https://github.com/nodejs/node/pull/21712
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
2018-07-12 16:11:11 -05:00
Gus Caplan
1849a2b2e9
napi: add bigint support
PR-URL: https://github.com/nodejs/node/pull/21226
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Kyle Farnung <kfarnung@microsoft.com>
2018-07-12 13:02:04 -05:00
James M Snell
d85449dcdf trace_events: add traced_value.cc/traced_value.h
Port of the V8 internal v8::tracing::TracedValue that allows
structured data to be included in the trace event. The v8 class
is not exported in the public API so we cannot use it directly.

This is a simplified and slightly modified port. This commit only
adds the class, it does not add uses of it. Those will come in
separate PRs/commits.

PR-URL: https://github.com/nodejs/node/pull/21475
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-07-12 10:32:26 -07:00
Dominic Farolino
d4164ca559 console: console.countReset() should emit warning
The Console Standard specifies that console.countReset()
should emit some type of a warning when given a label that
has no previous account associated with it. This PR brings
node's implementation of console.countReset() up-to-spec and
adds a test asserting that a warning is emitted.

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

PR-URL: https://github.com/nodejs/node/pull/21649
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-12 07:42:29 -07:00
Tobias Nießen
85b0f1649d
crypto: handle OpenSSL error queue in CipherBase
This handles all errors produced by OpenSSL within the CipherBase
class. API functions ensure that they do not add any new errors to the
error queue. Also adds a couple of CHECKs and throws under certain
conditions.

PR-URL: https://github.com/nodejs/node/pull/21288
Fixes: https://github.com/nodejs/node/issues/21281
Refs: https://github.com/nodejs/node/pull/21287
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2018-07-12 16:02:01 +02:00
Jon Moss
144c1b7e98 zlib: instance-ify two methods
Both `Params` and `SetDictionary` take `ZCtx` as an arg, so just make
them both instance methods on `ZCtx`.

PR-URL: https://github.com/nodejs/node/pull/21702
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-12 08:08:18 -04:00
Gabriel Schulhof
acf0606f72 n-api: test uint32 truncation
Re: https://github.com/nodejs/abi-stable-node/issues/55#issuecomment-403382424
PR-URL: https://github.com/nodejs/node/pull/21722
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-07-12 01:42:56 -04:00
Jon Moss
fcfd3e1bac src: make Environment::is_stopping_worker inline
Fixes a TODO comment.

PR-URL: https://github.com/nodejs/node/pull/21720
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-11 09:17:44 -04:00
cjihrig
8174d0c8ca
deps: upgrade to libuv 1.22.0
PR-URL: https://github.com/nodejs/node/pull/21731
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-10 21:47:58 -04:00
James M Snell
9d71619bbe src: add --title command line argument
Simple utility command line argument for setting the process
title on process startup.

PR-URL: https://github.com/nodejs/node/pull/21477
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-07-10 16:16:37 -07:00
James M Snell
67053568ee trace_events: add process_name metadata
PR-URL: https://github.com/nodejs/node/pull/21477
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-07-10 16:16:30 -07:00
Masashi Hirano
1f1675817c
test: check option start or end is not safe integer
To increase fs readstream coverage, added test to check error when
option.start or end is not safe integer.

PR-URL: https://github.com/nodejs/node/pull/21704
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-11 00:43:12 +02:00
Keita Akutsu
3898abc55c
test: add test for dns.promises.resolve .
PR-URL: https://github.com/nodejs/node/pull/21691
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-11 00:40:46 +02:00