stampit-org / stamp

Stamps - better OOP model
https://stampit.js.org
MIT License
25 stars 3 forks source link

Should `@stamp` support be limited to NodeJS? And if so which version? #57

Closed PopGoesTheWza closed 4 years ago

PopGoesTheWza commented 4 years ago

In article Fun with Stamps. Episode 20. Stampit v4 it is mentioned:

stampit is mainly for browsers. It has both node and browser builds. Whereas @stamp/it is node CommonJS only.

This is mentioned nowhere in any of the README.md of the @stamp monorepo.

Furthermore, current package.json requires a node engine >= 6.4.0 and .travis.yml setup test against node version 6, 7, 8, 10 and 12, but NodeJS Releases page no longer lists version 6 and 7.

By defining the minimal supported NodeJS version, we define the proper ES version to expect and can clean/simplify/harden the code base in several places (get rid of __proto__, rely on Symbol, Reflect and Proxy primitives, spread and rest operators, etc.)

NodeJS version Supported ES version
6.4.0 ES2015
7.5.0 ES2016
8.6.0 ES2016 (and parts of ES217)
9.11.2 ES217
10.3.0 ES2018

Also, since odd numbered releases of NodeJS are not considered long-lived, .travis.yml might be better limited to testing only even numbered version plus:

source: node.green

koresar commented 4 years ago

Agree. Time to drop non LTS node versions. Feel free to action.

PopGoesTheWza commented 4 years ago

I can PR with node >= 8.6.0 in package.json and travis to run tests on 8, 10 and 12 (NodeJS 13 is currently not fresh enough to bother with)

Following this, additional PRs could come to incrementally bring code base to ES2016

koresar commented 4 years ago

Superb. https://www.youtube.com/embed/ZXsQAXx_ao0