-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
drop support for unmaintained versions of Node.js #124
Conversation
@@ -1,5 +1,5 @@ | |||
repo-owner = davidchambers | |||
repo-name = doctest | |||
author-name = David Chambers <dc@davidchambers.me> | |||
source-files = lib/*.js | |||
source-files = lib/*.js lib/*.mjs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added lib/*.mjs
to source-files
so that .mjs files are linted.
.concat (['--', | ||
path.resolve (__dirname, | ||
'..', | ||
'lib', | ||
'command' + (esmSupported ? '.mjs' : '.js'))]) | ||
.concat (['--', path.resolve (__dirname, '..', 'lib', 'command.mjs')]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
command.mjs can now always be used, so I deleted command.js. :)
lib/command.mjs
Outdated
}, 0); | ||
}); | ||
})).then (function(statuses) { | ||
process.exit (Math.max.apply (Math, statuses)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made this change:
-process.exit (statuses.every (function(s) { return s === 0; }) ? 0 : 1);
+process.exit (Math.max.apply (Math, statuses));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach fails for []
:
> Math.max.apply (Math, [])
-Infinity
I will revert this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nice! It might be worth now to consider changing the whole source to ESM, instead of the mix that this left us with.
b625a1b
to
bb457e0
Compare
In addition to reviewing the changes, @Avaq, you could spend some time on this branch grepping for terms such as
esm
andprocess.version
in case I missed something.