watskeburt 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- "use strict";var i=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var A=Object.prototype.hasOwnProperty;var _=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},D=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of C(t))!A.call(e,o)&&o!==n&&i(e,o,{get:()=>t[o],enumerable:!(r=x(t,o))||r.enumerable});return e};var L=e=>D(i({},"__esModule",{value:!0}),e);var P={};_(P,{getSHASync:()=>k,listSync:()=>F});module.exports=L(P);var c=require("os"),R=/^(?<changeType>[ACDMRTUXB])(?<similarity>[0-9]{3})?[ \t]+(?<name>[^ \t]+)[ \t]*(?<newName>[^ \t]+)?$/,O=/^(?<stagedChangeType>[ ACDMRTUXB?!])(?<unStagedChangeType>[ ACDMRTUXB?!])[ \t]+(?<name>[^ \t]+)(( -> )(?<newName>[^ \t]+))?$/,U={A:"added",C:"copied",D:"deleted",M:"modified",R:"renamed",T:"type changed",U:"unmerged",B:"pairing broken"," ":"unmodified","?":"untracked","!":"ignored"};function u(e){return U[e]||"unknown"}function $(e){let t=e.match(O),n={};if(t){let r=u(t.groups.stagedChangeType),o=u(t.groups.unStagedChangeType);n.changeType=r==="unmodified"?o:r,t.groups.newName?(n.name=t.groups.newName,n.oldName=t.groups.name):n.name=t.groups.name}return n}function v(e){let t=e.match(R),n={};return t&&(n.changeType=u(t.groups.changeType),t.groups.newName?(n.name=t.groups.newName,n.oldName=t.groups.name):n.name=t.groups.name),n}function T(e){return e.split(c.EOL).filter(Boolean).map($).filter(({changeType:t})=>Boolean(t))}function S(e){return e.split(c.EOL).filter(Boolean).map(v).filter(({changeType:t})=>Boolean(t))}var a=require("child_process");function h(e){return e instanceof Buffer?e.toString("utf8"):e}function M(e){throw e.code==="ENOENT"?new Error("git executable not found"):new Error(`internal spawn error: ${e}`)}function f(e,t,n){let r=n("git",e,{cwd:process.cwd(),env:process.env});if(r.error&&M(r.error),r.status===0)return h(r.stdout);throw new Error(t[r.status]||`internal git error: ${r.status} (${h(r.stderr)})`)}function N(e=a.spawnSync){let t={129:`'${process.cwd()}' does not seem to be a git repository`};return f(["status","--porcelain"],t,e)}function y(e,t,n=a.spawnSync){let r={128:`revision '${e}' ${t?`(or '${t}') `:""}unknown`,129:`'${process.cwd()}' does not seem to be a git repository`};return f(t?["diff",e,t,"--name-status"]:["diff",e,"--name-status"],r,n)}function l(e=a.spawnSync){return f(["rev-parse","HEAD"],{},e).slice(0,40)}var E=require("path"),B=new Set([".cjs",".cjsx",".coffee",".csx",".js",".json",".jsx",".litcoffee",".ls",".mjs",".svelte",".ts",".tsx",".vue",".vuex"]),H=new Set(["modified","added","renamed","copied","untracked"]);function p(e,t=B,n=H){return`^(${e.filter(o=>n.has(o.changeType)).map(({name:o})=>o).filter(o=>t.has((0,E.extname)(o))).join("|")})$`}function m(e){return JSON.stringify(e,null,2)}var j=e=>e,I=new Map([["regex",p],["json",m]]);function g(e,t){return(I.get(t)||j)(e)}function k(){return l()}function F(e,t,n){let r=e||l(),o=t||null,d=n||{},s=S(y(r,o));return d.trackedOnly||(s=s.concat(T(N()).filter(({changeType:w})=>w==="untracked"))),g(s,d.outputType)}0&&(module.exports={getSHASync,listSync});
1
+ "use strict";var i=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var A=Object.prototype.hasOwnProperty;var _=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},D=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of C(t))!A.call(e,o)&&o!==n&&i(e,o,{get:()=>t[o],enumerable:!(r=x(t,o))||r.enumerable});return e};var L=e=>D(i({},"__esModule",{value:!0}),e);var P={};_(P,{getSHASync:()=>k,listSync:()=>F});module.exports=L(P);var c=require("os"),R=/^(?<changeType>[ACDMRTUXB])(?<similarity>[0-9]{3})?[ \t]+(?<name>[^ \t]+)[ \t]*(?<newName>[^ \t]+)?$/,O=/^(?<stagedChangeType>[ ACDMRTUXB?!])(?<unStagedChangeType>[ ACDMRTUXB?!])[ \t]+(?<name>[^ \t]+)(( -> )(?<newName>[^ \t]+))?$/,U={A:"added",C:"copied",D:"deleted",M:"modified",R:"renamed",T:"type changed",U:"unmerged",B:"pairing broken"," ":"unmodified","?":"untracked","!":"ignored"};function u(e){return U[e]||"unknown"}function $(e){let t=e.match(O),n={};if(t){let r=u(t.groups.stagedChangeType),o=u(t.groups.unStagedChangeType);n.changeType=r==="unmodified"?o:r,t.groups.newName?(n.name=t.groups.newName,n.oldName=t.groups.name):n.name=t.groups.name}return n}function v(e){let t=e.match(R),n={};return t&&(n.changeType=u(t.groups.changeType),t.groups.newName?(n.name=t.groups.newName,n.oldName=t.groups.name):n.name=t.groups.name),n}function T(e){return e.split(c.EOL).filter(Boolean).map($).filter(({changeType:t})=>Boolean(t))}function S(e){return e.split(c.EOL).filter(Boolean).map(v).filter(({changeType:t})=>Boolean(t))}var s=require("child_process");function h(e){return e instanceof Buffer?e.toString("utf8"):e}function M(e){throw e.code==="ENOENT"?new Error("git executable not found"):new Error(`internal spawn error: ${e}`)}function f(e,t,n){let r=n("git",e,{cwd:process.cwd(),env:process.env});if(r.error&&M(r.error),r.status===0)return h(r.stdout);throw new Error(t[r.status]||`internal git error: ${r.status} (${h(r.stderr)})`)}function N(e=s.spawnSync){let t={129:`'${process.cwd()}' does not seem to be a git repository`};return f(["status","--porcelain"],t,e)}function y(e,t,n=s.spawnSync){let r={128:`revision '${e}' ${t?`(or '${t}') `:""}unknown`,129:`'${process.cwd()}' does not seem to be a git repository`};return f(t?["diff",e,t,"--name-status"]:["diff",e,"--name-status"],r,n)}function l(e=s.spawnSync){return f(["rev-parse","HEAD"],{},e).slice(0,40)}var E=require("path"),B=new Set([".cjs",".cjsx",".coffee",".csx",".cts",".js",".json",".jsx",".litcoffee",".ls",".mjs",".mts",".svelte",".ts",".tsx",".vue",".vuex"]),H=new Set(["modified","added","renamed","copied","untracked"]);function m(e,t=B,n=H){return`^(${e.filter(o=>n.has(o.changeType)).map(({name:o})=>o).filter(o=>t.has((0,E.extname)(o))).join("|")})$`}function p(e){return JSON.stringify(e,null,2)}var j=e=>e,I=new Map([["regex",m],["json",p]]);function g(e,t){return(I.get(t)||j)(e)}function k(){return l()}function F(e,t,n){let r=e||l(),o=t||null,d=n||{},a=S(y(r,o));return d.trackedOnly||(a=a.concat(T(N()).filter(({changeType:w})=>w==="untracked"))),g(a,d.outputType)}0&&(module.exports={getSHASync,listSync});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "watskeburt",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "List files changed since a git revision",
5
5
  "keywords": [
6
6
  "git",
@@ -44,28 +44,30 @@
44
44
  "README.md"
45
45
  ],
