Skip to content
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
2 changes: 1 addition & 1 deletion src/cli/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ function outputResults(
report: CompareJsonEntry[],
opts: Options,
exitWithError: boolean,
): void {
): never {
if (opts.json) {
console.log(JSON.stringify(report, null, 2));
}
Expand Down
11 changes: 9 additions & 2 deletions src/commands/compare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ function createCategoryFilter(
return (category: Category) => !onlySet || onlySet.has(category);
}

interface ParsedAndFilteredEnv {
current: Record<string, string>;
example: Record<string, string>;
currentKeys: string[];
exampleKeys: string[];
}

/**
* Parses and filters the environment and example files.
* @param envPath The path to the .env file
Expand All @@ -53,7 +60,7 @@ function parseAndFilter(
envPath: string,
examplePath: string,
opts: ComparisonOptions,
) {
): ParsedAndFilteredEnv {
const currentFull = parseEnvFile(envPath);
const exampleFull = parseEnvFile(examplePath);

Expand Down Expand Up @@ -121,7 +128,7 @@ function findDuplicates(
*/
export async function compareMany(
pairs: FilePair[],
opts: ComparisonOptions,
opts: Readonly<ComparisonOptions>,
): Promise<ComparisonResult> {
let exitWithError = false;

Expand Down
Loading