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

26643 Commits

Author SHA1 Message Date
Refael Ackermann
1302e0174a tools: bump cpplint.py to 1.4.4
Refs: https://github.com/cpplint/cpplint/releases/tag/1.4.4

PR-URL: https://github.com/nodejs/node/pull/27098
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2019-04-08 08:30:18 -04:00
Michaël Zasso
112cc7c275 lib: use safe methods from primordials
This changes the primordials to expose built-in prototypes with their
methods already uncurried.
The uncurryThis function is therefore moved to the primordials.
All uses of uncurryThis on built-ins are changed to import the relevant
prototypes from primordials.
All uses of Function.call.bind are also changed to use primordials.

PR-URL: https://github.com/nodejs/node/pull/27096
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-04-08 11:23:09 +02:00
Tobias Nießen
969bd1eb7b crypto: add support for RSA-PSS keys
This commit adds support for RSA-PSS keys, including
- KeyObjects of type rsa-pss,
- key pair generation for RSA-PSS, and
- signing and verification using RSA-PSS keys.

PR-URL: https://github.com/nodejs/node/pull/26960
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2019-04-08 09:22:32 +02:00
Ruben Bridgewater
d834275a48 buffer: fix custom inspection with extra properties
This broke due to a recent change that prevents exposing inspect
internals. It now relies on the public API instead and should be a
bit more robust due to that.

PR-URL: https://github.com/nodejs/node/pull/27074
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-04-08 08:55:46 +02:00
Tobias Nießen
fadcb2d850 crypto: simplify missing passphrase detection
PR-URL: https://github.com/nodejs/node/pull/27089
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-04-08 08:19:13 +02:00
Vse Mozhet Byt
5a8c55f078 lib: fix outdated comment
PR-URL: https://github.com/nodejs/node/pull/27122
Refs: 7e2088f773
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-04-08 06:03:33 +02:00
Rich Trott
557bd861aa doc: revise Collaborator material in GOVERNANCE.md
* Reduce passive voice
* Shorter and simpler sentences

PR-URL: https://github.com/nodejs/node/pull/27103
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
2019-04-07 19:34:35 -07:00
Vse Mozhet Byt
1afec97130 doc: link bigint type to MDN instead of proposal
PR-URL: https://github.com/nodejs/node/pull/27101
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-04-07 22:50:35 +03:00
Ruben Bridgewater
75463a9004
assert: fix rejects stack trace and operator
This makes sure the stack trace is not removed due to a wrong stack
start function being used. It also fixes the wrong operator caused
by the same reason. This only applies in case an validation object
was used to validate the rejection passed to `assert.reject()` as
first argument.

PR-URL: https://github.com/nodejs/node/pull/27047
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-04-07 20:25:32 +02:00
Ruben Bridgewater
eb2d4161f5
fs: improve readFile performance
This increases the maximum buffer size per read to 512kb when using
`fs.readFile`. This is important to improve the read performance for
bigger files.

PR-URL: https://github.com/nodejs/node/pull/27063
Refs: https://github.com/nodejs/node/issues/25741
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jamie Davis <davisjam@vt.edu>
2019-04-07 11:28:15 +02:00
cjihrig
97c0a34935 src: don't point to out of scope variable
Coverity reported this. The addr pointer is passed to
req_wrap->Dispatch(). By the time this happens, the value
that addr points to, addr_storage, is out of scope. This
commit remedies that.

PR-URL: https://github.com/nodejs/node/pull/27070
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
2019-04-07 14:13:11 +08:00
Rich Trott
77dee25efd benchmark: remove deprecated argument
The benchmarks for dns.lookup() include calling it with an empty
hostname which results in a deprecation warning. This benchmark seems to
be subject to some odd side effects (see Ref below) and we probably
generally don't want to benchmark deprecated things by default anyway.
Remove the deprecated value from the default list. Bonus is that this
will speed up the benchmark.

Refs: https://github.com/nodejs/node/pull/27081#issuecomment-479981874

PR-URL: https://github.com/nodejs/node/pull/27091
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-04-06 22:37:47 -07:00
Myles Borins
21b739fb69
doc: add missing step to npm release process
PR-URL: https://github.com/nodejs/node/pull/27105
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-04-06 20:57:30 -04:00
Kat Marchán
033f6b566e
deps: upgrade npm to 6.9.0
Co-authored-by: Myles Borins <mylesborins@google.com>