46
46
  "dependencies": {
47
- "commander": "^9.3.0"
47
+ "commander": "9.4.1"
48
48
  },
49
49
  "devDependencies": {
50
- "@types/mocha": "^9.1.1",
51
- "@types/node": "^18.6.3",
52
- "@typescript-eslint/eslint-plugin": "^5.32.0",
53
- "c8": "^7.12.0",
54
- "dependency-cruiser": "^11.14.1",
55
- "esbuild": "^0.14.51",
56
- "eslint": "^8.21.0",
57
- "eslint-config-moving-meadow": "^3.0.0",
58
- "eslint-config-prettier": "^8.5.0",
59
- "eslint-plugin-budapestian": "^4.0.0",
60
- "eslint-plugin-import": "^2.26.0",
61
- "eslint-plugin-mocha": "^10.1.0",
62
- "eslint-plugin-node": "^11.1.0",
63
- "eslint-plugin-security": "^1.5.0",
64
- "eslint-plugin-unicorn": "^43.0.2",
65
- "mocha": "^10.0.0",
66
- "npm-run-all": "^4.1.5",
67
- "prettier": "^2.7.1",
68
- "typescript": "^4.7.4"
50
+ "@types/mocha": "10.0.0",
51
+ "@types/node": "18.11.3",
52
+ "@typescript-eslint/eslint-plugin": "5.40.1",
53
+ "c8": "7.12.0",
54
+ "dependency-cruiser": "11.17.0",
55
+ "esbuild": "0.15.12",
56
+ "eslint": "8.26.0",
57
+ "eslint-config-moving-meadow": "4.0.2",
58
+ "eslint-config-prettier": "8.5.0",
59
+ "eslint-plugin-budapestian": "5.0.1",
60
+ "eslint-plugin-eslint-comments": "3.2.0",
61
+ "eslint-plugin-import": "2.26.0",
62
+ "eslint-plugin-mocha": "10.1.0",
63
+ "eslint-plugin-node": "11.1.0",
64
+ "eslint-plugin-security": "1.5.0",
65
+ "eslint-plugin-unicorn": "44.0.2",
66
+ "mocha": "10.1.0",
67
+ "npm-run-all": "4.1.5",
68
+ "prettier": "2.7.1",
69
+ "typescript": "4.8.4",
70
+ "upem": "7.3.0"
69
71
  },
