1- "use strict" ;
2- var __create = Object . create ;
3- var __defProp = Object . defineProperty ;
4- var __getOwnPropDesc = Object . getOwnPropertyDescriptor ;
5- var __getOwnPropNames = Object . getOwnPropertyNames ;
6- var __getProtoOf = Object . getPrototypeOf ;
7- var __hasOwnProp = Object . prototype . hasOwnProperty ;
8- var __export = ( target , all ) => {
9- for ( var name in all )
10- __defProp ( target , name , { get : all [ name ] , enumerable : true } ) ;
11- } ;
12- var __copyProps = ( to , from , except , desc ) => {
13- if ( from && typeof from === "object" || typeof from === "function" ) {
14- for ( let key of __getOwnPropNames ( from ) )
15- if ( ! __hasOwnProp . call ( to , key ) && key !== except )
16- __defProp ( to , key , { get : ( ) => from [ key ] , enumerable : ! ( desc = __getOwnPropDesc ( from , key ) ) || desc . enumerable } ) ;
17- }
18- return to ;
19- } ;
20- var __toESM = ( mod , isNodeMode , target ) => ( target = mod != null ? __create ( __getProtoOf ( mod ) ) : { } , __copyProps (
21- // If the importer is in node compatibility mode or this is not an ESM
22- // file that has been converted to a CommonJS file using a Babel-
23- // compatible transform (i.e. "__esModule" has not been set), then set
24- // "default" to the CommonJS "module.exports" for node compatibility.
25- isNodeMode || ! mod || ! mod . __esModule ? __defProp ( target , "default" , { value : mod , enumerable : true } ) : target ,
26- mod
27- ) ) ;
28- var __toCommonJS = ( mod ) => __copyProps ( __defProp ( { } , "__esModule" , { value : true } ) , mod ) ;
29-
301// src/coverage-reporter.ts
31- var coverage_reporter_exports = { } ;
32- __export ( coverage_reporter_exports , {
33- default : ( ) => GithubActionsCoverageReporter
34- } ) ;
35- module . exports = __toCommonJS ( coverage_reporter_exports ) ;
36- var import_fs = __toESM ( require ( "fs" ) , 1 ) ;
37- var import_istanbul_lib_report = require ( "istanbul-lib-report" ) ;
2+ import fs from "fs" ;
3+ import { ReportBase } from "istanbul-lib-report" ;
384function isFull ( metrics ) {
395 return metrics . statements . pct === 100 && metrics . branches . pct === 100 && metrics . functions . pct === 100 && metrics . lines . pct === 100 ;
406}
@@ -71,7 +37,7 @@ function getUncoveredLines(node) {
7137 return ranges ;
7238}
7339var headers = [ "Statements" , "Branches" , "Functions" , "Lines" ] ;
74- var GithubActionsCoverageReporter = class extends import_istanbul_lib_report . ReportBase {
40+ var GithubActionsCoverageReporter = class extends ReportBase {
7541 skipEmpty ;
7642 skipFull ;
7743 results = { } ;
@@ -87,7 +53,7 @@ var GithubActionsCoverageReporter = class extends import_istanbul_lib_report.Rep
8753 console . log ( "Reporter not being executed in Github Actions environment" ) ;
8854 return ;
8955 }
90- this . cw = import_fs . default . createWriteStream ( process . env . GITHUB_STEP_SUMMARY , { encoding : "utf-8" , flags : "a" } ) ;
56+ this . cw = fs . createWriteStream ( process . env . GITHUB_STEP_SUMMARY , { encoding : "utf-8" , flags : "a" } ) ;
9157 this . watermarks = context . watermarks ;
9258 this . cw . write ( "<h2>Test Coverage</h2>" ) ;
9359 this . cw . write ( "<table><thead><tr>" ) ;
@@ -157,3 +123,6 @@ var GithubActionsCoverageReporter = class extends import_istanbul_lib_report.Rep
157123 this . cw . close ( ) ;
158124 }
159125} ;
126+ export {
127+ GithubActionsCoverageReporter as default
128+ } ;
0 commit comments