Граф коммитов

22482 Коммитов

Автор SHA1 Сообщение Дата
Anna Henningsen 9c560ca907
test: rename and document tls test
Add a short description and one question to a TLS test.
Also, rename it since the previous name might unintentionally
evoke connotations to an internet meme that would generally
not be considered appropriate in our context.

PR-URL: https://github.com/nodejs/node/pull/20820
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2018-05-23 17:05:38 -04:00
я котик пур-пур fe7e8d6a3e
http: fix capitalization of 418 status message
Update the message to be consistent with RFC 7168. Add a note to
"Multiple Choices" regarding RFC 7231 superseding RFC 7168.

PR-URL: https://github.com/nodejs/node/pull/20700
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>t

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2018-05-23 17:05:38 -04:00
Luigi Pinca 75e4415c40
http: do not rely on the 'agentRemove' event
Do not use the `'agentRemove'` event to null `socket._httpMessage` as
that event is public and can be used to not keep a request in the agent.

PR-URL: https://github.com/nodejs/node/pull/20786
Fixes: https://github.com/nodejs/node/issues/20690
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-05-23 17:05:38 -04:00
Anatoli Papirovski dd32a7a0d4
test: fix flaky http2-session-unref
It's possible for the connections to take too long and since the server
is already unrefed, the process will just exit. Instead adjust the test
so that server unref only happens after all sessions have been
successfuly established and unrefed. That still tests the same condition
but will not fail under load.

PR-URL: https://github.com/nodejs/node/pull/20772
Fixes: https://github.com/nodejs/node/issues/20705
Fixes: https://github.com/nodejs/node/issues/20750
Fixes: https://github.com/nodejs/node/issues/20850
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-05-23 17:05:38 -04:00
Anatoli Papirovski 2687d44739
http2: fix several serious bugs
Currently http2 does not properly submit GOAWAY frames when a session
is being destroyed. It also doesn't properly handle when the other
party severs the connection after sending a GOAWAY frame, even though
it should.

Edge, IE & Safari are currently unable to handle empty TRAILERS
frames despite them being correctly to spec. Instead send an empty
DATA frame with END_STREAM flag in those situations.

Fix and adjust several flaky and/or incorrect tests.

PR-URL: https://github.com/nodejs/node/pull/20772
Fixes: https://github.com/nodejs/node/issues/20705
Fixes: https://github.com/nodejs/node/issues/20750
Fixes: https://github.com/nodejs/node/issues/20850
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-05-23 17:05:38 -04:00
Rich Trott a8c74e89ae
test: use error code rather than message in test
Use err.code checking instead of err.message checking in
test-child-process-fork-closed-channel-segfault.

PR-URL: https://github.com/nodejs/node/pull/20859
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-05-23 17:05:38 -04:00
cjihrig f5f9cdc110
test: define SharedArrayBuffer as a known global
This commit defines SharedArrayBuffer as a global for all tests,
rather than adding comments to individual tests.

PR-URL: https://github.com/nodejs/node/pull/20849
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-05-23 17:05:38 -04:00
Ali Ijaz Sheikh c4f0e81dd0
src: trace_events: background thread events
V8 uses a thread pool provided by the host to schedule background tasks
for concurrent GC and compiation. Emit trace events to identify the
background threads. Ensure that the tracing infrastructure is started
before the thread pool is initialized.

PR-URL: https://github.com/nodejs/node/pull/20823
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-05-23 17:05:38 -04:00
Ruben Bridgewater 8f8a0e3483
assert: fix wrong message indentation
If code is read from a file and that code is indented, it would be
misaligned. This makes sure it has a natural indentation that is
relative to the starting point of the assertion.

PR-URL: https://github.com/nodejs/node/pull/20791
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-05-23 17:05:38 -04:00
Ruben Bridgewater c8c9211fa6
util: improve error inspection
When inspecting errors with extra properties while setting the
compact option to false, it will now return:

[Error: foo] {
    at repl:1:5
    at Script.runInThisContext (vm.js:89:20)
  bla: true
}

Instead of:

Error: foo
    at repl:1:5
    at Script.runInThisContext (vm.js:91:20) {
  bla: true
}

PR-URL: https://github.com/nodejs/node/pull/20802
Refs: https://github.com/nodejs/node/issues/20253
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-22 15:24:54 -04:00
Ruben Bridgewater f0d6a37c5c
util: fix inspected stack indentation
Error stacks and multiline error messages were not correct indented.
This is fixed by this patch.

PR-URL: https://github.com/nodejs/node/pull/20802
Refs: https://github.com/nodejs/node/issues/20253
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-22 15:24:54 -04:00
Ruben Bridgewater 38bc5fbd6b
util: remove erroneous whitespace
When inspecting nested objects some times a whitespace was added at
the end of a line. This fixes this erroneous space.

Besides that the `breakLength` was not followed if a single property
was longer than the breakLength. It will now break a single property
into the key and value in such cases.

PR-URL: https://github.com/nodejs/node/pull/20802
Refs: https://github.com/nodejs/node/issues/20253
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-22 15:24:53 -04:00
Ruben Bridgewater 5ce85a72cb
util: wrap error in brackets without stack
This aligns the visualization of an error with no stack traces set
to zero just as it is done in case the error has no stack trace.

PR-URL: https://github.com/nodejs/node/pull/20802
Refs: https://github.com/nodejs/node/issues/20253
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-22 15:24:09 -04:00
Vse Mozhet Byt 8a17a259f3
doc: fix some nits in hardcoded manpage links
After https://github.com/nodejs/node/pull/20785, we wrap autogenerated
manpage links in code elements. This PR unify some hardcoded manpage
links with autogenerated ones: it adds backticks, parentheses, section
numbers, and updates URLs.

Also, some typos are fixes in passing (missing periods, reference
sorting).

PR-URL: https://github.com/nodejs/node/pull/20854
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-22 14:28:05 -04:00
Daniel Bevenius 3110d15f2b
src: make pointers lean left in node_crypto.cc
PR-URL: https://github.com/nodejs/node/pull/20799
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-22 14:28:05 -04:00
Daniel Bevenius b6225349f4
src: use unqualified names in node_crypto.cc
This commit removes the usage of qualified names for consistency.

PR-URL: https://github.com/nodejs/node/pull/20799
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-22 14:28:05 -04:00
Keita Akutsu 8317a468db
doc: fix fs.promises sample codes
PR-URL: https://github.com/nodejs/node/pull/20838
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-22 14:28:05 -04:00
Keita Akutsu 37b9fe1e68
doc: fix typo in http2.md
PR-URL: https://github.com/nodejs/node/pull/20843
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-05-22 14:28:05 -04:00
Rich Trott 88aee8a65c
doc: improve _Deprecation_ definition
* Use definition from Wikipedia. Provide link.
* Use italics for "words-as-words".
* Simplify sentence. ("Deprecation is..." rather than "Deprecation
  refers to...".)

PR-URL: https://github.com/nodejs/node/pull/20788
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-05-22 14:28:05 -04:00
Ujjwal Sharma d614511b9f
net,http2: refactor _write and _writev
Refactor writable part (the _write and _writev functions) in net.Socket
and http2.Http2Stream classes.
Also involves adding a generic "WriteGeneric" method to the Http2Stream
class based on net.Socket._writeGeneric, but behind a symbol.

PR-URL: https://github.com/nodejs/node/pull/20643
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-22 14:24:32 -04:00
James M Snell 010ad8c26c
src: move *Exceptions out to separate cc/h
PR-URL: https://github.com/nodejs/node/pull/20789
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-05-22 14:24:32 -04:00
James M Snell 08b98d17f1
src: fix odd linting issue
The prior commit causes a linting issue here.
Fix by changing from a struct to a class.

PR-URL: https://github.com/nodejs/node/pull/20789
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-05-22 14:24:32 -04:00
James M Snell 36d4a42e35
src: move CallbackScope to separate cc/h
PR-URL: https://github.com/nodejs/node/pull/20789
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-05-22 14:24:32 -04:00
James M Snell 2e9957641e
perf_hooks: always set bootstrapComplete
PR-URL: https://github.com/nodejs/node/pull/20768
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-05-22 14:24:32 -04:00
Ruben Bridgewater 22f46e7766
test: remove common.globalCheck
This flag is partially used in tests where it was not necessary and
it is always possible to replace this flag with
`common.allowGlobals`. This makes sure all globals are truly tested
for.

PR-URL: https://github.com/nodejs/node/pull/20717
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-05-22 14:24:32 -04:00
Ruben Bridgewater ada41b02c5
repl: make console, module and require non-enumerable
This aligns these globals with the regular context.

PR-URL: https://github.com/nodejs/node/pull/20717
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-05-22 14:24:32 -04:00
Ruben Bridgewater 5ffce3ef06
test: remove untested knownGlobals
These values are all non-enumerable and will never be checked.
By removing them, we make sure they will not become enumerable
unnoticed.

PR-URL: https://github.com/nodejs/node/pull/20717
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-05-22 14:24:32 -04:00
Ruben Bridgewater e7c2616d10
test: mark tests as flaky as intermediate step
We have a few http2 issues that are currently resolved. Until they
are, just mark these two tests as flaky.

PR-URL: https://github.com/nodejs/node/pull/20835
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-05-22 14:24:32 -04:00
Gus Caplan b308a07301
util: support inspecting namespaces of unevaluated modules
PR-URL: https://github.com/nodejs/node/pull/20782
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-05-22 14:13:28 -04:00
Anna Henningsen fb7a775242
lib,src: use V8 API for collection inspection
Use a new public V8 API for inspecting weak collections and
collection iterators, rather than using V8-internal functions
to achieve this. This currently comes with a slight modification of
the output for inspecting iterators generated by `Set().entries()`.

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

PR-URL: https://github.com/nodejs/node/pull/20719
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-22 14:13:28 -04:00
Anna Henningsen e56716e396
deps: cherry-pick ff0a9793334 from upstream V8
Original commit message:

    [api] Expose PreviewEntries as public API

    Turn `debug::EntriesPreview` into a public API.
    This is a straightforward approach to addressing
    nodejs/node#20409
    (not relying on functionality behind `--allow-natives-syntax`)
    in Node.js.

Refs: ff0a979333

PR-URL: https://github.com/nodejs/node/pull/20719
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-22 14:13:28 -04:00
Ali Ijaz Sheikh 4b64c847f1
src: trace_events: support for metadata events
Add support for metadata events. At this point they are added to the
main buffer. Emit a metadata event for the main thread.

PR-URL: https://github.com/nodejs/node/pull/20757
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-05-22 14:13:28 -04:00
Anna Henningsen b664a848fa
test: improve assertion in test-performance
PR-URL: https://github.com/nodejs/node/pull/20809
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-05-22 14:13:28 -04:00
Bartosz Sosnowski 7b1c035218
doc: describe using multiple link-module on win
Current description seems to suggest that only one linked-module can be
provided. This modifies the example to show that multiple
inked-modules can be used.

PR-URL: https://github.com/nodejs/node/pull/20774
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-22 14:13:28 -04:00
Benjamin Coe 3b516177c8
build: use nyc's merge command
a 'merge' command has recently been added to nyc, eliminating the need
for the istanbul-merge library.

PR-URL: https://github.com/nodejs/node/pull/20760
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-22 14:13:28 -04:00
Ruben Bridgewater 338e663860
assert: fix EOL issue in messages on Windows
PR-URL: https://github.com/nodejs/node/pull/20754
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-22 14:13:28 -04:00
Myles Borins 8e058d5f94
deps: patch V8 to 6.6.346.32
PR-URL: https://github.com/nodejs/node/pull/20748
Refs: https://github.com/v8/v8/compare/6.6.346.31...6.6.346.32
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2018-05-22 14:13:28 -04:00
Vse Mozhet Byt 9a8cdc93ff
doc: fix typo in COLLABORATOR_GUIDE.md
PR-URL: https://github.com/nodejs/node/pull/20742
Refs: https://github.com/nodejs/node/pull/20740
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-05-22 14:13:28 -04:00
Rich Trott bd500af2ff
tools: update prohibited-strings md linting
Update to remark-lint-prohibited-strings 1.0.3 to avoid false positives
with GitHub team names which must be lowercased no matter what our
prohibited-strings rules say about a particular string.

PR-URL: https://github.com/nodejs/node/pull/20742
Refs: https://github.com/nodejs/node/pull/20740
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-05-22 14:13:28 -04:00
Ruben Bridgewater 045b37b32d
test: add eslint rule to verify assertion input
The input for `assert.deepStrictEqual` and similar expect the actual
input first and the expected input as second argument. This verifies
that this is actually done correct in our tests.

This is important so the possible error message actually makes sense.

PR-URL: https://github.com/nodejs/node/pull/20718
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-05-22 14:13:28 -04:00
ohbarye 3fd67249df
console: .table fall back to logging for function too
According to the console.table documentation, it reads that it "falls
back to just logging the argument if it can’t be parsed as tabular."

But it doesn't fall back when I give a function as its first argument.
It logs an empty table. This is fixes by this commit.

PR-URL: https://github.com/nodejs/node/pull/20681
Fixes: https://github.com/nodejs/node/issues/20679
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-22 14:13:28 -04:00
Dan Kang 3edb04d065
src: remove 2nd `undefined` argument in node_file.cc
In the document for fs, there are several functions that state "No
arguments other than a possible exception are given to the completion
callback." (ex> fs.access, fs.chmod, fs.close, ..)

But, the functions are invoking the callback with two parameters (err,
undefined)

It causes problems in using several API like
[async.waterfall](https://caolan.github.io/async/docs.html#waterfall).

PR-URL: https://github.com/nodejs/node/pull/20629
Fixes: https://github.com/nodejs/node/issues/20335
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-22 14:13:28 -04:00
monkingxue 83119db45e
repl: add friendly tips about how to exit repl
Imitate python repl, when the user enters 'exit' or 'quit',
no longer prompt 'Reference Error', but
prompts 'To exit, press ^D or type .exit'.
If the user defines variables named 'exit' or 'quit' ,
only the value of the variables are output

PR-URL: https://github.com/nodejs/node/pull/20617
Fixes: https://github.com/nodejs/node/issues/19021
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-22 14:13:28 -04:00
Ruben Bridgewater 1ae076b30e
test: add loaded modules test
This makes sure there is no regression by switching to loading
eagerly.

PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-22 14:13:28 -04:00
Ruben Bridgewater eac7aad55e
net: lazy load dns
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-22 14:13:28 -04:00
Ruben Bridgewater 328a2c7c28
stream: lazy load end-of-stream
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-22 14:13:28 -04:00
Ruben Bridgewater bc6dbc3bfc
console: lazy load cli
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-22 14:13:28 -04:00
Ruben Bridgewater 94d217f877
stream: lazy load ReadableAsyncIterator
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-22 14:13:28 -04:00
Ruben Bridgewater e0fd80c641
lib: do not call performance hooks
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-22 14:13:28 -04:00
Ruben Bridgewater 9feca3ea32
async_hooks: lazy loading for startup performance
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-22 14:13:28 -04:00