summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorJan Krems <jan.krems@groupon.com>2018-05-31 12:21:03 +0200
committerAnna Henningsen <anna@addaleax.net>2018-06-14 18:46:01 +0200
commite11447a08b132906d9852e58ccb0433b17f65b0c (patch)
tree15cd8e5c93aeb6d0da0489f54fce70bb71b19c36 /deps
parent7a687624b4b5c7de1a2a33944dc44df76723309a (diff)
downloadandroid-node-v8-e11447a08b132906d9852e58ccb0433b17f65b0c.tar.gz
android-node-v8-e11447a08b132906d9852e58ccb0433b17f65b0c.tar.bz2
android-node-v8-e11447a08b132906d9852e58ccb0433b17f65b0c.zip
deps: Upgrade node-inspect to 1.11.5
Removes the prompt to report a bug when trying to launch the debugger using a port that is already in use. Changeset generated via: ``` rm -rf deps/node-inspect node-inspect-* && \ curl -sSL "https://github.com/nodejs/node-inspect/archive/v1.11.5.tar.gz" | \ tar -xzvf - && mv node-inspect-* deps/node-inspect ``` PR-URL: https://github.com/nodejs/node/pull/21055 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'deps')
-rw-r--r--deps/node-inspect/.eslintrc8
-rw-r--r--deps/node-inspect/.npmrc1
-rw-r--r--deps/node-inspect/CHANGELOG.md14
-rw-r--r--deps/node-inspect/lib/_inspect.js21
-rw-r--r--deps/node-inspect/package.json2
-rw-r--r--deps/node-inspect/test/cli/invalid-args.test.js29
6 files changed, 68 insertions, 7 deletions
diff --git a/deps/node-inspect/.eslintrc b/deps/node-inspect/.eslintrc
index de2b4fb28b..b6d45aa499 100644
--- a/deps/node-inspect/.eslintrc
+++ b/deps/node-inspect/.eslintrc
@@ -5,7 +5,7 @@ env:
es6: true
parserOptions:
- ecmaVersion: 2016
+ ecmaVersion: 2017
rules:
# Possible Errors
@@ -139,3 +139,9 @@ globals:
DTRACE_HTTP_SERVER_RESPONSE: false
DTRACE_NET_SERVER_CONNECTION: false
DTRACE_NET_STREAM_END: false
+ LTTNG_HTTP_CLIENT_REQUEST: false
+ LTTNG_HTTP_CLIENT_RESPONSE: false
+ LTTNG_HTTP_SERVER_REQUEST: false
+ LTTNG_HTTP_SERVER_RESPONSE: false
+ LTTNG_NET_SERVER_CONNECTION: false
+ LTTNG_NET_STREAM_END: false
diff --git a/deps/node-inspect/.npmrc b/deps/node-inspect/.npmrc
index 38f11c645a..b7c8444fee 100644
--- a/deps/node-inspect/.npmrc
+++ b/deps/node-inspect/.npmrc
@@ -1 +1,2 @@
registry=https://registry.npmjs.org
+package-lock=false
diff --git a/deps/node-inspect/CHANGELOG.md b/deps/node-inspect/CHANGELOG.md
index 0db3a7842e..44ae510efe 100644
--- a/deps/node-inspect/CHANGELOG.md
+++ b/deps/node-inspect/CHANGELOG.md
@@ -1,3 +1,17 @@
+### 1.11.5
+
+* Fix eslint issues - **[@jkrems](https://github.com/jkrems)** [#63](https://github.com/nodejs/node-inspect/pull/63)
+ - [`2adadbc`](https://github.com/nodejs/node-inspect/commit/2adadbc1086d2e374c425acbf96260a122705db2) **style:** Fix eslint issues
+ - [`a6d2f88`](https://github.com/nodejs/node-inspect/commit/a6d2f882c026409696a1b063ff40ceba7e1ddb86) **doc:** Remove redundant newline at the end
+
+
+### 1.11.4
+
+* Handle blocked port - **[@jkrems](https://github.com/jkrems)** [#62](https://github.com/nodejs/node-inspect/pull/62)
+ - [`3388969`](https://github.com/nodejs/node-inspect/commit/3388969d0032a78ff0cdb8146f170b978ec13b7b) **chore:** Disable package-lock
+ - [`d278b23`](https://github.com/nodejs/node-inspect/commit/d278b233ae5e11a2b62d01ccbaae594f39b32a96) **fix:** Stop asking to report a blocked port - see: [#60](https://github.com/nodejs/node-inspect/issues/60)
+
+
### 1.11.3
* [`93caa0f`](https://github.com/nodejs/node-inspect/commit/93caa0f5267c7ab452b258d3b03329a0bb5ac7f7) **docs:** Add missing oc in protocol
diff --git a/deps/node-inspect/lib/_inspect.js b/deps/node-inspect/lib/_inspect.js
index d846efbe6a..305e49915a 100644
--- a/deps/node-inspect/lib/_inspect.js
+++ b/deps/node-inspect/lib/_inspect.js
@@ -42,6 +42,13 @@ const [ InspectClient, createRepl ] =
const debuglog = util.debuglog('inspect');
+class StartupError extends Error {
+ constructor(message) {
+ super(message);
+ this.name = 'StartupError';
+ }
+}
+
function portIsFree(host, port, timeout = 2000) {
if (port === 0) return Promise.resolve(); // Binding to a random port.
@@ -51,7 +58,7 @@ function portIsFree(host, port, timeout = 2000) {
return new Promise((resolve, reject) => {
setTimeout(() => {
didTimeOut = true;
- reject(new Error(
+ reject(new StartupError(
`Timeout (${timeout}) waiting for ${host}:${port} to be free`));
}, timeout);
@@ -346,10 +353,14 @@ function startInspect(argv = process.argv.slice(2),
stdin.resume();
function handleUnexpectedError(e) {
- console.error('There was an internal error in node-inspect. ' +
- 'Please report this bug.');
- console.error(e.message);
- console.error(e.stack);
+ if (!(e instanceof StartupError)) {
+ console.error('There was an internal error in node-inspect. ' +
+ 'Please report this bug.');
+ console.error(e.message);
+ console.error(e.stack);
+ } else {
+ console.error(e.message);
+ }
if (inspector.child) inspector.child.kill();
process.exit(1);
}
diff --git a/deps/node-inspect/package.json b/deps/node-inspect/package.json
index d25376b5d4..eddc14debc 100644
--- a/deps/node-inspect/package.json
+++ b/deps/node-inspect/package.json
@@ -1,6 +1,6 @@
{
"name": "node-inspect",
- "version": "1.11.3",
+ "version": "1.11.5",
"description": "Node Inspect",
"license": "MIT",
"main": "lib/_inspect.js",
diff --git a/deps/node-inspect/test/cli/invalid-args.test.js b/deps/node-inspect/test/cli/invalid-args.test.js
index c831d799a0..c1aaeb6a9c 100644
--- a/deps/node-inspect/test/cli/invalid-args.test.js
+++ b/deps/node-inspect/test/cli/invalid-args.test.js
@@ -1,4 +1,7 @@
'use strict';
+const Path = require('path');
+const { createServer } = require('net');
+
const { test } = require('tap');
const startCLI = require('./start-cli');
@@ -23,3 +26,29 @@ test('launch w/ invalid host:port', (t) => {
t.equal(code, 1, 'exits with non-zero exit code');
});
});
+
+test('launch w/ unavailable port', async (t) => {
+ const blocker = createServer((socket) => socket.end());
+ const port = await new Promise((resolve, reject) => {
+ blocker.on('error', reject);
+ blocker.listen(0, '127.0.0.1', () => resolve(blocker.address().port));
+ });
+
+ try {
+ const script = Path.join('examples', 'three-lines.js');
+ const cli = startCLI([`--port=${port}`, script]);
+ const code = await cli.quit();
+
+ t.notMatch(
+ cli.output,
+ 'report this bug',
+ 'Omits message about reporting this as a bug');
+ t.match(
+ cli.output,
+ `waiting for 127.0.0.1:${port} to be free`,
+ 'Tells the user that the port wasn\'t available');
+ t.equal(code, 1, 'exits with non-zero exit code');
+ } finally {
+ blocker.close();
+ }
+});