c8
c8 copied to clipboard
No longer compatible with Node < 16 since upgrade to foreground-child > 3.x
All technical details of the test can be found at https://github.com/metalsmith/metalsmith/actions/runs/7854693798/job/21435716699
Since v3.x the dependency foreground-child
uses the node:
prefix to include constants and due to this c8 throws in Node < 16:
Error: Cannot find module 'node:constants'
Shall preferably be tackled after a solution is chosen at https://github.com/tapjs/foreground-child/issues/56
@webketje would you be able to contribute a failing test? our test matrix includes Node 14 and 16 and I haven't been seeing failures.
I think the test I ran has all the details, but it was run with 14.14.0. According to this article: https://2ality.com/2021/12/node-protocol-imports.html#support-for-node%3A-imports, the node:
prefixed imports are only supported since 14.18.0, I will re-run a test locally. If that's the case, the engines.node
property should only be changed to >=14.18.0
@bcoe I've done a 2 local test runs with 14.14.0 and 14.18.0 and can confirm that c8 works with Node >=14.18.0
but not with `<14.18.0.
If that's the case, the engines.node property should only be changed to >=14.18.0
@webketje 👍 sounds like a good call to me.