grunt-contrib-coffee icon indicating copy to clipboard operation
grunt-contrib-coffee copied to clipboard

Please specify CoffeeScript as a peerDependency, require Node 6+

Open GeoffreyBooth opened this issue 6 years ago • 0 comments

Please add coffeescript to the package.json peerDependencies section, so that users can use the latest version of the CoffeeScript compiler without needing to open issues or PRs with this repo.

CoffeeScript 2.x requires Node 6+ for the compiler itself to run. (Node 7.6+ is required to use async functions, but the compiler itself doesn’t use them so the compiler can compile files in Node 6 or higher.) Assuming you add a peer dependency for CoffeeScript 2+, or just *, it would make sense to update your package.json engines section to require Node 6+.

Along those lines, it would be good to actually check that you’re in a Node 6+ environment, ideally by feature-detection the way CoffeeScript itself does here. That would avoid errors like this one, where the problem is really that the version of Node is too old, rather than a bug in CoffeeScript.

GeoffreyBooth avatar Feb 21 '18 05:02 GeoffreyBooth