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

20691 Commits

Author SHA1 Message Date
Michael Dawson
f054855bbf doc: remove uannecessary Require
This was the only instance were we said a parameter
was required.  It is assumed parameters are required unless
the doc says they are option.  Remove `Required` to make
consistent with the rest of the doc

PR-URL: https://github.com/nodejs/node/pull/18184
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-01-18 10:45:46 -05:00
Suixinlei
f2e62b5238
doc: add builtin module in building.md
Fixes: https://github.com/nodejs/node/issues/12516
Refs: https://github.com/nodejs/node/pull/2497

PR-URL: https://github.com/nodejs/node/pull/17705
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-18 21:36:32 +08:00
Matheus Marchini
c134ff24f4
doc: warn users about non-ASCII paths on build
The build breaks if there's a non-ASCII character on
the path to the building directory.

PR-URL: https://github.com/nodejs/node/pull/16735
Refs: https://github.com/nodejs/node/issues/16278
Refs: https://github.com/nodejs/node/issues/14336
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-01-18 21:27:00 +08:00
Anatoli Papirovski
38ee25e2e2
child_process: do not ignore proto values of env
This reverts this behaviour introduced in a recent PR, and updates
the test. Without this change, CitGM and other packages are broken.

PR-URL: https://github.com/nodejs/node/pull/18210
Fixes: https://github.com/nodejs/citgm/issues/536
Reviewed-By: Evan Lucas <evanlucas@me.com>
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: Michaël Zasso <targos@protonmail.com>
2018-01-18 08:04:06 -05:00
Rich Trott
359a232348 doc: fix typo in esm.md
Change `run time` to `runtime` for both correctness and consistency with
every other instance of the expression in the docs.

PR-URL: https://github.com/nodejs/node/pull/18142
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
2018-01-18 04:46:41 -08:00
Vse Mozhet Byt
6c76de13c5 doc: add missing link references
PR-URL: https://github.com/nodejs/node/pull/18222
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-01-18 13:21:23 +02:00
Rich Trott
c6bee70eec doc: simplify sentences that use "considered"
Change many instances of "x is considered to be y" to "x is y".

PR-URL: https://github.com/nodejs/node/pull/18095
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-01-17 21:22:53 -08:00
Steven R. Loomis
e42708c8e3
deps: ICU 60.2 bump
- Update to Maintainance ICU 60.2
- CLDR 32.0.1
- http://site.icu-project.org/download/60#TOC-ICU-60.2-bug-fixes
- Subsumes https://github.com/nodejs/node/pull/16931

PR-URL: https://github.com/nodejs/node/pull/17687
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-17 20:08:43 -08:00
Vse Mozhet Byt
f7c709fdd0 doc: dedupe links
Replace some repeated full links
with concise ones and bottom references.

PR-URL: https://github.com/nodejs/node/pull/18213
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-18 03:15:02 +02:00
陈刚
82bdf8fba2
fs: fix options.end of fs.ReadStream()
Fixes: https://github.com/nodejs/node/issues/18116
PR-URL: https://github.com/nodejs/node/pull/18121
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
2018-01-18 08:47:07 +08:00
Michael Dawson
5aa0f3ee16
doc: update sample output for process.versions
Update so that it includes some of the more recent additions.

PR-URL: https://github.com/nodejs/node/pull/18167
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-01-17 20:55:55 +01:00
Yosuke Furukawa
98f744cbc9 doc: fix typo in TextEncoding section
PR-URL: https://github.com/nodejs/node/pull/18201
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-01-17 20:23:23 +02:00
sreepurnajasti
1b0d9795b6
test: remove trivial buffer imports
Refs: #13836

PR-URL: https://github.com/nodejs/node/pull/18034
Refs: https://github.com/nodejs/node/issues/13836
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-01-18 01:14:09 +08:00
Anatoli Papirovski
b88da496ef
test: fix flaky interval test
PR-URL: https://github.com/nodejs/node/pull/18161
Fixes: https://github.com/nodejs/node/issues/18160
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-01-18 01:11:27 +08:00
cjihrig
dbdcf12187
doc: correct buffer changelog ordering
This commit reorders the function level changelogs of
Buffer.prototype.fill() and Buffer.alloc() to reflect the order
in which the entries were added.

PR-URL: https://github.com/nodejs/node/pull/18129
Fixes: https://github.com/nodejs/node/issues/18128
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2018-01-17 09:06:03 -05:00
cjihrig
1e802539b2
buffer: throw when filling with empty buffers
Prior to this commit, Node would enter an infinite loop when
attempting to fill a non-zero length buffer with a zero length
buffer. This commit introduces a thrown exception in this scenario.

PR-URL: https://github.com/nodejs/node/pull/18129
Fixes: https://github.com/nodejs/node/issues/18128
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2018-01-17 09:05:52 -05:00
Tobias Nießen
db9c556f50
test: use shorthand properties
PR-URL: https://github.com/nodejs/node/pull/18105
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-17 14:33:20 +01:00
Tobias Nießen
eb68a06a3e
test: simplify loadDHParam in TLS test
PR-URL: https://github.com/nodejs/node/pull/18103
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-01-17 12:35:00 +01:00
laino
4e2e7d11e1
cluster: resolve relative unix socket paths
Relative unix sockets paths were previously interpreted relative
to the master's CWD, which was inconsistent with non-cluster behavior.
A test case has been added as well.

PR-URL: https://github.com/nodejs/node/pull/16749
Fixes: https://github.com/nodejs/node/issues/16387
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-01-17 11:55:49 +08:00
Yihong Wang
f878f9414e
build: refine static and shared lib build
Refine the static and shared lib build process in order
to integrate static and shared lib verfication into CI.
When building both static and shared lib, we still build
node executable now and it uses the shared and static lib.

Signed-off-by: Yihong Wang <yh.wang@ibm.com>

Fixes: https://github.com/nodejs/node/issues/14158
PR-URL: https://github.com/nodejs/node/pull/17604
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-01-17 11:34:28 +08:00
Kyle Farnung
cd60c7db5f build,win: update lint-cpp on Windows
* Added a `lint-cpp` argument
* Updated `findstr` calls to output to `nul`
* Updated `findstr` calls to only use `/r` when the input is a regex

PR-URL: https://github.com/nodejs/node/pull/18012
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2018-01-16 17:09:14 -08:00
sreepurnajasti
e08cf1d230
test: improve to use template string
PR-URL: https://github.com/nodejs/node/pull/18097
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-01-17 08:50:02 +08:00
Moritz Peters
d3600e513a
doc: fix typo in http2stream.close param default
PR-URL: https://github.com/nodejs/node/pull/18166
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-01-17 08:48:26 +08:00
furstenheim
c90185c15e
test: fixed typos in napi test
PR-URL: https://github.com/nodejs/node/pull/18148
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-01-17 08:41:53 +08:00
Roman Reiss
82b0783519
src,doc,test: Fix common misspellings
PR-URL: https://github.com/nodejs/node/pull/18151
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@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: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-01-16 23:44:27 +01:00
Joyee Cheung
1312db5651
test: test error messages from fs.realpath{Sync}
PR-URL: https://github.com/nodejs/node/pull/17914
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-17 06:20:16 +08:00
Joyee Cheung
5eccbb09fa
test: verify errors thrown from fs stat APIs
PR-URL: https://github.com/nodejs/node/pull/17914
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-17 06:20:11 +08:00
Joyee Cheung
8c00a809bc
fs: throw fs.fstat{Sync} errors in JS
PR-URL: https://github.com/nodejs/node/pull/17914
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-17 06:20:06 +08:00
Joyee Cheung
da7804f259
fs: throw fs.lstat{Sync} errors in JS
PR-URL: https://github.com/nodejs/node/pull/17914
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-17 06:20:00 +08:00
Joyee Cheung
57d7638af3
fs: throw fs.stat{Sync} errors in JS
PR-URL: https://github.com/nodejs/node/pull/17914
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-17 06:19:54 +08:00
Joyee Cheung
791975d189
fs: return errno and take fs_req_wrap in SyncCall
PR-URL: https://github.com/nodejs/node/pull/17914
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-17 06:19:47 +08:00
Jinho Bang
316b5efd6b n-api: throw RangeError napi_create_typedarray()
According to the ECMA spec, we should throw a RangeError in the
following cases:
  - `(length * elementSize) + offset` > the size of the array passed in
  - `offset % elementSize` != `0`

In the current implementation, this check was omitted. So, the following
code will cause a crash.
  ```
  napi_create_typedarray(env, napi_uint16_array, 2 /* length */,
                         buffer, 1 /* byte_offset */, &output_array);
  ```

This change fixes the problem and write some related tests.

Refs:
https://tc39.github.io/ecma262/#sec-typedarray-buffer-byteoffset-length

PR-URL: https://github.com/nodejs/node/pull/18037
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-01-16 15:22:36 -05:00
Ruben Bridgewater
4319780389
doc: remove double line break
This is the only double line break in the file and for
consistency one is removed.

PR-URL: https://github.com/nodejs/node/pull/17581
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ron Korving <ron@ronkorving.nl>
2018-01-16 19:57:36 +01:00
Ruben Bridgewater
d07c6f9739
assert: throw without args in ok
`assert.ok()` should always receive a value. Otherwise there
might be a bug or it was intended to use `assert.fail()`.

PR-URL: https://github.com/nodejs/node/pull/17581
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ron Korving <ron@ronkorving.nl>
2018-01-16 19:57:36 +01:00
Ruben Bridgewater
f76ef50432
assert: improve simple assert
This improves the error message in simple asserts by using the
real call information instead of the already evaluated part.

PR-URL: https://github.com/nodejs/node/pull/17581
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ron Korving <ron@ronkorving.nl>
2018-01-16 19:57:35 +01:00
Joyee Cheung
27925c4086
doc: suggest not to throw JS errors from C++
Also provide an example on how to use internal/errors
to handle errors in C++.

PR-URL: https://github.com/nodejs/node/pull/18149
Refs: https://github.com/nodejs/node/issues/18106
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-01-17 02:42:52 +08:00
Joyee Cheung
eca73a2f82
fs: migrate ASYNC_CALL to AsyncCall
This patch migrates all the `ASYNC_CALL` macro in `node_file.cc` to
the template counterpart AsyncCall. Also goes with a different style
of wrapping the arguments so it's clearer to see what arguments are
passed to which `uv_fs_*` functions.

PR-URL: https://github.com/nodejs/node/pull/18144
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-17 02:35:17 +08:00
Joyee Cheung
0c8aaf318a
build: remove bench-* targets
PR-URL: https://github.com/nodejs/node/pull/18150
Fixes: https://github.com/nodejs/node/issues/17053
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-01-17 02:30:31 +08:00
Joyee Cheung
1c29da8236
tls: migrate C++ errors to internal/errors.js
* Throw ERR_TLS_SNI_FROM_SERVER when setting server names on a
  server-side socket instead of returning silently
* Assert on wrap_->started and wrap_->ssl instead of throwing
  errors since these errors indicate that the user either uses
  private APIs, or monkey-patches internals, or hits a bug.

PR-URL: https://github.com/nodejs/node/pull/18125
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-17 02:20:36 +08:00
Joyee Cheung
9ffebeab48
tls: migrate argument type-checking errors
* Throw ERR_INVALID_ARG_TYPE from public APIs
* Assert argument types in bindings instead of throwing errors

PR-URL: https://github.com/nodejs/node/pull/18125
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-17 02:20:16 +08:00
Ali Ijaz Sheikh
f75bc2c1a5 doc: napi: make header style consistent
Some of the API section headers had emphasis, while others did not.
Use a consistent style (no emphasis) for all of them, as that matches
our other API docs.

PR-URL: https://github.com/nodejs/node/pull/18122
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Kyle Farnung <kfarnung@microsoft.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-01-16 09:25:06 -08:00
Ali Ijaz Sheikh
3e062762e4 doc: napi: fix unbalanced emphasis
Some of the section headers had unbalanced emphasis.

PR-URL: https://github.com/nodejs/node/pull/18122
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Kyle Farnung <kfarnung@microsoft.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-01-16 09:25:00 -08:00
Michael Dawson
8229fc0715 src: fix code coverage cleanup
In https://github.com/nodejs/node/pull/17987 which updated
the location of the code coverage patches I missed a few
changes needed to properly clean up for code coverage.  Add
these.

PR-URL: https://github.com/nodejs/node/pull/18081
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-16 10:50:46 -05:00
Ruben Bridgewater
8f153092d8
util: change %o depth default
Since the default for depth is changed to `Infinity` it is logical
to change the %o default to the same as well.

Using %o with `util.format` will now always print the whole object.

PR-URL: https://github.com/nodejs/node/pull/17907
Refs: https://github.com/nodejs/node/issues/12693
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-01-16 15:34:04 +01:00
Ruben Bridgewater
b994b8eff6
util: change util.inspect depth default
The current default is not ideal in most use cases. Therefore it is
changed to showing unlimited depth in case util.inspect is called
directly. The default is kept as before for console.log and similar.

Using console.dir will now show a depth of up to five and
console.assert / console.trace will show a unlimited depth.

PR-URL: https://github.com/nodejs/node/pull/17907
Refs: https://github.com/nodejs/node/issues/12693
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-01-16 15:34:03 +01:00
Ruben Bridgewater
9d3958102e
stream: add custom inspect to BufferList
Currently inspecting the BufferList can result a maximum call stack
size error. Adding a individual inspect function prevents this.

PR-URL: https://github.com/nodejs/node/pull/17907
Refs: https://github.com/nodejs/node/issues/12693
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-01-16 15:34:02 +01:00
Gus Caplan
921fb84687 module: refactor loader
PR-URL: https://github.com/nodejs/node/pull/16874
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
2018-01-15 12:42:29 -06:00
现充
85739b6c5b child_process: ignore undef/proto values of env
At present, undefined values of env option will be transferred as
a "undefined" string value, and values in prototype will also be
included, which are not usual behaviors.

This commit prevents those to be transferred to the environment of
the child process.

PR-URL: https://github.com/nodejs/node/pull/15089
Fixes: https://github.com/nodejs/node/issues/15087
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-01-15 13:51:11 +01:00
Tobias Nießen
858b48b692
crypto: assign deprecation code for setAuthTag/GCM
PR-URL: https://github.com/nodejs/node/pull/18017
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-01-14 18:41:42 +01:00
Andreas Madsen
b12425d055
async_hooks,test: only use IPv6 in http test
If IPv6 is not supported on a machine, the IPv6 handle will first be
created, this will then fail and default to an IPv4 handle. This causes
the graph to change, as there now is an extra handle.

PR-URL: https://github.com/nodejs/node/pull/18143
Fixes: https://github.com/nodejs/node/issues/18003
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-14 12:31:56 -05:00