jaredpalmer / tsdx

Zero-config CLI for TypeScript package development
https://tsdx.io
MIT License
11.28k stars 507 forks source link

Upgrade engines.node to >=12 in package.json for basic template #733

Closed zenflow closed 4 years ago

zenflow commented 4 years ago

The engines.node field should match the version of node we are testing against in CI: https://github.com/jaredpalmer/tsdx/blob/21893b8e498985879bb6665dba279cf4853aabec/templates/basic/.github/workflows/main.yml

This change doesn't apply to the other templates

Thanks for the awesome package! You saved me a ton of time for sure! <3

agilgur5 commented 4 years ago

I appreciate that you were looking for some consistency here, but I'm sorry to say that I'll have to decline the PR in its current state.

The current GitHub Action was meant to just be a starting point and not the end state. The action in each template is also meant to be the same; it's a limitation of our current templating set-up that there are multiple files.

Node 10 is still LTS for another year, until May 2021, so I would certainly not recommend library authors only support Node 12+. It would be better to add matrix testing for different Node versions and OSes like TSDX itself does, which is likely to be added in the near future. Per the proposal issue #438, the basic variant was meant not to significantly bloat the templates as an initial feature especially as we'd prefer partial scaffold commands that could set-up things like Actions or TravisCI for instance.