-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to Node 14 #1253
Comments
I'm fine with new commits targeting minimum active LTS (currently Node 14), and then backporting big fixes to maintenace LTS versions (currently Node 12). |
Sounds like something for a new branch |
This comment has been minimized.
This comment has been minimized.
As said in OP,
Also the next lib update has a bunch of features and I think everything already runs fine on Node 10, I'd rather nobody go out of their way to break compatibility.
We already have version branches (e.g. |
It should be noted that erlpack isn't even capable of compiling w/ Node 16 support. |
We wouldn't be going to v16 for a long while, and losing erlpack isn't really that bad of a loss |
It supports node 16, the pr for it got merged: discord/erlpack#41 |
This could be a good first step towards moving from CJS to ESM. ES Modules have a number of advantages over the current CommonJS, mainly the following:
However, these would be severely breaking changes due to the inability of CommonJS projects to load ES Modules. Therefore, these changes can definitely not be made without a warning. But they're a change certainly worth considering. |
Considering how insane abal is about backwards compatibility, I seriously doubt eris will ever go full esm for the exact stated reason at the bottom - I'd take a good bet eris would lose a LOT of its userbase to a change like that and unless there's something different about it.. commonjs can do named exports? // 1.js
module.exports.whatever = "hi"; // 2.js
const { whatever } = require("./1");
console.log(whatever); // hi |
CJS exports are... One single object. There is one object exported and that is ESM exports are different. The export {no, strangers, to, love, know, the, rules}
export default {
were: {
no,
strangers,
to,
love,
},
you: {
know,
the,
rules,
}
} The two export statements do not interfere with each other. They're exported like, {
...namedExports,
default
} import x from 'this file';
// you get that giant object from `default` import {strangers, love} from 'this file';
// you directly get the two from the named exports. The main advantage is being able to export whatever you want at the top level for users to directly import them. Tho yea I do agree that going full ESM suddenly would just crumble the userbase. However, a lot of popular small modules are already going full ESM. A good example would be The main reason a lot of people give for not switching over is "Typescript and Electron do not support ESM yet". When the large modules like these make the move, it'll just be a matter of time before the majority start using ESM. |
I don't think anyone is debating that CJS and ESM are structured differently. However, like you said in your first comment, Eris already has explicit support for ESM consumers by providing an ESM entry point that uses named exports. The distinction between the default export and named exports in ESM is unlikely to matter to internal code, since I don't think we have any file (other than the main entry point) where a non-trivial default export is used at the same time as named exports. Similarly, top-level |
Node.js released v20 recently. Abal, are you really sure there is a reason to support v10? It reached EOL whole 2 years ago, and v14 reached EOL recently too. If you care about your userbase, then simply make a poll asking what nodejs version people use. I'm pretty sure there won't be much answers below v14. |
@ItsAleph that comment is also from over 1.5 years ago. If you update the numbers, the general sentiment of the comment still stands. |
Eris currently has a minimum supported version of Node 10. However that version was released in 2018, isn't maintained anymore, and doesn't receive security patches. With Node 16 entering LTS in less than 3 months, I believe we should bump the minimum supported version to at least Node 14.
Updating to Node 14 brings countless security and performance improvements (especially to JSON parsing), bug fixes, and useful new features such as:
I am willing to make a PR for this, however it's practically guaranteed to be full of merge conflicts with any existing PRs due to these new features. Because of that, I believe it would be better to wait until after the next Eris release to open such a PR, as merge conflicts will be at their lowest then.
The text was updated successfully, but these errors were encountered: