Discord.js: Minimum node version requirement: >=12.0.0

Created on 16 Apr 2017  路  6Comments  路  Source: discordjs/discord.js

Starting with v12.0.0 the minimum node version requirement for discord.js will be >=12.0.0 to make use of features like async/await, Object.entries(), Object.values() (ES2017) etc.
This will allow us to implement features like #1376 easily and without further obstacles.

Since this will be a rather big breaking change users that want to use discord.js v12.x.x will need to update their node version to at least 12.0.0. The reason why we don't plan on supporting >=7.0.0 is that --harmony is way too unreliable and unstable in versions prior to 7.6.0 (e.g. memory leaks) .

Benefits:

  • Full access to ES2017 features

    • async / await


    • Object.entries()


    • Object.values()

Drawbacks:

  • Dropping node 6/7/8 support
dependencies roadmap major discussion enhancement

Most helpful comment

This is live now, forcing node 8 will be done in around 1 week or a as soon as we start using features that are not compatible with node 6 anymore.

All 6 comments

for build:
now: add v8(-nightly) (and v9(-nightly) when it releases)
after v11.1 is released: remove v6/v7 builds

This is live now, forcing node 8 will be done in around 1 week or a as soon as we start using features that are not compatible with node 6 anymore.

As of 375b89a9 this (forcing node 8) is now implemented in master.

I believe this is now resolved in #3180, since URLSearchParams are global in Node.js 10+.

Bumped to v12

If v12 is the minimum, for the ShardingManager, how much flexibility is there with defaulting to worker mode and using SharedArrayBuffer to share memory between instances? Workers were made stable as part of v12

Things like users, presences, and probably more could be cut down on for memory usage savings. Unfortunately I'm not as familiar with this as I started looking into it just recently.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

Alipoodle picture Alipoodle  路  3Comments

tiritto picture tiritto  路  3Comments

smchase picture smchase  路  3Comments

PassTheMayo picture PassTheMayo  路  3Comments