sindresorhus / cli-truncate

Truncate a string to a specific width in the terminal
MIT License
85 stars 14 forks source link

Remove object rest operator to support Node.js 8 #15

Closed bet4it closed 5 years ago

bet4it commented 5 years ago

Object rest operator was introduced in ES2018, and was not fully supported in Node.js 8 until 8.6.0: https://node.green/#ES2018-features-object-rest-spread-properties

Hope we can keep compatibility with all the Node.js 8 version. We can revert this commit when we drop support of Node.js 8.

sindresorhus commented 5 years ago

As a Node.js user, you're expected to upgrade minor versions of Node.j 8 for both import security fixes and feature improvements. This is nothing new.

bet4it commented 5 years ago

Yeah, everything you said is right, but Hyper 2 use Node.js 8.2.1 and Hyper 3 is not stable enough, so my Hyper plugin wants to keep compatibility with both Hyper 2 and Hyper 3 🙃