Commit Graph

6096 Commits

Author SHA1 Message Date
Antoine du Hamel
2481facd9f tools,doc: forbid CJS globals in ESM code snippets
PR-URL: https://github.com/nodejs/node/pull/38889
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Danielle Adams <adamzdanielle@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2021-06-03 16:18:40 +02:00
himself65
47548d0c81 doc: fix .mjs syntax in crypto.md
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/38882
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2021-06-03 16:18:05 +02:00
Danielle Adams
21f5a56914
2021-06-02, Version 16.3.0 (Current)
Notable changes:

* cli:
  * add -C alias for --conditions flag (Guy Bedford) (https://github.com/nodejs/node/pull/38755)
* deps:
  * add workspaces support to npm install commands (Ruy Adorno) (https://github.com/nodejs/node/pull/38750)

PR-URL: https://github.com/nodejs/node/pull/38874
2021-06-02 23:25:45 -04:00
Ouyang Yadong
d8797f5994 dns: allow --dns-result-order to change default dns verbatim
Allow the `--dns-result-order` option to change the default value
of verbatim in `dns.lookup()`. This is useful when running
Node.js in ipv6-only environments to avoid possible ENETUNREACH
errors.

PR-URL: https://github.com/nodejs/node/pull/38099
Refs: https://github.com/nodejs/node/issues/31566
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2021-06-02 19:28:05 +02:00
Luigi Pinca
152d675cc6 os: add os.devNull
Provides the platform-specific file path of the null device.

PR-URL: https://github.com/nodejs/node/pull/38569
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2021-06-01 21:06:18 +02:00
julianjany
fc269b37cf doc: fixed typo in n-api.md
PR-URL: https://github.com/nodejs/node/pull/38822
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2021-06-01 10:00:15 +02:00
Darshan Sen
bbab59d7ca doc,url: clarify domainTo* when built without ICU
Continuation of: https://github.com/nodejs/node/pull/35099

Signed-off-by: Darshan Sen <raisinten@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/38789
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-05-26 15:56:51 +02:00
yotamselementor
d28eedba3a doc: fix grammar in fs.md
PR-URL: https://github.com/nodejs/node/pull/38818
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
2021-05-26 15:49:28 +02:00
Nitzan Uziely
df85d37050
stream: add a non-destroying iterator to Readable
add a non-destroying iterator to Readable

fixes: https://github.com/nodejs/node/issues/38491

PR-URL: https://github.com/nodejs/node/pull/38526
Fixes: https://github.com/nodejs/node/issues/38491
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2021-05-25 07:22:29 -07:00
TodorTotev
5a67f1504f
doc: fixup code sample in http.md
PR-URL: https://github.com/nodejs/node/pull/38776
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-05-25 07:20:54 -07:00
Guy Bedford
3ad4fa01eb cli: add -C alias for --conditions flag
PR-URL: https://github.com/nodejs/node/pull/38755
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
2021-05-25 15:13:36 +02:00
Guy Bedford
01940ee285 doc: document null target pattern
PR-URL: https://github.com/nodejs/node/pull/38724
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-05-20 18:53:45 +02:00
fisker Cheung
42cceff1f7 doc: update code examples for node:url module
There are many things called `url` in this page including `url` module,
`URL` instances, etc.

The original example was not clear where these methods come from.

PR-URL: https://github.com/nodejs/node/pull/38645
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-05-19 19:18:06 +02:00
Michaël Zasso
44ffddae8b
2021-05-19, Version 16.2.0 (Current)
Notable changes:

async_hooks:
  * (SEMVER-MINOR) use new v8::Context PromiseHook API (Stephen Belanger) https://github.com/nodejs/node/pull/36394
lib:
  * support setting process.env.TZ on windows (James M Snell) https://github.com/nodejs/node/pull/38642
module:
  * (SEMVER-MINOR) add support for `URL` to `import.meta.resolve` (Antoine du Hamel) https://github.com/nodejs/node/pull/38587
process:
  * (SEMVER-MINOR) add `'worker'` event (James M Snell) https://github.com/nodejs/node/pull/38659
util:
  * (SEMVER-MINOR) add util.types.isKeyObject and util.types.isCryptoKey (Filip Skokan) https://github.com/nodejs/node/pull/38619

PR-URL: https://github.com/nodejs/node/pull/38719
2021-05-19 12:56:18 +02:00
Tobias Nießen
3b1a9936a8
doc: document buffer.kStringMaxLength
PR-URL: https://github.com/nodejs/node/pull/38688
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-05-17 12:33:10 -07:00
Moritz Kneilmann
ceae1b47b7
doc: update abort signal in fs promise api example
PR-URL: https://github.com/nodejs/node/pull/38669
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-05-17 12:24:27 -07:00
Hitesh Sharma
5b9074813f
doc: add documentation for fs.WriteStream.close()
PR-URL: https://github.com/nodejs/node/pull/38610
Fixes: https://github.com/nodejs/node/issues/38606
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2021-05-17 12:20:08 -07:00
James M Snell
61a67c1625
doc: clarify synchronous blocking of Worker stdio
Fixes: https://github.com/nodejs/node/issues/25630
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/38658
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-05-17 12:06:18 -07:00
James M Snell
16cb4f720b
lib: support setting process.env.TZ on windows
Fixes: https://github.com/nodejs/node/issues/4230
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/38642
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-05-17 12:02:49 -07:00
Filip Skokan
3ee1f9a29a util: add util.types.isKeyObject and util.types.isCryptoKey
closes #38611

PR-URL: https://github.com/nodejs/node/pull/38619
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2021-05-17 10:29:18 +02:00
Antoine du Hamel
df744dbb95
doc: add ESM code examples in url.md
PR-URL: https://github.com/nodejs/node/pull/38651
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
2021-05-14 15:57:46 -07:00
Timothy Gu
70157b9cb7
url: forbid certain confusable changes from being introduced by toASCII
The legacy url.parse() function attempts to convert Unicode domains
(IDNs) into their ASCII/Punycode form through the use of the toASCII
function. However, toASCII can introduce or remove various characters
that at best invalidate the parsed URL, and at worst cause hostname
spoofing:

  url.parse('http://bad.c℀.good.com/').href === 'http://bad.ca/c.good.com/'
  (from [1])
  url.parse('http://\u00AD/bad.com').href === 'http:///bad.com/'

While changes to the legacy URL parser are discouraged in general, the
security implications here outweigh the desire for strict compatibility.
This is since this commit only changes behavior when non-ASCII
characters appear in the hostname, an unusual situation for most use
cases. Additionally, despite the availability of the WHATWG URL API,
url.parse remain widely deployed in the Node.js ecosystem, as
exemplified by the recent un-deprecation of the legacy API.

This change is similar in spirit to CPython 3.8's change [2] fixing
bpo-36216 [3] aka CVE-2019-9636, which also occurred despite potential
compatibility concerns.

[1]: https://hackerone.com/reports/678487
[2]: 16e6f7dee7
[3]: https://bugs.python.org/issue36216

PR-URL: https://github.com/nodejs/node/pull/38631
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2021-05-13 23:04:23 -07:00
James M Snell
2c80048cb7
process: add 'worker' event
Provides a new `process.on('worker', (worker) => {})` event that
is triggered by the creation of a new `worker_thread.Worker`.
The use case is to allow hooks to be installed for monitoring
workers without having to modify the call sites around those.

Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/38659
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2021-05-13 18:12:52 -07:00
Danielle Adams
16e00a15de
2021-05-11, Version 14.17.0 'Fermium' (LTS)
Notable Changes:

Diagnostics channel (experimental module):

`diagnostics_channel` is a new experimental module that provides an API
to create named channels to report arbitrary message data for
diagnostics purposes.

The module was initially introduced in Node.js v15.1.0 and is
backported to v14.17.0 to enable testing it at a larger scale.

With `diagnostics_channel`, Node.js core and module authors can publish
contextual data about what they are doing at a given time. This could
be the hostname and query string of a mysql query, for example. Just
create a named channel with `dc.channel(name)` and call
`channel.publish(data)` to send the data to any listeners to that
channel.

```js
const dc = require('diagnostics_channel');
const channel = dc.channel('mysql.query');

MySQL.prototype.query = function query(queryString, values, callback) {
  // Broadcast query information whenever a query is made
  channel.publish({
    query: queryString,
    host: this.hostname,
  });

  this.doQuery(queryString, values, callback);
};
```

Channels are like one big global event emitter but are split into
separate objects to ensure they get the best performance. If nothing is
listening to the channel, the publishing overhead should be as close to
zero as possible. Consuming channel data is as easy as using
`channel.subscribe(listener)` to run a function whenever a message is
published to that channel.

```js
const dc = require('diagnostics_channel');
const channel = dc.channel('mysql.query');

channel.subscribe(({ query, host }) => {
  console.log(`mysql query to ${host}: ${query}`);
});
```

The data captured can be used to provide context for what an app is
doing at a given time. This can be used for things like augmenting
tracing data, tracking network and filesystem activity, logging
queries, and many other things. It's also a very useful data source
for diagnostics tools to provide a clearer picture of exactly what the
application is doing at a given point in the data they are presenting.

Contributed by Stephen Belanger (https://github.com/nodejs/node/pull/34895).

UUID support in the crypto module:

The new `crypto.randomUUID()` method now allows to generate random
[RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) Version 4
UUID strings:

```js
const { randomUUID } = require('crypto');

console.log(randomUUID());
// 'aa7c91a1-f8fc-4339-b9db-f93fc7233429'
```

Contributed by James M Snell (https://github.com/nodejs/node/pull/36729).

Experimental support for `AbortController` and `AbortSignal`:

Node.js 14.17.0 adds experimental partial support for `AbortController`
and `AbortSignal`.

Both constructors can be enabled globally using the
`--experimental-abortcontroller` flag.

Additionally, several Node.js APIs have been updated to support
`AbortSignal` for cancellation.
It is not mandatory to use the built-in constructors with them. Any
spec-compliant third-party alternatives should be compatible.

`AbortSignal` support was added to the following methods:

* `child_process.exec`
* `child_process.execFile`
* `child_process.fork`
* `child_process.spawn`
* `dgram.createSocket`
* `events.on`
* `events.once`
* `fs.readFile`
* `fs.watch`
* `fs.writeFile`
* `http.request`
* `https.request`
* `http2Session.request`
* The promisified variants of `setImmediate` and `setTimeout`

Other notable changes:

* doc:
  * revoke deprecation of legacy url, change status to legacy (James M Snell) (https://github.com/nodejs/node/pull/37784)
  * add legacy status to stability index (James M Snell) (https://github.com/nodejs/node/pull/37784)
  * upgrade stability status of report API (Gireesh Punathil) (https://github.com/nodejs/node/pull/35654)
* deps:
  * V8: Backport various patches for Apple Silicon support (BoHong Li) (https://github.com/nodejs/node/pull/38051)
  * update ICU to 68.1 (Michaël Zasso) (https://github.com/nodejs/node/pull/36187)
  * upgrade to libuv 1.41.0 (Colin Ihrig) (https://github.com/nodejs/node/pull/37360)
* http:
  * add http.ClientRequest.getRawHeaderNames() (simov) (https://github.com/nodejs/node/pull/37660)
  * report request start and end with diagnostics\_channel (Stephen Belanger) (https://github.com/nodejs/node/pull/34895)
* util:
  * add getSystemErrorMap() impl (eladkeyshawn) (https://github.com/nodejs/node/pull/38101)

PR-URL: https://github.com/nodejs/node/pull/38507
2021-05-11 19:05:18 -04:00
Antoine du Hamel
4ebb88fea5
module: add support for URL to import.meta.resolve
PR-URL: https://github.com/nodejs/node/pull/38587
Refs: https://github.com/nodejs/node/pull/38585
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-05-10 15:09:05 -07:00
Luigi Pinca
63155c95ba doc: fix fs.openSync() signature
The `mode` argument depends on the `flags` argument but it is optional
even if the `flags` argument is specified.

PR-URL: https://github.com/nodejs/node/pull/38591
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2021-05-10 16:07:51 +02:00
Bryan Field
fdcf45a609
doc: typo stats() should be stat(); clarity
PR-URL: https://github.com/nodejs/node/pull/38541
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2021-05-07 09:29:59 -07:00
Juan José Arboleda
75073aba9d
src: make workers messaging more resilient
PR-URL: https://github.com/nodejs/node/pull/38510
Fixes: https://github.com/nodejs/node/issues/38499
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-05-06 10:31:56 -07:00
Juan José Arboleda
b373a2c4ba
Revert "worker: remove ERR_CLOSED_MESSAGE_PORT"
This reverts commit 73370b4584.

The unit test is preserved to make sure it does not break
https://github.com/nodejs/node/issues/26463 again.

PR-URL: https://github.com/nodejs/node/pull/38510
Fixes: https://github.com/nodejs/node/issues/38499
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-05-06 10:31:54 -07:00
Jordan Baczuk
aed17e963a doc: fix code example in ecdh.setPublicKey()
Fixes: https://github.com/nodejs/node/issues/38540
PR-URL: https://github.com/nodejs/node/pull/38542
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-05-05 21:19:27 -07:00
Nitzan Uziely
9643128270
doc: clarify DiffieHellmanGroup class docs
Make it clearer in the docs that DiffieHellmanGroup does
not support changing the keys after creation.

PR-URL: https://github.com/nodejs/node/pull/38363
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Adrian Estrada <edsadr@gmail.com>
2021-05-04 14:56:32 -07:00
Rich Trott
e8eb6ac31c
doc: fix broken AHAFS link in fs doc
The content we're linking to for AHAFS was published in 2011 but has now
been archived. This updates the link to the archived version (as the
current version results in a "Yikes!" page with an HTTP 400 response
code).

Unfortunately, the archived version does say "This content is no
longer being updated or maintained. The content is provided “as is.”
Given the rapid evolution of technology, some content, steps, or
illustrations may have changed." So we'll want to update at some point I
imagine. But for the moment, archived content with a notice like that is
better than a broken link.

PR-URL: https://github.com/nodejs/node/pull/38534
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Ash Cripps <acripps@redhat.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-05-04 13:27:53 -07:00
Rich Trott
431d375054
doc: use AIX instead of Aix in fs.md
Both for consistency within the doc and to conform with IBM's usage
regarding their on product, refer to the operating system as AIX rather
than Aix.

PR-URL: https://github.com/nodejs/node/pull/38535
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
2021-05-04 13:27:01 -07:00
Michaël Zasso
671c289957
2021-05-04, Version 16.1.0 (Current)
Notable changes:

fs:
  * (SEMVER-MINOR) allow no-params fsPromises fileHandle read (Nitzan Uziely) https://github.com/nodejs/node/pull/38287

PR-URL: https://github.com/nodejs/node/pull/38522
2021-05-04 17:09:39 +02:00
Michaël Zasso
e2708ee491
Revert "doc: os.uptime() temporary bug notice"
This reverts commit b9ffb82f9b.

The bug was fixed in libuv 1.41.0.

Refs: https://github.com/libuv/libuv/pull/3072

PR-URL: https://github.com/nodejs/node/pull/38494
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-05-03 13:36:01 +02:00
James M Snell
99099f9147
doc: document 'secureConnect' event limitation
Fixes: https://github.com/nodejs/node/issues/10555
Signed-off-by: James M Snell <jasnell@gmail.com>
Refs: https://github.com/nodejs/node/pull/10846

PR-URL: https://github.com/nodejs/node/pull/38447
Reviewed-By: Alba Mendez <me@alba.sh>
Reviewed-By: Adrian Estrada <edsadr@gmail.com>
2021-05-02 09:24:55 +02:00
Yash Ladha
93f0b4d35b
perf_hooks: add toJSON to performance class
Added toJSON method to the InternalPerformance class as per the
convention followed in other performance classes and per the spec:
https://www.w3.org/TR/hr-time/#tojson-method

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

PR-URL: https://github.com/nodejs/node/pull/37771
Fixes: https://github.com/nodejs/node/issues/37623
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-04-30 13:28:27 -07:00
Ruben Bridgewater
5bfb6f0564
doc: fix outdated util inspect documentation and layout example
The documentation and layout example was not up to date with the
latest changes.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/37079
Fixes: https://github.com/nodejs/node/issues/37054
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2021-04-30 12:46:50 -07:00
Antoine du Hamel
40ea8aa364
punycode: add pending deprecation
PR-URL: https://github.com/nodejs/node/pull/38444
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2021-04-30 10:59:28 -07:00
Guy Bedford
50991df0f7 deps: update to cjs-module-lexer@1.2.1
PR-URL: https://github.com/nodejs/node/pull/38450
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-04-30 14:43:48 +02:00
James M Snell
32ade6997b doc: mark querystring api as legacy
Signed-off-by: James M Snell <jasnell@gmail.com>
Fixes: https://github.com/nodejs/node/issues/38231

PR-URL: https://github.com/nodejs/node/pull/38436
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2021-04-29 13:03:59 +02:00
Michael Dawson
c791019b36 doc: update node-api support matrix
Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: https://github.com/nodejs/node/pull/38424
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-04-28 18:18:43 -04:00
Qingyu Deng
50307ed4cd
doc: add arguments for stream event of Http2Server and Http2SecureServer
PR-URL: https://github.com/nodejs/node/pull/37892
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-04-28 13:37:55 -07:00
Matteo Collina
1adcae96b5
doc: add try/catch in http2 respondWithFile example
PR-URL: https://github.com/nodejs/node/pull/38410
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-04-28 13:16:58 -07:00
James M Snell
346f0e99cd
repl: document top level await limitation with const/let
Fixes: https://github.com/nodejs/node/issues/17669
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/38449
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2021-04-28 10:13:03 -07:00
James M Snell
5a0ed51a93
doc: minor clarification to pathObject
Signed-off-by: James M Snell <jasnell@gmail.com>
Fixes: https://github.com/nodejs/node/issues/36582

PR-URL: https://github.com/nodejs/node/pull/38437
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2021-04-27 14:56:09 -07:00
James M Snell
87aca074f9
doc: clarify that fs.Dir async iterator closes automatically
Signed-off-by: James M Snell <jasnell@gmail.com>
Fixes: https://github.com/nodejs/node/issues/35148

PR-URL: https://github.com/nodejs/node/pull/38438
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2021-04-27 14:55:26 -07:00
Arnold Zokas
b607373e61
doc: document new TCP_KEEPCNT and TCP_KEEPINTVL socket option defaults
PR https://github.com/nodejs/node/pull/32204 introduced new defaults for
the TCP keep-alive socket options (see deps/uv/src/unix/tcp.c):
- "TCP_KEEPCNT" now defaults to 10 on all platforms
- "TCP_KEEPINTVL" now defaults to 1 on all platforms

Previously, "TCP_KEEPCNT" and "TCP_KEEPINTVL" were not set explicitly
and OS-default values were used.

Fixes: https://github.com/nodejs/node/issues/38298
Refs: https://github.com/nodejs/node/pull/32204

PR-URL: https://github.com/nodejs/node/pull/38313
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-04-27 13:16:16 -07:00
Luigi Pinca
d432386f83 doc: do not mention TCP in the allowHalfOpen option description
The `allowHalfOpen` option works in the same way for both TCP and IPC
connections.

PR-URL: https://github.com/nodejs/node/pull/38360
Fixes: https://github.com/nodejs/node/issues/38307
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-04-27 19:21:00 +02:00
Rich Trott
50bbc4e403 doc: update message to match actual output
PR-URL: https://github.com/nodejs/node/pull/35271
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2021-04-27 09:04:33 -07:00