hildjj / node-cbor

Encode and decode CBOR documents, with both easy mode, streaming mode, and SAX-style evented mode.
MIT License
357 stars 73 forks source link

remove support for node 6 #95

Closed hildjj closed 3 years ago

hildjj commented 5 years ago

We have now pinned an old version of ava so I can still test on Node 6. There will be other reasons to move over time.

This is a tracking bug. Please reference this with a bug in your project if you want me to wait for you to stop supporting Node 6.

hildjj commented 5 years ago

Blocks full fix for #10.

hildjj commented 4 years ago

I'm thinking about adding a warning in the postinstall hook that you should upgrade node. I'll do a major version for that, and everyone that wants to support node < v10 will need to pin to the minor version before that. Ava now has an audit alarm on the version I'm forced to use if I'm going to test on early node versions, and I don't want to claim to support those versions if I can't test on them.

hildjj commented 3 years ago

This is becoming more pressing for me as security issues continue to pile up for old versions of ava. If someone wanted to do the research to pick a test framework that works on node6, send me a patch that moves to that framework, and ensures coverage doesn't suffer too badly, I'd take it.

hildjj commented 3 years ago

OK, my current approach is that package.json's engines entry doesn't do anything for older versions of npm. engineStrict is deprecated. I've added a .npmrc file with engine-strict=true, but that probably only works for newer versions of npm. In the future, it may be enough. In the meantime, I've added an aggressive preinstall hook that will check the current node version. You'll get a warning like:

+-------------------------------------------------------+
| The cbor package REQUIRES Node.js v10.18 or higher.   |
| You are currently running Node.js v6.17.1             |
| Please upgrade node, or pin cbor to version 5.2.x:    |
| `npm install --save cbor@5.2`                         |
+-------------------------------------------------------+

I'm open to taking patches to backport features or bug fixes into the 5.2 branch (which I've tagged node6, and which tag I'll move forward with changes), but testing is going to be iffy because of the old version of ava involved. So... sparingly, I guess.

Please just upgrade to a supported version of Node and encourage your distros and users to do so also.