watskeburt 0.4.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016-2022 Sander Verweij
3
+ Copyright (c) 2022-2022 Sander Verweij
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,29 +1,67 @@
1
1
  # watskeburt
2
2
 
3
- get git changed files & their statuses since _any revision_
3
+ Get changed files & their statuses since any git _revision_
4
4
 
5
5
  ## what's this do?
6
6
 
7
- A micro-lib to retrieve an array of file names that were changed (added,
8
- modified, renamed, deleted, ...) since the revision it got passed. Also
9
- sports a cli for use outside of JavaScript c.s.
7
+ A micro-lib to retrieve an array of file names that were changed since a
8
+ revision. Also sports a cli for use outside of JavaScript c.s.
10
9
 
11
- - :warning: in the process of getting 'production ready'. It's automatically
12
- tested + it's using itself - but a bunch of static analysis and a bit of
13
- automation still needs be added.
14
- - :warning: Interface is stable-ish, but can can change until 1.0.0 is published
15
- - :warning: expect some rough edges for e.g. error scenarios
10
+ - :warning: Interface is stable, but can can change until 1.0.0 is published :warning:
16
11
 
17
12
  ## why?
18
13
 
19
- Useful primitives to support e.g. auto-documenting pull requests, or to save
20
- processing power by only doing static analysis only over stuff that is changed.
14
+ I needed something simple and robust to support some upcoming features in
15
+ [dependency-cruiser](https://github.com/sverweij/dependency-cruiser) and to
16
+ run standalone to use _in combination_ with dependency-cruiser.
21
17
 
22
- There are a few packages like these like this on npm, but it seems they've
23
- fallen out of maintenance. More generic packages don't get plagued by this
18
+ There are a few specialized packages like this on npm, but it seems they've
19
+ fallen out of maintenance. More generic packages are still maintained,
24
20
  but for just this simple usage they're a bit overkill.
25
21
 
26
- ## usage
22
+ ## :construction_worker: usage
23
+
24
+ ### :scroll: API
25
+
26
+ ```javascript
27
+ // const { listSync, getSHASync } = require("watskeburt"); // in commonjs contexts you can also require it
28
+ import { listSync, getSHASync } from "watskeburt";
29
+
30
+ // print the SHA1 of the current HEAD
31
+ console.log(getSHASync());
32
+
33
+ // list all files that differ between 'main' and the current revision (including
34
+ // files not staged for commit and files not under revision control)
35
+ /** @type {import('watskeburt').IChange[]} */
36
+ const lChangedFiles = listSync("main");
37
+
38
+ // As a second parameter you can pass some options:
39
+ /** @type {import('watskeburt').IChange[]|string} */
40
+ const lChangedFiles = listSync("main", {
41
+ trackedOnly: false, // when set to true leaves out files not under revision control
42
+ outputType: "object", // other options: "json" and "regex" (as used in the CLI)
43
+ });
44
+ ```
45
+
46
+ The array of changes this returns looks like this:
47
+
48
+ ```javascript
49
+ [
50
+ {
51
+ name: "doc/cli.md",
52
+ changeType: "modified",
53
+ },
54
+ {
55
+ name: "test/thing.spec.mjs",
56
+ changeType: "renamed",
57
+ oldName: "test/old-thing.spec.mjs",
58
+ },
59
+ {
60
+ name: "src/not-tracked-yet.mjs",
61
+ changeType: "untracked",
62
+ },
63
+ ];
64
+ ```
27
65
 
28
66
  ### :shell: cli
29
67
 
@@ -37,7 +75,10 @@ $ npx watskeburt main
37
75
 
38
76
  By default this returns a regex that contains all changed files that could be
39
77
  source files in the JavaScript ecosystem (.js, .mjs, .ts, .tsx ...) that can
40
- be used in e.g. the `--focus` filter of dependency-cruiser:
78
+ be used in e.g. the `--focus` and `--reaches` filters of dependency-cruiser.
79
+
80
+ The JSON output (which looks a lot like the array above) is unfiltered and
81
+ also contains other extensions.
41
82
 
42
83
  ```
43
84
  Usage: cli [options] [revision]
@@ -53,36 +94,9 @@ Options:
53
94
  -h, --help display help for command
54
95
  ```
55
96
 
56
- ### :scroll: API
57
-
58
- ```javascript
59
- // const { list } = require('watskeburt'); // will work in commonjs contexts as well
60
- import { list, getSHA } from "watskeburt";
61
-
62
- // print the SHA1 of the current HEAD
63
- console.log(getSHA());
64
-
65
- // list all files that differ between 'main' and
66
- /** @type {import('watskeburt').IChange[]} */
67
- const lChangedFiles = list("main");
68
- ```
69
-
70
- An array of changes looks something like this:
71
-
72
- ```javascript
73
- [
74
- { name: "doc/cli.md", changeType: "modified" },
75
- {
76
- name: "test/thing.spec.mjs",
77
- changeType: "renamed",
78
- oldName: "test/old-thing.spec.mjs",
79
- },
80
- { name: "src/not-tracked-yet.mjs", changeType: "untracked" },
81
- ];
82
- ```
83
-
84
- ## 🇳🇱 'watskeburt'??
97
+ ## 🇳🇱 what does 'watskeburt' mean?
85
98
 
86
- _watskeburt_ is a fast pronunciation of the Dutch sentence "Wat is er gebeurd?"
87
- (What has happened?), as well as the title of a song by the Dutch hip hop group
88
- "De Jeugd van Tegenwoordig".
99
+ _watskeburt_ is a fast pronunciation of the Dutch "wat is er gebeurd?"
100
+ (_what has happened?_) or "wat er is gebeurd" (_what has happened_). It's
101
+ also the title of a song by the Dutch band "De Jeugd van Tegenwoordig"
102
+ (_Youth these days..._).
@@ -1 +1 @@
1
- var s=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var A=(e,t)=>{for(var n in t)s(e,n,{get:t[n],enumerable:!0})},_=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of E(t))!C.call(e,o)&&o!==n&&s(e,o,{get:()=>t[o],enumerable:!(r=x(t,o))||r.enumerable});return e};var R=e=>_(s({},"__esModule",{value:!0}),e);var H={};A(H,{getSHA:()=>w,list:()=>M});module.exports=R(H);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]+))?$/,O={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 O[e]||"unknown"}function U(e){let t=e.match(L),n={};if(t){let r=i(t.groups.stagedChangeType),o=i(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(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(U).filter(({changeType:t})=>Boolean(t))}function g(e){return e.split(u.EOL).filter(Boolean).map(v).filter(({changeType:t})=>Boolean(t))}var a=require("child_process");function d(e){return e instanceof Buffer?e.toString("utf8"):e}function $(e){throw e.code==="ENOENT"?new Error("git executable not found"):new Error(`internal spawn error: ${e}`)}function c(e,t,n){let r=n("git",e,{cwd:process.cwd(),env:process.env});if(r.error&&$(r.error),r.status===0)return d(r.stdout);throw new Error(t[r.status]||`internal git error: ${r.status} (${d(r.stderr)})`)}function T(e=a.spawnSync){let t={129:`'${process.cwd()}' does not seem to be a git repository`};return c(["status","--porcelain"],t,e)}function h(e,t=a.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 S(e=a.spawnSync){return c(["rev-parse","HEAD"],{},e).slice(0,40)}var N=require("path");function f(e,t=[".js",".jsx",".mjs",".cjs",".ts",".tsx",".vue",".vuex",".json"],n=["modified","added","renamed","copied","untracked"]){return`^(${e.filter(o=>n.includes(o.changeType)).map(({name:o})=>o).filter(o=>t.includes((0,N.extname)(o))).join("|")})$`}function p(e){return JSON.stringify(e,null,2)}var j={regex:f,json:p,object:e=>e},B="object";function l(e,t){return j[t||B](e)}function w(){return S()}function M(e,t){let n=e||w(),r=g(h(n)),o=t||{};return o.trackedOnly||(r=r.concat(m(T()).filter(({changeType:y})=>y==="untracked"))),l(r,o.outputType)}0&&(module.exports={getSHA,list});
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});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "watskeburt",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "List files changed since a git revision",
5
5
  "keywords": [
6
6
  "git",
@@ -47,19 +47,21 @@
47
47
  "commander": "^9.3.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@typescript-eslint/eslint-plugin": "^5.30.5",
51
- "c8": "^7.11.3",
52
- "dependency-cruiser": "^11.11.0",
53
- "esbuild": "^0.14.48",
54
- "eslint": "^8.19.0",
50
+ "@types/mocha": "^9.1.1",
51
+ "@types/node": "^18.0.6",
52
+ "@typescript-eslint/eslint-plugin": "^5.30.7",
53
+ "c8": "^7.12.0",
54
+ "dependency-cruiser": "^11.12.0",
55
+ "esbuild": "^0.14.49",
56
+ "eslint": "^8.20.0",
55
57
  "eslint-config-moving-meadow": "^3.0.0",
56
58
  "eslint-config-prettier": "^8.5.0",
57
59
  "eslint-plugin-budapestian": "^4.0.0",
58
60
  "eslint-plugin-import": "^2.26.0",
59
- "eslint-plugin-mocha": "^10.0.5",
61
+ "eslint-plugin-mocha": "^10.1.0",
60
62
  "eslint-plugin-node": "^11.1.0",
61
63
  "eslint-plugin-security": "^1.5.0",
62
- "eslint-plugin-unicorn": "^43.0.1",
64
+ "eslint-plugin-unicorn": "^43.0.2",
63
65
  "mocha": "^10.0.0",
64
66
  "npm-run-all": "^4.1.5",
65
67
  "prettier": "^2.7.1",
@@ -76,21 +78,22 @@
76
78
  "clean": "rm -rf dist",
77
79
  "test": "mocha \"src/**/*.spec.mjs\"",
78
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",
79
- "depcruise": "depcruise src --config",
80
- "depcruise:graph": "depcruise src --include-only '^(src)' --config --output-type dot | dot -T svg | tee docs/dependency-graph.svg | depcruise-wrap-stream-in-html > docs/dependency-graph.html",
81
+ "depcruise": "depcruise src types --config",
82
+ "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",
81
83
  "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",
82
84
  "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",
83
- "depcruise:graph:diff:dev": "depcruise src --include-only '^(src)' --focus \"$(node src/cli.mjs main -T regex)\" --prefix vscode://file/$(pwd)/ --config --output-type dot | dot -T svg | depcruise-wrap-stream-in-html | browser",
84
- "depcruise:graph:diff:mermaid": "depcruise src --include-only '^(src)' --config --output-type mermaid --output-to - --focus \"$(node src/cli.mjs $SHA -T regex)\"",
85
+ "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",
86
+ "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",
85
87
  "depcruise:html": "depcruise src --progress --config --output-type err-html --output-to dependency-violation-report.html",
86
88
  "depcruise:text": "depcruise src --progress --config --output-type text",
87
89
  "depcruise:focus": "depcruise src --progress --config --output-type text --focus",
88
- "lint": "npm-run-all --parallel --aggregate-output lint:format lint:eslint",
90
+ "lint": "npm-run-all --parallel --aggregate-output lint:format lint:eslint lint:types",
89
91
  "lint:fix": "npm-run-all --parallel --aggregate-output lint:format:fix lint:eslint:fix",
90
- "lint:eslint": "eslint src --cache --cache-location node_modules/.cache/eslint/",
91
- "lint:eslint:fix": "eslint src tools --fix --cache --cache-location node_modules/.cache/eslint/",
92
+ "lint:eslint": "eslint src types tools --cache --cache-location node_modules/.cache/eslint/",
93
+ "lint:eslint:fix": "eslint src types tools --fix --cache --cache-location node_modules/.cache/eslint/",
92
94
  "lint:format": "prettier --check \"{src,tools}/**/*.mjs\" \"types/**/*.ts\" \"*.{json,yml,md,js}\"",
93
95
  "lint:format:fix": "prettier --loglevel warn --write \"{src,tools}/**/*.mjs\" \"types/**/*.ts\" \"*.{json,yml,md,js}\"",
96
+ "lint:types": "tsc",
94
97
  "scm:stage": "git add .",
95
98
  "version": "npm-run-all --sequential clean build lint depcruise:graph scm:stage"
96
99
  },
package/src/cli.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  /* eslint-disable no-console */
3
3
 
4
4
  import { program } from "commander";
5
- import { list } from "./main.mjs";
5
+ import { listSync } from "./main.mjs";
6
6
  import { VERSION } from "./version.mjs";
7
7
 
8
8
  program
@@ -17,7 +17,7 @@ program
17
17
  .parse(process.argv);
18
18
 
19
19
  try {
20
- console.log(list(program.args[0], program.opts()));
20
+ console.log(listSync(program.args[0], program.opts()));
21
21
  } catch (pError) {
22
22
  console.error(`ERROR: ${pError.message}`);
23
23
  }
@@ -1,34 +1,47 @@
1
1
  import { extname } from "node:path";
2
2
 
3
+ const DEFAULT_EXTENSIONS = new Set([
4
+ ".cjs",
5
+ ".cjsx",
6
+ ".coffee",
7
+ ".csx",
8
+ ".js",
9
+ ".json",
10
+ ".jsx",
11
+ ".litcoffee",
12
+ ".ls",
13
+ ".mjs",
14
+ ".svelte",
15
+ ".ts",
16
+ ".tsx",
17
+ ".vue",
18
+ ".vuex",
19
+ ]);
20
+
21
+ const DEFAULT_CHANGE_TYPES = new Set([
22
+ "modified",
23
+ "added",
24
+ "renamed",
25
+ "copied",
26
+ "untracked",
27
+ ]);
3
28
  /**
4
29
  *
5
30
  * @param {import('../types/watskeburt').IChange[]} pChanges
6
- * @param {string[]} pExtensions
7
- * @param {import('../types/watskeburt').changeTypeType[]} pChangeTypes
31
+ * @param {Set<string>} pExtensions
32
+ * @param {Set<import('../types/watskeburt').changeTypeType>} pChangeTypes
8
33
  * @return {string}
9
34
  */
10
35
  export default function formatToRegex(
11
36
  pChanges,
12
- pExtensions = [
13
- ".js",
14
- ".jsx",
15
- ".mjs",
16
- ".cjs",
17
- ".ts",
18
- ".tsx",
19
- ".vue",
20
- ".vuex",
21
- ".json",
22
- ],
23
- pChangeTypes = ["modified", "added", "renamed", "copied", "untracked"]
37
+ pExtensions = DEFAULT_EXTENSIONS,
38
+ pChangeTypes = DEFAULT_CHANGE_TYPES
24
39
  ) {
25
40
  const lChanges = pChanges
26
- .filter((pChange) => pChangeTypes.includes(pChange.changeType))
27
- .map(
28
- // .replace(/\./g, "\\\\.")
29
- ({ name }) => name
30
- )
31
- .filter((pName) => pExtensions.includes(extname(pName)))
41
+ .filter((pChange) => pChangeTypes.has(pChange.changeType))
42
+ .map(({ name }) => name)
43
+ .filter((pName) => pExtensions.has(extname(pName)))
44
+ // .replace(/\./g, "\\\\.")
32
45
  .join("|");
33
46
  return `^(${lChanges})$`;
34
47
  }
package/src/main.mjs CHANGED
@@ -5,14 +5,14 @@ import {
5
5
  import { getDiffLines, getSHA1, getStatusShort } from "./git-primitives.mjs";
6
6
  import format from "./formatters/format.mjs";
7
7
 
8
- /** @type {import("../types/watskeburt.js").getSHA} */
9
- export function getSHA() {
8
+ /** @type {import("../types/watskeburt").getSHASync} */
9
+ export function getSHASync() {
10
10
  return getSHA1();
11
11
  }
12
12
 
13
- /** @type {import("../types/watskeburt.js").list} */
14
- export function list(pOldRevision, pOptions) {
15
- const lOldRevision = pOldRevision || getSHA();
13
+ /** @type {import("../types/watskeburt").listSync} */
14
+ export function listSync(pOldRevision, pOptions) {
15
+ const lOldRevision = pOldRevision || getSHA1();
16
16
  let lChanges = convertDiffLines(getDiffLines(lOldRevision));
17
17
  const lOptions = pOptions || {};
18
18
 
package/src/version.mjs CHANGED
@@ -1 +1 @@
1
- export const VERSION = "0.4.0";
1
+ export const VERSION = "0.6.0";
@@ -32,7 +32,7 @@ export type outputTypeType = "regex" | "json" | "object";
32
32
  export interface IOptions {
33
33
  /**
34
34
  * The type of output to deliver. Defaults to "object" - in which case
35
- * the list function returns an IChange[] object
35
+ * the listSync function returns an IChange[] object
36
36
  */
37
37
  outputType: outputTypeType;
38
38
  /**
@@ -47,21 +47,21 @@ export interface IOptions {
47
47
  /**
48
48
  * returns a list of files changed since pOldRevision.
49
49
  *
50
- * @param pOldRevision the revision against which to compare. E.g. a commit-hash,
50
+ * @param pOldRevision The revision against which to compare. E.g. a commit-hash,
51
51
  * a branch or a tag. When not passed defaults to the _current_
52
52
  * commit hash (if there's any)
53
53
  * @param pOptions Options that influence how the changes are returned and that
54
54
  * filter what is returned and
55
55
  * @throws {Error}
56
56
  */
57
- export function list(
57
+ export type listSync = (
58
58
  pOldRevision?: string,
59
59
  pOptions?: IOptions
60
- ): IChange[] | string;
60
+ ) => IChange[] | string;
61
61
 
62
62
  /**
63
63
  * Returns the SHA1 of the current HEAD
64
64
  *
65
65
  * @throws {Error}
66
66
  */
67
- export function getSHA(): string;
67
+ export type getSHASync = () => string;
@@ -1,47 +0,0 @@
1
- {
2
- "root": true,
3
- "extends": ["moving-meadow"],
4
- "overrides": [
5
- {
6
- "files": ["**/*.mjs"],
7
- "rules": {
8
- "unicorn/no-null": "off",
9
- "unicorn/prefer-spread": "off",
10
- "node/no-unsupported-features/es-syntax": "off",
11
- "import/no-relative-parent-imports": "off",
12
- "sort-imports": "off",
13
- "unicorn/prefer-node-protocol": "error",
14
- "unicorn/prefer-module": "error"
15
- },
16
- "parserOptions": {
17
- "ecmaVersion": "latest"
18
- }
19
- },
20
- {
21
- "files": ["**/*.spec.mjs"],
22
- "env": {
23
- "mocha": true
24
- },
25
- "rules": {
26
- "no-magic-numbers": "off",
27
- "security/detect-non-literal-require": "off",
28
- "security/detect-non-literal-fs-filename": "off",
29
- "max-lines-per-function": "off",
30
- "max-lines": "off",
31
- "no-null": "off"
32
- }
33
- },
34
- {
35
- "files": ["types/*.ts"],
36
- "plugins": ["@typescript-eslint"],
37
- "extends": ["plugin:@typescript-eslint/recommended"],
38
- "parser": "@typescript-eslint/parser",
39
- "parserOptions": {
40
- "ecmaVersion": "latest"
41
- },
42
- "rules": {
43
- "node/no-unsupported-features/es-syntax": "off"
44
- }
45
- }
46
- ]
47
- }