Skip to content
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

Merged
merged 1 commit into from
Jun 17, 2020
Merged

Conversation

davidchambers
Copy link
Owner

In addition to reviewing the changes, @Avaq, you could spend some time on this branch grepping for terms such as esm and process.version in case I missed something.

@@ -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
Copy link
Owner Author

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.

Comment on lines -17 to +16
.concat (['--',
path.resolve (__dirname,
'..',
'lib',
'command' + (esmSupported ? '.mjs' : '.js'))])
.concat (['--', path.resolve (__dirname, '..', 'lib', 'command.mjs')])
Copy link
Owner Author

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));
Copy link
Owner Author

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));

Copy link
Owner Author

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.

Copy link
Collaborator

@Avaq Avaq left a 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.

@davidchambers davidchambers merged commit 67bde9e into master Jun 17, 2020
@davidchambers davidchambers deleted the disharmony branch June 17, 2020 07:59
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants