SolidOS / solid-ui

User Interface widgets and utilities for Solid
https://solidos.github.io/solid-ui/dist/solid-ui.js
MIT License
147 stars 39 forks source link

Document the fact that Node version >= 12 is needed. #193

Open michielbdejong opened 4 years ago

michielbdejong commented 4 years ago

This line: https://github.com/solid/solid-ui/blame/master/src/authn/authn.ts#L477 uses: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat Which will not work in older browsers, nor in node 8 or node 10. I updated the .travis.yml now to only run the tests in node 12. The .nvmrc version also says to use Node 12, but we should mention it in the readme.

Apart from the node version, we also need to decide which browsers we want to target, because if we say Array.flat is allowed, then we miss out on 15% of web users according to https://caniuse.com/#feat=array-flat ?

michielbdejong commented 4 years ago

Apart from Array.flat which requires Node >= 12, the tests use jsdom, which requires Node >= 10.

megoth commented 4 years ago

We do use preset-env that defaults to browserlist, which defaults to > 0.5%, last 2 versions, Firefox ESR, not dead. In other words, the code will be transpiled and polyfilled when necessary.

That said, I think we would benefit from being more specific about which browsers and environments that we want to support.