namuol / tap-difflet

TAP output formatter using difflet for inequality errors.
48 stars 8 forks source link

arrow function breaks node 0.10 and 0.12 #13

Closed nickdesaulniers closed 5 years ago

nickdesaulniers commented 5 years ago

While fixing a vulnerability report, our CI failed for 0.10 and 0.12 because of our use of tap-difflet. https://github.com/nickdesaulniers/node-nanomsg/pull/212

It seems that this newer version of tap-difflet uses arrow function syntax. While I don't really want to tell you how to style your code, note that use of new languages features makes supporting older versions of node more difficult.

I'll see if we can downgrade tap-difflet. Feel free to close if you don't want to remove the use of arrow function syntax.

nickdesaulniers commented 5 years ago
/home/travis/build/nickdesaulniers/node-nanomsg/node_modules/tap-difflet/bin/tap-difflet:24
  Object.keys(options).forEach(key => {
                                    ^
SyntaxError: Unexpected token >
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:945:3
nickdesaulniers commented 5 years ago

Looks like the offending commit is https://github.com/namuol/tap-difflet/commit/22b7aa52f795fe2631a698c1d2027d696bd69061, which was then released as 0.7.0.