Updating NPM dependencies

This commit is contained in:
Drew Heavner
2020-11-11 13:30:52 +00:00
committed by GitHub
parent 7a6fb66c63
commit bd487ef324
9068 changed files with 1400893 additions and 587661 deletions

View File

@@ -34,8 +34,7 @@ function annotateLines(fileCoverage, structuredText) {
if (!lineStats) {
return;
}
Object.keys(lineStats).forEach(lineNumber => {
const count = lineStats[lineNumber];
Object.entries(lineStats).forEach(([lineNumber, count]) => {
if (structuredText[lineNumber]) {
structuredText[lineNumber].covered = count > 0 ? 'yes' : 'no';
structuredText[lineNumber].hits = count;
@@ -46,8 +45,7 @@ function annotateLines(fileCoverage, structuredText) {
function annotateStatements(fileCoverage, structuredText) {
const statementStats = fileCoverage.s;
const statementMeta = fileCoverage.statementMap;
Object.keys(statementStats).forEach(stName => {
const count = statementStats[stName];
Object.entries(statementStats).forEach(([stName, count]) => {
const meta = statementMeta[stName];
const type = count > 0 ? 'yes' : 'no';
const startCol = meta.start.column;
@@ -85,8 +83,7 @@ function annotateFunctions(fileCoverage, structuredText) {
if (!fnStats) {
return;
}
Object.keys(fnStats).forEach(fName => {
const count = fnStats[fName];
Object.entries(fnStats).forEach(([fName, count]) => {
const meta = fnMeta[fName];
const type = count > 0 ? 'yes' : 'no';
const startCol = meta.decl.start.column;
@@ -125,8 +122,7 @@ function annotateBranches(fileCoverage, structuredText) {
return;
}
Object.keys(branchStats).forEach(branchName => {
const branchArray = branchStats[branchName];
Object.entries(branchStats).forEach(([branchName, branchArray]) => {
const sumCount = branchArray.reduce((p, n) => p + n, 0);
const metaArray = branchMeta[branchName].locations;
let i;

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 B

View File

@@ -1,3 +1,4 @@
'use strict';
/*
Copyright 2012-2015, Yahoo Inc.
Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
@@ -5,6 +6,7 @@
const fs = require('fs');
const path = require('path');
const html = require('html-escaper');
const { ReportBase } = require('istanbul-lib-report');
const annotator = require('./annotator');
function htmlHead(details) {
@@ -14,7 +16,10 @@ function htmlHead(details) {
<meta charset="utf-8" />
<link rel="stylesheet" href="${html.escape(details.prettify.css)}" />
<link rel="stylesheet" href="${html.escape(details.base.css)}" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" type="image/x-icon" href="${html.escape(
details.favicon
)}" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(${html.escape(details.sorter.image)});
@@ -230,7 +235,7 @@ const standardLinkMapper = {
relativePath(source, target) {
const targetPath = this.getPath(target);
const sourcePath = path.dirname(this.getPath(source));
return path.relative(sourcePath, targetPath);
return path.posix.relative(sourcePath, targetPath);
},
assetPath(node, name) {
@@ -245,8 +250,10 @@ function fixPct(metrics) {
return metrics;
}
class HtmlReport {
class HtmlReport extends ReportBase {
constructor(opts) {
super();
this.verbose = opts.verbose;
this.linkMapper = opts.linkMapper || standardLinkMapper;
this.subdir = opts.subdir || '';
@@ -299,6 +306,7 @@ class HtmlReport {
js: linkMapper.assetPath(node, 'prettify.js'),
css: linkMapper.assetPath(node, 'prettify.css')
};
templateData.favicon = linkMapper.assetPath(node, 'favicon.png');
}
getTemplateData() {

View File

@@ -1,3 +1,4 @@
'use strict';
/*
Copyright 2012-2015, Yahoo Inc.
Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.