Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump prettier from 3.0.0 to 3.3.3 #108

Merged
merged 5 commits into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.action = void 0;
exports.action = action;
/* eslint-disable @typescript-eslint/no-explicit-any */
const core = __importStar(__nccwpck_require__(2186));
const github = __importStar(__nccwpck_require__(5438));
Expand Down Expand Up @@ -134,7 +134,6 @@ async function action() {
}
}
}
exports.action = action;
async function getJsonReports(xmlPaths, debugMode) {
const globber = await glob.create(xmlPaths.join('\n'));
const files = await globber.glob();
Expand Down Expand Up @@ -212,7 +211,7 @@ async function addComment(prNumber, update, title, body, client, debugMode) {
"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getProjectCoverage = void 0;
exports.getProjectCoverage = getProjectCoverage;
const util_1 = __nccwpck_require__(1597);
function getProjectCoverage(reports, changedFiles) {
const moduleCoverages = [];
Expand Down Expand Up @@ -271,7 +270,6 @@ function getProjectCoverage(reports, changedFiles) {
'coverage-changed-files': totalPercentage ?? 100,
};
}
exports.getProjectCoverage = getProjectCoverage;
function sumReducer(total, value) {
return total + value;
}
Expand Down Expand Up @@ -422,7 +420,8 @@ function getDetailedCoverage(counters, type) {
"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getTitle = exports.getPRComment = void 0;
exports.getPRComment = getPRComment;
exports.getTitle = getTitle;
function getPRComment(project, minCoverage, title, emoji) {
const heading = getTitle(title);
const overallTable = getOverallTable(project, minCoverage, emoji);
Expand All @@ -435,7 +434,6 @@ function getPRComment(project, minCoverage, title, emoji) {
: filesTable;
return `${heading + overallTable}\n\n${tables}`;
}
exports.getPRComment = getPRComment;
function getModuleTable(modules, minCoverage, emoji) {
const tableHeader = '|Module|Coverage||';
const tableStructure = '|:-|:-|:-:|';
Expand Down Expand Up @@ -533,7 +531,6 @@ function getTitle(title) {
return '';
}
}
exports.getTitle = getTitle;
function getStatus(coverage, minCoverage, emoji) {
let status = emoji.pass;
if (coverage != null && coverage < minCoverage) {
Expand Down Expand Up @@ -562,12 +559,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.parseToReport = exports.getFilesWithCoverage = exports.getChangedLines = exports.debug = void 0;
exports.debug = debug;
exports.getChangedLines = getChangedLines;
exports.getFilesWithCoverage = getFilesWithCoverage;
exports.parseToReport = parseToReport;
const xml2js_1 = __importDefault(__nccwpck_require__(6189));
function debug(obj) {
return JSON.stringify(obj, null, 4);
}
exports.debug = debug;
const pattern = /^@@ -([0-9]*),?\S* \+([0-9]*),?/;
function getChangedLines(patch) {
const lineNumbers = new Set();
Expand Down Expand Up @@ -595,7 +594,6 @@ function getChangedLines(patch) {
}
return [...lineNumbers];
}
exports.getChangedLines = getChangedLines;
function getDiffGroups(lines) {
const groups = [];
let group = [];
Expand Down Expand Up @@ -650,7 +648,6 @@ function getFilesWithCoverage(packages) {
}
return files;
}
exports.getFilesWithCoverage = getFilesWithCoverage;
async function parseToReport(reportXml) {
const json = await xml2js_1.default.parseStringPromise(reportXml);
if (json && typeof json === 'object' && 'report' in json) {
Expand All @@ -661,7 +658,6 @@ async function parseToReport(reportXml) {
}
throw new Error('Invalid report');
}
exports.parseToReport = parseToReport;
/* eslint-disable @typescript-eslint/no-explicit-any */
function getPackage(obj) {
return obj.package?.map((pkg) => ({
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions lib/src/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.action = void 0;
exports.action = action;
/* eslint-disable @typescript-eslint/no-explicit-any */
const core = __importStar(require("@actions/core"));
const github = __importStar(require("@actions/github"));
Expand Down Expand Up @@ -127,7 +127,6 @@ async function action() {
}
}
}
exports.action = action;
async function getJsonReports(xmlPaths, debugMode) {
const globber = await glob.create(xmlPaths.join('\n'));
const files = await globber.glob();
Expand Down
3 changes: 1 addition & 2 deletions lib/src/process.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getProjectCoverage = void 0;
exports.getProjectCoverage = getProjectCoverage;
const util_1 = require("./util");
function getProjectCoverage(reports, changedFiles) {
const moduleCoverages = [];
Expand Down Expand Up @@ -59,7 +59,6 @@ function getProjectCoverage(reports, changedFiles) {
'coverage-changed-files': totalPercentage ?? 100,
};
}
exports.getProjectCoverage = getProjectCoverage;
function sumReducer(total, value) {
return total + value;
}
Expand Down
5 changes: 2 additions & 3 deletions lib/src/render.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTitle = exports.getPRComment = void 0;
exports.getPRComment = getPRComment;
exports.getTitle = getTitle;
function getPRComment(project, minCoverage, title, emoji) {
const heading = getTitle(title);
const overallTable = getOverallTable(project, minCoverage, emoji);
Expand All @@ -13,7 +14,6 @@ function getPRComment(project, minCoverage, title, emoji) {
: filesTable;
return `${heading + overallTable}\n\n${tables}`;
}
exports.getPRComment = getPRComment;
function getModuleTable(modules, minCoverage, emoji) {
const tableHeader = '|Module|Coverage||';
const tableStructure = '|:-|:-|:-:|';
Expand Down Expand Up @@ -111,7 +111,6 @@ function getTitle(title) {
return '';
}
}
exports.getTitle = getTitle;
function getStatus(coverage, minCoverage, emoji) {
let status = emoji.pass;
if (coverage != null && coverage < minCoverage) {
Expand Down
9 changes: 4 additions & 5 deletions lib/src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseToReport = exports.getFilesWithCoverage = exports.getChangedLines = exports.debug = void 0;
exports.debug = debug;
exports.getChangedLines = getChangedLines;
exports.getFilesWithCoverage = getFilesWithCoverage;
exports.parseToReport = parseToReport;
const xml2js_1 = __importDefault(require("xml2js"));
function debug(obj) {
return JSON.stringify(obj, null, 4);
}
exports.debug = debug;
const pattern = /^@@ -([0-9]*),?\S* \+([0-9]*),?/;
function getChangedLines(patch) {
const lineNumbers = new Set();
Expand Down Expand Up @@ -36,7 +38,6 @@ function getChangedLines(patch) {
}
return [...lineNumbers];
}
exports.getChangedLines = getChangedLines;
function getDiffGroups(lines) {
const groups = [];
let group = [];
Expand Down Expand Up @@ -91,7 +92,6 @@ function getFilesWithCoverage(packages) {
}
return files;
}
exports.getFilesWithCoverage = getFilesWithCoverage;
async function parseToReport(reportXml) {
const json = await xml2js_1.default.parseStringPromise(reportXml);
if (json && typeof json === 'object' && 'report' in json) {
Expand All @@ -102,7 +102,6 @@ async function parseToReport(reportXml) {
}
throw new Error('Invalid report');
}
exports.parseToReport = parseToReport;
/* eslint-disable @typescript-eslint/no-explicit-any */
function getPackage(obj) {
return obj.package?.map((pkg) => ({
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"eslint-plugin-n": "^16.0.1",
"eslint-plugin-promise": "^7.1.0",
"jest": "^29.6.2",
"prettier": "^3.0.0",
"prettier": "^3.3.3",
"ts-jest": "^29.1.0",
"typescript": "^5.5.4",
"webpack": "^5.94.0",
Expand Down
4 changes: 2 additions & 2 deletions src/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export function getPRComment(
project.modules.length === 0
? '> There is no coverage information present for the Files changed'
: project.isMultiModule
? `${moduleTable}\n\n${filesTable}`
: filesTable
? `${moduleTable}\n\n${filesTable}`
: filesTable

return `${heading + overallTable}\n\n${tables}`
}
Expand Down
Loading