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 CHANGED
@@ -62,7 +62,7 @@ function getArguments(pArguments) {
62
62
  },
63
63
  extensions: {
64
64
  type: "string",
65
- short: "x",
65
+ short: "e",
66
66
  default:
67
67
  "cjs,cjsx,coffee,csx,cts,js,json,jsx,litcoffee,ls,mjs,mts,svelte,ts,tsx,vue,vuex",
68
68
  },
@@ -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("|");
@@ -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(EOL)
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(EOL)
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.1";
1
+ export const VERSION = "4.2.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "watskeburt",
3
- "version": "4.1.1",
3
+ "version": "4.2.1",
4
4
  "description": "List files changed since a git revision",
5
5
  "keywords": [
6
6
  "git",
@@ -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
  }