watskeburt
Advanced tools
Comparing version 4.1.0 to 4.1.1
@@ -9,8 +9,5 @@ import formatAsRegex from "./regex.js"; | ||
const lExtensions = new Set( | ||
pExtensions | ||
.split(",") | ||
.map((pExtension) => pExtension.trim()) | ||
.map((pExtension) => `.${pExtension}`), | ||
pExtensions.split(",").map((pExtension) => `.${pExtension.trim()}`), | ||
); | ||
return OUTPUT_TYPE_TO_FUNCTION.get(pOutputType)(pChanges, lExtensions); | ||
} |
@@ -63,3 +63,3 @@ import { spawn } from "node:child_process"; | ||
new Error( | ||
pErrorMap.get(pCode ?? 0) || | ||
pErrorMap.get(pCode ?? 0) ?? | ||
`internal git error: ${pCode} (${stringifyOutStream(lStdErrorData)})`, | ||
@@ -66,0 +66,0 @@ ), |
@@ -5,3 +5,3 @@ import { parseDiffLines } from "./parse-diff-lines.js"; | ||
export async function list(pOptions) { | ||
const lOldRevision = pOptions?.oldRevision || (await primitives.getSHA()); | ||
const lOldRevision = pOptions?.oldRevision ?? (await primitives.getSHA()); | ||
const lOptions = pOptions || {}; | ||
@@ -8,0 +8,0 @@ const [lDiffLines, lStatusLines] = await Promise.all([ |
import { EOL } from "node:os"; | ||
import { mapChangeType } from "./map-change-type.js"; | ||
const DIFF_NAME_STATUS_LINE_PATTERN = | ||
/^(?<type>[ACDMRTUXB])(?<similarity>[0-9]{3})?[ \t]+(?<name>[^ \t]+)[ \t]*(?<newName>[^ \t]+)?$/; | ||
/^(?<type>[ACDMRTUXB])(?<similarity>\d{3})?[ \t]+(?<name>[^ \t]+)[ \t]*(?<newName>[^ \t]+)?$/; | ||
export function parseDiffLines(pString) { | ||
@@ -13,3 +13,3 @@ return pString | ||
export function parseDiffLine(pString) { | ||
const lMatchResult = pString.match(DIFF_NAME_STATUS_LINE_PATTERN); | ||
const lMatchResult = DIFF_NAME_STATUS_LINE_PATTERN.exec(pString); | ||
const lReturnValue = {}; | ||
@@ -16,0 +16,0 @@ if (lMatchResult?.groups) { |
@@ -13,3 +13,3 @@ import { EOL } from "node:os"; | ||
export function parseStatusLine(pString) { | ||
const lMatchResult = pString.match(DIFF_SHORT_STATUS_LINE_PATTERN); | ||
const lMatchResult = DIFF_SHORT_STATUS_LINE_PATTERN.exec(pString); | ||
const lReturnValue = {}; | ||
@@ -16,0 +16,0 @@ if (lMatchResult?.groups) { |
@@ -1,1 +0,1 @@ | ||
export const VERSION = "4.1.0"; | ||
export const VERSION = "4.1.1"; |
{ | ||
"name": "watskeburt", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"description": "List files changed since a git revision", | ||
@@ -51,4 +51,4 @@ "keywords": [ | ||
"scripts": { | ||
"test": "echo for test, build and static analysis scripts: see the github repository" | ||
"test": "echo see github for test, build and analysis scripts" | ||
} | ||
} |
15956
381