Socket
Socket
Sign inDemoInstall

c8

Package Overview
Dependencies
Maintainers
2
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

c8 - npm Package Compare versions

Comparing version 7.3.5 to 7.4.0

8

CHANGELOG.md

@@ -5,2 +5,10 @@ # Changelog

## [7.4.0](https://www.github.com/bcoe/c8/compare/v7.3.5...v7.4.0) (2020-12-31)
### Features
* support ignore start/stop comment ([#273](https://www.github.com/bcoe/c8/issues/273)) ([90949fa](https://www.github.com/bcoe/c8/commit/90949fa2deac7fccb9fc4b83ecca70f4de025ae9)), closes [#271](https://www.github.com/bcoe/c8/issues/271)
* use debuglog rather than console.warn ([#279](https://www.github.com/bcoe/c8/issues/279)) ([7c04a4d](https://www.github.com/bcoe/c8/commit/7c04a4dc47ee9496d89fcae9062da24a6f642f39))
### [7.3.5](https://www.github.com/bcoe/c8/compare/v7.3.4...v7.3.5) (2020-10-25)

@@ -7,0 +15,0 @@

2

lib/parse-args.js

@@ -129,3 +129,3 @@ const defaultExclude = require('@istanbuljs/schema/default-exclude')

function hideInstrumenterArgs (yargv) {
var argv = process.argv.slice(1)
let argv = process.argv.slice(1)
argv = argv.slice(argv.indexOf(yargv._[0]))

@@ -132,0 +132,0 @@ if (argv[0][0] === '-') {

@@ -12,2 +12,4 @@ const Exclude = require('test-exclude')

const isCjsEsmBridgeCov = require('./is-cjs-esm-bridge')
const util = require('util')
const debuglog = util.debuglog('c8')

@@ -57,3 +59,3 @@ class Report {

async run () {
var context = libReport.createContext({
const context = libReport.createContext({
dir: this.reportsDirectory,

@@ -108,3 +110,3 @@ watermarks: this.watermarks,

} catch (err) {
console.warn(`file: ${v8ScriptCov.url} error: ${err.stack}`)
debuglog(`file: ${v8ScriptCov.url} error: ${err.stack}`)
}

@@ -231,14 +233,14 @@ }

_loadReports () {
const files = readdirSync(this.tempDirectory)
return files.map((f) => {
const reports = []
for (const file of readdirSync(this.tempDirectory)) {
try {
return JSON.parse(readFileSync(
resolve(this.tempDirectory, f),
reports.push(JSON.parse(readFileSync(
resolve(this.tempDirectory, file),
'utf8'
))
)))
} catch (err) {
console.warn(`${err.stack}`)
debuglog(`${err.stack}`)
}
})
}
return reports
}

@@ -275,3 +277,3 @@

} catch (err) {
console.warn(err)
debuglog(`${err.stack}`)
continue

@@ -278,0 +280,0 @@ }

{
"name": "c8",
"version": "7.3.5",
"version": "7.4.0",
"description": "output coverage reports using Node.js' built in coverage",

@@ -46,3 +46,3 @@ "main": "./index.js",

"test-exclude": "^6.0.0",
"v8-to-istanbul": "^7.0.0",
"v8-to-istanbul": "^7.1.0",
"yargs": "^16.0.0",

@@ -55,3 +55,3 @@ "yargs-parser": "^20.0.0"

"mocha": "^8.1.3",
"standard": "^14.1.0",
"standard": "^16.0.3",
"ts-node": "^9.0.0",

@@ -58,0 +58,0 @@ "typescript": "^4.0.0"

@@ -67,3 +67,3 @@ # c8 - native V8 code-coverage

### Ignoring the next element
### Ignoring the next line

@@ -76,3 +76,3 @@ ```js

### Ignoring the next N elements
### Ignoring the next N lines

@@ -87,2 +87,12 @@ ```js

### Ignoring all lines until told
```js
/* c8 ignore start */
function dontMindMe() {
// ...
}
/* c8 ignore stop */
```
### Ignoring a block on the current line

@@ -89,0 +99,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc