Susana Ferreira
3000c2528c
util: replace var with let
...
PR-URL: https://github.com/nodejs/node/pull/30439
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-17 18:13:21 +05:30
Kenza Houmani
81a8097cf7
lib: replace var with let/const
...
PR-URL: https://github.com/nodejs/node/pull/30440
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-17 18:10:13 +05:30
Guy Bedford
250a995656
esm: disable non-js exts outside package scopes
...
PR-URL: https://github.com/nodejs/node/pull/30501
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2019-11-16 23:26:49 -08:00
xefimx
87cef76000
url: replace var with let in lib/url.js
...
PR-URL: https://github.com/nodejs/node/pull/30281
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-11-16 17:07:54 -08:00
mkdorff
f61882bce4
lib: change var to let in string_decoder
...
PR-URL: https://github.com/nodejs/node/pull/30393
Reviewed-By: James M Snell <jasnell@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-16 07:42:40 +05:30
Tobias Nießen
78dbe74520
crypto: fix key requirements in asymmetric cipher
...
PR-URL: https://github.com/nodejs/node/pull/30249
Fixes: https://github.com/nodejs/node/issues/30237
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-11-13 19:42:00 -04:00
Robert Nagy
f3ea4e9598
http: outgoing cork
...
PR-URL: https://github.com/nodejs/node/pull/29053
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-11-13 17:04:22 +00:00
Anna Henningsen
dc7b5fca3a
stream: add writableCorked to Duplex
...
PR-URL: https://github.com/nodejs/node/pull/29053
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-11-13 17:04:22 +00:00
Guy Bedford
796f3d0af4
esm: unflag --experimental-modules
...
PR-URL: https://github.com/nodejs/node/pull/29866
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2019-11-12 14:04:55 -08:00
Daniil Pletnev
cc6f99de44
tls: replace var with let
...
PR-URL: https://github.com/nodejs/node/pull/30308
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-11-12 09:56:34 +00:00
Vadim Gorbachev
f372867a40
lib: replaced var to let in lib/v8.js
...
PR-URL: https://github.com/nodejs/node/pull/30305
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
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 >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-11-12 09:53:15 +00:00
telenord
cd696959d9
http: http_common rename var to let and const
...
PR-URL: https://github.com/nodejs/node/pull/30288
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-11-12 09:50:13 +00:00
alexahdp
73780e33e3
net: replaced vars to lets and consts
...
PR-URL: https://github.com/nodejs/node/pull/30287
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@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-12 09:45:09 +00:00
telenord
c396f87efc
http: http_incoming rename var to let and const
...
PR-URL: https://github.com/nodejs/node/pull/30285
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
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-12 09:40:35 +00:00
Robert Nagy
f8c069f5b8
stream: increase MAX_HWM
...
MAX_HWM was added in 9208c89 where the highwatermark was changed to
always increase in steps of highest power of 2 to prevent increasing
hwm excessivly in tiny amounts.
Why a limit was added on the highwatermark is unclear but breaks
existing usage where a larger read size is used. The invariant for
read(n) is that a buffer of size n is always returned. Considering
a maximum ceiling on the buffer size breaks this invariant.
This PR significantly increases the limit to make it less likely to
break the previous invariant and also documents the limit.
Fixes: https://github.com/nodejs/node/issues/29933
PR-URL: https://github.com/nodejs/node/pull/29938
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2019-11-11 19:50:40 -08:00
peze
896b75a4da
path: replace var with let in lib/path.js
...
PR-URL: https://github.com/nodejs/node/pull/30260
Refs: https://github.com/nodejs/code-and-learn/issues/97
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
2019-11-09 08:44:29 -08:00
Dmitriy Kikinskiy
bbfa2e9cb1
dns: switch var to const/let
...
Simple exchange var to const/let.
PR-URL: https://github.com/nodejs/node/pull/30302
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2019-11-09 05:49:26 -08:00
Ilia Safronov
7f50839f7d
lib: change var to let in lib/_stream_duplex.js
...
PR-URL: https://github.com/nodejs/node/pull/30297
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
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 >
2019-11-09 05:47:58 -08:00
Vladislav Botvin
615ec972de
buffer: change var to let
...
PR-URL: https://github.com/nodejs/node/pull/30292
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2019-11-09 13:19:51 +01:00
Michaël Zasso
8bb83f4d3d
esm: exit the process with an error if loader has an issue
...
Previously, this would trigger an unhandled rejection that the user
cannot handle.
Fixes: https://github.com/nodejs/node/issues/30205
PR-URL: https://github.com/nodejs/node/pull/30219
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-11-09 09:30:36 +01:00
peze
0356746f50
cluster: destruct primordials in lib/internal/cluster/worker.js
...
Refs: nodejs/code-and-learn#97
PR-URL: https://github.com/nodejs/node/pull/30246
Refs: https://github.com/nodejs/code-and-learn/issues/97
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-11-09 14:43:13 +08:00
PerfectPan
cb34358dd9
assert: replace var with let in lib/assert.js
...
Refs: https://github.com/nodejs/code-and-learn/issues/97
PR-URL: https://github.com/nodejs/node/pull/30261
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-11-09 14:11:31 +08:00
Nadya
dde8fd3fab
fs: change var to let
...
PR-URL: https://github.com/nodejs/node/pull/30318
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2019-11-08 15:31:05 -08:00
galina.prokofeva
9a4b16f620
https: change var to let in lib/https.js
...
Changed a variable declaration.
PR-URL: https://github.com/nodejs/node/pull/30320
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2019-11-08 15:27:20 -08:00
Guy Bedford
2367474db4
module: conditional exports with flagged conditions
...
PR-URL: https://github.com/nodejs/node/pull/29978
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2019-11-08 17:26:26 -05:00
palmires
da6dfd82a7
http: replace vars with lets and consts in lib/_http_agent.js
...
PR-URL: https://github.com/nodejs/node/pull/30301
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 >
2019-11-08 14:00:10 -08:00
Nolik
722fc72fc2
tls: replace var with let and const
...
PR-URL: https://github.com/nodejs/node/pull/30299
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-11-08 13:58:57 -08:00
Anna Henningsen
115792dfde
dgram: remove listeners on bind error
...
This avoids piling up `'listening'` event listeners if
`.bind()` fails repeatedly.
Fixes: https://github.com/nodejs/node/issues/30209
PR-URL: https://github.com/nodejs/node/pull/30210
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-11-07 00:55:00 +01:00
Anna Henningsen
99e874e545
dgram: reset bind state before emitting error
...
This was previously done inconsistently, sometimes before, sometimes
after emitting the event.
PR-URL: https://github.com/nodejs/node/pull/30210
Fixes: https://github.com/nodejs/node/issues/30209
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-11-07 00:54:59 +01:00
Anna Henningsen
d26a74dca0
http,async_hooks: keep resource object alive from socket
...
If `asyncReset()` is used to specify an alternative resource object
to mark a re-used socket in the HTTP Agent implementation,
store that object and keep it alive, because domains rely on GC tracking
for resource objects to manage their own lifetimes, and previously that
resource object might have been garbage-collected too early, leading to
crashes.
Fixes: https://github.com/nodejs/node/issues/30122
PR-URL: https://github.com/nodejs/node/pull/30196
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2019-11-06 12:23:54 +01:00
Robert Nagy
de119131bc
stream: add writableCorked property
...
PR-URL: https://github.com/nodejs/node/pull/29012
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2019-11-05 23:26:26 +01:00
Lucas Holmquist
f04810531a
fs: add noop stub for FSWatcher.prototype.start
...
* Motivation: In a previous PR, #29905 , I made this method a private
method since it had no value to the user.
There was discussion that maybe it should have been a runtime
deprecation first, but was ultimatley decided that for this
type of method, a noop stub was a better option.
This Adds back in the method, but as a noop stub, while also keeping
the real implementation private
PR-URL: https://github.com/nodejs/node/pull/30160
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-11-05 23:16:44 +01:00
Anna Henningsen
973f324463
child_process,cluster: allow using V8 serialization API
...
Add an `serialization` option that allows child process IPC to
use the (typically more powerful) V8 serialization API.
Fixes: https://github.com/nodejs/node/issues/10965
PR-URL: https://github.com/nodejs/node/pull/30162
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-11-05 23:07:04 +01:00
Anna Henningsen
f17e414dc4
process: make source map getter resistant against prototype tampering
...
Since this code runs during process and Worker shutdown, it should not
call user-provided code and thereby e.g. provide a way to break out of
`worker.terminate()`.
PR-URL: https://github.com/nodejs/node/pull/30228
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Ben Coe <bencoe@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-11-05 20:55:54 +01:00
Anna Henningsen
237be2ed9e
encoding: make TextDecoder handle BOM correctly
...
Do not accept the BOM if it comes from a different encoding, and
only discard the BOM after it has actually been read (including
when it is spread over multiple chunks in streaming mode).
Fixes: https://github.com/nodejs/node/issues/25315
PR-URL: https://github.com/nodejs/node/pull/30132
Reviewed-By: Gus Caplan <me@gus.host >
2019-11-05 20:19:09 +01:00
Anna Henningsen
afd29c9502
v8: inspect unserializable objects
...
This would otherwise sometimes just print relatively useless
information about the value in question, such as `[object Object]`.
PR-URL: https://github.com/nodejs/node/pull/30167
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: David Carlier <devnexen@gmail.com >
2019-11-05 20:01:39 +01:00
Anna Henningsen
d855904ef6
worker: allow specifying resource limits
...
Allow specifying resource limits for the JS engine instance created
as part of a Worker.
PR-URL: https://github.com/nodejs/node/pull/26628
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
2019-11-05 19:57:13 +01:00
Jizu Sun
22799be7a9
buffer: improve performance caused by primordials
...
This is my first PR, and it's based on the code-and-learn guidances
This restore some performance after introducing primordialias.
Refs: https://github.com/nodejs/node/issues/29766
Refs: https://github.com/nodejs/code-and-learn/issues/97
Refs: https://github.com/nodejs/node/pull/29633
PR-URL: https://github.com/nodejs/node/pull/30235
Refs: https://github.com/nodejs/node/issues/29766
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-11-04 21:25:40 +08:00
Anna Henningsen
d7452b7140
module: warn on using unfinished circular dependency
...
Warn when a non-existent property of an unfinished module.exports
object is being accessed, as that very often indicates the presence
of a hard-to-detect and hard-to-debug problem.
This mechanism is only used if `module.exports` is still a
regular object at the point at which the second, circular `require()`
happens.
The downside is that, temporarily, `module.exports` will have a
prototype other than `Object.prototype`, and that there may
be valid uses of accessing non-existent properties of unfinished
`module.exports` objects.
Performance of circular require calls in general is not
noticeably impacted.
confidence improvement accuracy (*) (**) (***)
module/module-loader-circular.js n=10000 3.96 % ±5.12% ±6.82% ±8.89%
Example:
$ cat a.js
'use strict';
const b = require('./b.js');
exports.fn = () => {};
$ cat b.js
'use strict';
const a = require('./a.js');
a.fn();
$ node a.js
(node:1617) Warning: Accessing non-existent property 'fn' of module exports inside circular dependency
/tmp/b.js:4
a.fn();
^
TypeError: a.fn is not a function
at Object.<anonymous> (/tmp/b.js:4:3)
[...]
PR-URL: https://github.com/nodejs/node/pull/29935
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-11-01 19:58:41 +01:00
cjihrig
11276af5dd
http: support readable hwm in IncomingMessage
...
This commit causes http.IncomingMessage instances to set their
readableHighWaterMark value the same value used in the underlying
socket.
PR-URL: https://github.com/nodejs/node/pull/30135
Fixes: https://github.com/nodejs/node/issues/30107
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-10-30 10:32:46 -04:00
Matteo Collina
009952935f
stream: extract Readable.from in its own file
...
See: https://github.com/nodejs/readable-stream/pull/420
PR-URL: https://github.com/nodejs/node/pull/30140
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
2019-10-29 09:36:24 +01:00
Anna Henningsen
b35181f877
fs: add bufferSize option to fs.opendir()
...
Add an option that controls the size of the internal
buffer.
Fixes: https://github.com/nodejs/node/issues/29941
PR-URL: https://github.com/nodejs/node/pull/30114
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-10-28 14:34:25 +01:00
Rich Trott
72346bd8d4
doc: remove "it is important to" phrasing
...
Instead of telling someone "It is important to do X", just tell them to
"Do X."
PR-URL: https://github.com/nodejs/node/pull/30108
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@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-10-26 16:33:24 -07:00
Anna Henningsen
6858c7e3e7
async_hooks: only emit after for AsyncResource if stack not empty
...
We clear the async id stack inside the uncaught exception handler and
emit `after` events in the process, so we should not emit `after`
a second time from the `runInAsyncScope()` code.
This should match the behaviour we have in C++.
Fixes: https://github.com/nodejs/node/issues/30080
PR-URL: https://github.com/nodejs/node/pull/30087
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
2019-10-26 15:19:23 +02:00
Jan Krems
71bcd05232
module: resolve self-references
...
Adds the ability to `import` or `require` a package from within its
own source code. This allows tests and examples to be written using
the package name, making them easier to reuse by consumers of the
package.
Assuming the `name` field in `package.json` is set to `my-pkg`, its
test could use `require('my-pkg')` or `import 'my-pkg'` even if
there's no `node_modules/my-pkg` while testing the package itself.
An important difference between this and relative specifiers like
`require('../')` is that self-references use the public interface
of the package as defined in the `exports` field while relative
specifiers don't.
This behavior is guarded by a new experimental flag
(`--experimental-resolve-self`).
PR-URL: https://github.com/nodejs/node/pull/29327
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-10-24 15:14:38 -07:00
Luigi Pinca
1070153cf6
stream: simplify uint8ArrayToBuffer helper
...
The fallback code is no longer used when exporting to readable-stream.
Refs: https://github.com/nodejs/node/pull/29514
PR-URL: https://github.com/nodejs/node/pull/30041
Fixes: https://github.com/nodejs/node/issues/30040
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2019-10-22 13:37:59 -05:00
Luigi Pinca
94230d15bd
stream: remove dead code
...
`String.prototype.split()` returns an array of strings so the branch is
never taken.
Fixes: https://github.com/nodejs/node/issues/30040
PR-URL: https://github.com/nodejs/node/pull/30041
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2019-10-22 13:37:56 -05:00
Myles Borins
1e5ed9a5db
esm: modify resolution order for specifier flag
...
Currently `--es-module-specifier-resolution=node` has an alternative
resolution order than the default in common.js, this causes
inconsistencies. As discussed in @nodejs/modules we want to preserve
resolution order between implementations.
PR-URL: https://github.com/nodejs/node/pull/29974
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-10-16 22:01:19 -04:00
Bradley Farias
a6b030d5ac
module: refactor modules bootstrap
...
PR-URL: https://github.com/nodejs/node/pull/29937
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2019-10-16 21:50:05 -04:00
1784b7fafa
dgram: add source-specific multicast support
...
This adds RFC 4607 support for IPv4 and IPv6.
Co-Authored-By: Nicolas Thumann <46975855+n-thumann@users.noreply.github.com >
Co-Authored-By: Rich Trott <rtrott@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/15735
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-10-17 03:12:53 +02:00