PR-URL: https://github.com/nodejs/node/pull/26244
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-04-06 20:56:17 -04:00
Michaël Zasso
58aaf58406
test: fix test-repl-require-after-write
Currently, the test creates a file in the cwd and doesn't clean it up.
Use a temporary directory instead.

PR-URL: https://github.com/nodejs/node/pull/27088
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-04-06 23:04:49 +02:00
Nikolai Vavilov
3d8532f851 buffer: add {read|write}Big[U]Int64{BE|LE} methods
PR-URL: https://github.com/nodejs/node/pull/19691
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-04-06 19:30:23 +02:00
Michaël Zasso
dd89a1182f
tools: print a better message for unexpected use of globals
PR-URL: https://github.com/nodejs/node/pull/27083
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-04-06 16:15:28 +02:00
Joyee Cheung
de23055536
lib: remove env: node in eslint config for lib files
This patch removes the redundant `require-globals` custom
eslint rule by removing `env: node` in the eslint config
and whitelist the globals that can be accessed in native
modules instead of black listing them. This makes sense
for our `lib/` files because here we are creating the
Node.js environment instead of running in a normal user
land Node.js environment.

PR-URL: https://github.com/nodejs/node/pull/27082
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-04-06 12:04:36 +08:00
Joyee Cheung
864860e9f3
src: port coverage serialization to C++
This patch moves the serialization of coverage profiles into
C++. With this we no longer need to patch `process.reallyExit`
and hook into the exit events, but instead hook into relevant
places in C++ which are safe from user manipulation. This also
makes the code easier to reuse for other types of profiles.

PR-URL: https://github.com/nodejs/node/pull/26874
Reviewed-By: Ben Coe <bencoe@gmail.com>
2019-04-06 12:01:45 +08:00
Gabriel Schulhof
baa54a5ae7 test: cover napi_get/set/has_named_property()
Add test coverage for these N-APIs.

PR-URL: https://github.com/nodejs/node/pull/26947
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-04-05 11:56:09 -07:00
Richard Lau
e3032708e0 report: add support for UDP connected sockets
PR-URL: https://github.com/nodejs/node/pull/27072
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2019-04-05 13:24:06 -04:00
Rich Trott
181052d7c2 doc: revise Collaborator description in GOVERNANCE.md
* Active voice
* Remove Node.js Foundation mention. It may be appropriate to add
  something back in when the new foundation is bootstrapped. We
  don't control membership criteria, so best to link to something else
  when it becomes available rather than make guarantees in this doc.

PR-URL: https://github.com/nodejs/node/pull/27071
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-04-05 09:55:25 -07:00
gengjiawen
d0e2650d03 src: add NOLINT to js_native_.*
* add filter to not lint NOLINT rules

PR-URL: https://github.com/nodejs/node/pull/26884
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-04-05 08:59:00 -04:00
Michaël Zasso
135b79a31d deps: patch V8 to 7.4.288.18
Refs: https://github.com/v8/v8/compare/7.4.288.17...7.4.288.18

PR-URL: https://github.com/nodejs/node/pull/27066
Refs: https://github.com/v8/v8/compare/7.4.288.13...7.4.288.17
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-04-05 08:46:05 -04:00
Michaël Zasso
c1d61f2b4b deps: patch V8 to 7.4.288.17
Refs: https://github.com/v8/v8/compare/7.4.288.13...7.4.288.17

PR-URL: https://github.com/nodejs/node/pull/27066
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-04-05 08:45:59 -04:00
Rich Trott
c86883cfac test: fix test-benchmark-module
A recent commit broke test-benchmark-module. This fixes it.

PR-URL: https://github.com/nodejs/node/pull/27094
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
2019-04-04 22:13:56 -07:00
Ben Noordhuis
f13733d12d test: test vm.runInNewContext() filename option
The 'filename as a string' case was already being tested. This commit
also exercises the 'filename as an option' case.

