shelljs / shx

Portable Shell Commands for Node
MIT License
1.72k stars 44 forks source link

Mocha and babel compiler warnings #144

Closed nfischer closed 6 years ago

nfischer commented 6 years ago

I see the following output when I run npm test on node v4.8.7 and npm 5.8.0:

> shx@0.3.1 test [path redacted]/shx
> nyc --reporter=text --reporter=lcov mocha

"--compilers" will be removed in a future version of Mocha; see https://git.io/vdcSr for more info
Transformation error for [path redacted]/shx/src/shx.js ; return original code
Unexpected token ...
Transformation error for [path redacted]/shx/src/help.js ; return original code
Unexpected token ...
Transformation error for [path redacted]/shx/src/config.js ; return original code
Unexpected token ...
Transformation error for [path redacted]/shx/src/printCmdRet.js ; return original code
Unexpected token ...

We should find a way forward without the --compilers flag. The deprecation notice says this is only a warning, so we may have a different problem related to the "Transformation errors".

This blocks #142.

nfischer commented 6 years ago

Seems like --compilers deprecation is indeed separate from the transformation errors from babel.

nfischer commented 6 years ago

Culprit: PR #135


The --compilers warning happened when we bumped mocha to ^5.2.0 (not sure exactly which version). This is easy to fix (the deprecation link has clear instructions).


The Transformation error messages started with nyc ^12.0.0 (but are not present on ^11.0.0). The quick fix is to downgrade nyc.

nfischer commented 6 years ago

The answer to the nyc issue is in the changelog. nyc@11 is the last release with node v4/v5 support.