wessberg / browserslist-generator

A library that makes generating and validating Browserslists a breeze!
MIT License
91 stars 8 forks source link

Querying Ecma version for node always return es3 #7

Open Septh opened 2 years ago

Septh commented 2 years ago

Hi there!

It looks like browserslist-generator doesn't support node as a query, is this intentional ?

import {getAppropriateEcmaVersionForBrowserslist} from 'browserslist-generator'
console.log(getAppropriateEcmaVersionForBrowserslist(['node >= 12']))
// => es3
console.log(getAppropriateEcmaVersionForBrowserslist(['node >= 14']))
// => es3
console.log(getAppropriateEcmaVersionForBrowserslist(['current node']))
// => es3

Not much of a big deal since I can query for Chrome instead, but disturbing. ;)