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

26393 Commits

Author SHA1 Message Date
dnlup
0f2bf72604
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-25 00:34:17 +01:00
dnlup
ad661ca209
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-25 00:33:06 +01:00
dnlup
005528ac82
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-25 00:29:36 +01:00
nd-02110114
55e6c68170
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-25 00:26:49 +01:00
dnlup
e5383adb25
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-25 00:20:03 +01:00
dnlup
cf1b9d395d
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-25 00:17:52 +01:00
dnlup
a1330af6a3
tls: remove usage of public require('util')
Remove the usage of public require('util'), as described in:
https://github.com/nodejs/node/issues/26546

PR-URL: https://github.com/nodejs/node/pull/26747
Refs: https://github.com/nodejs/node/issues/26546
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-25 00:15:39 +01:00
Rich Trott
1ac88f4b44 doc: minor edit to worker_threads.md
Change "JS code" to "JavaScript".

PR-URL: https://github.com/nodejs/node/pull/26870
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-03-24 14:59:56 -07:00
Rich Trott
4ba33c90c6 test: delete pummel/test-dtrace-jsstack
The test pummel/test-dtrace-jsstack is broken and probably has been for
a very long time. Remove it.

It gets skipped on anything that is non-SunOS. In our CI, that means
skipped everywhere but SmartOS.

When run on SmartOS in our CI (which never happens because it's in
pummel, but I moved it into sequential to test it), it fails because it
needs elevated privileges.

When I log into the SmartOS machine and run the test as root, it fails
with:

  AssertionError [ERR_ASSERTION]: did not find expected frame stalloogle

Since I have dtrace installed on my macOS machine, I tried running it
locally but removing the SunOS check. It failed because the test leaks a
global variable. I removed the global leak check, and the test failed
because I have System Integrity Protection enabled.

In short, the test does not work in its current form, has almost
certainly not worked in a long time, and is very likely to be brittle if
we ever do fix it. I'm inclined to remove it.

PR-URL: https://github.com/nodejs/node/pull/26869
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-03-24 14:59:14 -07:00
Rich Trott
26f8af9feb 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-24 14:58:18 -07:00
Rich Trott
4a40ea6894 test: refactor test-https-connect-localport
Use arrow functions for callbacks. Replace uses of `this` with explicit
variables. Add a trailing comma in a multiline object literal
declaration.

PR-URL: https://github.com/nodejs/node/pull/26881
Fixes: https://github.com/https://github.com/nodejs/node/issues/26862
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2019-03-24 07:56:25 -07:00
Rich Trott
f5969f08a0 test: replace localhost IP with 'localhost' for TLS conformity
test-https-connect-localport currently causes a runtime deprecation
warning: "[DEP0123] DeprecationWarning: Setting the TLS ServerName
to an IP address is not permitted by RFC 6066. This will be ignored
in a future version."

Change IP usage to the string 'localhost' instead.

PR-URL: https://github.com/nodejs/node/pull/26881
Fixes: https://github.com/https://github.com/nodejs/node/issues/26862
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2019-03-24 07:56:20 -07:00
Rich Trott
229759f961 test: use common.PORT instead of hardcoded number
In sequential/test-https-connect-localport, replace 34567 with
common.PORT.

PR-URL: https://github.com/nodejs/node/pull/26881
Fixes: https://github.com/https://github.com/nodejs/node/issues/26862
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2019-03-24 07:56:12 -07:00
Rich Trott
0f7e24a0c3 test: move test-https-connect-localport to sequential
test-https-connect-localport uses a hard-coded port number. Therefore
the test cannot be in the parallel directory because it will sometimes
conflict with other tests that run at the same time and request that the
OS provide an available port.

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

PR-URL: https://github.com/nodejs/node/pull/26881
Fixes: https://github.com/https://github.com/nodejs/node/issues/26862
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2019-03-24 07:56:03 -07:00
toshi1127
5b59b5f525 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-24 22:09:47 +08:00
toshi1127
b8d4bafa03 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-24 21:52:58 +08:00
dnlup
25b78c0940 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-24 21:45:39 +08:00
dnlup
a89451409e 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-24 18:28:07 +08:00
toshi1127
b2b8741a7e 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-24 18:15:23 +08:00
toshi1127
740e7e8a9d worker: remove usage of require('util') in worker_thread.js
PR-URL: https://github.com/nodejs/node/pull/26814
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>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-03-24 18:07:37 +08:00
Rich Trott
8330555295 test: refactor test-dgram-broadcast-multi-process
* Add check that `signal` is not null in callback.
* Use arrow functions for callbacks, destructuring where appropriate,
  and a trailing comma in multi-line arrays

PR-URL: https://github.com/nodejs/node/pull/26846
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-03-23 19:58:04 -07:00
Rich Trott
683e01b250 doc: edit LTS material in Collaborator Guide
* Rewrite some material for simplicity and directness.
* Remove outdated LTS material in the Collaborator Guide. (For example,
  refers to LTS WG for things that are now handled by the Release WG.)
* Minor change to text about force pushing (s/minimize/reduce/).

PR-URL: https://github.com/nodejs/node/pull/26845
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-03-23 19:56:31 -07:00
Gireesh Punathil
ed849f812d test: strengthen test-worker-prof
Force main and worker to stay for some deterministic time
Add some more validation check around profile file generation

Fixes: https://github.com/nodejs/node/issues/26401
PR-URL: https://github.com/nodejs/node/pull/26608

Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-03-24 07:06:59 +05:30
cjihrig
c0f031c5bd
src: remove unused variable
PR-URL: https://github.com/nodejs/node/pull/26879
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-03-23 17:33:25 -04:00
Mohammed Essehemy
a7a871476e doc: change error message to 'not defined'
PR-URL: https://github.com/nodejs/node/pull/26857
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2019-03-23 22:25:07 +02:00
Joyee Cheung
0d21299384 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-23 15:02:23 -04:00
cjihrig
2b89ac6818
tools: update ESLint to 5.15.3
Update ESLint to 5.15.3

PR-URL: https://github.com/nodejs/node/pull/26746
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-03-23 12:02:40 -04:00
dnlup
cd3a9eebca https: remove usage of public require('util')
Use `require('internal/util/debuglog').debuglog`
and `Object.setPrototypeOf` instead of `require('util').debuglog`
and `require('util').inherits`.

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

PR-URL: https://github.com/nodejs/node/pull/26772
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-03-23 18:40:24 +05:30
dnlup
0c89a21f96 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-23 18:37:39 +05:30
Jesse Katsumata
afdadbcff5 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-23 13:25:42 +08:00
dnlup
2701f5538f readline: remove usage of require('util')
Use `require('internal/util/inspect').inspect` instead of
`require('util').inspect`.

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

PR-URL: https://github.com/nodejs/node/pull/26818
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
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-23 12:18:32 +08:00
Jeremiah Senkpiel
7c80f18c41 timers: deprecate active() and _unrefActive()
Another nail in the coffin here, farewell ye ol C-style apis.

These apis caused numerous other issues that required far too many
safeguards. This gets us one step closer to not having to worry about
those issues anymore.

Refs: https://github.com/nodejs/node/pull/18066
Refs: https://github.com/nodejs/node/pull/20298

PR-URL: https://github.com/nodejs/node/pull/26760

Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-03-22 19:47:32 -07:00
Ruben Bridgewater
afce912193
assert: improve performance to instantiate errors
This improves the performance for AssertionError by deactivating
duplicated stack frame creation.

PR-URL: https://github.com/nodejs/node/pull/26738
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-03-23 02:55:57 +01:00
Ruben Bridgewater
f0f26cedcc
n-api: remove code from error name
This is a first step to align the n-api errors towards errors created
in JS. The stack still has to be updated to add the error code.

PR-URL: https://github.com/nodejs/node/pull/26738
Fixes: https://github.com/nodejs/node/issues/26669
Fixes: https://github.com/nodejs/node/issues/20253
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-03-23 02:55:57 +01:00
Ruben Bridgewater
e96e3f9eb0
test: remove redundant common.mustCall
All calls verify the cb is called, thus using `common.mustCall` is
not required inside of this function.

PR-URL: https://github.com/nodejs/node/pull/26738
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-03-23 02:55:56 +01:00
Ruben Bridgewater
3fe1e80896
lib: validate Error.captureStackTrace() calls
This adds a custom eslint rule to verify that
`Error.captureStackTrace()` is only called if necessary. In most
cases the helper function should be used instead.

PR-URL: https://github.com/nodejs/node/pull/26738
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-03-23 02:55:55 +01:00
Ruben Bridgewater
bfbce289c3
lib: refactor Error.captureStackTrace() usage
When using `Errors.captureStackFrames` the error's stack property
is set again. This adds a helper function that wraps this functionality
in a simple API that does not only set the stack including the `code`
property but it also improves the performance to create the error.
The helper works for thrown errors and errors returned from wrapped
functions in case they are Node.js core errors.

PR-URL: https://github.com/nodejs/node/pull/26738
Fixes: https://github.com/nodejs/node/issues/26669
Fixes: https://github.com/nodejs/node/issues/20253
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-03-23 02:55:54 +01:00
Ruben Bridgewater
1ed3c54ecb
errors: update error name
This updates all Node.js errors by removing the `code` being part
of the `name` property. Instead, the name is just changed once on
instantiation, the stack is accessed to create the stack as expected
and then the `name` property is set back to it's original form.

PR-URL: https://github.com/nodejs/node/pull/26738
Fixes: https://github.com/nodejs/node/issues/26669
Fixes: https://github.com/nodejs/node/issues/20253
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-03-23 02:55:54 +01:00
gengjiawen
c757cb1b98 src: apply clang-tidy readability-delete-null-pointer
PR-URL: https://github.com/nodejs/node/pull/26813
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-03-22 18:35:43 -04:00
gengjiawen
86e0296631 src: apply clang-tidy performance-faster-string-find
PR-URL: https://github.com/nodejs/node/pull/26812
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-03-22 18:14:37 -04:00
Rich Trott
7d201c4e70 test: move pummel tls test to sequential
Move test-tls-session-timeout from pummel to sequential. It isn't very
pummel-y and this will result in it being run on our CI more than once a
day. (It broke recently and it would have been caught if it was in
sequential rather than pummel.)

It must be in sequential rather than pummel because it uses
`common.PORT` which can result in test failures if more than one test
uses it at one time in parallel.

PR-URL: https://github.com/nodejs/node/pull/26865
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-03-22 13:57:24 -07:00
Rich Trott
cc89e68e72 test: fix pummel/test-tls-session-timeout
The test does not work with TLS 1.3 nor should it. Force TLS version
1.2.

While at it, some refactoring:

* refresh the tmp directory in case it doesn't exist!
* add an assert.strictEqual() check on the client return `code` value
  which must be zero
* use arrow functions for callbacks
* add trailing commas for multiline arrays/objects

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

PR-URL: https://github.com/nodejs/node/pull/26865
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-03-22 13:57:21 -07:00
Rich Trott
6e9551e1b1 test: complete console.assert() coverage
There is one condition in the `console.assert()` code that is not
tested currently. Add a test to confirm that `console.assert(false)`
does not include a `:` in its output.

PR-URL: https://github.com/nodejs/node/pull/26827
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-22 11:15:39 -07:00
dnlup
91be64b9d3 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-23 00:16:02 +08:00
toshi1127
01a129635c worker: remove usage of require('util')
PR-URL: https://github.com/nodejs/node/pull/26810
Refs: https://github.com/nodejs/node/issues/26546
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
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-23 00:09:48 +08:00
cjihrig
76387c1c20 src: initialize worker's stack_base_ field
Coverity was complaining that this field was not initialized.

PR-URL: https://github.com/nodejs/node/pull/26739
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-03-22 09:19:03 +01:00
Rich Trott
ee429e4b2c test: fix test-console-stdio-setters to test setters
test-console-stdio-setters needs to test against the global console in
order to test the setters for the lazy-loaded _stdout and _stderr
properties.

PR-URL: https://github.com/nodejs/node/pull/26796
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-03-21 22:22:29 -07:00
Richard Lau
41ba699973 build: update configure for Node.js 12
Update supported level of gcc to 6.3.0 and clang to 8.0.0.

Refs: https://github.com/nodejs/node/pull/26714

PR-URL: https://github.com/nodejs/node/pull/26719
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-22 00:50:08 -04:00
Zach Bjornson
0b516fac79 src: use explicit casts to silence conversion warnings
PR-URL: https://github.com/nodejs/node/pull/26766
Ref https://github.com/nodejs/node/issues/26733
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-03-22 05:47:47 +01:00
toshi1127
382e859afc child_process: reduce internal usage of public require of util
PR-URL: https://github.com/nodejs/node/pull/26769
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-22 12:41:25 +08:00