mirror of
https://github.com/SrIzan10/nodemon.git
synced 2026-05-01 10:55:09 +00:00
Merge branch 'master' of github.com:remy/nodemon
* 'master' of github.com:remy/nodemon: chore: adding funding file chore: update stalebot feat: add message event fix: disable fork only if string starts with dash feat: add TypeScript to default execPath (#1552) fix: Quote zero-length strings in arguments (#1551)
This commit is contained in:
2
.github/FUNDING.yml
vendored
Normal file
2
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
open_collective: nodemon
|
||||
1
.github/stale.yml
vendored
1
.github/stale.yml
vendored
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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');
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user