watskeburt
Advanced tools
Comparing version 0.6.0 to 0.6.1
@@ -1,1 +0,1 @@ | ||
"use strict";var a=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var A=(e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})},C=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of y(t))!x.call(e,r)&&r!==n&&a(e,r,{get:()=>t[r],enumerable:!(o=w(t,r))||o.enumerable});return e};var _=e=>C(a({},"__esModule",{value:!0}),e);var I={};A(I,{getSHASync:()=>M,listSync:()=>F});module.exports=_(I);var u=require("os"),D=/^(?<changeType>[ACDMRTUXB])(?<similarity>[0-9]{3})?[ \t]+(?<name>[^ \t]+)[ \t]*(?<newName>[^ \t]+)?$/,L=/^(?<stagedChangeType>[ ACDMRTUXB?!])(?<unStagedChangeType>[ ACDMRTUXB?!])[ \t]+(?<name>[^ \t]+)(( -> )(?<newName>[^ \t]+))?$/,R={A:"added",C:"copied",D:"deleted",M:"modified",R:"renamed",T:"type changed",U:"unmerged",B:"pairing broken"," ":"unmodified","?":"untracked","!":"ignored"};function i(e){return R[e]||"unknown"}function U(e){let t=e.match(L),n={};if(t){let o=i(t.groups.stagedChangeType),r=i(t.groups.unStagedChangeType);n.changeType=o==="unmodified"?r:o,t.groups.newName?(n.name=t.groups.newName,n.oldName=t.groups.name):n.name=t.groups.name}return n}function O(e){let t=e.match(D),n={};return t&&(n.changeType=i(t.groups.changeType),t.groups.newName?(n.name=t.groups.newName,n.oldName=t.groups.name):n.name=t.groups.name),n}function g(e){return e.split(u.EOL).filter(Boolean).map(U).filter(({changeType:t})=>Boolean(t))}function d(e){return e.split(u.EOL).filter(Boolean).map(O).filter(({changeType:t})=>Boolean(t))}var s=require("child_process");function T(e){return e instanceof Buffer?e.toString("utf8"):e}function v(e){throw e.code==="ENOENT"?new Error("git executable not found"):new Error(`internal spawn error: ${e}`)}function c(e,t,n){let o=n("git",e,{cwd:process.cwd(),env:process.env});if(o.error&&v(o.error),o.status===0)return T(o.stdout);throw new Error(t[o.status]||`internal git error: ${o.status} (${T(o.stderr)})`)}function S(e=s.spawnSync){let t={129:`'${process.cwd()}' does not seem to be a git repository`};return c(["status","--porcelain"],t,e)}function h(e,t=s.spawnSync){let n={128:`revision '${e}' unknown `,129:`'${process.cwd()}' does not seem to be a git repository`};return c(["diff",e,"--name-status"],n,t)}function f(e=s.spawnSync){return c(["rev-parse","HEAD"],{},e).slice(0,40)}var N=require("path"),j=new Set([".cjs",".cjsx",".coffee",".csx",".js",".json",".jsx",".litcoffee",".ls",".mjs",".svelte",".ts",".tsx",".vue",".vuex"]),$=new Set(["modified","added","renamed","copied","untracked"]);function p(e,t=j,n=$){return`^(${e.filter(r=>n.has(r.changeType)).map(({name:r})=>r).filter(r=>t.has((0,N.extname)(r))).join("|")})$`}function l(e){return JSON.stringify(e,null,2)}var B={regex:p,json:l,object:e=>e},H="object";function m(e,t){return B[t||H](e)}function M(){return f()}function F(e,t){let n=e||f(),o=d(h(n)),r=t||{};return r.trackedOnly||(o=o.concat(g(S()).filter(({changeType:E})=>E==="untracked"))),m(o,r.outputType)}0&&(module.exports={getSHASync,listSync}); | ||
"use strict";var a=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var C=(e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})},A=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of E(t))!x.call(e,r)&&r!==n&&a(e,r,{get:()=>t[r],enumerable:!(o=y(t,r))||o.enumerable});return e};var _=e=>A(a({},"__esModule",{value:!0}),e);var k={};C(k,{getSHASync:()=>j,listSync:()=>I});module.exports=_(k);var u=require("os"),D=/^(?<changeType>[ACDMRTUXB])(?<similarity>[0-9]{3})?[ \t]+(?<name>[^ \t]+)[ \t]*(?<newName>[^ \t]+)?$/,R=/^(?<stagedChangeType>[ ACDMRTUXB?!])(?<unStagedChangeType>[ ACDMRTUXB?!])[ \t]+(?<name>[^ \t]+)(( -> )(?<newName>[^ \t]+))?$/,L={A:"added",C:"copied",D:"deleted",M:"modified",R:"renamed",T:"type changed",U:"unmerged",B:"pairing broken"," ":"unmodified","?":"untracked","!":"ignored"};function i(e){return L[e]||"unknown"}function v(e){let t=e.match(R),n={};if(t){let o=i(t.groups.stagedChangeType),r=i(t.groups.unStagedChangeType);n.changeType=o==="unmodified"?r:o,t.groups.newName?(n.name=t.groups.newName,n.oldName=t.groups.name):n.name=t.groups.name}return n}function O(e){let t=e.match(D),n={};return t&&(n.changeType=i(t.groups.changeType),t.groups.newName?(n.name=t.groups.newName,n.oldName=t.groups.name):n.name=t.groups.name),n}function m(e){return e.split(u.EOL).filter(Boolean).map(v).filter(({changeType:t})=>Boolean(t))}function d(e){return e.split(u.EOL).filter(Boolean).map(O).filter(({changeType:t})=>Boolean(t))}var s=require("child_process");function T(e){return e instanceof Buffer?e.toString("utf8"):e}function U(e){throw e.code==="ENOENT"?new Error("git executable not found"):new Error(`internal spawn error: ${e}`)}function c(e,t,n){let o=n("git",e,{cwd:process.cwd(),env:process.env});if(o.error&&U(o.error),o.status===0)return T(o.stdout);throw new Error(t[o.status]||`internal git error: ${o.status} (${T(o.stderr)})`)}function S(e=s.spawnSync){let t={129:`'${process.cwd()}' does not seem to be a git repository`};return c(["status","--porcelain"],t,e)}function h(e,t=s.spawnSync){let n={128:`revision '${e}' unknown `,129:`'${process.cwd()}' does not seem to be a git repository`};return c(["diff",e,"--name-status"],n,t)}function f(e=s.spawnSync){return c(["rev-parse","HEAD"],{},e).slice(0,40)}var N=require("path"),M=new Set([".cjs",".cjsx",".coffee",".csx",".js",".json",".jsx",".litcoffee",".ls",".mjs",".svelte",".ts",".tsx",".vue",".vuex"]),$=new Set(["modified","added","renamed","copied","untracked"]);function p(e,t=M,n=$){return`^(${e.filter(r=>n.has(r.changeType)).map(({name:r})=>r).filter(r=>t.has((0,N.extname)(r))).join("|")})$`}function l(e){return JSON.stringify(e,null,2)}var B=e=>e,H=new Map([["regex",p],["json",l]]);function g(e,t){return(H.get(t)||B)(e)}function j(){return f()}function I(e,t){let n=e||f(),o=d(h(n)),r=t||{};return r.trackedOnly||(o=o.concat(m(S()).filter(({changeType:w})=>w==="untracked"))),g(o,r.outputType)}0&&(module.exports={getSHASync,listSync}); |
{ | ||
"name": "watskeburt", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "List files changed since a git revision", | ||
@@ -51,8 +51,8 @@ "keywords": [ | ||
"@types/mocha": "^9.1.1", | ||
"@types/node": "^18.0.6", | ||
"@typescript-eslint/eslint-plugin": "^5.30.7", | ||
"@types/node": "^18.6.3", | ||
"@typescript-eslint/eslint-plugin": "^5.32.0", | ||
"c8": "^7.12.0", | ||
"dependency-cruiser": "^11.12.0", | ||
"esbuild": "^0.14.49", | ||
"eslint": "^8.20.0", | ||
"dependency-cruiser": "^11.14.1", | ||
"esbuild": "^0.14.51", | ||
"eslint": "^8.21.0", | ||
"eslint-config-moving-meadow": "^3.0.0", | ||
@@ -82,11 +82,12 @@ "eslint-config-prettier": "^8.5.0", | ||
"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", | ||
"depcruise": "depcruise src types --config", | ||
"depcruise:graph": "depcruise src types --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", | ||
"depcruise:graph:archi": "depcruise src --include-only '^(src)' --config --output-type archi | dot -T svg | depcruise-wrap-stream-in-html > docs/high-level-dependency-graph.html", | ||
"depcruise:graph:dev": "depcruise src --include-only '^(src)' --prefix vscode://file/$(pwd)/ --config --output-type dot | dot -T svg | depcruise-wrap-stream-in-html | browser", | ||
"depcruise:graph:diff:dev": "depcruise src types --include-only '^(src|types)' --focus \"$(node src/cli.mjs main -T regex)\" --focus-depth 0 --prefix vscode://file/$(pwd)/ --config --output-type dot | dot -T svg | depcruise-wrap-stream-in-html | browser", | ||
"depcruise:graph:diff:mermaid": "depcruise src types --include-only '^(src|types)' --config --output-type mermaid --output-to - --focus \"$(node src/cli.mjs $SHA -T regex)\" --focus-depth 0", | ||
"depcruise:html": "depcruise src --progress --config --output-type err-html --output-to dependency-violation-report.html", | ||
"depcruise:text": "depcruise src --progress --config --output-type text", | ||
"depcruise:focus": "depcruise src --progress --config --output-type text --focus", | ||
"depcruise": "depcruise src types --config --cache", | ||
"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", | ||
"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", | ||
"depcruise:graph:dev": "depcruise src --cache --include-only '^(src)' --prefix vscode://file/$(pwd)/ --config --output-type dot | dot -T svg | depcruise-wrap-stream-in-html | browser", | ||
"depcruise:graph:diff:dev": "depcruise src types --cache --include-only '^(src|types)' --focus \"$(node src/cli.mjs main -T regex)\" --focus-depth 0 --prefix vscode://file/$(pwd)/ --config --output-type dot | dot -T svg | depcruise-wrap-stream-in-html | browser", | ||
"depcruise:graph:diff:mermaid": "depcruise src types --cache --include-only '^(src|types)' --config --output-type mermaid --output-to - --focus \"$(node src/cli.mjs $SHA -T regex)\" --focus-depth 0", | ||
"depcruise:html": "depcruise src types --progress --cache --config --output-type err-html --output-to dependency-violation-report.html", | ||
"depcruise:text": "depcruise src types --progress --cache --config --output-type text", | ||
"depcruise:focus": "depcruise src types --progress --cache --config --output-type text --focus", | ||
"depcruise:reaches": "depcruise src types --progress --cache --config --output-type text --reaches", | ||
"lint": "npm-run-all --parallel --aggregate-output lint:format lint:eslint lint:types", | ||
@@ -93,0 +94,0 @@ "lint:fix": "npm-run-all --parallel --aggregate-output lint:format:fix lint:eslint:fix", |
@@ -40,5 +40,5 @@ export type changeTypeType = | ||
* When true _only_ takes already tracked files into account. | ||
* When true also takes untracked files into account. | ||
* When false also takes untracked files into account. | ||
* | ||
* Defaults to true. | ||
* Defaults to false. | ||
*/ | ||
@@ -58,6 +58,6 @@ trackedOnly: boolean; | ||
*/ | ||
export type listSync = ( | ||
export function listSync( | ||
pOldRevision?: string, | ||
pOptions?: IOptions | ||
) => IChange[] | string; | ||
): IChange[] | string; | ||
@@ -69,2 +69,2 @@ /** | ||
*/ | ||
export type getSHASync = () => string; | ||
export function getSHASync(): string; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22048
371