Commit Graph
33270 Commits
Author SHA1 Message Date
Robert Nagy c31e2f6b0f stream: fix legacy pipe error handling
Fixes: https://github.com/nodejs/node/issues/35237

PR-URL: https://github.com/nodejs/node/pull/35257
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-06-11 09:28:45 +02:00
Mary Marchini 219ed0ba4c test: add Actions annotation output
It's possible to annotate failures in Actions by printing
"::error file={},line={},col={}::{message}". This methos is preferrable
over using a problem matcher because problem matchers only allow
single-line messages, whereas ::error allows multi-line messages.

PR-URL: https://github.com/nodejs/node/pull/34590
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2021-06-11 09:28:45 +02:00
Anna Henningsen 9fa8d2037f tools: add linting rule for async IIFEs
The result of an async IIFE should always be handled in our tests,
typically by adding `.then(common.mustCall())` to verify that the
async function actually finishes executing at some point.

PR-URL: https://github.com/nodejs/node/pull/34363
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-06-11 09:28:44 +02:00
Anna Henningsen 89ee6abae0 test: use .then(common.mustCall()) for all async IIFEs
This makes sure that all async functions finish as expected.

PR-URL: https://github.com/nodejs/node/pull/34363
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-06-11 09:28:44 +02:00
Luigi Pinca 55fc206d13 tools: update ESLint to 7.13.0
Update ESLint to 7.13.0

PR-URL: https://github.com/nodejs/node/pull/36031
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2021-06-11 09:28:44 +02:00
cjihrig 937fc0a30c tools: update ESLint to 7.12.1
Update ESLint to 7.12.1

PR-URL: https://github.com/nodejs/node/pull/35799
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2021-06-11 09:28:44 +02:00
cjihrig 29d0840a90 tools: update ESLint to 7.12.0
Update ESLint to 7.12.0

PR-URL: https://github.com/nodejs/node/pull/35799
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2021-06-11 09:28:44 +02:00
cjihrig dcbd44758c tools: update ESLint to 7.11.0
Update ESLint to 7.11.0

PR-URL: https://github.com/nodejs/node/pull/35578
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2021-06-11 09:28:44 +02:00
Antoine du Hamel 9e7f166161 module: refactor to use more primordials
PR-URL: https://github.com/nodejs/node/pull/36024
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2021-06-11 09:28:43 +02:00
ExE BossandAntoine du Hamel 24d4d63308 lib: add %TypedArray% abstract constructor to primordials
Refs: https://github.com/nodejs/node/pull/35448
Refs: https://github.com/nodejs/node/pull/36003
Refs: https://tc39.es/ecma262/#sec-%typedarray%-intrinsic-object

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/36016
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
2021-06-11 09:28:43 +02:00
James M SnellandBenjamin Gruenbaum d84b05a619 timers: cleanup abort listener on awaitable timers
Co-authored-by: Benjamin Gruenbaum <benjamingr@gmail.com>
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/36006
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2021-06-11 09:28:38 +02:00
Antoine du Hamel e19478aa76 tools,lib: recommend using safe primordials
Make the linter recommend replacing `globalThis.Map` by
`primordials.SafeMap`, and similar for `Set`, `WeakSet`, and `WeakMap`.

PR-URL: https://github.com/nodejs/node/pull/36026
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
2021-06-11 09:28:02 +02:00
Antoine du Hamel 5f848a612d tools,lib: tighten prefer-primordials rules for Error statics
PR-URL: https://github.com/nodejs/node/pull/36017
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-06-11 09:28:02 +02:00
Leko c7751b4e69 tools: add new ESLint rule: prefer-primordials
I added a new custom ESLint rule to fix these problems.

We have a lot of replaceable codes with primordials.
Accessing built-in objects is restricted by existing rule
(no-restricted-globals), but accessing property in the built-in objects
is not restricted right now. We manually review codes that can be
replaced by primordials, but there's a lot of code that actually needs
to be fixed. We have often made pull requests to replace the primordials
with.

Restrict accessing global built-in objects such as `Promise`.
Restrict calling static methods such as `Array.from` or `Symbol.for`.
Don't restrict prototype methods to prevent false-positive.

PR-URL: https://github.com/nodejs/node/pull/35448
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Ben Coe <bencoe@gmail.com>
2021-06-11 09:27:52 +02:00
Michaël Zasso e2395b0f3b lib: use Object static properties from primordials
PR-URL: https://github.com/nodejs/node/pull/35380
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2021-05-16 15:10:11 +02:00
bcoe eee1d291cf module: refactor to use iterable-weak-map
Using an iterable WeakMap (a data-structure that uses WeakRef and
WeakMap), we are able to: stop relying on Module._cache to
serialize source maps; stop requiring an error object when calling
findSourceMap().

PR-URL: https://github.com/nodejs/node/pull/35915
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-05-16 13:56:12 +02:00
Antoine du Hamel 7d7e34c15a errors: refactor to use more primordials
PR-URL: https://github.com/nodejs/node/pull/35944
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-05-16 13:55:42 +02:00
Milad Fa d67827744b deps: V8: cherry-pick 530080c44af2
Original commit message:
    ```
    PPC: Add Power10 to the supported list and enable related features

    This CL adds Power10 recognition to Linux, AIX as well as IBMi.

    Enabled features include:
    MODULO
    FPR_GPR_MOV
    SIMD
    LWSYNC
    ISELECT
    VSX

    Change-Id: Ifc337e6497a3efe9697bcf03063a2b94471f96e9
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2855041
    Reviewed-by: Clemens Backes <clemensb@chromium.org>
    Reviewed-by: Junliang Yan <junyan@redhat.com>
    Reviewed-by: Vasili Skurydzin <vasili.skurydzin@ibm.com>
    Commit-Queue: Milad Fa <mfarazma@redhat.com>
    Cr-Commit-Position: refs/heads/master@{#74279}
    ```

Refs: https://github.com/v8/v8/commit/530080c44af254646a3cc3f364aac26b1b5ac10c

PR-URL: https://github.com/nodejs/node/pull/38508
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Ash Cripps <acripps@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2021-05-14 15:16:21 -04:00
Danielle Adams 3ce447f6a8 Working on v14.17.1
PR-URL: https://github.com/nodejs/node/pull/38507
2021-05-11 18:10:17 -04:00
Danielle Adams aa15690b64 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
v14.17.0
2021-05-11 08:06:24 -04:00
Michaël Zasso f755fc4ef2 deps: V8: cherry-pick 00245033cf75
Original commit message:

    M86-LTS: [compiler] Fix off-by-one error in kAdditiveSafeInteger

    (cherry picked from commit 798fbcb0a3e5a292fb775c37c19d9fe73bbac17c)

    No-Try: true
    No-Presubmit: true
    No-Tree-Checks: true
    Bug: chromium:1198705
    Change-Id: I6b3ad82754e1ca72701ce57f16c4f085f8c87f77
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2835705
    Auto-Submit: Georg Neis <neis@chromium.org>
    Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
    Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
    Cr-Original-Commit-Position: refs/heads/master@{#74033}
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2850708
    Commit-Queue: Artem Sumaneev <asumaneev@google.com>
    Reviewed-by: Victor-Gabriel Savu <vsavu@google.com>
    Cr-Commit-Position: refs/branch-heads/8.6@{#87}
    Cr-Branched-From: a64aed2333abf49e494d2a5ce24bbd14fff19f60-refs/heads/8.6.395@{#1}
    Cr-Branched-From: a626bc036236c9bf92ac7b87dc40c9e538b087e3-refs/heads/master@{#69472}

Refs: https://github.com/v8/v8/commit/00245033cf756f86cef7e830661810777aaf3476

PR-URL: https://github.com/nodejs/node/pull/38481
Reviewed-By: Richard Lau <rlau@redhat.com>
2021-05-08 12:44:48 -04:00
Michaël Zasso 5ede8adc44 deps: V8: cherry-pick ab2340a9b994
Original commit message:

    M86-LTS: [compiler] Fix a bug in VisitSpeculativeIntegerAdditiveOp

    (cherry picked from commit 9313c4ce3f32ad81df1c65becccec7e129181ce3)

    No-Try: true
    No-Presubmit: true
    No-Tree-Checks: true
    Bug: chromium:1199345
    Change-Id: I33bf71b33f43919fec4684054b5bf0a0787930ca
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2831478
    Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
    Commit-Queue: Georg Neis <neis@chromium.org>
    Cr-Original-Commit-Position: refs/heads/master@{#74008}
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2848412
    Commit-Queue: Artem Sumaneev <asumaneev@google.com>
    Reviewed-by: Victor-Gabriel Savu <vsavu@google.com>
    Cr-Commit-Position: refs/branch-heads/8.6@{#86}
    Cr-Branched-From: a64aed2333abf49e494d2a5ce24bbd14fff19f60-refs/heads/8.6.395@{#1}
    Cr-Branched-From: a626bc036236c9bf92ac7b87dc40c9e538b087e3-refs/heads/master@{#69472}

Refs: https://github.com/v8/v8/commit/ab2340a9b99409c94553eea0f79eed0e19903107

PR-URL: https://github.com/nodejs/node/pull/38481
Reviewed-By: Richard Lau <rlau@redhat.com>
2021-05-08 12:44:48 -04:00
Rich Trott 402ba0bfd2 test: move buffer-as-path symlink test to its own test file
The buffer-as-path test for fs.symlinkSync() is a bit unusual and
potentially error-prone embedded in the general fs.symlink() test. Move
it to its own test file.

Refs: https://github.com/nodejs/node/pull/34540/files#r463168354

PR-URL: https://github.com/nodejs/node/pull/34569
Reviewed-By: Pranshu Srivastava <rexagod@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2021-05-08 12:44:48 -04:00
Rich Trott a67e689b1d test: change Fixes: to Refs:
Tests don't fix things generally, so use "Refs:" to refer people to
GitHub issues.

PR-URL: https://github.com/nodejs/node/pull/34568
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-05-08 12:44:48 -04:00
Rich Trott 9645583799 tools: update glob-parent to 5.1.2
In the markdown linting rollup script, update glob-parent to 5.1.2.

Refs: https://app.snyk.io/vuln/SNYK-JS-GLOBPARENT-1016905

PR-URL: https://github.com/nodejs/node/pull/37646
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2021-05-08 12:44:48 -04:00
Rich Trott cd5020c9e2 tools: update remark-preset-lint-node to 2.1.1
PR-URL: https://github.com/nodejs/node/pull/37604
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-05-08 12:44:47 -04:00
Rich Trott f15b11f8d1 tools: bump remark-present-lint-node from 2.0.0 to 2.0.1
This is a prerequisite for https://github.com/nodejs/node/pull/37259.

PR-URL: https://github.com/nodejs/node/pull/37270
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
2021-05-08 12:44:47 -04:00
Michaël Zasso 14681b9c56 tools: update all lint-md rollup dependencies
PR-URL: https://github.com/nodejs/node/pull/36843
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-05-08 12:44:47 -04:00
Myles Borins daee82a95a tools: update ini in tools/node-lint-md-cli-rollup
Refs: https://github.com/nodejs/node/pull/36473
Refs: https://github.com/advisories/GHSA-qqgx-2p2h-9c37

PR-URL: https://github.com/nodejs/node/pull/36474
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-05-08 12:44:47 -04:00
Rich Trott 7715fb49ee tools: bump remark-lint-preset-node to 2.0.0
Update remark@13.0.0, remark-lint-preset-node@2.0.0 and other
dependencies in the lint-md rollup.

PR-URL: https://github.com/nodejs/node/pull/35905
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-05-08 12:44:46 -04:00
Rich Trott d71fd8be87 tools: bump remark-lint-preset-node to 1.17.1
Bump remark-lint-preset-node@1.16.0 to remark-lint-preset-node@1.17.1.

Refs: https://github.com/nodejs/remark-preset-lint-node/pull/139

PR-URL: https://github.com/nodejs/node/pull/35668
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-05-08 12:44:46 -04:00
Antoine du Hamel b9cd835e93 doc: harmonize changes list ordering
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/139

PR-URL: https://github.com/nodejs/node/pull/35454
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2021-05-08 12:44:46 -04:00
Rich Trott 67de0f5294 tools: skip macOS GitHub Actions test on doc-only changes
We skip macOS GitHub Actions pushes on doc-only changes but the
intention was no doubt to skip them on pull requests too. We still run
the tests on Linux, so addons tests will still run when addons docs
change.

PR-URL: https://github.com/nodejs/node/pull/38296
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2021-05-08 12:44:46 -04:00
XadillaX 6067f958b5 src: cache some context in locals
Refs: https://github.com/nodejs/node/commit/66566df5773c8ef2f0e1181e8f9e47403e68c4b7

PR-URL: https://github.com/nodejs/node/pull/37473
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-05-08 12:44:46 -04:00
Rich Trott 92f1e04e29 test: fix flaky test-dns and test-dns-lookup
Ubuntu 16.04 is going to be unsupported after April 2021. Switching
Node.js CI to Ubuntu 18.04 for the internet tests resulted in failures
in test-dns and test-dns-lookup because it returns server failure/try
again on .invalid domain. Add a hostname for testing that will return
record not found.

PR-URL: https://github.com/nodejs/node/pull/38282
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2021-05-08 12:44:45 -04:00
David Brownman 505123c44b typings: add JSDoc to os module functions
PR-URL: https://github.com/nodejs/node/pull/38197
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2021-05-08 12:44:45 -04:00
Simon Knott 546a28fe12 typings: add JSDoc Types to lib/querystring
PR-URL: https://github.com/nodejs/node/pull/38185
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-05-08 12:44:45 -04:00
Cactysman efaab988fb buffer,errors: add missing n literal in range error string
PR-URL: https://github.com/nodejs/node/pull/37750
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: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Pooja D P <Pooja.D.P@ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-05-08 12:44:45 -04:00
Arkerone 581a083002 doc: fix typo in repl.md
"entires" -> "entries"

PR-URL: https://github.com/nodejs/node/pull/38244
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-05-08 12:44:44 -04:00
James M Snell 0541e195c5 dns: refactor cares_wrap internals
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/38172
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-05-08 12:44:44 -04:00
James M Snell c659034c91 test: fixup failing test/internet/test-dns.js
The `ttl` for the `nodejs.org` DNS record is returning `0`
currently. The test checks for `> 0`, causing the test to
fail.

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

PR-URL: https://github.com/nodejs/node/pull/38241
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-05-08 12:44:44 -04:00
Arkerone f3a32631d1 doc: change "oject" to "object"
PR-URL: https://github.com/nodejs/node/pull/38256
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-05-08 12:44:44 -04:00
Voltrex 5b5597cf1c typings: add JSDoc typings for http
PR-URL: https://github.com/nodejs/node/pull/38191
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-05-08 12:44:44 -04:00
James M Snell 27ebcb72e8 src: fix finalization crash
PR-URL: https://github.com/nodejs/node/pull/38250
Fixes: https://github.com/nodejs/node/issues/38040
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-05-08 12:44:43 -04:00
Voltrex fee39ea598 typings: add JSDoc typings for assert
PR-URL: https://github.com/nodejs/node/pull/38188
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-05-08 12:44:43 -04:00
Rich Trott 2cbcffe7ee doc: revise TLS minVersion/maxVersion text
Minor changes mostly to improve compliance with our style guide.

PR-URL: https://github.com/nodejs/node/pull/38202
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-05-08 12:44:43 -04:00
Rich Trott b1084a43ad test: add tests for missing https agent options
Add test that minVersion and maxVersion options are accepted. This
should complete coverage for lib/https.js.

Refs: https://codecov.io/gh/nodejs/node/src/ec0dcd720e10831b3e783b415c5dc011ed5be2f8/lib/https.js

PR-URL: https://github.com/nodejs/node/pull/38202
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-05-08 12:44:43 -04:00
Rich Trott 553cd85441 test: fix test-https-agent-additional-options.js
`value` was always being assigned to an `undefined` property of an
Array. Thus, the assertions that depended on `value` being defined were
never being checked. Assign `value` the correct...er...value.

PR-URL: https://github.com/nodejs/node/pull/38202
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-05-08 12:44:43 -04:00
Simon Knott 487fc31e53 typings: add JSDoc types to lib/path
PR-URL: https://github.com/nodejs/node/pull/38186
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-05-08 12:44:42 -04:00
eladkeyshawn d6c04cedbf util: add getSystemErrorMap() impl
PR-URL: https://github.com/nodejs/node/pull/38101
Fixes: https://github.com/nodejs/node/issues/37951
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-05-08 12:44:42 -04:00