Socket
Socket
Sign inDemoInstall

coffee-coverage

Package Overview
Dependencies
15
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.7.0 to 1.0.0

9

CHANGELOG.md
# coffee-coverage Changelog
### v1.0.0
- [#71: Accept globs as excludes](https://github.com/benbria/coffee-coverage/pull/71) Many thanks to
[dbartholomae](https://github.com/dbartholomae) for this much requested feature. Note that excludes will still
match if they are prefixes (so you can still use /node_modules to eliminate everything in the /node_modules
folder), but you can also use globs here.
### v0.7.0

@@ -110,4 +116,1 @@ - [#64: Add `postProcessors` option to `register()`](https://github.com/benbria/coffee-coverage/pull/64) and deprecate `streamlinejs` option.

"init" and a "js" which must be concatenated to get fully instrumented source.

@@ -65,2 +65,6 @@ Instrumenting Files at Compile Time

You can also use globs. If you have your specs next to your code you might e.g. use:
coffeeCoverage --exclude 'node_modules,.git,**/*.spec.coffee'
#### --path

@@ -67,0 +71,0 @@

// Generated by CoffeeScript 1.9.2
(function() {
var EXTENSIONS, _, assert, fs, path, statFile,
var EXTENSIONS, _, assert, fs, glob, path, statFile,
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };

@@ -16,2 +16,4 @@

glob = require('glob');
exports.stripLeadingDotOrSlash = function(pathName) {

@@ -74,2 +76,13 @@ return pathName.replace(/^\//, "").replace(/^\.\//, "");

}
exclude.map(function(pattern) {
return glob.sync(pattern, {
dot: true,
cwd: basePath,
root: basePath
}).forEach(function(file) {
if (relativeFilename === path.normalize(file)) {
return excluded = true;
}
});
});
components = relativeFilename.split(path.sep);

@@ -76,0 +89,0 @@ for (i = 0, len = components.length; i < len; i++) {

@@ -15,3 +15,3 @@ {

],
"version": "0.7.0",
"version": "1.0.0",
"author": "Benbria (http://www.benbria.com/)",

@@ -49,2 +49,3 @@ "contributors": [

"lodash": "^3.7.0",
"glob": "^6.0.4",
"pkginfo": ">=0.2.3"

@@ -51,0 +52,0 @@ },

@@ -32,10 +32,11 @@ Istanbul and JSCoverage-style instrumentation for CoffeeScript files.

npm install --save-dev coffee-coverage
npm install --save-dev istanbul
mocha --recursive \
--compilers coffee:coffee-script/register \
--require coffee-coverage/register-istanbul \
test
./node_modules/.bin/istanbul report
```bash
$ npm install --save-dev coffee-coverage
$ npm install --save-dev istanbul
$ mocha --recursive --compilers coffee:coffee-script/register --require coffee-coverage/register-istanbul test
$ ./node_modules/.bin/istanbul report
```
You should now have an Istanbul coverage report in ./coverage/lcov-report/index.html.

@@ -42,0 +43,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc