Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

v8-to-istanbul

Package Overview
Dependencies
Maintainers
0
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

v8-to-istanbul - npm Package Compare versions

Comparing version 9.2.0 to 9.3.0

7

CHANGELOG.md

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

## [9.3.0](https://github.com/istanbuljs/v8-to-istanbul/compare/v9.2.0...v9.3.0) (2024-06-22)
### Features
* respect node:coverage comments ([#252](https://github.com/istanbuljs/v8-to-istanbul/issues/252)) ([92d593e](https://github.com/istanbuljs/v8-to-istanbul/commit/92d593e6ad7ad38bfacb3c9d237667df5c452fcb))
## [9.2.0](https://github.com/istanbuljs/v8-to-istanbul/compare/v9.1.3...v9.2.0) (2023-11-22)

@@ -7,0 +14,0 @@

14

lib/source.js

@@ -55,3 +55,3 @@ const CovLine = require('./line')

_parseIgnore (lineStr) {
const testIgnoreNextLines = lineStr.match(/^\W*\/\* [c|v]8 ignore next (?<count>[0-9]+)/)
const testIgnoreNextLines = lineStr.match(/^\W*\/\* (?:[cv]8|node:coverage) ignore next (?<count>[0-9]+)/)
if (testIgnoreNextLines) {

@@ -62,7 +62,7 @@ return { count: Number(testIgnoreNextLines.groups.count) }

// Check if comment is on its own line.
if (lineStr.match(/^\W*\/\* [c|v]8 ignore next/)) {
if (lineStr.match(/^\W*\/\* (?:[cv]8|node:coverage) ignore next/)) {
return { count: 1 }
}
if (lineStr.match(/\/\* [c|v]8 ignore next/)) {
if (lineStr.match(/\/\* ([cv]8|node:coverage) ignore next/)) {
// Won't ignore successive lines, but the current line will be ignored.

@@ -77,2 +77,8 @@ return { count: 0 }

}
const testNodeIgnoreStartStop = lineStr.match(/\/\* node:coverage (?<mode>enable|disable)/)
if (testNodeIgnoreStartStop) {
if (testNodeIgnoreStartStop.groups.mode === 'disable') return { start: true }
if (testNodeIgnoreStartStop.groups.mode === 'enable') return { stop: true }
}
}

@@ -241,2 +247,3 @@

function getShebangLength (source) {
/* c8 ignore start - platform-specific */
if (isPreNode12 && source.indexOf('#!') === 0) {

@@ -248,4 +255,5 @@ const match = source.match(/(?<shebang>#!.*)/)

} else {
/* c8 ignore stop - platform-specific */
return 0
}
}
{
"name": "v8-to-istanbul",
"version": "9.2.0",
"version": "9.3.0",
"description": "convert from v8 coverage format to istanbul's format",

@@ -33,3 +33,3 @@ "main": "index.js",

"devDependencies": {
"@types/node": "^18.0.0",
"@types/node": "^20.0.0",
"c8": "^7.2.1",

@@ -36,0 +36,0 @@ "semver": "^7.3.2",

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