Rich Trott
359766b2c3
benchmark,doc,lib,test: prepare for padding lint rule
...
Upcoming lint rule will require a blank line between consecutive
functions. Add it in the places where we don't have it already.
PR-URL: https://github.com/nodejs/node/pull/30696
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-11-30 06:28:29 -08:00
Jeny
246557eb11
test:refactor createHook test
...
PR-URL: https://github.com/nodejs/node/pull/30568
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2019-11-30 09:45:25 +05:30
Brian White
c14c476614
buffer: fix 6-byte writeUIntBE() range check
...
Fixes: https://github.com/nodejs/node/issues/30420
PR-URL: https://github.com/nodejs/node/pull/30459
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-11-29 19:40:52 -08:00
Anna Henningsen
48cadcb7aa
dns: use length for building TXT string
...
Rely on the length reported by C-Ares rather than `\0`-termination
for creating the JS string for a dns TXT response.
Fixes: https://github.com/nodejs/node/issues/30688
PR-URL: https://github.com/nodejs/node/pull/30690
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-11-30 02:03:46 +01:00
Ruben Bridgewater
be30911361
util: fix .format() not always calling toString when it should be
...
This makes sure that `util.format('%s', object)` will always call
a user defined `toString` function. It was formerly not the case
when the object had the function declared on the super class.
At the same time this also makes sure that getters won't be
triggered accessing the `constructor` property.
PR-URL: https://github.com/nodejs/node/pull/30343
Fixes: https://github.com/nodejs/node/issues/30333
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2019-11-30 01:19:14 +01:00
Anna Henningsen
4871779542
http: set socket.server unconditionally
...
This is useful for situations in which the socket was not
created for HTTP, e.g. when using arbitrary `Duplex` streams.
(The added test fails because previously, `socket.server.emit()`
would not work for emitting the `clientError` event, as
`socket.server` was `undefined`.)
PR-URL: https://github.com/nodejs/node/pull/30571
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-11-29 16:27:35 +01:00
Anna Henningsen
58850f6bb4
test: revert 6d022c13
...
Revert "test: skip test-domain-error-types in debug mode temporariliy"
This reverts commit 6d022c13c5 .
PR-URL: https://github.com/nodejs/node/pull/30708
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2019-11-29 14:19:51 +05:30
Rich Trott
99d1f6fea4
test: move test-https-server-consumed-timeout to parallel
...
Change the test to be robust in slow environments and move to parallel.
The previous version of the test failed for me in parallel with just two
or four simultaneous versions running. This version passes 96
simultaneous versions running, but still fails as designed if the
request writes fail to prevent the request timeout from occurring.
PR-URL: https://github.com/nodejs/node/pull/30677
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-11-28 22:41:13 -08:00
Anna Henningsen
fad952adbd
src: use uv_async_t for WeakRefs
...
Schedule a task on the main event loop, similar to what the HTML
spec recommends for browsers.
Alternative to https://github.com/nodejs/node/pull/30198
PR-URL: https://github.com/nodejs/node/pull/30616
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2019-11-29 02:17:12 +01:00
Jason Macgowan
ff48009fef
tls: allow empty subject even with altNames defined
...
Behavior described in https://github.com/nodejs/node/issues/11771
is still true even though the issue is closed.
This PR is to allow DNS and URI names, even when there is not a subject.
Refs: https://github.com/nodejs/node/issues/11771
PR-URL: https://github.com/nodejs/node/pull/22906
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-11-29 02:13:41 +01:00
Anna Henningsen
ea7a6f9dbd
test: add regression test for signal handler removal in exit
...
Refs: https://github.com/nodejs/node/pull/30581
Refs: https://github.com/nodejs/node/pull/30582
PR-URL: https://github.com/nodejs/node/pull/30589
Refs: https://github.com/nodejs/node/issues/30581
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-11-28 02:02:33 +01:00
Ruben Bridgewater
255461e19a
util: fix inspection of errors with tampered name or stack property
...
This makes sure that `util.inspect()` does not throw while inspecting
errors that have the name or stack property set to a different type
than string.
Fixes: https://github.com/nodejs/node/issues/30572
PR-URL: https://github.com/nodejs/node/pull/30576
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-11-28 02:01:54 +01:00
Denys Otrishko
988034be6a
http2: make maximum tolerated rejected streams configurable
...
PR-URL: https://github.com/nodejs/node/pull/30534
Fixes: https://github.com/nodejs/node/issues/30505
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-11-28 00:48:57 +01:00
Denys Otrishko
74f6bc7056
test: update and harden http2-reset-flood
...
* use new maxSessionInvalidFrames to lower the needed frames
* slow down requests to generate less redundant after-session-close
requests
PR-URL: https://github.com/nodejs/node/pull/30534
Fixes: https://github.com/nodejs/node/issues/30505
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-11-28 00:48:29 +01:00
Denys Otrishko
9590f577b0
http2: allow to configure maximum tolerated invalid frames
...
PR-URL: https://github.com/nodejs/node/pull/30534
Fixes: https://github.com/nodejs/node/issues/30505
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-11-28 00:48:28 +01:00
Tobias Nießen
10f5fa7513
crypto: forbid setting the PBKDF2 iter count to 0
...
RFC 2898 does not permit an iteration count of zero, and OpenSSL 1.1.1
will treat it as one iteration internally.
Future OpenSSL versions will reject such inputs (already on master
branch), but until that happens, Node.js should manually reject them.
Refs: https://github.com/nodejs/webcrypto/pull/29
PR-URL: https://github.com/nodejs/node/pull/30578
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-11-28 00:36:36 +01:00
cjihrig
b7cdeb8a3a
fs: add retryDelay option to rimraf
...
This commit adds a retryDelay option to rimraf which configures
the amount of time between retry operations.
Refs: https://github.com/nodejs/node/issues/30580
PR-URL: https://github.com/nodejs/node/pull/30644
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-11-27 18:27:11 -05:00
cjihrig
4c77a76ad9
fs: remove rimraf's emfileWait option
...
This commit removes the emfileWait option. EMFILE errors are
now handled the same as any other retriable error.
Refs: https://github.com/nodejs/node/issues/30580
PR-URL: https://github.com/nodejs/node/pull/30644
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-11-27 18:27:11 -05:00
cjihrig
7e85f068a4
fs: make rimraf default to 0 retries
...
This commit makes retries an opt-in feature by defaulting
to no automatic retries. This will be particularly important
once synchronous operations can sleep between attempts.
Refs: https://github.com/nodejs/node/issues/30580
PR-URL: https://github.com/nodejs/node/pull/30644
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-11-27 18:27:11 -05:00
cjihrig
4059055739
fs: rename rimraf's maxBusyTries to maxRetries
...
This is part of reworking the rimraf retry logic.
Refs: https://github.com/nodejs/node/issues/30580
PR-URL: https://github.com/nodejs/node/pull/30644
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-11-27 18:27:11 -05:00
Rich Trott
6d022c13c5
test: skip test-domain-error-types in debug mode temporariliy
...
Until https://github.com/nodejs/node/issues/30498 is resolved, skip
test-domain-error-types on debug builds.
PR-URL: https://github.com/nodejs/node/pull/30629
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-11-26 10:18:42 -08:00
Rich Trott
ebb177ee22
test: move test-worker-prof to sequential
...
Refs: https://github.com/nodejs/node/issues/26401#issuecomment-557899953
PR-URL: https://github.com/nodejs/node/pull/30628
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2019-11-26 10:17:04 -08:00
Dmitriy Kikinskiy
8c41b19619
test: dir class initialisation w/o handler
...
Covering the case when init Dir class without passing
handle paramd to constructor.
PR-URL: https://github.com/nodejs/node/pull/30313
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-11-26 20:27:16 +05:30
poutch
48a16f25a9
test: change object assign by spread operator
...
change object assign by spread operator in test-require-symlink.js
PR-URL: https://github.com/nodejs/node/pull/30438
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-11-26 13:17:31 +05:30
Richard Lau
f2060fa9e6
test: test for minimum ICU version consistency
...
The minimum ICU version for Node.js must be at least the minimum ICU
version for V8.
PR-URL: https://github.com/nodejs/node/pull/30608
Refs: https://github.com/nodejs/node/pull/30607
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-11-25 19:39:54 -05:00
Nazar Malyy
a7ddf8c5d2
test: code&learn var to let update
...
PR-URL: https://github.com/nodejs/node/pull/30436
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-11-25 19:30:20 +05:30
poutch
ce4f97c779
test: change object assign to spread object
...
change object assign to spread object in test-npm-install.js
PR-URL: https://github.com/nodejs/node/pull/30422
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-11-25 09:59:46 +05:30
Jamar Torres
1faa45fd41
test: changed var to let in module-errors
...
PR-URL: https://github.com/nodejs/node/pull/30413
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: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-11-24 21:33:39 +05:30
Shubham Chaturvedi
d3b658865c
test: use spread instead of object.assign
...
PR-URL: https://github.com/nodejs/node/pull/30412
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: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-11-24 20:36:54 +05:30
Jon Church
fdac8f6258
test: change var to let in test-trace-events
...
PR-URL: https://github.com/nodejs/node/pull/30406
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: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-11-24 15:46:26 +05:30
telenord
d90219d9ad
test: test cover cases when trace is empty
...
cover prepare_stack_trace in case when trace is empty
PR-URL: https://github.com/nodejs/node/pull/30311
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2019-11-24 11:48:28 +05:30
Vladislav Botvin
aaeafd5c9f
fs: cover fs.opendir ERR_INVALID_CALLBACK
...
PR-URL: https://github.com/nodejs/node/pull/30307
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-11-22 21:17:33 -08:00
Rich Trott
19e44efdfb
test: add common.mustCall() to stream test
...
Refs: https://github.com/nodejs/node/pull/30561/files#r348667256
PR-URL: https://github.com/nodejs/node/pull/30561
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-11-22 11:41:32 -08:00
Rich Trott
1a35db590f
test: move explanatory comment to expected location in file
...
Refs: https://github.com/nodejs/node/pull/30561#pullrequestreview-320172639
PR-URL: https://github.com/nodejs/node/pull/30561
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-11-22 11:41:29 -08:00
Rich Trott
110c25d5ac
test: move stream test to parallel
...
I don't believe there's a reason test-stream-writable-clear-buffer needs
to be in sequential. Move it to parallel.
PR-URL: https://github.com/nodejs/node/pull/30561
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-11-22 11:41:25 -08:00
Rich Trott
03b5c46bc4
test: move test not requiring internet from internet to parallel
...
test-dgram-send-cb-quelches-error works with or without a network. Move
to `parallel` directory.
PR-URL: https://github.com/nodejs/node/pull/30545
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-11-21 10:26:29 -08:00
Artem Maksimov
9fbad51c8a
test: cover 'close' method in Dir class
...
cover 'close' method (in Dir class) with tests
Add 2 tests for full covering of method 'close' in class Dir
1. If pass smth that not string as a callback - throw an exception
2. If do .close() on already closed directory - throw an exception
PR-URL: https://github.com/nodejs/node/pull/30310
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-11-21 18:10:49 +05:30
ZYSzys
52e1bbde01
test: add test for options validation of createServer
...
PR-URL: https://github.com/nodejs/node/pull/30541
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-11-21 17:30:13 +08:00
Denys Otrishko
a30a9f8193
test: clean up http-set-trailers
...
* remove shared state of request counting from each listener by using
callbacks to report test finish. This also fixes slight race condition
where one of the request could finish before the other was taken into
account resulting in ECONNREFUSED due to premature server.close()
* slightly move code for better cohesion
* fix error comment in testHttp10 'Trailer ...' -> 'No trailer ...'
PR-URL: https://github.com/nodejs/node/pull/30522
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-11-20 13:18:46 -08:00
Tobias Nießen
c63af4fea0
crypto: add support for IEEE-P1363 DSA signatures
...
PR-URL: https://github.com/nodejs/node/pull/29292
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-11-20 12:55:47 -04:00
Sam Roberts
80efb80f3f
tls: cli option to enable TLS key logging to file
...
Debugging HTTPS or TLS connections from a Node.js app with (for example)
Wireshark is unreasonably difficult without the ability to get the TLS
key log. In theory, the application can be modified to use the
`'keylog'` event directly, but for complex apps, or apps that define
there own HTTPS Agent (like npm), this is unreasonably difficult.
Use of the option triggers a warning to be emitted so the user is
clearly notified of what is happening and its effect.
PR-URL: https://github.com/nodejs/node/pull/30055
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@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-11-20 08:00:02 -08:00
Sam Roberts
b0cf62b3a0
https: add client support for TLS keylog events
...
The keylog event is implemented on TLS sockets, but client HTTPS uses
TLS sockets managed by an agent, so accessing the underlying socket
before the TLS handshake completed was not possible. Note that server
HTTPS already supports the keylog event because it inherits from the TLS
server.
PR-URL: https://github.com/nodejs/node/pull/30053
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-11-19 22:23:23 -08:00
Robert Nagy
9d09969f4c
stream: always invoke end callback
...
Ensure that the callback passed into end() is always invoke in
order to avoid bug such as deadlock the user.
PR-URL: https://github.com/nodejs/node/pull/29747
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-11-19 16:06:35 +01:00
Lucas Holmquist
535e9571f5
fs: make FSStatWatcher.start private
...
An instance of FSStatWatcher is returned when a user calls fs.watchFile,
which will call the start method. A user can't create an instance
of a FSStatWatcher directly. If the start method is called by a user
it is a noop since the watcher has already started.
This "Class" is currently undocumented.
PR-URL: https://github.com/nodejs/node/pull/29971
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-11-19 16:05:21 +01:00
Joyee Cheung
efce655c0f
module: reduce circular dependency of internal/modules/cjs/loader
...
Previously `internal/bootstrap/pre_execution.js` requires
`internal/modules/cjs/loader.js` which in turn requires
`internal/bootstrap/pre_execution.js`. This patch moves the
entry point execution logic out of `pre_execution.js` and
puts it into `internal/modules/run_main.js`. It also tests
that `Module.runMain` can be monkey-patched before further
deprecation/refactoring can be done.
Also added an internal assertion `hasLoadedAnyUserCJSModule`
for documentation purposes.
PR-URL: https://github.com/nodejs/node/pull/30349
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-11-19 13:43:59 +01:00
Ruben Bridgewater
0f78dcc86d
util: escape C1 control characters and switch to hex format
...
C1 control characters will from now on also be escaped to prevent
altering the terminal behavior.
Fixes: https://github.com/nodejs/node/issues/29450
PR-URL: https://github.com/nodejs/node/pull/29826
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-11-19 13:34:40 +01:00
Jure Stepisnik
0bc0abb941
test: Change from var to const
...
PR-URL: https://github.com/nodejs/node/pull/30431
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-11-18 13:47:46 +05:30
JL Phillips
50902d00ad
test: changed var to let in test-repl-editor
...
PR-URL: https://github.com/nodejs/node/pull/30443
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-11-18 13:02:42 +05:30
Artem Maksimov
722f9588d7
test: improve test-fs-open
...
If there is a file 'path' in the root dir, the test
will fail with the 'ENOTDIR' instead of 'ENOENT'.
Change path to something more unlikely.
PR-URL: https://github.com/nodejs/node/pull/30280
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-11-17 21:13:08 +05:30
Kerry Mahne
dcbb2ecb49
test: changed var to const in test
...
Changed outdated var to const in the test file
repl-unexpected-token-recoverable.js
PR-URL: https://github.com/nodejs/node/pull/30434
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-11-17 19:43:12 +05:30