10

Is there a mapping somewhere from Node.js version, e.g. 0.10, or 14, to the corresponding ECMAScript version, e.g. ES5, ES2020?

As this question is closed, I can't post the solution I came up with as an answer, so it is here instead.

@bevry/node-versions includes fetchESVersionForNodeVersion(nodeVersion: string): Promise<string> which will fetch the ECMAScript version that was ratified by the time that the Node.js version was released.

balupton
  • 44,611
  • 30
  • 121
  • 175
  • 1
    https://node.green/. See also e.g. https://stackoverflow.com/q/5139168/3001761. – jonrsharpe Oct 26 '20 at 22:44
  • There is no such thing as a direct mapping because no single node.js version represents a 100% transition from one version of the ECMAScript specification to a new version. Instead, it is a gradual adding of new language features over time and over many versions. As you've now received two recommendations for, node.green will show you the feature by feature transition between nodejs versions. – jfriend00 Oct 26 '20 at 23:52
  • 1
    Just because an ideal solution is not possible, does not mean a practical solution is not. Just came back to post my mapping of the ratified ECMAScript version at the time of each Node.js release, however my answer is closed. Will go to Quora instead. Stack Exchange is joke, just a place for gatekeepers to feel validated. – balupton Nov 10 '20 at 01:11

1 Answers1

5

Which features ship with which Node.js version by default?

The website node.green provides an excellent overview over supported ECMAScript features in various versions of Node.js, based on kangax's compat-table.

Source: https://nodejs.org/en/docs/es6/

jonrsharpe
  • 107,083
  • 22
  • 201
  • 376
iwaduarte
  • 1,258
  • 19
  • 20