Shao,Ting
2d4dd10829
build: add '-z relro -z now' linker flags
...
These flags could make some sections and the GOT entries of node
process read only to avoid being modified after dynamic linking is
done, thus the security could be enhanced.
Fixes: https://github.com/nodejs/node/issues/20122
PR-URL: https://github.com/nodejs/node/pull/20513
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-14 19:10:50 +02:00
David Humphrey
fcc46ee5a9
test: increase test coverage for fs/promises.js
...
PR-URL: https://github.com/nodejs/node/pull/19811
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2018-05-14 19:09:02 +02:00
Ujjwal Sharma
19374fd25b
fs: improve argument handling for ReadStream
...
Improve handling of erratic arguments in fs.ReadStream
Refs: https://github.com/nodejs/node/pull/19732
PR-URL: https://github.com/nodejs/node/pull/19898
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ron Korving <ron@ronkorving.nl >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-05-14 19:03:27 +02:00
RakshithNM
745463a0b7
test: display values in AssertionErrors
...
In test-module-relative-lookup, change assert.strictEqual()
calls so that values are displayed when an AssertionError occurs.
PR-URL: https://github.com/nodejs/node/pull/20545
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-05-14 18:56:28 +02:00
Luigi Pinca
60ef7d1a8f
test: fix assertion in test-console
...
Move the assertion after the second call to `console.time()` to
actually make sure that the time is not reset.
Refs: https://github.com/nodejs/node/pull/20442
PR-URL: https://github.com/nodejs/node/pull/20557
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-05-14 18:53:08 +02:00
Jackson Tian
37461878d0
fs: use _final() for fs.WriteStream
...
use _final() method instead of once 'finish' event.
PR-URL: https://github.com/nodejs/node/pull/20562
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-14 18:45:49 +02:00
helloshuangzi
34ca9f3b91
inspector: fix inspector::Agent::HasConnectedSessions
...
PR-URL: https://github.com/nodejs/node/pull/20614
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-14 18:43:57 +02:00
helloshuangzi
963cb3a49c
src: add public API to create isolate and context
...
PR-URL: https://github.com/nodejs/node/pull/20639
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2018-05-14 18:40:17 +02:00
Rich Trott
617f0d2763
test: apply test-fs-access to promises API
...
Add tests for `fs.promises.access()` in all test cases in
`test-fs-access` that are relevant to the Promises-based API.
PR-URL: https://github.com/nodejs/node/pull/20667
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2018-05-14 18:38:31 +02:00
Michael Dawson
2e4ee3dfa0
doc: fixup NODE_EXTERN -> NAPI_EXTERN
...
Seems like we missed updating doc when we changed
from NODE_EXTERN to NAPI_EXTERN
PR-URL: https://github.com/nodejs/node/pull/20641
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-05-14 18:36:16 +02:00
Michael Dawson
7dcfe72a25
doc: fix signature for napi_create_range_error
...
Fixes: https://github.com/nodejs/node/issues/20623
PR-URL: https://github.com/nodejs/node/pull/20641
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-05-14 18:36:15 +02:00
Michael Dawson
1248ce1645
async_wrap: fix memory leak in AsyncResource
...
Reset the persistent that keeps the resource
Object alive when the AsyncResource is being
destroyed.
Fixes: https://github.com/nodejs/node-addon-api/issues/237
PR-URL: https://github.com/nodejs/node/pull/20668
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-14 18:32:11 +02:00
Vse Mozhet Byt
fb93984445
test: modernize and correct test-doctool-html.js
...
PR-URL: https://github.com/nodejs/node/pull/20676
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-05-14 19:21:04 +03:00
Anna Henningsen
00f395db45
src: make AsyncResource destructor virtual
...
`AsyncResource` is intended to be a base class, and since we don’t
know what API consumers will do with it in their own code,
it’s good practice to make its destructor virtual.
This should not be ABI-breaking since all class methods are inline.
PR-URL: https://github.com/nodejs/node/pull/20633
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-05-14 18:18:16 +02:00
Anna Henningsen
7b39503b4a
tools: hide symbols for builtin JS files in binary
...
Do not expose symbols like `node::internal_process_next_tick_value`,
`node::internal_process_next_tick_key` in the created `node` binary
by wrapping them in an anonymous namespace.
PR-URL: https://github.com/nodejs/node/pull/20634
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-05-14 18:15:26 +02:00
Anna Henningsen
f8fc2f8954
test: better error message in trace events test
...
PR-URL: https://github.com/nodejs/node/pull/20655
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-05-14 18:13:20 +02:00
Anna Henningsen
fdfbf63973
tools: make C++ linter reject template<
...
This one is more or less just for me. :)
PR-URL: https://github.com/nodejs/node/pull/20675
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-05-14 18:09:24 +02:00
Anna Henningsen
bd6dc9ebab
src: replace template< → template <
...
PR-URL: https://github.com/nodejs/node/pull/20675
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-05-14 18:09:23 +02:00
Vse Mozhet Byt
12b0159adf
tools: overhaul tools/doc/html.js
...
PR-URL: https://github.com/nodejs/node/pull/20613
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-05-14 19:07:47 +03:00
Anna Henningsen
64b50468bb
doc: fix typo in dns docs
...
PR-URL: https://github.com/nodejs/node/pull/20711
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2018-05-14 18:06:38 +02:00
Maya Lekova
e993e45dbf
test: add test for async hooks parity for async/await
...
Add a basic test ensuring parity between before-after and
init-promiseResolve hooks when using async/await.
Add ability to initHooks and to checkInvocations utilities to transmit
promiseResolve hook as well.
See: https://github.com/nodejs/node/issues/20516
PR-URL: https://github.com/nodejs/node/pull/20626
Refs: https://github.com/nodejs/node/issues/20516
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com >
2018-05-14 16:25:50 +02:00
Joyee Cheung
657723e5c0
build: always use BUILDTYPE binary to run JS tests
...
PR-URL: https://github.com/nodejs/node/pull/20362
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-05-14 21:53:50 +08:00
Robert Nagy
ffb503be5f
http: fix client response close & aborted
...
Fixes: https://github.com/nodejs/node/issues/20102
Fixes: https://github.com/nodejs/node/issues/20101
Fixes: https://github.com/nodejs/node/issues/1735
- Response should always emit close.
- Response should always emit aborted if aborted.
- Response should always emit close after request has emitted close.
PR-URL: https://github.com/nodejs/node/pull/20075
Fixes: https://github.com/nodejs/node/issues/17352
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-05-13 22:54:34 -07:00
Daniel Bevenius
fcf2e4207e
src: make env_ and context_ private
...
This commit makes the currently protected members env_ and context_
private in node_contextify.h.
PR-URL: https://github.com/nodejs/node/pull/20671
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-14 05:51:16 +02:00
Robert Nagy
f22c7c10ca
http: always emit close on req and res
...
PR-URL: https://github.com/nodejs/node/pull/20611
Fixes: https://github.com/nodejs/node/issues/20600
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-05-13 16:23:50 -07:00
Francesco Falanga
eafb30ccbf
test: remove deepStrictEqual() third argument
...
The call to assert.deepStrictEqual() has a string literal for its third
argument. Unfortunately, a side effect of that is that the values of the
first two arguments are not displayed if there is an AssertionError.
That information is useful for debugging.
PR-URL: https://github.com/nodejs/node/pull/20702
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-05-13 14:06:26 -07:00
Jackson Tian
0e9ea35e39
stream: no need to initial er with false
...
initial `er` with false is unnecessarily.
PR-URL: https://github.com/nodejs/node/pull/20607
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-05-13 13:26:25 -07:00
Mathias Buus and Matteo Collina
b60b18379d
http2: destroy the socket properly and add tests
...
Fix a bug where the socket wasn't being correctly destroyed and
adjust existing tests, as well as add additional tests.
PR-URL: https://github.com/nodejs/node/pull/19852
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Co-authored-by: Matteo Collina <matteo.collina@gmail.com >
2018-05-13 19:47:40 +02:00
Daniel Bevenius
a9b399f581
src: remove unused includes from node_contextify.h
...
PR-URL: https://github.com/nodejs/node/pull/20670
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-13 17:04:54 +02:00
Daniel Bevenius
f9c6fd0a02
src: use unqualified names in node_contextify.cc
...
This commit removes the usage of qualified names for consistency.
PR-URL: https://github.com/nodejs/node/pull/20669
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-13 16:57:02 +02:00
Michaël Zasso
6de0f55c8f
doc: update AUTHORS list
...
PR-URL: https://github.com/nodejs/node/pull/20658
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-13 09:22:31 +02:00
James M Snell
c0359f0988
meta: add initial CODEOWNERS file
...
PR-URL: https://github.com/nodejs/node/pull/20554
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
2018-05-12 16:46:42 -07:00
Anna Henningsen
19c9ff5a92
test: plug AliasedBuffer cctest memory leak
...
No need to heap-allocate values here.
PR-URL: https://github.com/nodejs/node/pull/20665
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2018-05-12 16:26:40 -07:00
Yihong Wang
e3ceae724c
crypto: add test case for AES key wrapping
...
Add test cases for AES key wrapping and only detect output length in
cipher case. The reason being is the returned output length is
insufficient in AES key unwrapping case.
PR-URL: https://github.com/nodejs/node/pull/20587
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-05-12 23:51:22 +02:00
David Goldstein
236596590c
module: add --preserve-symlinks-main
...
Add `--preserve-symlinks-main` option which behaves like
`--preserve-symlinks` but for `require.main`.
PR-URL: https://github.com/nodejs/node/pull/19911
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-13 00:28:16 +03:00
cjihrig
20509ebee6
fs: make fs.promises non-enumerable
...
This prevents the experimental feature warning from being emitted
in cases where fs.promises is not actually used.
PR-URL: https://github.com/nodejs/node/pull/20632
Fixes: https://github.com/nodejs/node/issues/20504
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2018-05-11 22:18:01 -04:00
musgravejw
6fd8022641
doc: add global node_modules to require.resolve()
...
PR-URL: https://github.com/nodejs/node/pull/20534
Fixes: https://github.com/nodejs/node/issues/18926
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-05-12 01:18:10 +03:00
Michael Dawson
3706c65500
doc: fix stability text for n-api
...
While some places list n-api as stable, the reference
in doc/api/addons.md was missed. This fixes that
instance.
Fixes: https://github.com/nodejs/node/issues/20645
PR-URL: https://github.com/nodejs/node/pull/20659
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-05-11 14:58:54 -07:00
Gus Caplan
f074612b74
esm: provide named exports for builtin libs
...
Provide named exports for all builtin libraries so that the libraries
may be imported in a nicer way for esm users. The default export is left
as the entire namespace (module.exports) and wrapped in a proxy such
that APMs and other behavior are still left intact.
PR-URL: https://github.com/nodejs/node/pull/20403
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
2018-05-11 12:06:18 -05:00
Anna Henningsen
5096e249e7
test: make sure linked lists are inspectable with defaults
...
Make sure that a long singly-linked list can be passed
to `util.inspect()` without causing a stack overflow.
PR-URL: https://github.com/nodejs/node/pull/20017
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-05-11 17:46:56 +02:00
Anna Henningsen
849aaaeeb0
Revert "util: change util.inspect depth default"
...
This reverts commit b994b8eff6 .
This caused regressions in ecosystem code. While the change originally
was semver-major and could be postponed until after Node.js 10,
I think reverting it is a good choice at this point.
Also, I personally do not think defaulting to a shallow inspect
is a bad thing at all – quite the opposite: It makes `util.inspect()`
give an overview of an object, rather than providing a full
display of its contents. Changing the `depth` default to infinity
fundamentally changed the role that `util.inspect()` plays,
and makes output much more verbose and thus at times unusable
for `console.log()`-style debugging.
PR-URL: https://github.com/nodejs/node/pull/20017
Fixes: https://github.com/nodejs/node/issues/19405
Refs: https://github.com/nodejs/node/pull/17907
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-05-11 17:46:56 +02:00
Anna Henningsen
85373aeb4c
Revert "util: change %o depth default"
...
This reverts commit 8f153092d8 .
PR-URL: https://github.com/nodejs/node/pull/20017
Refs: https://github.com/nodejs/node/pull/17907
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-05-11 17:46:56 +02:00
Rich Trott
f145a53a78
tools: use macOS as operating system name
...
As of 2016, the operating system is macOS. Remove use of "macosx".
PR-URL: https://github.com/nodejs/node/pull/20579
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-10 14:46:51 -07:00
Daniel Bevenius
778f248914
src: add missing override to ThreadPoolWork funcs
...
Currently the following warnings are displayed when compiling:
../src/node_api.cc:3380:8:
warning: 'AfterThreadPoolWork' overrides a member function but is not
marked 'override' [-Winconsistent-missing-override]
void AfterThreadPoolWork(int status) {
^
../src/node_internals.h:513:16: note: overridden virtual function is
here
virtual void AfterThreadPoolWork(int status) = 0;
^
1 warning generated.
../src/node_zlib.cc:220:8:
warning: 'DoThreadPoolWork' overrides a member function but is not
marked 'override' [-Winconsistent-missing-override]
void DoThreadPoolWork() {
^
../src/node_internals.h:512:16: note: overridden virtual function is
here
virtual void DoThreadPoolWork() = 0;
^
../src/node_zlib.cc:224:8:
warning: 'AfterThreadPoolWork' overrides a member function but is
not marked 'override' [-Winconsistent-missing-override]
void AfterThreadPoolWork(int status) {
^
../src/node_internals.h:513:16: note: overridden virtual function is
here
virtual void AfterThreadPoolWork(int status) = 0;
^
2 warnings generated.
This commit adds override to the functions.
PR-URL: https://github.com/nodejs/node/pull/20663
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2018-05-10 23:37:44 +02:00
Gus Caplan
f1cdd7749f
doc: add util.types.isModuleNamespaceObject()
...
PR-URL: https://github.com/nodejs/node/pull/20616
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-05-10 15:25:57 -05:00
Jeremiah Senkpiel
46d335c380
timers: make timer.refresh() a public API
...
Originally added in
bb5575aa75
discussions such as
https://github.com/nodejs/node/issues/20261
show the usefulness of this API to the Node.js ecosystem.
PR-URL: https://github.com/nodejs/node/pull/20298
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-05-10 22:19:27 +05:30
Benjamin Coe
d942573393
test: add regression test for #11257
...
Refs: https://github.com/nodejs/node/issues/11257
PR-URL: https://github.com/nodejs/node/pull/20391
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-05-10 12:08:17 -04:00
Vse Mozhet Byt
8d3131b0af
doc: fix nits in doc/api_assets/style.css
...
1. Merge rule sets for identical selectors.
2. Delete impossible selector block: we have only stability indexes
0, 1, and 2, so there can't be `.api_stability_3` class.
Refs: nodejs.org/api/documentation.html#documentation_stability_index
PR-URL: https://github.com/nodejs/node/pull/20601
Refs: https://nodejs.org/api/documentation.html#documentation_stability_index
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-05-10 18:19:43 +03:00
Anna Henningsen
79f87cc729
src: fix typo in util.h comment
...
PR-URL: https://github.com/nodejs/node/pull/20656
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-10 16:56:28 +02:00
Ruben Bridgewater
21c3a402d4
assert: validate input stricter
...
This makes sure invalid `error` objects are not ignored when using
`assert.throws` and `assert.rejects`.
PR-URL: https://github.com/nodejs/node/pull/20481
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2018-05-10 15:27:32 +02:00