PR-URL: https://github.com/nodejs/node/pull/27056
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gus Caplan <me@gus.host>
2019-04-05 05:44:51 +02:00
Anatoli Papirovski
2c49e8b537 lib: make queueMicrotask faster
No longer create an additional scope within queueMicrotask
in order to improve performance.

PR-URL: https://github.com/nodejs/node/pull/27032
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-04-05 05:37:11 +02:00
Anatoli Papirovski
d3d4e10107 async_hooks: improve AsyncResource performance
Accessing symbols is generally quite expensive and so is emitInit,
only do both when actually required.

PR-URL: https://github.com/nodejs/node/pull/27032
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-04-05 05:37:01 +02:00
Richard Lau
af03de48d8 build: don't use lint-ci on Travis
The `lint-ci` Makefile target differs from `lint` in that it writes to
a tap file and not stdout and also stops execution when an error is
found (e.g. if JavaScript linting fails the C++ and docs linting are
not run).

The switch to `lint-ci` was to enable Python linting. Revert to `lint`
and add the `lint-py` target.

PR-URL: https://github.com/nodejs/node/pull/27062
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-04-04 21:27:54 -04:00
Tobias Nießen
2f1ed5c063 crypto: remove legacy native handles
PR-URL: https://github.com/nodejs/node/pull/27011
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-04-04 16:45:41 +02:00
Tobias Nießen
73bca57988
crypto: fail early if passphrase is too long
This causes OpenSSL to fail early if the decryption passphrase is too
long, and produces a somewhat helpful error message.

PR-URL: https://github.com/nodejs/node/pull/27010
Refs: https://github.com/nodejs/node/pull/25208
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2019-04-04 16:09:11 +02:00
Ben Noordhuis
608878c956
build: fix inspector dependency resolution
It was reported that parallel builds on Windows sometimes error because
of missing intermediate files.

On closer inspection I noticed that some files are copied from src/ to
the intermediate build directory in a way where they don't participate
in dependency resolution. Put another way, the build system doesn't
know to wait for the copy to complete because we don't tell it to.

Fix that by not copying around files but instead making the script that
processes them a little smarter about where to find them and where to
store the results.

PR-URL: https://github.com/nodejs/node/pull/27026
Fixes: https://github.com/nodejs/node/issues/27025
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-04-04 16:02:23 +02:00
Anatoli Papirovski
04355eff5b
async_hooks: minor cleanup and improvements
Cleanup some code and make the emit hooks very slightly faster.

PR-URL: https://github.com/nodejs/node/pull/27034
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-04-04 15:55:56 +02:00
Filip Skokan
b2bb6c2b80
crypto: fix crash of encrypted private key export without cipher
PR-URL: https://github.com/nodejs/node/pull/27041
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-04-04 15:54:04 +02:00
Thomas
6fb32ac255
src: prevent crash in TTYWrap::Initialize
When console.log is called for the first time it initializes
TTYWrap object. However, if there is not enough space on the
V8 stack, creating function template fails and triggers
empty maybe local exception.

PR-URL: https://github.com/nodejs/node/pull/26832
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-04-04 15:35:02 +02:00
ZYSzys
b965ac22ca
querystring: simplify stringify method
PR-URL: https://github.com/nodejs/node/pull/26591
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-04-04 15:26:06 +02:00
Ben Noordhuis
eb2dccb17a
src: move AsyncResource impl out of public header
Implementing the methods out-of-line (i.e., not inline) means we can fix
bugs and have already compiled add-ons pick up the fixes automatically,
something that doesn't work when the methods are inline because then
they get compiled into the add-on instead of the node binary.

PR-URL: https://github.com/nodejs/node/pull/26348
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-04-04 15:23:11 +02:00
Jon Kunkee
e575ba608a
deps: add ARM64 Windows configurations in openssl
This change adds the generated files required for building OpenSSL for
Node.js for ARM64 Windows. I did this on a VM running Ubuntu 18.04. The
basic workflow is to cd to deps/openssl/config and run `make`,
installing any needed packages until all architectures build correctly.

Note that OpenSSL 1.1.1 does not support ASM on ARM64 Windows, so this
change also supports only no-asm on ARM64 Windows.