70
72
  "engines": {
71
73
  "node": "^12.20||^14||>=16"
@@ -76,8 +78,8 @@
76
78
  "build:dist": "esbuild src/main.mjs --format=cjs --target=node12 --platform=node --bundle --global-name=wkbtcjs --minify --outfile=dist/cjs-bundle.js",
77
79
  "check": "npm-run-all --parallel --aggregate-output lint depcruise test:cover",
78
80
  "clean": "rm -rf dist",
79
- "test": "mocha \"src/**/*.spec.mjs\"",
80
- "test:cover": "c8 --check-coverage --statements 100 --branches 100 --functions 100 --lines 100 --exclude \"**/*.spec.mjs\" --reporter text-summary --reporter html --reporter json-summary npm test",
81
+ "test": "mocha",
82
+ "test:cover": "c8 --check-coverage --statements 100 --branches 100 --functions 100 --lines 100 --exclude \"**/*.spec.mjs\" --reporter text-summary --reporter html --reporter json-summary mocha",
81
83
  "depcruise": "depcruise src types --config --cache",
82
84
  "depcruise:graph": "depcruise src types --cache --include-only '^(src|types)' --config --output-type dot | dot -T svg | tee docs/dependency-graph.svg | depcruise-wrap-stream-in-html > docs/dependency-graph.html",
83
85
  "depcruise:graph:archi": "depcruise src --cache --include-only '^(src)' --config --output-type archi | dot -T svg | depcruise-wrap-stream-in-html > docs/high-level-dependency-graph.html",
@@ -96,6 +98,10 @@
96
98
  "lint:format:fix": "prettier --loglevel warn --write \"{src,tools}/**/*.mjs\" \"types/**/*.ts\" \"*.{json,yml,md,js}\"",
97
99
  "lint:types": "tsc",
98
100
  "scm:stage": "git add .",
101
+ "update-dependencies": "run-s upem:update upem:install lint:fix check",
102
+ "upem-outdated": "npm outdated --json --long | upem --dry-run",
103
+ "upem:install": "npm install",
104
+ "upem:update": "npm outdated --json --long | upem | pbcopy && pbpaste",
99
105
  "version": "npm-run-all --sequential clean build lint depcruise:graph scm:stage"
100
106
  },
101
107
  "eslintIgnore": [
@@ -1,6 +1,6 @@
1
1
  // the security (and unicorn) plugins don't seem to detect named caption
2
2
  // groups very well - false-flagging below regular expressions to be susceptible
3
- // to redos attacks.
3
+ // to redos attacks.
4
4
  /* eslint-disable unicorn/no-unsafe-regex, security/detect-unsafe-regex */
5
5
  import { EOL } from "node:os";
6
6
 
@@ -5,12 +5,14 @@ const DEFAULT_EXTENSIONS = new Set([
5
5
  ".cjsx",
6
6
  ".coffee",
7
7
  ".csx",
8
+ ".cts",
8
9
  ".js",
9
10
  ".json",
10
11
  ".jsx",
11
12
  ".litcoffee",
12
13
  ".ls",
13
14
  ".mjs",
15
+ ".mts",
14
16
  ".svelte",
15
17
  ".ts",
16
18
  ".tsx",
package/src/version.mjs CHANGED
@@ -1 +1 @@
1
- export const VERSION = "0.7.0";
1
+ export const VERSION = "0.8.0";