Giter Site home page Giter Site logo

node-green's Issues

Add support for latest ES_VERSIONS (eg. everything after ES2018)

Looking at the code here, it will only check against a hardcoded list of ES_VERSIONS:

const ES_VERSIONS = [
'ESNEXT',
'ES2018',
'ES2017',
'ES2016',
'ES2015',
]

ES_VERSIONS.forEach(ver => {

Yet looking at the .json data for a recent (19.1.0) version of node in node-compat-table, there are many more keys supported:

โ‡’  curl --silent https://raw.githubusercontent.com/williamkapke/node-compat-table/gh-pages/results/v8/19.1.0.json | jq 'keys'
[
  "ES2015",
  "ES2016",
  "ES2017",
  "ES2018",
  "ES2019",
  "ES2020",
  "ES2021",
  "ES2022",
  "ES2023",
  "ESNEXT",
  "_engine",
  "_version"
]

It would be great if you could update this package (and ensure the node-green-cli uses the newer version) so that we can check features that only came into existence in these newer versions.

Ideally we could probably do away with the hardcoded ES_VERSIONS and just extract the keys to check automagically from the .json, something like this might work:

const esVersions = Object.keys(result).filter(key => !key.startsWith('_')).reverse();

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.