Fix node.js v14 support#672
Conversation
|
I know the ticket says otherwise but if we can add tests for 14 relatively simply, I think we should so we don't get any more surprises as long we want to support 14. I think it would only require adding a test matrix in |
f653309 to
cb36bee
Compare
|
I looked into verifying correct node.js and ECMAScript usage via an This table has a nice overview of ECMAScript versions and their node.js support. Using |
7d7eff2 to
ed4bbb1
Compare
|
In the last commit I tried to execute the examples with v14, but that does not seem to work, as npm 7 is required to support workspaces during build time. npm can not distinguish between build and runtime engine versions. npm 7 is included in node.js v15. Using that version for the examples should work, but is it worth the hassle? WDYT? |
|
Would it make sense to only add some end-to-end tests for all but one node version (say v18, or v16)? 50m to test one node version, x4 = about 4 hours. With one flaky test, and we will need several days to merge a PR. Can the e2e tests use Jazzer.js built by a different node version? |
bffbdee to
9e9941f
Compare
|
As discussed, tests and examples are now executed with all LTS versions on Linux and the end-to-end tests also with v14. |
a71eb90 to
dd2e8e9
Compare
br-lewis
left a comment
There was a problem hiding this comment.
I think the readme would be a good spot to mention our node version support. I would be inclined to say it should go towards the bottom since it isn't immediately relevant when you're trying to figure out what the project is and does. We do have architecture support at the very top so it makes sense to have it there though maybe we should move that further down as well.
dd2e8e9 to
5b10cf0
Compare
|
Moved the supported architecture section further down and added a remark about supported Node.js versions. |
Replace two functions introduced in v16 to still support v14. Supporting this old version is probably a big stretch in the JavaScript ecosystem, though. To verify ECMAScript compatibility the TypeScript target version is now set to ES2020 as that is mostly supported by node.js v14. This only catches invalid ECMAScript features, and would have done so in case of the two fixed usages, but not unsupported node.js APIs. Sadly, available eslint plugins verifying correct node.js API version usage seem quite out of date.
5b10cf0 to
34f7f0e
Compare
Replace two functions introduced in v16 to still support v14. Supporting this old version is probably a big stretch in the JavaScript ecosystem, though.
To verify ECMAScript compatibility the TypeScript target version is now set to ES2020 as that is mostly supported by node.js v14. This only catches invalid ECMAScript features, and would have done so in case of the two fixed usages, but not unsupported node.js APIs.
Sadly, available eslint plugins verifying correct node.js API version usage seem quite out of date.
Closes #641