ifandelse / machina.js

js ex machina - finite state machines in JavaScript
http://machina-js.org/
Other
1.93k stars 147 forks source link

should machina npm ship with coverage.json? #91

Closed danielbprice closed 9 years ago

danielbprice commented 9 years ago

I'm not sure you would consider this a "real" issue or not. Here goes. We have a large project of which machina is a component (thanks!). We use istanbul to generate coverage reports.

However what I am finding is that it is difficult to avoid having istanbul pick up the coverage.json file inside of the machina NPM when I am running istanbul report. As a result, my coverage reporting tips over with:

dev_deps/node_modules/.bin/istanbul report

fs.js:427
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: ENOENT, no such file or directory '/Users/Jim/git/oss/machina/lib/machina.js'
    at Object.fs.openSync (fs.js:427:18)

/Users/Jim seems to come from the machina NPM itself-- node_modules/machina/coverage/coverage.json.

I'm not really an NPM expert so I don't know if there is a good reason for including the coverage.json file in the NPM. But, if it's there by accident, it would be really nice to remove it! I'm trying to work around this using various arguments to istanbul but it seems painful. Thanks.

ifandelse commented 9 years ago

@danielbprice - Indeed that was an accident on my part, sorry about that! Seems I failed to include a files prop in my package.json, so I will update that and do a patch version bump. I'll post back here once that's published. Thanks for letting me know!

ifandelse commented 9 years ago

@danielbprice OK - you should be good to go with v1.0.1. Let me know if you run into any other issues.