Jeremiah Senkpiel
a640834039
timers: move big impl comment to /internal/
...
To be paired with the commits from
https://github.com/nodejs/node/pull/26583
Specifically:
1a6fb71f71
PR-URL: https://github.com/nodejs/node/pull/26761
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2019-03-27 22:31:45 +01:00
Anatoli Papirovski
3ec652ad38
timers: fix refresh inside callback
...
When `timers.refresh()` is called inside a callback, the timer would
incorrectly end up unrefed and thus not keep the event loop alive.
PR-URL: https://github.com/nodejs/node/pull/26721
Fixes: https://github.com/nodejs/node/issues/26642
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2019-03-27 22:31:32 +01:00
Joyee Cheung
4314dbfce9
worker: create per-Environment message port after bootstrap
...
PR-URL: https://github.com/nodejs/node/pull/26593
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-27 22:31:06 +01:00
Richard Lau
cc4a25a1a9
lib: lazy load v8 in error-serdes
...
Lazy loading `v8` in `lib/internal/error-serdes.js` reduces the number
of loaded modules by the bootstrap code for Worker threads by seven.
PR-URL: https://github.com/nodejs/node/pull/26689
Refs: https://github.com/nodejs/node/pull/26501#discussion_r264849750
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-03-27 22:27:44 +01:00
Joyee Cheung
1f4a5bcc98
timers: refactor timer callback initialization
...
This patch:
- Moves the timer callback initialization into bootstrap/node.js,
documents when they will be called, and make the dependency on
process._tickCallback explicit.
- Moves the initialization of tick callbacks and timer callbacks
to the end of the bootstrap to make sure the operations
done before those initializations are synchronous.
- Moves more internals into internal/timers.js from timers.js.
PR-URL: https://github.com/nodejs/node/pull/26583
Refs: https://github.com/nodejs/node/issues/26546
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-03-27 22:26:48 +01:00
Joyee Cheung
ebb0c2a44e
timers: reduce usage of public util
...
Refs: https://github.com/nodejs/node/issues/26546
PR-URL: https://github.com/nodejs/node/pull/26583
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-03-27 22:17:16 +01:00
Joyee Cheung
e6367c2da5
timers: refactor to use module.exports
...
PR-URL: https://github.com/nodejs/node/pull/26583
Refs: https://github.com/nodejs/node/issues/26546
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-03-27 22:17:05 +01:00
Joyee Cheung
255de69596
process: refactor global.queueMicrotask()
...
- Lazy load `async_hooks` in the implementation
- Rename `process/next_tick.js` to `process/task_queues.js`
and move the implementation of `global.queueMicrotask()`
there since these methods are conceptually related to
each other.
- Move the bindings used by `global.queueMicrotask()` into
`node_task_queue.cc` instead of the generic `node_util.cc`
- Use `defineOperation` to define `global.queueMicrotask()`
PR-URL: https://github.com/nodejs/node/pull/26523
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-27 22:16:26 +01:00
Joyee Cheung
1481e5b5c1
process: set the trace category update handler during bootstrap
...
Set the trace category update handler during bootstrap, but delay
the initial invocation of it until pre-execution. In addition, do
not serialize the `node.async_hooks` category state when loading
the trace_event binding during bootstrap, since it depends on
run time states (e.g. CLI flags). Instead, use the
`isTraceCategoryEnabled` v8 intrinsics to query that value during
pre-execution.
PR-URL: https://github.com/nodejs/node/pull/26605
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-03-27 22:16:26 +01:00
Joyee Cheung
235bb733a6
module: do not share the internal require function with public loaders
...
This patch removes `NativeModule.require` and
`NativeModule.requireWithFallbackInDeps`. The public loaders now
have to use a special method
`NativeModule.prototype.compileForPublicLoader()` to compile native
modules. In addition this patch moves the decisions of proxifying
exports and throwing unknown builtin errors entirely to public
loaders, and skip those during internal use - therefore `loaders.js`,
which is compiled during bootstrap, no longer needs to be aware of
the value of `--experimental-modules`.
PR-URL: https://github.com/nodejs/node/pull/26549
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-27 22:16:25 +01:00
Anna Henningsen
3c6f12c965
worker: implement worker.moveMessagePortToContext()
...
This enables using `MessagePort`s in different `vm.Context`s,
aiding with the isolation that the `vm` module seeks to provide.
Refs: https://github.com/ayojs/ayo/pull/111
PR-URL: https://github.com/nodejs/node/pull/26497
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-27 22:16:25 +01:00
Anna Henningsen
1e669b2e2e
src,lib: make DOMException available in all Contexts
...
This allows using `DOMException` from Node.js code for any
`vm.Context`.
PR-URL: https://github.com/nodejs/node/pull/26497
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-27 22:16:25 +01:00
Anna Henningsen
e044563bb0
src,lib: allow running multiple per-context files
...
Create an `lib/internal/per_context/` directory that can
host multiple files which we execute for each context.
PR-URL: https://github.com/nodejs/node/pull/26497
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-27 22:16:25 +01:00
Tobias Nießen
f2a07df27f
crypto: improve error handling in parseKeyEncoding
...
This change only affects KeyObject.export().
Backport-PR-URL: https://github.com/nodejs/node/pull/26688
PR-URL: https://github.com/nodejs/node/pull/26455
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-27 22:16:25 +01:00
Tobias Nießen
ed7599bf36
crypto: allow deriving public from private keys
...
This change allows passing private key objects to
crypto.createPublicKey, resulting in a key object that represents a
valid public key for the given private key. The returned public key
object can be used and exported safely without revealing information
about the private key.
Backport-PR-URL: https://github.com/nodejs/node/pull/26688
PR-URL: https://github.com/nodejs/node/pull/26278
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2019-03-27 22:16:24 +01:00
Joyee Cheung
be3ea2a1eb
process: handle node --debug deprecation in pre-execution
...
In addition, shim `process._deprecatedDebugBrk` in pre-execution.
This is a non-semver-major v11.x backport for
https://github.com/nodejs/node/pull/25828 .
PR-URL: https://github.com/nodejs/node/pull/26670
Refs: https://github.com/nodejs/node/pull/25828
2019-03-27 22:16:24 +01:00
Matteo Collina
249bf509a3
stream: fix regression introduced in #26059
...
In #26059 , we introduced a bug that caused 'readable' to be nextTicked
on EOF of a ReadableStream. This breaks the dicer module on CITGM.
That change was partially reverted to still fix the bug in #25810 and
not break dicer.
See: https://github.com/nodejs/node/pull/26059
Fixes: https://github.com/nodejs/node/issues/25810
PR-URL: https://github.com/nodejs/node/pull/26643
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-27 22:16:24 +01:00
Matteo Collina
0b2f900c9a
stream: make sure 'readable' is emitted before ending the stream
...
Fixes: https://github.com/nodejs/node/issues/25810
PR-URL: https://github.com/nodejs/node/pull/26059
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-03-27 22:16:24 +01:00
gengjiawen
d80cd50dbc
tools: remove eslint rule no-let-in-for-declaration
...
PR-URL: https://github.com/nodejs/node/pull/26715
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-27 22:16:22 +01:00
dnlup
9a5c1495b1
errors: remove usage of require('util')
...
Remove internal usage of `require('util').inspect`.
PR-URL: https://github.com/nodejs/node/pull/26781
Refs: https://github.com/nodejs/node/issues/26546
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2019-03-27 22:16:21 +01:00
dnlup
5f3b850da5
lib: reduce usage of require('util')
...
Replace `require('util').inspect` and `require('util').format` with
`require('util/internal/inspect').inspect` and
`require('util/internal/inspect').format` in `lib/internal/errors.js`.
PR-URL: https://github.com/nodejs/node/pull/26782
Refs: https://github.com/nodejs/node/issues/26546
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-27 22:16:21 +01:00
cjihrig
fef2a54a4e
tools: enable getter-return lint rule
...
PR-URL: https://github.com/nodejs/node/pull/26615
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Masashi Hirano <shisama07@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-03-27 22:16:21 +01:00
Matteo Collina
8b65aa73f6
process: make stdout and stderr emit 'close' on destroy
...
Fix: https://github.com/nodejs/node/issues/26550
PR-URL: https://github.com/nodejs/node/pull/26691
Fixes: https://github.com/false
Fixes: https://github.com/nodejs/node/issues/26550
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-03-27 22:16:21 +01:00
Rich Trott
a20bf75e06
Revert "net: remove usage of require('util')"
...
This reverts commit e112fb4c22 .
This commit broke parallel/test-net-access-byteswritten.
PR-URL: https://github.com/nodejs/node/pull/26896
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2019-03-27 22:16:20 +01:00
dnlup
dd2f2cca00
process: remove usage of require('util') in per_thread.js
...
Use `require('internal/util/inspect').format` instead of
`require('util').format`.
PR-URL: https://github.com/nodejs/node/pull/26817
Refs: https://github.com/nodejs/node/issues/26546
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-27 22:16:20 +01:00
dnlup
5e06c3bc0b
net: remove usage of require('util')
...
Use `require('internal/util/inspect').inspect` and
`require('internal/util/debuglog').debuglog` instead of
`require('util').debuglog` and `require('util').inspect`.
PR-URL: https://github.com/nodejs/node/pull/26807
Refs: https://github.com/nodejs/node/issues/26546
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-27 22:16:20 +01:00
dnlup
4cafd7419d
module: remove usage of require('util') in esm/translators.js
...
Use `require('internal/util/debuglog').debuglog` and
`require('internal/util').promisify`
instead of `require('util').debuglog` and `require('util').promisify` in
`lib/internal/modules/translators.js`.
PR-URL: https://github.com/nodejs/node/pull/26806
Refs: https://github.com/nodejs/node/issues/26546
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-27 22:16:20 +01:00
dnlup
037e3fddfa
module: remove usage of require('util') in esm/loader.js
...
Use `require('internal/util/debuglog').debuglog` instead of
`require('util').debuglog` in `lib/internal/modules/esm/loader.js`.
PR-URL: https://github.com/nodejs/node/pull/26804
Refs: https://github.com/nodejs/node/issues/26546
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-27 22:16:19 +01:00
dnlup
414d6f5e04
module: remove usage of require('util') in cjs/loader.js
...
Use `require('internal/util').deprecate` instead of
`require('util').deprecate` in `lib/internal/modules/cjs/loader.js`.
PR-URL: https://github.com/nodejs/node/pull/26802
Refs: https://github.com/nodejs/node/issues/26546
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-27 22:16:19 +01:00
nd-02110114
83f6ec8876
tty: remove util.inherits usage
...
PR-URL: https://github.com/nodejs/node/pull/26797
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-03-27 22:16:19 +01:00
dnlup
bf2b57e46f
lib: remove usage of require('util')
...
Remove the usage of `require('util').inspect`.
PR-URL: https://github.com/nodejs/node/pull/26779
Refs: https://github.com/nodejs/node/issues/26546
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-03-27 22:16:19 +01:00
dnlup
64a92290c0
lib: remove usage of require('util')
...
Remove usage of public `require('util').inspect` and
`require('util').formatWithOptions`.
PR-URL: https://github.com/nodejs/node/pull/26777
Refs: https://github.com/nodejs/node/issues/26546
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-27 22:16:19 +01:00
Rich Trott
f263f98d5a
console: remove unreachable code
...
The current version of lib/internal/console/constructor.js includes this
as part of line 470:
setlike ? iterKey : indexKey
However, `setlike` is guaranteed to be true because we are inside of an
`if` block (starting on line 463) that explicitly checks that `setlike`
is true.
Coverage reporting confirms that `setliked` is always true when it is
reached in our tests.
Remove the ternary as the value provided will always be `iterKey`.
PR-URL: https://github.com/nodejs/node/pull/26863
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-03-27 22:16:18 +01:00
toshi1127
04c7db3638
url: remove usage of require('util')
...
PR-URL: https://github.com/nodejs/node/pull/26808
Refs: https://github.com/nodejs/node/issues/26546
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-03-27 22:16:17 +01:00
toshi1127
15af5193af
http2: reduce usage of require('util')
...
PR-URL: https://github.com/nodejs/node/pull/26784
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-03-27 22:16:17 +01:00
dnlup
fbe6d30bcf
module: remove usage of require('util')
...
Use `require('internal/util/debuglog').debuglog` instead of
`require('util').debuglog` in `lib/internal/modules/esm/module_map.js`.
Refs: https://github.com/nodejs/node/issues/26546
PR-URL: https://github.com/nodejs/node/pull/26805
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-03-27 22:16:17 +01:00
dnlup
0f9a779da8
trace_events: remove usage of require('util')
...
Use `require('internal/util/inspect').format` instead of
`require('util').format`.
Refs: https://github.com/nodejs/node/issues/26546
PR-URL: https://github.com/nodejs/node/pull/26822
Reviewed-By: Masashi Hirano <shisama07@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-03-27 22:16:16 +01:00
toshi1127
a2d2756792
assert: reduce internal usage of public require of util
...
PR-URL: https://github.com/nodejs/node/pull/26750
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-27 22:16:16 +01:00
Joyee Cheung
41761cc4a6
process: load internal/async_hooks before inspector hooks registration
...
Otherwise the exports of `internal/async_hooks` may be undefined
when the inspector async hooks are registered.
PR-URL: https://github.com/nodejs/node/pull/26866
Fixes: https://github.com/nodejs/node/issues/26798
Refs: https://github.com/nodejs/node/pull/26859
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2019-03-27 22:16:15 +01:00
dnlup
dae1e301c6
dgram: remove usage of public require('util')
...
Use `require('internal/util').deprecate` instead of
`require('util').deprecate`.
Refs: https://github.com/nodejs/node/issues/26546
PR-URL: https://github.com/nodejs/node/pull/26770
Reviewed-By: Masashi Hirano <shisama07@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-27 22:16:15 +01:00
Jesse Katsumata
c127bec4ab
policy: reduce internal usage of public util for manifest.js
...
PR-URL: https://github.com/nodejs/node/pull/26833
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Masashi Hirano <shisama07@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-03-27 22:16:15 +01:00
dnlup
04e9d5a448
repl: remove usage of require('util') in repl/history
...
Use `require('internal/util/debuglog').debuglog` instead of
`require('util').debuglog`.
Refs: https://github.com/nodejs/node/issues/26546
PR-URL: https://github.com/nodejs/node/pull/26819
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-27 22:16:14 +01:00
Beni von Cheni
b552139554
stream: reduce internal usage of public require of util
...
PR-URL: https://github.com/nodejs/node/pull/26698
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-27 22:16:12 +01:00
Daiki Ihara
db7c4ac40b
assert: reduce internal usage of public require of util
...
PR-URL: https://github.com/nodejs/node/pull/26762
Refs: https://github.com/nodejs/node/issues/26546
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Masashi Hirano <shisama07@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-27 22:16:11 +01:00
Joyee Cheung
de353b75d5
perf_hooks: load internal/errors eagerly
...
Since `internal/errors` is loaded by many builtin modules and is
currently the first module loaded during bootstrap, it is
fine to load it eagerly. We just need to make sure
that `internal/errors` itself load other modules lazily.
PR-URL: https://github.com/nodejs/node/pull/26771
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-27 22:16:11 +01:00
Joyee Cheung
7022609dcc
events: load internal/errors eagerly
...
Since `internal/errors` is loaded by many builtin modules and is
currently the first module loaded during bootstrap, it is
fine to load it eagerly. We just need to make sure
that `internal/errors` itself load other modules lazily.
PR-URL: https://github.com/nodejs/node/pull/26771
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-27 22:16:11 +01:00
Ruben Bridgewater
e49cd40789
console: fix trace function
...
A recent refactoring made the slight mistake of calling `trace()`
instead of `this.trace()`.
PR-URL: https://github.com/nodejs/node/pull/26764
Fixes: https://github.com/nodejs/node/issues/26763
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
2019-03-27 22:16:05 +01:00
Ruben Bridgewater
bff5d301bf
lib: move extra properties into error creation
...
This encapsulates the Node.js errors more by adding extra properties
to an error inside of the function to create the error message instead
of adding the properties at the call site. That simplifies the usage
of our errors and makes sure the expected properties are always set.
PR-URL: https://github.com/nodejs/node/pull/26752
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-27 22:10:31 +01:00
dnlup
e916a2ad54
lib: remove usage of require('util')
...
Remove usage of public require('util') in
`internal/child_process`.
Refs: https://github.com/nodejs/node/issues/26546
PR-URL: https://github.com/nodejs/node/pull/26773
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-27 22:10:30 +01:00
Weijia Wang
cc76f3f152
lib: use Array#includes instead of Array#indexOf
...
PR-URL: https://github.com/nodejs/node/pull/26732
Refs: https://github.com/nodejs/node/issues/26568
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-03-27 22:10:30 +01:00