watskeburt 4.1.1 → 4.2.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cli.js +1 -1
- package/dist/format/regex.js +1 -1
- package/dist/parse-diff-lines.js +1 -2
- package/dist/parse-status-lines.js +1 -2
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/types/watskeburt.d.ts +3 -1
package/dist/cli.js
CHANGED
package/dist/format/regex.js
CHANGED
@@ -15,7 +15,7 @@ export default function formatAsRegex(
|
|
15
15
|
.filter(
|
16
16
|
(pChange) =>
|
17
17
|
pChangeTypes.has(pChange.type) &&
|
18
|
-
pExtensions.has(extname(pChange.name)),
|
18
|
+
(pExtensions.has(".*") || pExtensions.has(extname(pChange.name))),
|
19
19
|
)
|
20
20
|
.map(({ name }) => name.replace(/\\/g, "\\\\").replace(/\./g, "[.]"))
|
21
21
|
.join("|");
|
package/dist/parse-diff-lines.js
CHANGED
@@ -1,10 +1,9 @@
|
|
1
|
-
import { EOL } from "node:os";
|
2
1
|
import { mapChangeType } from "./map-change-type.js";
|
3
2
|
const DIFF_NAME_STATUS_LINE_PATTERN =
|
4
3
|
/^(?<type>[ACDMRTUXB])(?<similarity>\d{3})?[ \t]+(?<name>[^ \t]+)[ \t]*(?<newName>[^ \t]+)?$/;
|
5
4
|
export function parseDiffLines(pString) {
|
6
5
|
return pString
|
7
|
-
.split(
|
6
|
+
.split(/\r?\n/)
|
8
7
|
.filter(Boolean)
|
9
8
|
.map(parseDiffLine)
|
10
9
|
.filter(({ name, type }) => Boolean(name) && Boolean(type));
|
@@ -1,10 +1,9 @@
|
|
1
|
-
import { EOL } from "node:os";
|
2
1
|
import { mapChangeType } from "./map-change-type.js";
|
3
2
|
const DIFF_SHORT_STATUS_LINE_PATTERN =
|
4
3
|
/^(?<stagedType>[ ACDMRTUXB?!])(?<unStagedType>[ ACDMRTUXB?!])[ \t]+(?<name>[^ \t]+)(( -> )(?<newName>[^ \t]+))?$/;
|
5
4
|
export function parseStatusLines(pString) {
|
6
5
|
return pString
|
7
|
-
.split(
|
6
|
+
.split(/\r?\n/)
|
8
7
|
.filter(Boolean)
|
9
8
|
.map(parseStatusLine)
|
10
9
|
.filter(({ name, type }) => Boolean(name) && Boolean(type));
|
package/dist/version.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const VERSION = "4.
|
1
|
+
export const VERSION = "4.2.1";
|
package/package.json
CHANGED
package/types/watskeburt.d.ts
CHANGED
@@ -54,7 +54,9 @@ export interface IFormatOptions extends IBaseOptions {
|
|
54
54
|
outputType: "regex" | "json";
|
55
55
|
|
56
56
|
/**
|
57
|
-
* A comma-separated list of file extensions to include in the output
|
57
|
+
* A comma-separated list of file extensions to include in the output.
|
58
|
+
* When the list includes "*" all files are included. Currently applicable
|
59
|
+
* to the "regex" outputType only.
|
58
60
|
*/
|
59
61
|
extensions: string;
|
60
62
|
}
|