From 2973afbd26e2c9a9f9676fed8ab63999022ea7ca Mon Sep 17 00:00:00 2001 From: Emily Marigold Klassen Date: Wed, 1 May 2019 00:04:25 -0700 Subject: [PATCH 1/6] fix: Quote zero-length strings in arguments (#1551) If a zero-length string is passed, it does not get properly quoted, and then it is not properly passed to the child process --- lib/utils/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/index.js b/lib/utils/index.js index d49f8c5e..c4803383 100644 --- a/lib/utils/index.js +++ b/lib/utils/index.js @@ -69,7 +69,7 @@ var utils = (module.exports = { args.map(function (arg) { // if an argument contains a space, we want to show it with quotes // around it to indicate that it is a single argument - if (arg.indexOf(' ') === -1) { + if (arg.length > 0 && arg.indexOf(' ') === -1) { return arg; } // this should correctly escape nested quotes From 64b474e9f3c24cd4c1f360a73da3d675559b3b3e Mon Sep 17 00:00:00 2001 From: Leonardo Dino Date: Wed, 1 May 2019 04:04:44 -0300 Subject: [PATCH 2/6] feat: add TypeScript to default execPath (#1552) `ts-node` is the standard for running typescript node programs on development mode. Adding this line will enable everyone with a `tsconfig.json` to have a full-refresh server watching experience. (: --- lib/config/defaults.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/config/defaults.js b/lib/config/defaults.js index 6a225619..e2a448b4 100644 --- a/lib/config/defaults.js +++ b/lib/config/defaults.js @@ -7,6 +7,7 @@ module.exports = { execMap: { py: 'python', rb: 'ruby', + ts: 'ts-node', // more can be added here such as ls: lsc - but please ensure it's cross // compatible with linux, mac and windows, or make the default.js // dynamically append the `.cmd` for node based utilities From 886527f1f0a9249e1a044fd652b7519d1c0dc50e Mon Sep 17 00:00:00 2001 From: Emily Marigold Klassen Date: Tue, 23 Apr 2019 12:38:28 -0700 Subject: [PATCH 3/6] fix: disable fork only if string starts with dash fixes #1554 --- lib/monitor/run.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/monitor/run.js b/lib/monitor/run.js index e316c2b1..4c74d338 100644 --- a/lib/monitor/run.js +++ b/lib/monitor/run.js @@ -91,7 +91,7 @@ function run(options) { const shouldFork = !config.options.spawn && !inBinPath && - firstArg.indexOf('-') === -1 && // don't fork if there's a node exec arg + !(firstArg.indexOf('-') === 0) && // don't fork if there's a node exec arg firstArg !== 'inspect' && // don't fork it's `inspect` debugger executable === 'node' && // only fork if node utils.version.major > 4 // only fork if node version > 4 From 20ccb623c4dbdbc9445085ba72ca7ab90f5bffcb Mon Sep 17 00:00:00 2001 From: Emily Marigold Klassen Date: Tue, 23 Apr 2019 12:49:54 -0700 Subject: [PATCH 4/6] feat: add message event add event to listen to messages coming from the child's ipc events, partially implementing #1519 --- lib/monitor/run.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/monitor/run.js b/lib/monitor/run.js index 4c74d338..59a339da 100644 --- a/lib/monitor/run.js +++ b/lib/monitor/run.js @@ -133,6 +133,12 @@ function run(options) { bus.stdout = child.stdout; bus.stderr = child.stderr; } + + if (shouldFork) { + child.on('message', function (message, sendHandle) { + bus.emit('message', message, sendHandle); + }); + } } bus.emit('start'); From d088cb6e66855bbed04511c15fa12de0f8829237 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Wed, 8 May 2019 11:12:13 +0100 Subject: [PATCH 5/6] chore: update stalebot [skip ci] --- .github/stale.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/stale.yml b/.github/stale.yml index 0d5c7a4e..9046dde3 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -6,6 +6,7 @@ daysUntilClose: 7 exemptLabels: - pinned - security + - not-stale # Label to use when marking an issue as stale staleLabel: stale # Comment to post when marking an issue as stale. Set to `false` to disable From d84f421ef7287e07acff3b18e366534f4afb66be Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Thu, 23 May 2019 22:07:50 +0100 Subject: [PATCH 6/6] chore: adding funding file [skip ci] --- .github/FUNDING.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..b709e0ef --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,2 @@ +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +open_collective: nodemon