PR-URL: https://github.com/nodejs/node/pull/26001
Fixes: https://github.com/nodejs/node/issues/25998
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2019-04-04 15:11:45 +02:00
Shigeki Ohtsu
a19e8ebe9f
deps: add ARM64 Windows support in openssl
This adds ARM64 Windows support in the OpenSSL build system.

Since OpenSSL's ARM64 Windows support does not have support for ASM--
that is, VC-WIN64-ARM inherits from VC-noCE-common which has no ASM
files--`openssl_no_asm.gypi` is always used for building. This
essentially forces the 'no-asm' Configure flag.

PR-URL: https://github.com/nodejs/node/pull/26001
Fixes: https://github.com/nodejs/node/issues/25998
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2019-04-04 15:11:44 +02:00
Ruben Bridgewater
4f094c0ae6
buffer: fix concat error message
The list argument may only be of type array, not of any other type
as it actually suggests.

PR-URL: https://github.com/nodejs/node/pull/27050
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-04-04 14:21:11 +02:00
Ruben Bridgewater
0f190a5bed
module: add extra caching layer
This adds an extra modules caching layer that operates on the parent's
`path` property and the current require argument. That together can
be used as unique identifier to speed up loading the same module more
than once. It is a cache on top of the current modules cache.

It has the nice feature that this cache does not only work in the same
file but it works for the whole current directory. So if the same file
is loaded in any other file from the same directory, it will also hit
this cache instead of having to resolve the file again.

To keep it backwards compatible with the old modules cache, it detects
invalidation of that cache.

PR-URL: https://github.com/nodejs/node/pull/26970
Refs: https://github.com/nodejs/node/pull/25362
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-04-04 13:03:29 +02:00
Ruben Bridgewater
d0043136e5
module: add path to the module object
This adds the `path` property to the module object. It contains the
current directory as path. That is necessary to add an extra caching
layer.

It also makes sure the `id` uses a default in case it's not set.
Otherwise the `path.dirname(id)` command could fail.

PR-URL: https://github.com/nodejs/node/pull/26970
Refs: https://github.com/nodejs/node/pull/25362
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-04-04 13:03:28 +02:00
Ruben Bridgewater
be577615c8
module: inline try catch
Moving `try / catch` into separate functions is not necessary
anymore due to V8 optimizations.

PR-URL: https://github.com/nodejs/node/pull/26970
Refs: https://github.com/nodejs/node/pull/25362
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-04-04 13:03:27 +02:00
Ruben Bridgewater
ae9fae813e
benchmark: improve module-loader benchmark
Add more benchmark options to properly verify the gains.

This makes sure the benchmark also tests requiring the same module
again instead of only loading each module only once.

PR-URL: https://github.com/nodejs/node/pull/26970
Refs: https://github.com/nodejs/node/pull/25362
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-04-04 13:03:26 +02:00
Ruben Bridgewater
a8b69d453f
benchmark: add new module loading benchmarks
PR-URL: https://github.com/nodejs/node/pull/26970
Refs: https://github.com/nodejs/node/pull/25362
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-04-04 13:03:25 +02:00
Ruben Bridgewater
3b044962c4
errors: add more information in case of invalid callbacks
This adds the actual callback that is passed through to the error
message in case an ERR_INVALID_CALLBACK error is thrown.

PR-URL: https://github.com/nodejs/node/pull/27048
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-04-04 12:51:03 +02:00
Ruben Bridgewater
a9bf6652b5
util: use minimal object inspection with %s specifier
This improves `util.format()` by returning more meaningful results
when using `%s` as specifier and any object as value. Besides that
`BigInt` will also be represented with an `n` at the end to indicate
that it's of type `BigInt`.

PR-URL: https://github.com/nodejs/node/pull/26927
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-04-04 12:48:57 +02:00
Ben Noordhuis
adbcda1eef src: use sizeof(var) instead of sizeof(type)
Change `memset(&s, 0, sizeof(type))` to `memset(&s, 0, sizeof(s))`.
The former is dangerous when the type of `s` changes.

PR-URL: https://github.com/nodejs/node/pull/27038
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2019-04-04 10:12:48 +02:00
Ali Ijaz Sheikh
be45224f22 meta: move ofrobots to TSC emeritus
PR-URL: https://github.com/nodejs/node/pull/27076
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-04-04 10:01:39 +02:00