From 3fc13ab9e2613a080ac398a7a926be46ad801d54 Mon Sep 17 00:00:00 2001 From: Sagi Tsofan Date: Fri, 21 Sep 2018 00:59:22 +0300 Subject: [PATCH 01/19] improved error message description for the http server --- lib/internal/errors.js | 39 +++++++++++++++++++++++++++++++++++++-- lib/net.js | 10 +++++++--- lib/util.js | 1 - 3 files changed, 44 insertions(+), 6 deletions(-) diff --git a/lib/internal/errors.js b/lib/internal/errors.js index 4094a40f6b5631..bbded52e411b53 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -285,6 +285,42 @@ function uvException(ctx) { return err; } +/** + * This creates an error compatible with errors produced in the C++ + * This function should replace the deprecated `uvException(ctx)` function. + * + * @param {number} err - A libuv error number + * @param {string} syscall + * @param {string} address + * @param {number} [port] + * @param {string} [additional] + * @returns {Error} + */ +function uvExceptionWithHostPort(err, syscall, address, port, additional) { + const [ code, uvmsg ] = errmap.get(err); + const message = `${code}: ${uvmsg}, ${syscall}`; + let details = ''; + if (port && port > 0) { + details = ` ${address}:${port}`; + } else if (address) { + details = ` ${address}`; + } + if (additional) { + details += ` - Local (${additional})`; + } + + const ex = new Error(`${message} ${details}`); + ex.code = code; + ex.syscall = syscall; + ex.address = address; + if (port) { + ex.port = port; + } + + Error.captureStackTrace(ex, uvExceptionWithHostPort); + return ex; +} + /** * This used to be util._errnoException(). * @@ -314,8 +350,6 @@ function errnoException(err, syscall, original) { } /** - * This used to be util._exceptionWithHostPort(). - * * @param {number} err - A libuv error number * @param {string} syscall * @param {string} address @@ -437,6 +471,7 @@ module.exports = { errnoException, exceptionWithHostPort, uvException, + uvExceptionWithHostPort, isStackOverflowError, getMessage, SystemError, diff --git a/lib/net.js b/lib/net.js index f7d55ca6462920..33ce1f74eb2fba 100644 --- a/lib/net.js +++ b/lib/net.js @@ -84,7 +84,11 @@ const kLastWriteQueueSize = Symbol('lastWriteQueueSize'); let cluster; let dns; -const { errnoException, exceptionWithHostPort } = errors; +const { + errnoException, + exceptionWithHostPort, + uvExceptionWithHostPort +} = errors; const { kTimeout, @@ -1266,7 +1270,7 @@ function setupListenHandle(address, port, addressType, backlog, fd) { rval = createServerHandle(address, port, addressType, fd); if (typeof rval === 'number') { - var error = exceptionWithHostPort(rval, 'listen', address, port); + var error = uvExceptionWithHostPort(rval, 'listen', address, port); process.nextTick(emitErrorNT, this, error); return; } @@ -1283,7 +1287,7 @@ function setupListenHandle(address, port, addressType, backlog, fd) { var err = this._handle.listen(backlog || 511); if (err) { - var ex = exceptionWithHostPort(err, 'listen', address, port); + var ex = uvExceptionWithHostPort(err, 'listen', address, port); this._handle.close(); this._handle = null; defaultTriggerAsyncIdScope(this[async_id_symbol], diff --git a/lib/util.js b/lib/util.js index 2e42beb58b2398..86a82019998301 100644 --- a/lib/util.js +++ b/lib/util.js @@ -390,7 +390,6 @@ function getSystemErrorName(err) { // Keep the `exports =` so that various functions can still be monkeypatched module.exports = exports = { _errnoException: errors.errnoException, - _exceptionWithHostPort: errors.exceptionWithHostPort, _extend, callbackify, debuglog, From 2184f59b550518b2e0a79430b28e2dfc8b734ba1 Mon Sep 17 00:00:00 2001 From: Sagi Tsofan Date: Fri, 21 Sep 2018 01:01:15 +0300 Subject: [PATCH 02/19] fix linter --- lib/internal/errors.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/internal/errors.js b/lib/internal/errors.js index bbded52e411b53..dc79bc83ba09cf 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -309,6 +309,7 @@ function uvExceptionWithHostPort(err, syscall, address, port, additional) { details += ` - Local (${additional})`; } + // eslint-disable-next-line no-restricted-syntax const ex = new Error(`${message} ${details}`); ex.code = code; ex.syscall = syscall; From bc8456981e0996043063ee339d9e7a7edc39901c Mon Sep 17 00:00:00 2001 From: Sagi Tsofan Date: Fri, 21 Sep 2018 16:23:33 +0300 Subject: [PATCH 03/19] lib: improved error message description for the http server binding errors. currently changed only in `setupListenHandle`, but needs to be change all over. Added new `uvExceptionWithHostPort` function (+export) in `lib/internal/error.js` that extracts the error message defined by libuv, using the error code, and returns an error object with the full error description. example: old error message: `listen EADDRINUSE` new error message: `listen EADDRINUSE: Address already in use` Removed exportable function `_exceptionWithHostPort` from `lib/util.js` - exported by accident Replaced `exceptionWithHostPort` to the new function `uvExceptionWithHostPort` for a more detailed error. Fixes: https://github.com/nodejs/node/issues/22936 - [X] `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes - [X] commit message follows [commit guidelines](https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#commit-message-guidelines) --- lib/internal/errors.js | 8 +++++--- lib/util.js | 1 + test/parallel/test-net-server-listen-handle.js | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/internal/errors.js b/lib/internal/errors.js index dc79bc83ba09cf..6561a748826160 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -287,7 +287,8 @@ function uvException(ctx) { /** * This creates an error compatible with errors produced in the C++ - * This function should replace the deprecated `uvException(ctx)` function. + * This function should replace the deprecated + * `exceptionWithHostPort(err, syscall, address, port, additional)` function. * * @param {number} err - A libuv error number * @param {string} syscall @@ -298,8 +299,9 @@ function uvException(ctx) { */ function uvExceptionWithHostPort(err, syscall, address, port, additional) { const [ code, uvmsg ] = errmap.get(err); - const message = `${code}: ${uvmsg}, ${syscall}`; + const message = `${syscall} ${code}: ${uvmsg}`; let details = ''; + if (port && port > 0) { details = ` ${address}:${port}`; } else if (address) { @@ -310,7 +312,7 @@ function uvExceptionWithHostPort(err, syscall, address, port, additional) { } // eslint-disable-next-line no-restricted-syntax - const ex = new Error(`${message} ${details}`); + const ex = new Error(`${message}${details}`); ex.code = code; ex.syscall = syscall; ex.address = address; diff --git a/lib/util.js b/lib/util.js index 86a82019998301..2e42beb58b2398 100644 --- a/lib/util.js +++ b/lib/util.js @@ -390,6 +390,7 @@ function getSystemErrorName(err) { // Keep the `exports =` so that various functions can still be monkeypatched module.exports = exports = { _errnoException: errors.errnoException, + _exceptionWithHostPort: errors.exceptionWithHostPort, _extend, callbackify, debuglog, diff --git a/test/parallel/test-net-server-listen-handle.js b/test/parallel/test-net-server-listen-handle.js index b1182221fcbd06..0d59bd76cad8a8 100644 --- a/test/parallel/test-net-server-listen-handle.js +++ b/test/parallel/test-net-server-listen-handle.js @@ -150,7 +150,7 @@ if (!common.isWindows) { // Windows doesn't support {fd: } net.createServer() .listen({ fd }, common.mustNotCall()) .on('error', common.mustCall(function(err) { - assert.strictEqual(String(err), 'Error: listen EINVAL'); + assert.strictEqual(String(err), 'Error: listen EINVAL: invalid argument'); this.close(); })); } From abbe6ace15edb7a03205f9e34ff025fc257e982c Mon Sep 17 00:00:00 2001 From: Sagi Tsofan Date: Fri, 21 Sep 2018 17:40:10 +0300 Subject: [PATCH 04/19] fix test --- test/parallel/test-cluster-bind-twice.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-cluster-bind-twice.js b/test/parallel/test-cluster-bind-twice.js index 4ef319ae80d409..2f830713f26bfc 100644 --- a/test/parallel/test-cluster-bind-twice.js +++ b/test/parallel/test-cluster-bind-twice.js @@ -72,7 +72,7 @@ if (!id) { })); b.on('message', common.mustCall((m) => { - assert.strictEqual(m, 'EADDRINUSE'); + assert.strictEqual(m.code, 'EADDRINUSE'); a.send('QUIT'); b.send('QUIT'); })); From c21b1ca85419064ba4bc353c499e921ad9647725 Mon Sep 17 00:00:00 2001 From: Sagi Tsofan Date: Fri, 21 Sep 2018 17:51:37 +0300 Subject: [PATCH 05/19] assign errno --- lib/internal/errors.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/errors.js b/lib/internal/errors.js index 6561a748826160..54c86ecfe3ae70 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -313,7 +313,7 @@ function uvExceptionWithHostPort(err, syscall, address, port, additional) { // eslint-disable-next-line no-restricted-syntax const ex = new Error(`${message}${details}`); - ex.code = code; + ex.code = ex.errno = code; ex.syscall = syscall; ex.address = address; if (port) { From 71e60652d6db032d7e7438082df2181abc3d435a Mon Sep 17 00:00:00 2001 From: Sagi Tsofan Date: Fri, 21 Sep 2018 18:52:17 +0300 Subject: [PATCH 06/19] fixes --- lib/internal/errors.js | 3 ++- test/parallel/test-cluster-bind-twice.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/internal/errors.js b/lib/internal/errors.js index 54c86ecfe3ae70..242ed388abeca7 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -313,7 +313,8 @@ function uvExceptionWithHostPort(err, syscall, address, port, additional) { // eslint-disable-next-line no-restricted-syntax const ex = new Error(`${message}${details}`); - ex.code = ex.errno = code; + ex.code = code; + ex.errno = code; ex.syscall = syscall; ex.address = address; if (port) { diff --git a/test/parallel/test-cluster-bind-twice.js b/test/parallel/test-cluster-bind-twice.js index 2f830713f26bfc..4ef319ae80d409 100644 --- a/test/parallel/test-cluster-bind-twice.js +++ b/test/parallel/test-cluster-bind-twice.js @@ -72,7 +72,7 @@ if (!id) { })); b.on('message', common.mustCall((m) => { - assert.strictEqual(m.code, 'EADDRINUSE'); + assert.strictEqual(m, 'EADDRINUSE'); a.send('QUIT'); b.send('QUIT'); })); From 2b872937cb8e5a4db52e703a9578fcc904f95135 Mon Sep 17 00:00:00 2001 From: Sagi Tsofan Date: Fri, 21 Sep 2018 22:01:51 +0300 Subject: [PATCH 07/19] add comments --- lib/internal/errors.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/internal/errors.js b/lib/internal/errors.js index 242ed388abeca7..245cad01804ab2 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -354,6 +354,9 @@ function errnoException(err, syscall, original) { } /** + * deprecated, new function is `uvExceptionWithHostPort` + * new function added the error description directly + * from C++. leaved here for backwards compatibility * @param {number} err - A libuv error number * @param {string} syscall * @param {string} address From 8b3c24bf22e5d6213c81b8d786d9dc21984f777d Mon Sep 17 00:00:00 2001 From: Sagi Tsofan Date: Sat, 6 Oct 2018 17:28:47 +0300 Subject: [PATCH 08/19] function comments fixes --- lib/internal/errors.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/internal/errors.js b/lib/internal/errors.js index 245cad01804ab2..4f8eeebdcf2a56 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -354,9 +354,9 @@ function errnoException(err, syscall, original) { } /** - * deprecated, new function is `uvExceptionWithHostPort` - * new function added the error description directly - * from C++. leaved here for backwards compatibility + * Deprecated, new function is `uvExceptionWithHostPort` + * The new function added the error description directly + * from C++. left here for backwards compatibility * @param {number} err - A libuv error number * @param {string} syscall * @param {string} address From 0e483130283b1490c636130a81d1eeeb8f4d60a0 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 24 Sep 2018 21:43:49 -0700 Subject: [PATCH 09/19] doc: shorten intro of README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are many things I might want to know about if I'm reading the introduction of the README file for Node.js: Where to get help, what the latest release is, how to compile from source, where to report bugs, how to contribute... One thing I cannot imagine wondering about is, "I wonder if there is a foundation that supports Node.js." Move that sentence to the end of the paragraph as it is designed to serve the project and not the end user. Bonus: This removes a usage of passive voice. The Linux kernel README does not mention the Linux Foundation. https://github.com/torvalds/linux/blob/master/README The jQuery README does not mention the JS Foundation. https://github.com/jquery/jquery/blob/master/README.md (It does mention the no-longer-extant jQuery Foundation but only because the Foundation itself apparently had coding standards.) The Python README only mentions the Python Software Foundation as the copyright owner. The Apache httpd README does mention the Apache Software Foundation although it does not link to it and it is mentioned in passing rather than being the topic of a declarative sentence. PR-URL: https://github.com/nodejs/node/pull/23073 Reviewed-By: Daniel Bevenius Reviewed-By: Anna Henningsen Reviewed-By: Ruben Bridgewater Reviewed-By: Michaël Zasso Reviewed-By: Colin Ihrig Reviewed-By: Refael Ackermann --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 47e178845d1dbf..f89526a1c8ed61 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,9 @@ Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. For more information on using Node.js, see the [Node.js Website][]. -The Node.js project uses an [open governance model](./GOVERNANCE.md). The -[Node.js Foundation][] provides support for the project. +Node.js contributions, policies, and releases are managed under an +[open governance model](./GOVERNANCE.md). The [Node.js Foundation][] provides +support for the project. **This project is bound by a [Code of Conduct][].** From 5932fba4eb3e9d740d685ca8ae4453b6e2a07bff Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 3 Oct 2018 14:14:19 -0700 Subject: [PATCH 10/19] doc: improve instructions for verifying binaries Simplify and clarify the text in README.md for verifying binaries. PR-URL: https://github.com/nodejs/node/pull/23248 Reviewed-By: Anna Henningsen Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Ruben Bridgewater Reviewed-By: James M Snell --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f89526a1c8ed61..f79aa0de69d592 100644 --- a/README.md +++ b/README.md @@ -116,10 +116,10 @@ _docs_ subdirectory. Version-specific documentation is also at ### Verifying Binaries -Download directories contain a `SHASUMS256.txt` file with SHA checksums for the +Download directories contain a SHASUMS256.txt file with SHA checksums for the files. -To download `SHASUMS256.txt` using `curl`: +To download SHASUMS256.txt using `curl`: ```console $ curl -O https://nodejs.org/dist/vx.y.z/SHASUMS256.txt @@ -132,9 +132,15 @@ it through `sha256sum` with a command such as: $ grep node-vx.y.z.tar.gz SHASUMS256.txt | sha256sum -c - ``` +<<<<<<< HEAD For Current and LTS, the GPG detached signature of `SHASUMS256.txt` is in `SHASUMS256.txt.sig`. You can use it with `gpg` to verify the integrity of `SHASUM256.txt`. You will first need to import all the GPG keys of individuals +======= +For Current and LTS, the GPG detached signature of SHASUMS256.txt is in +SHASUMS256.txt.sig. You can use it with `gpg` to verify the integrity of +SHASUM256.txt. You will first need to import all the GPG keys of individuals +>>>>>>> doc: improve instructions for verifying binaries authorized to create releases. They are at the bottom of this README under [Release Team](#release-team). To import the keys: From f4148536e96d746ddcbda12f6bf88ed27b5234ee Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 25 Sep 2018 06:35:33 -0700 Subject: [PATCH 11/19] doc: shorten pull request wait time to 48 hours MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, we have a 72 rule for how many hours a pull request should be left open at a minimum. Reduce that time to 48 hours. PR-URL: https://github.com/nodejs/node/pull/23082 Reviewed-By: Michaël Zasso Reviewed-By: Colin Ihrig Reviewed-By: Denys Otrishko Reviewed-By: Ruben Bridgewater Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Matteo Collina Reviewed-By: Franziska Hinkelmann Reviewed-By: Anatoli Papirovski --- doc/onboarding.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/onboarding.md b/doc/onboarding.md index b08aabfff7d74e..a461d0a2e0e138 100644 --- a/doc/onboarding.md +++ b/doc/onboarding.md @@ -215,8 +215,8 @@ needs to be pointed out separately during the onboarding. labels. * Run CI on the PR. Because the PR does not affect any code, use the `node-test-pull-request-lite-pipeline` CI task. -* After two Collaborator approvals for the change and two Collaborator approvals - for fast-tracking, land the PR. +* After one or two approvals, land the PR (PRs of this type do not need to wait + for 48 hours to land). * Be sure to add the `PR-URL: ` and appropriate `Reviewed-By:` metadata. * [`node-core-utils`][] automates the generation of metadata and the landing From 42dd59d60233f718717f03080889ebabbc0c7edd Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 6 Oct 2018 15:28:14 -0700 Subject: [PATCH 12/19] doc: use backticks around file names in README.md Use backticks around `SHASUM256.txt` etc. in README.md. PR-URL: https://github.com/nodejs/node/pull/23299 Reviewed-By: Vse Mozhet Byt Reviewed-By: Refael Ackermann Reviewed-By: Colin Ihrig --- README.md | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index f79aa0de69d592..478b2cc8746b68 100644 --- a/README.md +++ b/README.md @@ -116,10 +116,10 @@ _docs_ subdirectory. Version-specific documentation is also at ### Verifying Binaries -Download directories contain a SHASUMS256.txt file with SHA checksums for the +Download directories contain a `SHASUMS256.txt` file with SHA checksums for the files. -To download SHASUMS256.txt using `curl`: +To download `SHASUMS256.txt` using `curl`: ```console $ curl -O https://nodejs.org/dist/vx.y.z/SHASUMS256.txt @@ -132,17 +132,9 @@ it through `sha256sum` with a command such as: $ grep node-vx.y.z.tar.gz SHASUMS256.txt | sha256sum -c - ``` -<<<<<<< HEAD For Current and LTS, the GPG detached signature of `SHASUMS256.txt` is in `SHASUMS256.txt.sig`. You can use it with `gpg` to verify the integrity of `SHASUM256.txt`. You will first need to import all the GPG keys of individuals -======= -For Current and LTS, the GPG detached signature of SHASUMS256.txt is in -SHASUMS256.txt.sig. You can use it with `gpg` to verify the integrity of -SHASUM256.txt. You will first need to import all the GPG keys of individuals ->>>>>>> doc: improve instructions for verifying binaries -authorized to create releases. They are at the bottom of this README under -[Release Team](#release-team). To import the keys: ```console $ gpg --keyserver pool.sks-keyservers.net --recv-keys DD8F2338BAE7501E3DD5AC78C273792F7D83545D From 7a3b34aad5c0cd61485a5a6a89604c012bdfab6b Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 6 Oct 2018 15:36:08 -0700 Subject: [PATCH 13/19] doc: update onboarding task Use fast-tracking on PRs where new Collaborators are adding themselves to the README. PR-URL: https://github.com/nodejs/node/pull/23300 Reviewed-By: Vse Mozhet Byt Reviewed-By: Refael Ackermann Reviewed-By: Colin Ihrig --- doc/onboarding.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/onboarding.md b/doc/onboarding.md index a461d0a2e0e138..b08aabfff7d74e 100644 --- a/doc/onboarding.md +++ b/doc/onboarding.md @@ -215,8 +215,8 @@ needs to be pointed out separately during the onboarding. labels. * Run CI on the PR. Because the PR does not affect any code, use the `node-test-pull-request-lite-pipeline` CI task. -* After one or two approvals, land the PR (PRs of this type do not need to wait - for 48 hours to land). +* After two Collaborator approvals for the change and two Collaborator approvals + for fast-tracking, land the PR. * Be sure to add the `PR-URL: ` and appropriate `Reviewed-By:` metadata. * [`node-core-utils`][] automates the generation of metadata and the landing From 141cd235576f23a88db50e9a1d73a3393ceb7bbe Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 6 Oct 2018 18:27:28 -0700 Subject: [PATCH 14/19] test: remove internal errorCache property The internal `assert` modules `errorCache` property is exposed only for testing. The one test that used it is rewritten here to not use it. This has the following advantages: * The test now makes sure that there is an empty cache in a more robust way. Instead of relying on the internal implementation of `errorCache`, it simply spawns a separate process. * One less test using the `--expose-internals` flag. PR-URL: https://github.com/nodejs/node/pull/23304 Reviewed-By: Ruben Bridgewater Reviewed-By: Sakthipriyan Vairamani --- .../parallel/test-assert-builtins-not-read-from-filesystem.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-assert-builtins-not-read-from-filesystem.js b/test/parallel/test-assert-builtins-not-read-from-filesystem.js index 7a713a2ea432c1..7855f830add10b 100644 --- a/test/parallel/test-assert-builtins-not-read-from-filesystem.js +++ b/test/parallel/test-assert-builtins-not-read-from-filesystem.js @@ -19,13 +19,13 @@ if (process.argv[2] !== 'child') { e.emit('hello', false); } catch (err) { const frames = err.stack.split('\n'); - const [, filename, line, column] = frames[1].match(/\((.+):(\d+):(\d+)\)/); + const [, filename, , ] = frames[1].match(/\((.+):(\d+):(\d+)\)/); // Spawn a child process to avoid the error having been cached in the assert // module's `errorCache` Map. const { output, status, error } = spawnSync(process.execPath, - [process.argv[1], 'child', filename, line, column], + [process.argv[1], 'child', filename], { cwd: tmpdir.path, env: process.env }); assert.ifError(error); assert.strictEqual(status, 0, `Exit code: ${status}\n${output}`); From e7b03d8c19f6240a4a91f5916bfec2be9fb26400 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 6 Oct 2018 18:27:54 -0700 Subject: [PATCH 15/19] assert: remove internal errorCache property The internal assert module exposed an errorCache property solely for testing. It is no longer necessary. Remove it. PR-URL: https://github.com/nodejs/node/pull/23304 Reviewed-By: Ruben Bridgewater Reviewed-By: Sakthipriyan Vairamani --- .../parallel/test-assert-builtins-not-read-from-filesystem.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-assert-builtins-not-read-from-filesystem.js b/test/parallel/test-assert-builtins-not-read-from-filesystem.js index 7855f830add10b..7a713a2ea432c1 100644 --- a/test/parallel/test-assert-builtins-not-read-from-filesystem.js +++ b/test/parallel/test-assert-builtins-not-read-from-filesystem.js @@ -19,13 +19,13 @@ if (process.argv[2] !== 'child') { e.emit('hello', false); } catch (err) { const frames = err.stack.split('\n'); - const [, filename, , ] = frames[1].match(/\((.+):(\d+):(\d+)\)/); + const [, filename, line, column] = frames[1].match(/\((.+):(\d+):(\d+)\)/); // Spawn a child process to avoid the error having been cached in the assert // module's `errorCache` Map. const { output, status, error } = spawnSync(process.execPath, - [process.argv[1], 'child', filename], + [process.argv[1], 'child', filename, line, column], { cwd: tmpdir.path, env: process.env }); assert.ifError(error); assert.strictEqual(status, 0, `Exit code: ${status}\n${output}`); From c1cf5c603a10cc0aeee937615e18bb2121d16ca3 Mon Sep 17 00:00:00 2001 From: Sagi Tsofan Date: Tue, 9 Oct 2018 21:09:42 +0300 Subject: [PATCH 16/19] lib: changed function comment Comments clarification at the deprecated function and new function. Fixes: https://github.com/nodejs/node/issues/22936 --- lib/internal/errors.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/internal/errors.js b/lib/internal/errors.js index 4f8eeebdcf2a56..965ed935e064b6 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -288,7 +288,7 @@ function uvException(ctx) { /** * This creates an error compatible with errors produced in the C++ * This function should replace the deprecated - * `exceptionWithHostPort(err, syscall, address, port, additional)` function. + * `exceptionWithHostPort` function. * * @param {number} err - A libuv error number * @param {string} syscall @@ -355,8 +355,8 @@ function errnoException(err, syscall, original) { /** * Deprecated, new function is `uvExceptionWithHostPort` - * The new function added the error description directly - * from C++. left here for backwards compatibility + * New function added the error description directly + * from C++. this method for backwards compatibility * @param {number} err - A libuv error number * @param {string} syscall * @param {string} address From 58049654b26a5e089758747da556fd1fdab36fe7 Mon Sep 17 00:00:00 2001 From: Sagi Tsofan Date: Tue, 9 Oct 2018 21:40:51 +0300 Subject: [PATCH 17/19] lib: changed function comment Comments clarification Fixes: https://github.com/nodejs/node/issues/22936 --- lib/internal/errors.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/errors.js b/lib/internal/errors.js index 965ed935e064b6..58eba742e08685 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -288,7 +288,7 @@ function uvException(ctx) { /** * This creates an error compatible with errors produced in the C++ * This function should replace the deprecated - * `exceptionWithHostPort` function. + * `exceptionWithHostPort()` function. * * @param {number} err - A libuv error number * @param {string} syscall @@ -354,7 +354,7 @@ function errnoException(err, syscall, original) { } /** - * Deprecated, new function is `uvExceptionWithHostPort` + * Deprecated, new function is `uvExceptionWithHostPort()` * New function added the error description directly * from C++. this method for backwards compatibility * @param {number} err - A libuv error number From 9f038a522c9cd8558e0826c42816d5e42c8d1164 Mon Sep 17 00:00:00 2001 From: Sagi Tsofan Date: Wed, 10 Oct 2018 23:04:40 +0300 Subject: [PATCH 18/19] fix conflicts --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 478b2cc8746b68..fe450760ddbc1e 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,8 @@ Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. For more information on using Node.js, see the [Node.js Website][]. -Node.js contributions, policies, and releases are managed under an -[open governance model](./GOVERNANCE.md). The [Node.js Foundation][] provides -support for the project. +The Node.js project uses an [open governance model](./GOVERNANCE.md). The +[Node.js Foundation][] provides support for the project. **This project is bound by a [Code of Conduct][].** From fdb7b3e518d630fa7ef01a139c2c6ed81fb40d8f Mon Sep 17 00:00:00 2001 From: Sagi Tsofan Date: Thu, 11 Oct 2018 21:29:43 +0300 Subject: [PATCH 19/19] revert changes --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index fe450760ddbc1e..47e178845d1dbf 100644 --- a/README.md +++ b/README.md @@ -134,6 +134,8 @@ $ grep node-vx.y.z.tar.gz SHASUMS256.txt | sha256sum -c - For Current and LTS, the GPG detached signature of `SHASUMS256.txt` is in `SHASUMS256.txt.sig`. You can use it with `gpg` to verify the integrity of `SHASUM256.txt`. You will first need to import all the GPG keys of individuals +authorized to create releases. They are at the bottom of this README under +[Release Team](#release-team). To import the keys: ```console $ gpg --keyserver pool.sks-keyservers.net --recv-keys DD8F2338BAE7501E3DD5AC78C273792F7D83545D