From acc5086fe9b57b0614a779f39335055f1c2a448b Mon Sep 17 00:00:00 2001 From: Yucel Olcay Date: Thu, 5 Oct 2023 15:23:24 +0700 Subject: [PATCH 1/4] feat(coverage): add branch coverage --- bin/cmd.js | 12 +- package.json | 2 +- src/CoverageResult.js | 49 ++ src/FileResult.js | 47 -- src/__tests__/CoverageResult.spec.js | 242 +++++++ src/__tests__/parser.spec.js | 234 +++++++ src/index.js | 11 +- src/parser.js | 9 +- tests/fixtures/lcov-2.info | 909 +++++++++++++++++++++++++++ tests/fixtures/lcov-3.info | 33 + tests/main.spec.js | 16 +- 11 files changed, 1494 insertions(+), 70 deletions(-) create mode 100644 src/CoverageResult.js delete mode 100644 src/FileResult.js create mode 100644 src/__tests__/CoverageResult.spec.js create mode 100644 src/__tests__/parser.spec.js create mode 100644 tests/fixtures/lcov-2.info create mode 100644 tests/fixtures/lcov-3.info diff --git a/bin/cmd.js b/bin/cmd.js index d8636f0..69ae43b 100755 --- a/bin/cmd.js +++ b/bin/cmd.js @@ -14,12 +14,18 @@ if (!filename) { } const result = total(filename); + +const { totalCoverage, branchCoverage } = JSON.parse(result); + +// console.log({ totalCoverage, branchCoverage }); + let returnVal = `${result}`; let min = 0; if (gte) { - const [, value] = gte.split("="); - min = !isNaN(parseInt(value)) ? parseFloat(value) : 0; - process.exitCode = result >= min ? 0 : 1; + const [gteStr, value] = gte.split("="); + const isGte = gteStr === "--gte"; + min = isGte && !isNaN(parseInt(value)) ? parseFloat(value) : 0; + process.exitCode = totalCoverage >= min && branchCoverage >= min ? 0 : 1; returnVal = ""; } diff --git a/package.json b/package.json index 9fb1f5c..999c366 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "export": "src/index.js", "type": "module", "scripts": { - "test": "NODE_ENV=test ava", + "test": "NODE_ENV=test ava --verbose --gte=45", "prepare": "node prepare.cjs || echo 'Skipping prepare'" }, "repository": { diff --git a/src/CoverageResult.js b/src/CoverageResult.js new file mode 100644 index 0000000..0746eca --- /dev/null +++ b/src/CoverageResult.js @@ -0,0 +1,49 @@ +export class CoverageResult { + constructor(parsedFile) { + this._parsedFile = parsedFile; + } + + get files() { + return this._parsedFile; + } + + get coverage() { + let total = 0; + let executed = 0; + + this.files.forEach((fileResult) => { + const { lines } = fileResult; + + if (!lines) return; + + total += lines.found; + executed += lines.hit; + }); + + if (!total) throw new Error("Can not find any lines"); + + let coverage = (executed / total) * 100; + + return parseFloat(coverage.toFixed(2)); + } + + get branchCoverage() { + let total = 0; + let executed = 0; + + this.files.forEach((fileResult) => { + const { branches } = fileResult; + + if (!branches) return; + + total += branches.found; + executed += branches.hit; + }); + + if (!total) throw new Error("Can not find any branches"); + + let coverage = (executed / total) * 100; + + return parseFloat(coverage.toFixed(2)); + } +} diff --git a/src/FileResult.js b/src/FileResult.js deleted file mode 100644 index c80d993..0000000 --- a/src/FileResult.js +++ /dev/null @@ -1,47 +0,0 @@ -export class FileResult { - constructor(fileName, linesResult) { - this._name = fileName; - this._result = linesResult; - } - - get fileName() { - return this._name; - } - - get executed() { - return this._result.hit; - } - - get total() { - return this._result.found; - } - - get coverage() { - let coverage = (this.executed / this.total) * 100; - return parseFloat(coverage.toFixed(2)); - } -} - -export class CoverageResult { - /** - * @param {FileResult[]} fileResults - */ - constructor(fileResults = []) { - this._fileResults = fileResults; - } - - get files() { - return this._fileResults; - } - - get coverage() { - let total = 0; - let executed = 0; - this.files.forEach((fileResult) => { - total += fileResult.total; - executed += fileResult.executed; - }); - let coverage = (executed / total) * 100; - return parseFloat(coverage.toFixed(2)); - } -} diff --git a/src/__tests__/CoverageResult.spec.js b/src/__tests__/CoverageResult.spec.js new file mode 100644 index 0000000..7a481de --- /dev/null +++ b/src/__tests__/CoverageResult.spec.js @@ -0,0 +1,242 @@ +// eslint-disable-next-line node/no-missing-import +import test from "ava"; + +import { CoverageResult } from "../CoverageResult.js"; + +test("CoverageResult gets line coverage", async (t) => { + const instance = new CoverageResult(parsed); + + const coverage = instance.coverage; + + t.is(coverage, 92.45); +}); + +test("CoverageResult gets branch coverage", async (t) => { + const instance = new CoverageResult(parsed); + + const coverage = instance.branchCoverage; + + t.is(coverage, 87.5); +}); + +const parsed = [ + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + title: "", + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + file: "utils/axios-handler.js", + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { + hit: 0, + found: 0, + details: [{ name: "axiosHandler", line: 26 }], + }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { + hit: 0, + found: 0, + details: [{ name: "(anonymous_16)", line: 37 }], + }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { + hit: 0, + found: 0, + details: [{ name: "gitbeakerWrapper", line: 66 }], + }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { + hit: 0, + found: 0, + details: [{ name: "(anonymous_19)", line: 76 }], + }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { + hit: 0, + found: 0, + details: [{ name: "(anonymous_20)", line: 90 }], + }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 5, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 5, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [{ line: 1, hit: 7 }] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [{ line: 2, hit: 7 }] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [{ line: 3, hit: 7 }] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [{ line: 5, hit: 7 }] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [{ line: 6, hit: 7 }] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [{ line: 26, hit: 7 }] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 53, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 49, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { + hit: 0, + found: 0, + details: [{ line: 26, block: 0, branch: 0, taken: 5 }], + }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { + hit: 0, + found: 0, + details: [{ line: 27, block: 1, branch: 0, taken: 5 }], + }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { + hit: 0, + found: 0, + details: [{ line: 29, block: 2, branch: 0, taken: 15 }], + }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { + hit: 0, + found: 0, + details: [{ line: 29, block: 2, branch: 1, taken: 12 }], + }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { + hit: 0, + found: 0, + details: [{ line: 31, block: 3, branch: 0, taken: 1 }], + }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { + hit: 0, + found: 0, + details: [{ line: 31, block: 4, branch: 0, taken: 3 }], + }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { + hit: 0, + found: 0, + details: [{ line: 31, block: 4, branch: 1, taken: 11 }], + }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { + hit: 0, + found: 0, + details: [{ line: 31, block: 5, branch: 0, taken: 14 }], + }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 56, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 49, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, +]; diff --git a/src/__tests__/parser.spec.js b/src/__tests__/parser.spec.js new file mode 100644 index 0000000..1d54474 --- /dev/null +++ b/src/__tests__/parser.spec.js @@ -0,0 +1,234 @@ +// eslint-disable-next-line node/no-missing-import +import test from "ava"; + +import parse from "../parser.js"; + +test("Should parse .info file", async (t) => { + const output = parse("tests/fixtures/lcov-3.info"); + + // console.log(util.inspect(output, { showHidden: false, depth: null })); + + t.deepEqual(output, parsed); +}); + +const parsed = [ + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + title: "", + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + file: "utils/axios-handler.js", + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { + hit: 0, + found: 0, + details: [{ name: "axiosHandler", line: 26 }], + }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { + hit: 0, + found: 0, + details: [{ name: "(anonymous_16)", line: 37 }], + }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { + hit: 0, + found: 0, + details: [{ name: "gitbeakerWrapper", line: 66 }], + }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { + hit: 0, + found: 0, + details: [{ name: "(anonymous_19)", line: 76 }], + }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { + hit: 0, + found: 0, + details: [{ name: "(anonymous_20)", line: 90 }], + }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 5, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 5, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [{ line: 1, hit: 7 }] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [{ line: 2, hit: 7 }] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [{ line: 3, hit: 7 }] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [{ line: 5, hit: 7 }] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [{ line: 6, hit: 7 }] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [{ line: 26, hit: 7 }] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 53, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 49, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { + hit: 0, + found: 0, + details: [{ line: 26, block: 0, branch: 0, taken: 5 }], + }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { + hit: 0, + found: 0, + details: [{ line: 27, block: 1, branch: 0, taken: 5 }], + }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { + hit: 0, + found: 0, + details: [{ line: 29, block: 2, branch: 0, taken: 15 }], + }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { + hit: 0, + found: 0, + details: [{ line: 29, block: 2, branch: 1, taken: 12 }], + }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { + hit: 0, + found: 0, + details: [{ line: 31, block: 3, branch: 0, taken: 1 }], + }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { + hit: 0, + found: 0, + details: [{ line: 31, block: 4, branch: 0, taken: 3 }], + }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { + hit: 0, + found: 0, + details: [{ line: 31, block: 4, branch: 1, taken: 11 }], + }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { + hit: 0, + found: 0, + details: [{ line: 31, block: 5, branch: 0, taken: 14 }], + }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 56, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 49, found: 0, details: [] }, + }, + { + lines: { found: 0, hit: 0, details: [] }, + functions: { hit: 0, found: 0, details: [] }, + branches: { hit: 0, found: 0, details: [] }, + }, +]; diff --git a/src/index.js b/src/index.js index 951791e..4478ca3 100644 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,4 @@ -import { FileResult, CoverageResult } from "./FileResult.js"; +import { CoverageResult } from "./CoverageResult.js"; import parser from "./parser.js"; export default function total(filename) { @@ -8,11 +8,10 @@ export default function total(filename) { throw new Error("content is empty"); } - /** @type FileResult[] */ - const fileResults = results.map((result) => { - return new FileResult(result.file, result.lines); + const coverageResult = new CoverageResult(results); + return JSON.stringify({ + totalCoverage: coverageResult.coverage, + branchCoverage: coverageResult.branchCoverage, }); - const coverageResult = new CoverageResult(fileResults); - return coverageResult.coverage; } // diff --git a/src/parser.js b/src/parser.js index d118405..4372cfb 100644 --- a/src/parser.js +++ b/src/parser.js @@ -6,9 +6,9 @@ export default function parse(filename) { } export function format(file) { - const dataset = ["end_of_record"].concat(file.split("\n")); + const dataset = file?.split("\n"); - const data = dataset.map(function (current) { + const data = dataset?.map(function (current) { const item = { lines: { found: 0, @@ -95,10 +95,9 @@ export function format(file) { return item; }); - data.shift(); - - if (!data.length) { + if (!data?.length) { throw new Error("FAILED_TO_PARSE_STRING"); } + return data; } diff --git a/tests/fixtures/lcov-2.info b/tests/fixtures/lcov-2.info new file mode 100644 index 0000000..27d8a79 --- /dev/null +++ b/tests/fixtures/lcov-2.info @@ -0,0 +1,909 @@ +TN: +SF:utils/axios-handler.js +FN:26,axiosHandler +FN:37,(anonymous_16) +FN:66,gitbeakerWrapper +FN:76,(anonymous_19) +FN:90,(anonymous_20) +FNF:5 +FNH:5 +FNDA:15,axiosHandler +FNDA:7,(anonymous_16) +FNDA:5,gitbeakerWrapper +FNDA:27,(anonymous_19) +FNDA:5,(anonymous_20) +DA:1,7 +DA:2,7 +DA:3,7 +DA:5,7 +DA:6,7 +DA:26,7 +DA:27,15 +DA:28,15 +DA:29,15 +DA:31,14 +DA:32,1 +DA:34,1 +DA:37,13 +DA:39,7 +DA:41,7 +DA:43,7 +DA:44,5 +DA:52,5 +DA:53,1 +DA:56,6 +DA:59,5 +DA:62,5 +DA:66,7 +DA:67,5 +DA:68,5 +DA:69,5 +DA:71,5 +DA:72,0 +DA:76,27 +DA:77,5 +DA:78,5 +DA:80,5 +DA:87,5 +DA:88,5 +DA:89,5 +DA:90,5 +DA:94,5 +DA:97,5 +DA:99,5 +DA:100,5 +DA:102,5 +DA:103,5 +DA:104,3 +DA:106,2 +DA:112,1 +DA:114,1 +DA:118,1 +DA:122,0 +DA:129,2 +DA:130,1 +DA:132,1 +DA:136,0 +DA:137,0 +LF:53 +LH:49 +BRDA:26,0,0,5 +BRDA:27,1,0,5 +BRDA:29,2,0,15 +BRDA:29,2,1,12 +BRDA:31,3,0,1 +BRDA:31,4,0,3 +BRDA:31,4,1,11 +BRDA:31,5,0,14 +BRDA:31,5,1,14 +BRDA:43,6,0,5 +BRDA:43,7,0,2 +BRDA:43,7,1,5 +BRDA:43,8,0,7 +BRDA:43,8,1,7 +BRDA:43,9,0,0 +BRDA:43,9,1,7 +BRDA:43,10,0,7 +BRDA:43,10,1,7 +BRDA:46,11,0,0 +BRDA:46,11,1,5 +BRDA:46,12,0,5 +BRDA:46,12,1,5 +BRDA:46,13,0,0 +BRDA:46,13,1,5 +BRDA:46,14,0,5 +BRDA:46,14,1,5 +BRDA:52,15,0,1 +BRDA:56,16,0,1 +BRDA:59,17,0,5 +BRDA:59,17,1,1 +BRDA:59,17,2,1 +BRDA:59,18,0,1 +BRDA:59,18,1,4 +BRDA:59,19,0,5 +BRDA:59,19,1,5 +BRDA:69,20,0,5 +BRDA:69,20,1,5 +BRDA:71,21,0,0 +BRDA:76,22,0,0 +BRDA:76,22,1,27 +BRDA:76,23,0,27 +BRDA:76,23,1,27 +BRDA:84,24,0,5 +BRDA:84,24,1,0 +BRDA:103,25,0,3 +BRDA:103,25,1,2 +BRDA:104,26,0,2 +BRDA:104,26,1,1 +BRDA:112,27,0,1 +BRDA:112,27,1,0 +BRDA:129,28,0,1 +BRDA:129,28,1,1 +BRDA:129,29,0,1 +BRDA:129,29,1,1 +BRDA:129,30,0,2 +BRDA:129,30,1,2 +BRF:56 +BRH:49 +end_of_record +TN: +SF:utils/bash-string-to-array.js +FN:1,(anonymous_0) +FN:5,(anonymous_1) +FN:6,(anonymous_2) +FNF:3 +FNH:3 +FNDA:1,(anonymous_0) +FNDA:3,(anonymous_1) +FNDA:2,(anonymous_2) +DA:1,6 +DA:2,1 +DA:5,3 +DA:6,2 +LF:4 +LH:4 +BRDA:2,0,0,1 +BRDA:2,0,1,1 +BRDA:2,0,2,0 +BRDA:3,1,0,0 +BRDA:3,1,1,1 +BRDA:3,2,0,1 +BRDA:3,2,1,1 +BRDA:3,3,0,0 +BRDA:3,3,1,1 +BRDA:3,4,0,1 +BRDA:3,4,1,1 +BRF:11 +BRH:8 +end_of_record +TN: +SF:utils/casings.js +FN:7,(anonymous_0) +FN:11,(anonymous_1) +FN:19,(anonymous_2) +FN:23,(anonymous_3) +FN:36,(anonymous_4) +FN:39,(anonymous_5) +FN:43,(anonymous_6) +FNF:7 +FNH:7 +FNDA:12,(anonymous_0) +FNDA:13,(anonymous_1) +FNDA:1,(anonymous_2) +FNDA:3,(anonymous_3) +FNDA:1,(anonymous_4) +FNDA:3,(anonymous_5) +FNDA:9,(anonymous_6) +DA:7,11 +DA:8,12 +DA:11,13 +DA:19,11 +DA:20,1 +DA:24,3 +DA:36,11 +DA:37,1 +DA:38,1 +DA:39,3 +DA:41,1 +DA:44,9 +DA:46,9 +DA:48,8 +DA:49,2 +DA:52,6 +LF:16 +LH:16 +BRDA:8,0,0,2 +BRDA:8,0,1,10 +BRDA:8,1,0,12 +BRDA:8,1,1,12 +BRDA:20,2,0,0 +BRDA:20,2,1,1 +BRDA:20,3,0,1 +BRDA:20,3,1,1 +BRDA:24,4,0,1 +BRDA:24,4,1,2 +BRDA:37,5,0,0 +BRDA:37,5,1,1 +BRDA:37,6,0,1 +BRDA:37,6,1,1 +BRDA:46,7,0,1 +BRDA:48,8,0,2 +BRF:16 +BRH:14 +end_of_record +TN: +SF:utils/clone-adapters.js +FN:16,cloneAdapters +FN:41,findAdapters +FN:60,downloadAndCopyToAdaptersFolder +FNF:3 +FNH:2 +FNDA:1,cloneAdapters +FNDA:1,findAdapters +FNDA:0,downloadAndCopyToAdaptersFolder +DA:3,4 +DA:5,4 +DA:7,4 +DA:16,4 +DA:21,1 +DA:23,1 +DA:25,1 +DA:27,5 +DA:28,2 +DA:41,4 +DA:42,1 +DA:47,1 +DA:49,1 +DA:51,1 +DA:60,4 +DA:65,0 +DA:67,0 +DA:68,0 +DA:71,0 +LF:19 +LH:15 +BRDA:19,0,0,1 +BRDA:25,1,0,0 +BRDA:25,2,0,0 +BRDA:25,2,1,1 +BRDA:25,3,0,1 +BRDA:25,3,1,1 +BRDA:49,4,0,1 +BRDA:49,4,1,0 +BRDA:49,5,0,0 +BRDA:49,5,1,1 +BRDA:49,6,0,1 +BRDA:49,6,1,1 +BRF:12 +BRH:8 +end_of_record +TN: +SF:utils/clone-block-into-repo.js +FN:23,cloneBlockIntoRepo +FNF:1 +FNH:1 +FNDA:3,cloneBlockIntoRepo +DA:1,6 +DA:3,6 +DA:4,6 +DA:6,6 +DA:13,6 +DA:23,6 +DA:35,3 +DA:38,3 +DA:39,3 +DA:43,3 +DA:44,2 +DA:46,2 +DA:56,2 +DA:58,1 +DA:60,1 +DA:63,1 +DA:64,1 +DA:65,0 +DA:67,1 +DA:69,1 +DA:75,1 +DA:77,1 +DA:83,1 +DA:85,1 +DA:86,1 +DA:89,3 +DA:91,3 +LF:27 +LH:26 +BRDA:27,0,0,0 +BRDA:43,1,0,2 +BRDA:43,1,1,1 +BRDA:63,2,0,1 +BRDA:64,3,0,0 +BRDA:64,4,0,1 +BRDA:64,4,1,1 +BRDA:64,5,0,0 +BRDA:64,5,1,1 +BRDA:64,6,0,1 +BRDA:64,6,1,1 +BRDA:64,7,0,0 +BRDA:64,7,1,1 +BRDA:64,8,0,1 +BRDA:64,8,1,1 +BRF:15 +BRH:11 +end_of_record +TN: +SF:utils/create-file.js +FN:12,createFile +FN:23,(anonymous_2) +FN:26,(anonymous_3) +FNF:3 +FNH:3 +FNDA:13,createFile +FNDA:37,(anonymous_2) +FNDA:97,(anonymous_3) +DA:1,8 +DA:12,8 +DA:13,13 +DA:15,13 +DA:17,13 +DA:19,13 +DA:21,13 +DA:23,13 +DA:24,37 +DA:26,97 +DA:29,37 +DA:32,13 +DA:33,7 +DA:35,13 +LF:14 +LH:14 +BRDA:12,0,0,13 +BRDA:13,1,0,0 +BRDA:17,2,0,13 +BRDA:17,2,1,0 +BRDA:19,3,0,8 +BRDA:19,3,1,5 +BRDA:19,4,0,0 +BRDA:19,4,1,8 +BRDA:19,5,0,8 +BRDA:19,5,1,8 +BRDA:21,6,0,6 +BRDA:21,7,0,0 +BRDA:21,7,1,6 +BRDA:21,8,0,6 +BRDA:21,8,1,6 +BRDA:23,9,0,0 +BRDA:23,9,1,13 +BRDA:23,10,0,13 +BRDA:23,10,1,13 +BRDA:29,11,0,29 +BRDA:32,12,0,7 +BRDA:32,13,0,13 +BRDA:32,13,1,7 +BRF:23 +BRH:18 +end_of_record +TN: +SF:utils/custom-exec.js +FN:11,(anonymous_8) +FN:11,(anonymous_9) +FN:21,(anonymous_10) +FN:22,(anonymous_11) +FNF:4 +FNH:4 +FNDA:6,(anonymous_8) +FNDA:6,(anonymous_9) +FNDA:3,(anonymous_10) +FNDA:3,(anonymous_11) +DA:1,7 +DA:2,7 +DA:11,7 +DA:12,6 +DA:16,6 +DA:18,6 +DA:20,6 +DA:21,3 +DA:23,3 +DA:25,2 +DA:26,1 +LF:11 +LH:11 +BRDA:11,0,0,3 +BRDA:12,1,0,4 +BRDA:12,2,0,5 +BRDA:16,3,0,6 +BRDA:16,3,1,5 +BRDA:23,4,0,1 +BRDA:23,5,0,3 +BRDA:23,5,1,3 +BRDA:25,6,0,1 +BRF:9 +BRH:9 +end_of_record +TN: +SF:utils/eslint-utils.js +FN:27,(anonymous_0) +FN:28,(anonymous_1) +FN:34,(anonymous_2) +FN:45,(anonymous_3) +FN:46,(anonymous_4) +FN:49,(anonymous_5) +FN:69,(anonymous_6) +FN:70,(anonymous_7) +FN:71,(anonymous_8) +FNF:9 +FNH:3 +FNDA:2,(anonymous_0) +FNDA:3,(anonymous_1) +FNDA:1,(anonymous_2) +FNDA:0,(anonymous_3) +FNDA:0,(anonymous_4) +FNDA:0,(anonymous_5) +FNDA:0,(anonymous_6) +FNDA:0,(anonymous_7) +FNDA:0,(anonymous_8) +DA:27,7 +DA:28,2 +DA:29,3 +DA:31,2 +DA:33,2 +DA:34,1 +DA:37,2 +DA:45,7 +DA:46,0 +DA:47,0 +DA:49,0 +DA:50,0 +DA:51,0 +DA:52,0 +DA:56,0 +DA:57,0 +DA:59,0 +DA:69,7 +DA:70,0 +DA:71,0 +DA:72,0 +DA:77,0 +DA:79,0 +DA:82,0 +LF:24 +LH:9 +BRDA:27,0,0,1 +BRDA:29,1,0,1 +BRDA:29,2,0,0 +BRDA:29,2,1,3 +BRDA:29,3,0,3 +BRDA:29,3,1,3 +BRDA:33,4,0,1 +BRDA:46,5,0,0 +BRDA:46,5,1,0 +BRDA:46,6,0,0 +BRDA:46,6,1,0 +BRDA:50,7,0,0 +BRDA:56,8,0,0 +BRDA:77,9,0,0 +BRDA:77,10,0,0 +BRDA:77,10,1,0 +BRDA:77,11,0,0 +BRDA:77,11,1,0 +BRF:18 +BRH:6 +end_of_record +TN: +SF:utils/get-args.js +FNF:0 +FNH:0 +DA:1,7 +DA:3,7 +DA:27,7 +DA:29,7 +DA:31,7 +DA:32,7 +DA:34,7 +DA:36,7 +LF:8 +LH:8 +BRF:0 +BRH:0 +end_of_record +TN: +SF:utils/get-block-name-and-path.js +FN:7,getBlockNameAndPath +FNF:1 +FNH:1 +FNDA:14,getBlockNameAndPath +DA:7,6 +DA:8,14 +DA:10,14 +DA:12,14 +DA:14,14 +DA:15,14 +DA:16,14 +DA:17,14 +DA:19,14 +DA:21,14 +DA:22,12 +DA:26,12 +DA:30,12 +DA:31,12 +DA:34,12 +DA:35,3 +DA:36,2 +DA:40,1 +DA:41,1 +DA:42,9 +DA:43,8 +DA:45,8 +DA:46,8 +DA:47,8 +DA:48,8 +DA:50,8 +DA:51,2 +DA:56,8 +DA:57,8 +DA:59,2 +DA:60,2 +DA:63,10 +LF:32 +LH:32 +BRDA:8,0,0,0 +BRDA:8,1,0,14 +BRDA:8,1,1,14 +BRDA:10,2,0,0 +BRDA:10,2,1,14 +BRDA:10,3,0,14 +BRDA:10,3,1,14 +BRDA:14,4,0,0 +BRDA:14,4,1,14 +BRDA:14,5,0,14 +BRDA:14,5,1,14 +BRDA:15,6,0,0 +BRDA:15,6,1,14 +BRDA:15,7,0,14 +BRDA:15,7,1,14 +BRDA:19,8,0,14 +BRDA:19,8,1,6 +BRDA:21,9,0,12 +BRDA:21,9,1,2 +BRDA:27,10,0,12 +BRDA:27,10,1,10 +BRDA:31,11,0,12 +BRDA:31,11,1,5 +BRDA:34,12,0,3 +BRDA:34,12,1,9 +BRDA:34,13,0,12 +BRDA:34,13,1,4 +BRDA:35,14,0,2 +BRDA:35,15,0,3 +BRDA:35,15,1,2 +BRDA:42,16,0,8 +BRDA:43,17,0,8 +BRDA:43,17,1,3 +BRDA:50,18,0,2 +BRDA:50,19,0,8 +BRDA:50,19,1,2 +BRDA:56,20,0,8 +BRDA:56,20,1,7 +BRDA:56,20,2,4 +BRF:39 +BRH:35 +end_of_record +TN: +SF:utils/gitlab-paginated-data-wrapper.js +FN:15,(anonymous_13) +FN:19,(anonymous_14) +FNF:2 +FNH:2 +FNDA:2,(anonymous_13) +FNDA:2,(anonymous_14) +DA:1,8 +DA:2,8 +DA:15,8 +DA:19,2 +DA:24,2 +DA:29,2 +DA:35,2 +DA:37,2 +DA:39,2 +DA:40,1 +DA:42,1 +LF:11 +LH:11 +BRDA:16,0,0,0 +BRDA:18,1,0,1 +BRDA:21,2,0,1 +BRDA:22,3,0,1 +BRDA:23,4,0,1 +BRDA:35,5,0,2 +BRDA:35,5,1,0 +BRDA:35,6,0,2 +BRDA:35,6,1,2 +BRDA:39,7,0,1 +BRDA:39,7,1,1 +BRDA:39,8,0,2 +BRDA:39,8,1,1 +BRDA:39,8,2,0 +BRF:14 +BRH:11 +end_of_record +TN: +SF:utils/move-from-nested-to-clone-target.js +FN:9,moveFromNestedToCloneTarget +FNF:1 +FNH:1 +FNDA:1,moveFromNestedToCloneTarget +DA:1,4 +DA:9,4 +DA:10,1 +DA:11,1 +DA:13,1 +LF:5 +LH:5 +BRF:0 +BRH:0 +end_of_record +TN: +SF:utils/progress-bar.js +FN:10,(anonymous_1) +FN:18,(anonymous_2) +FN:24,(anonymous_3) +FN:33,(anonymous_4) +FN:39,(anonymous_5) +FN:56,(anonymous_6) +FN:56,(anonymous_7) +FN:64,(anonymous_8) +FNF:8 +FNH:7 +FNDA:9,(anonymous_1) +FNDA:4,(anonymous_2) +FNDA:75,(anonymous_3) +FNDA:71,(anonymous_4) +FNDA:72,(anonymous_5) +FNDA:73,(anonymous_6) +FNDA:0,(anonymous_7) +FNDA:4,(anonymous_8) +DA:1,7 +DA:2,7 +DA:4,7 +DA:9,7 +DA:11,9 +DA:12,9 +DA:13,9 +DA:14,9 +DA:15,9 +DA:19,4 +DA:20,4 +DA:21,4 +DA:25,75 +DA:28,75 +DA:29,1 +DA:33,75 +DA:34,71 +DA:35,71 +DA:41,72 +DA:43,72 +DA:45,72 +DA:46,72 +DA:47,72 +DA:49,72 +DA:51,72 +DA:56,0 +DA:57,73 +DA:58,73 +DA:59,2372 +DA:61,73 +DA:65,4 +DA:67,4 +DA:70,4 +LF:33 +LH:32 +BRDA:14,0,0,0 +BRDA:14,0,1,9 +BRDA:14,1,0,9 +BRDA:14,1,1,9 +BRDA:28,2,0,1 +BRDA:41,3,0,0 +BRDA:45,4,0,0 +BRDA:45,4,1,72 +BRDA:45,5,0,72 +BRDA:45,5,1,72 +BRDA:46,6,0,0 +BRDA:46,6,1,72 +BRDA:46,7,0,72 +BRDA:46,7,1,72 +BRDA:47,8,0,0 +BRDA:47,8,1,72 +BRDA:47,9,0,72 +BRDA:47,9,1,72 +BRDA:51,10,0,0 +BRDA:51,10,1,72 +BRDA:51,11,0,72 +BRDA:51,11,1,72 +BRDA:56,12,0,0 +BRDA:67,13,0,0 +BRDA:70,14,0,0 +BRDA:70,14,1,4 +BRDA:70,15,0,4 +BRDA:70,15,1,4 +BRF:28 +BRH:19 +end_of_record +TN: +SF:utils/remove-directory.js +FN:9,(anonymous_1) +FN:16,(anonymous_2) +FNF:2 +FNH:2 +FNDA:23,(anonymous_1) +FNDA:7,(anonymous_2) +DA:1,7 +DA:2,7 +DA:9,7 +DA:10,23 +DA:12,13 +DA:14,12 +DA:16,12 +DA:17,7 +DA:19,7 +DA:20,7 +DA:21,5 +DA:23,2 +DA:28,12 +LF:13 +LH:13 +BRDA:10,0,0,10 +BRDA:12,1,0,1 +BRDA:19,2,0,7 +BRDA:19,3,0,7 +BRDA:19,3,1,7 +BRDA:20,4,0,5 +BRDA:20,4,1,2 +BRF:7 +BRH:7 +end_of_record +TN: +SF:utils/remove-non-npm-packages.js +FN:10,removeNonNpmPackages +FN:22,checkAndGetNpmPackage +FN:37,doesNpmPackageExist +FNF:3 +FNH:3 +FNDA:2,removeNonNpmPackages +FNDA:8,checkAndGetNpmPackage +FNDA:8,doesNpmPackageExist +DA:1,7 +DA:10,7 +DA:11,2 +DA:13,12 +DA:14,6 +DA:16,6 +DA:19,2 +DA:23,8 +DA:25,8 +DA:27,8 +DA:28,4 +DA:30,2 +DA:31,2 +DA:33,4 +DA:39,8 +DA:46,8 +LF:16 +LH:16 +BRDA:16,0,0,5 +BRDA:27,1,0,4 +BRDA:27,1,1,4 +BRDA:28,2,0,2 +BRDA:33,3,0,3 +BRDA:33,3,1,1 +BRF:6 +BRH:6 +end_of_record +TN: +SF:utils/run-spawn.js +FN:12,(anonymous_8) +FN:12,(anonymous_9) +FN:45,(anonymous_10) +FN:51,(anonymous_11) +FN:57,(anonymous_12) +FN:58,(anonymous_13) +FNF:6 +FNH:6 +FNDA:13,(anonymous_8) +FNDA:13,(anonymous_9) +FNDA:13,(anonymous_10) +FNDA:3,(anonymous_11) +FNDA:13,(anonymous_12) +FNDA:13,(anonymous_13) +DA:1,6 +DA:2,6 +DA:12,13 +DA:13,13 +DA:21,13 +DA:27,13 +DA:28,13 +DA:34,13 +DA:36,13 +DA:38,13 +DA:40,13 +DA:42,13 +DA:43,13 +DA:45,13 +DA:46,13 +DA:47,13 +DA:48,13 +DA:51,13 +DA:52,3 +DA:53,3 +DA:54,3 +DA:57,13 +DA:58,13 +DA:59,13 +DA:61,13 +DA:65,13 +DA:66,4 +DA:70,4 +DA:72,3 +DA:75,12 +LF:30 +LH:30 +BRDA:12,0,0,5 +BRDA:34,1,0,13 +BRDA:34,1,1,6 +BRDA:38,2,0,1 +BRDA:45,3,0,0 +BRDA:45,3,1,13 +BRDA:45,4,0,13 +BRDA:45,4,1,13 +BRDA:46,5,0,1 +BRDA:46,5,1,12 +BRDA:47,6,0,13 +BRDA:47,6,1,12 +BRDA:51,7,0,0 +BRDA:51,7,1,13 +BRDA:51,8,0,13 +BRDA:51,8,1,13 +BRDA:52,9,0,0 +BRDA:52,9,1,3 +BRDA:53,10,0,3 +BRDA:53,10,1,3 +BRDA:59,11,0,1 +BRDA:65,12,0,4 +BRDA:66,13,0,1 +BRDA:66,13,1,3 +BRDA:70,14,0,1 +BRF:25 +BRH:22 +end_of_record +TN: +SF:utils/helpers/get-gitlab-source-branch.js +FN:10,getGitlabSourceBranch +FN:18,(anonymous_9) +FN:18,(anonymous_10) +FN:22,(anonymous_11) +FN:42,(anonymous_12) +FNF:5 +FNH:3 +FNDA:1,getGitlabSourceBranch +FNDA:0,(anonymous_9) +FNDA:0,(anonymous_10) +FNDA:2,(anonymous_11) +FNDA:1,(anonymous_12) +DA:1,4 +DA:2,4 +DA:10,4 +DA:11,1 +DA:18,0 +DA:21,1 +DA:23,2 +DA:27,1 +DA:29,1 +DA:31,1 +DA:34,1 +DA:41,1 +DA:42,1 +DA:45,1 +DA:47,1 +DA:50,1 +DA:57,1 +LF:17 +LH:16 +BRDA:23,0,0,0 +BRDA:23,0,1,2 +BRDA:23,1,0,2 +BRDA:23,1,1,1 +BRDA:27,2,0,1 +BRDA:27,2,1,1 +BRDA:27,3,0,0 +BRDA:27,3,1,1 +BRDA:27,4,0,1 +BRDA:27,4,1,1 +BRDA:29,5,0,0 +BRDA:45,6,0,1 +BRDA:45,6,1,1 +BRDA:45,7,0,0 +BRDA:45,7,1,1 +BRDA:45,8,0,1 +BRDA:45,8,1,1 +BRDA:47,9,0,0 +BRF:18 +BRH:13 +end_of_record diff --git a/tests/fixtures/lcov-3.info b/tests/fixtures/lcov-3.info new file mode 100644 index 0000000..66a9e07 --- /dev/null +++ b/tests/fixtures/lcov-3.info @@ -0,0 +1,33 @@ +TN: +SF:utils/axios-handler.js +FN:26,axiosHandler +FN:37,(anonymous_16) +FN:66,gitbeakerWrapper +FN:76,(anonymous_19) +FN:90,(anonymous_20) +FNF:5 +FNH:5 +FNDA:15,axiosHandler +FNDA:7,(anonymous_16) +FNDA:5,gitbeakerWrapper +FNDA:27,(anonymous_19) +FNDA:5,(anonymous_20) +DA:1,7 +DA:2,7 +DA:3,7 +DA:5,7 +DA:6,7 +DA:26,7 +LF:53 +LH:49 +BRDA:26,0,0,5 +BRDA:27,1,0,5 +BRDA:29,2,0,15 +BRDA:29,2,1,12 +BRDA:31,3,0,1 +BRDA:31,4,0,3 +BRDA:31,4,1,11 +BRDA:31,5,0,14 +BRF:56 +BRH:49 +end_of_record \ No newline at end of file diff --git a/tests/main.spec.js b/tests/main.spec.js index 6462181..24c2699 100644 --- a/tests/main.spec.js +++ b/tests/main.spec.js @@ -7,12 +7,12 @@ import util from "util"; const exec = util.promisify(ex); const FILEPATH = `${process.cwd()}/tests/fixtures/lcov.info`; -const T_COV = 96.52; +const T_COV = '{"totalCoverage":96.52,"branchCoverage":81.62}'; test("should run, best test ever.", (t) => { const result = total(FILEPATH); - t.is(typeof result, "number"); - t.is(result, T_COV); + t.is(typeof result, "string"); + t.is(result, `${T_COV}`); }); test("Should run as a CLI", async (t) => { @@ -20,23 +20,23 @@ test("Should run as a CLI", async (t) => { t.is(stdout, `${T_COV}`); }); -test("Should exit(1) if lesser then equal 98", async (t) => { +test("Should exit(1) if lesser than 98", async (t) => { let { code } = await t.throwsAsync(() => - exec("node ./bin/cmd.js ./tests/fixtures/lcov.info --gte=98") + exec("node ./bin/cmd.js ./tests/fixtures/lcov.info --gte=98"), ); t.is(code, 1); }); -test("Should exit(0) if greater than equal then 90", async (t) => { +test("Should exit(0) if greater than or equal to 80", async (t) => { const { stderr } = await exec( - "node ./bin/cmd.js ./tests/fixtures/lcov.info --gte=90" + "node ./bin/cmd.js ./tests/fixtures/lcov.info --gte=80", ); t.is(stderr, ""); }); test("Should exit(1) if checking for --gte=100", async (t) => { await t.throwsAsync( - exec("node ./bin/cmd.js ./tests/fixtures/lcov.info --gte=100") + exec("node ./bin/cmd.js ./tests/fixtures/lcov.info --gte=100"), ); }); From d7a4423f1d62db22b9fcf9d13047a2db6e599322 Mon Sep 17 00:00:00 2001 From: Yucel Olcay Date: Thu, 5 Oct 2023 15:23:39 +0700 Subject: [PATCH 2/4] fix: lint errors --- .eslintrc.json | 3 +- package-lock.json | 631 ++++++++++++++++++++++++++++++++++++++++++++-- package.json | 2 +- src/index.js | 1 - src/parser.js | 2 +- 5 files changed, 611 insertions(+), 28 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 50bf59b..810e1c6 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -16,6 +16,7 @@ "rules": { "no-new": "error", "no-process-exit": "off", - "node/no-unsupported-features/es-syntax": "off" + "node/no-unsupported-features/es-syntax": "off", + "node/no-missing-import": "off" } } diff --git a/package-lock.json b/package-lock.json index cb86a3b..a6ffaf0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,7 @@ "eslint": "^8.7.0", "eslint-config-prettier": "^9.0.0", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^4.0.0", + "eslint-plugin-prettier": "^5.0.0", "husky": "^8.0.1", "is-ci": "^3.0.1", "lint-staged": "^14.0.1", @@ -978,6 +978,26 @@ "@octokit/openapi-types": "^18.0.0" } }, + "node_modules/@pkgr/utils": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.2.tgz", + "integrity": "sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "fast-glob": "^3.3.0", + "is-glob": "^4.0.3", + "open": "^9.1.0", + "picocolors": "^1.0.0", + "tslib": "^2.6.0" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, "node_modules/@pnpm/network.ca-file": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz", @@ -2304,6 +2324,15 @@ "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==", "dev": true }, + "node_modules/big-integer": { + "version": "1.6.51", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -2325,6 +2354,18 @@ "integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==", "dev": true }, + "node_modules/bplist-parser": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", + "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", + "dev": true, + "dependencies": { + "big-integer": "^1.6.44" + }, + "engines": { + "node": ">= 5.10.0" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2353,6 +2394,21 @@ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, + "node_modules/bundle-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", + "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==", + "dev": true, + "dependencies": { + "run-applescript": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -3041,6 +3097,162 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "node_modules/default-browser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", + "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==", + "dev": true, + "dependencies": { + "bundle-name": "^3.0.0", + "default-browser-id": "^3.0.0", + "execa": "^7.1.1", + "titleize": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz", + "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==", + "dev": true, + "dependencies": { + "bplist-parser": "^0.2.0", + "untildify": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/execa": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", + "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^4.3.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": "^14.18.0 || ^16.14.0 || >=18.0.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/default-browser/node_modules/human-signals": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", + "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "dev": true, + "engines": { + "node": ">=14.18.0" + } + }, + "node_modules/default-browser/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/npm-run-path": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "dev": true, + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/deprecation": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", @@ -3390,30 +3602,38 @@ } }, "node_modules/eslint-plugin-node/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" } }, "node_modules/eslint-plugin-prettier": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", - "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.0.tgz", + "integrity": "sha512-AgaZCVuYDXHUGxj/ZGu1u8H8CYgDY3iG6w5kUFw4AzMVXzB7VvbKgYR4nATIN+OvUrghMbiDLeimVjVY5ilq3w==", "dev": true, "dependencies": { - "prettier-linter-helpers": "^1.0.0" + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.8.5" }, "engines": { - "node": ">=12.0.0" + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/prettier" }, "peerDependencies": { - "eslint": ">=7.28.0", - "prettier": ">=2.0.0" + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "prettier": ">=3.0.0" }, "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, "eslint-config-prettier": { "optional": true } @@ -3856,9 +4076,9 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -4580,6 +4800,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-error": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/is-error/-/is-error-2.2.2.tgz", @@ -4628,6 +4863,24 @@ "node": ">=0.10.0" } }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -4715,6 +4968,33 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-wsl/node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -9231,6 +9511,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/open": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", + "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", + "dev": true, + "dependencies": { + "default-browser": "^4.0.0", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/optionator": { "version": "0.9.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", @@ -9532,6 +9830,12 @@ "node": ">=8" } }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -10063,6 +10367,21 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/run-applescript": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", + "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==", + "dev": true, + "dependencies": { + "execa": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -11077,6 +11396,22 @@ "node": ">=8" } }, + "node_modules/synckit": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", + "integrity": "sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==", + "dev": true, + "dependencies": { + "@pkgr/utils": "^2.3.1", + "tslib": "^2.5.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, "node_modules/temp-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", @@ -11181,6 +11516,18 @@ "node": ">=4" } }, + "node_modules/titleize": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", + "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", @@ -11281,6 +11628,12 @@ } } }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -11367,6 +11720,15 @@ "node": ">= 10.0.0" } }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -12367,6 +12729,20 @@ "@octokit/openapi-types": "^18.0.0" } }, + "@pkgr/utils": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.2.tgz", + "integrity": "sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "fast-glob": "^3.3.0", + "is-glob": "^4.0.3", + "open": "^9.1.0", + "picocolors": "^1.0.0", + "tslib": "^2.6.0" + } + }, "@pnpm/network.ca-file": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz", @@ -13284,6 +13660,12 @@ "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==", "dev": true }, + "big-integer": { + "version": "1.6.51", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "dev": true + }, "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -13302,6 +13684,15 @@ "integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==", "dev": true }, + "bplist-parser": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", + "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", + "dev": true, + "requires": { + "big-integer": "^1.6.44" + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -13327,6 +13718,15 @@ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, + "bundle-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", + "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==", + "dev": true, + "requires": { + "run-applescript": "^5.0.0" + } + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -13832,6 +14232,101 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "default-browser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", + "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==", + "dev": true, + "requires": { + "bundle-name": "^3.0.0", + "default-browser-id": "^3.0.0", + "execa": "^7.1.1", + "titleize": "^3.0.0" + }, + "dependencies": { + "execa": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", + "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^4.3.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" + } + }, + "human-signals": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", + "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "dev": true + }, + "is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true + }, + "mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true + }, + "npm-run-path": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "dev": true, + "requires": { + "path-key": "^4.0.0" + } + }, + "onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "requires": { + "mimic-fn": "^4.0.0" + } + }, + "path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true + }, + "strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true + } + } + }, + "default-browser-id": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz", + "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==", + "dev": true, + "requires": { + "bplist-parser": "^0.2.0", + "untildify": "^4.0.0" + } + }, + "define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true + }, "deprecation": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", @@ -14216,20 +14711,21 @@ }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } }, "eslint-plugin-prettier": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", - "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.0.tgz", + "integrity": "sha512-AgaZCVuYDXHUGxj/ZGu1u8H8CYgDY3iG6w5kUFw4AzMVXzB7VvbKgYR4nATIN+OvUrghMbiDLeimVjVY5ilq3w==", "dev": true, "requires": { - "prettier-linter-helpers": "^1.0.0" + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.8.5" } }, "eslint-scope": { @@ -14399,9 +14895,9 @@ "dev": true }, "fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", @@ -14949,6 +15445,12 @@ "has": "^1.0.3" } }, + "is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true + }, "is-error": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/is-error/-/is-error-2.2.2.tgz", @@ -14982,6 +15484,15 @@ "is-extglob": "^2.1.1" } }, + "is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "requires": { + "is-docker": "^3.0.0" + } + }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -15039,6 +15550,23 @@ "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", "dev": true }, + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "requires": { + "is-docker": "^2.0.0" + }, + "dependencies": { + "is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true + } + } + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -18183,6 +18711,18 @@ "mimic-fn": "^2.1.0" } }, + "open": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", + "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", + "dev": true, + "requires": { + "default-browser": "^4.0.0", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^2.2.0" + } + }, "optionator": { "version": "0.9.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", @@ -18377,6 +18917,12 @@ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, "picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -18746,6 +19292,15 @@ "glob": "^7.1.3" } }, + "run-applescript": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", + "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==", + "dev": true, + "requires": { + "execa": "^5.0.0" + } + }, "run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -19474,6 +20029,16 @@ } } }, + "synckit": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", + "integrity": "sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==", + "dev": true, + "requires": { + "@pkgr/utils": "^2.3.1", + "tslib": "^2.5.0" + } + }, "temp-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", @@ -19552,6 +20117,12 @@ "integrity": "sha1-mcW/VZWJZq9tBtg73zgA3IL67F0=", "dev": true }, + "titleize": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", + "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", + "dev": true + }, "to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", @@ -19620,6 +20191,12 @@ "yn": "3.1.1" } }, + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -19675,6 +20252,12 @@ "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", "dev": true }, + "untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true + }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", diff --git a/package.json b/package.json index 999c366..ad55308 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "eslint": "^8.7.0", "eslint-config-prettier": "^9.0.0", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^4.0.0", + "eslint-plugin-prettier": "^5.0.0", "husky": "^8.0.1", "is-ci": "^3.0.1", "lint-staged": "^14.0.1", diff --git a/src/index.js b/src/index.js index 4478ca3..fa8ccfa 100644 --- a/src/index.js +++ b/src/index.js @@ -14,4 +14,3 @@ export default function total(filename) { branchCoverage: coverageResult.branchCoverage, }); } -// diff --git a/src/parser.js b/src/parser.js index 4372cfb..c9f0d14 100644 --- a/src/parser.js +++ b/src/parser.js @@ -1,4 +1,4 @@ -import { readFileSync } from "node:fs"; +import { readFileSync } from "fs"; export default function parse(filename) { const file = readFileSync(filename, "utf-8"); From 8960bd9adeed0cf1a8c5698ccf5e6e14676133c8 Mon Sep 17 00:00:00 2001 From: Yucel Olcay Date: Thu, 5 Oct 2023 15:30:01 +0700 Subject: [PATCH 3/4] fix: remove redundant --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ad55308..eded0c1 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "export": "src/index.js", "type": "module", "scripts": { - "test": "NODE_ENV=test ava --verbose --gte=45", + "test": "NODE_ENV=test ava --verbose", "prepare": "node prepare.cjs || echo 'Skipping prepare'" }, "repository": { From ceb29e12e1b8a6feb3569ee5556b6d609bcf0d88 Mon Sep 17 00:00:00 2001 From: Yucel Olcay Date: Mon, 9 Oct 2023 18:43:57 +0700 Subject: [PATCH 4/4] fix: update package.json --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index eded0c1..140fbca 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "2.1.1", "description": "Parsing lcov.info and returning total of the summary intended to use inside CI to exit if threshold not reach", "bin": "bin/cmd.js", + "main": "src/index.js", "export": "src/index.js", "type": "module", "scripts": {