Skip to content

Commit d42d290

Browse files
committed
chore: file organization, single naming convention
1 parent d9c14b6 commit d42d290

File tree

10 files changed

+13
-13
lines changed

10 files changed

+13
-13
lines changed

bin/lcov-result-merger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const yargs = require('yargs/yargs');
66
const { hideBin } = require('yargs/helpers');
77

88
/**
9-
* @type {import("../lib/Configuration").ConfigurationPojo}
9+
* @type {import("../lib/configuration").ConfigurationPojo}
1010
*/
1111
const args = yargs(hideBin(process.argv)).command(
1212
'* <pattern> [outFile] [options]',

index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
const { readFile, writeFile } = require('node:fs/promises');
1010
const path = require('node:path');
1111
const { Transform } = require('node:stream');
12-
const Configuration = require('./lib/Configuration');
13-
const FullReport = require('./lib/FullReport');
12+
const Configuration = require('./lib/configuration');
13+
const FullReport = require('./lib/full-report');
1414

1515
/**
1616
* Process a lcov input file into the representing Objects
@@ -23,7 +23,7 @@ const FullReport = require('./lib/FullReport');
2323
* @returns {FullReport}
2424
*/
2525
function processFile(sourceDir, data, lcov, config) {
26-
/** @type {import("./lib/CoverageFile")|null} */
26+
/** @type {import("./lib/entries/coverage-file")|null} */
2727
let currentCoverageFile = null;
2828

2929
const lines = data.toString('utf-8').split(/\r?\n/);
@@ -80,7 +80,7 @@ function processFile(sourceDir, data, lcov, config) {
8080
*
8181
*
8282
* @param {string[]} filePaths
83-
* @param {import("./lib/Configuration").ConfigurationPojo} options
83+
* @param {import("./lib/configuration").ConfigurationPojo} options
8484
*
8585
* @return {Promise<string>}
8686
*/
@@ -135,8 +135,8 @@ class WrappingTransform extends Transform {
135135
}
136136

137137
/**
138-
* @param {string[] | import("./lib/Configuration").ConfigurationPojo} [filePathsOrOptions]
139-
* @param {import("./lib/Configuration").ConfigurationPojo} [options]
138+
* @param {string[] | import("./lib/configuration").ConfigurationPojo} [filePathsOrOptions]
139+
* @param {import("./lib/configuration").ConfigurationPojo} [options]
140140
*
141141
* @return {module:stream.internal.Transform}
142142
*/
File renamed without changes.
File renamed without changes.

lib/CoverageFile.js renamed to lib/entries/coverage-file.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const DA = require('./DA');
2-
const BRDA = require('./BRDA');
1+
const DA = require('./da');
2+
const BRDA = require('./brda');
33

44
/**
55
* Represents a coverage file, and it's DA/BRDA records.
File renamed without changes.

lib/FullReport.js renamed to lib/full-report.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const CoverageFile = require('./CoverageFile');
1+
const CoverageFile = require('./entries/coverage-file');
22

33
/**
44
* The FullReport class represents a collection of LCOV file contents that are

test/test-unit/BRDA-spec.js renamed to test/test-unit/brda-spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const chai = require('chai');
44
chai.should();
55

6-
const BRDA = require('../../lib/BRDA');
6+
const BRDA = require('../../lib/entries/brda');
77

88
describe('Unit | BRDA', function () {
99
it('should be constructable with the new operator', async function () {

test/test-unit/CoverageFile-spec.js renamed to test/test-unit/coverage-file-spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const chai = require('chai');
44
chai.should();
55

6-
const CoverageFile = require('../../lib/CoverageFile');
6+
const CoverageFile = require('../../lib/entries/coverage-file');
77

88
describe('Unit | CoverageFile', function () {
99
it('should be constructable with the new operator', async function () {

test/test-unit/DA-spec.js renamed to test/test-unit/da-spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const chai = require('chai');
44
chai.should();
55

6-
const DA = require('../../lib/DA');
6+
const DA = require('../../lib/entries/da');
77

88
describe('Unit | DA', function () {
99
it('should be constructable with the new operator', async function () {

0 commit comments

Comments
 (0)