hereby 1.8.0 → 1.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.d.ts +5 -0
- package/dist/cli/runner.js +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -6
- package/package.json +22 -22
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Task } from "../index.js";
|
|
2
|
+
import { type Herebyfile } from "./loadHerebyfile.js";
|
|
3
|
+
import { type D } from "./utils.js";
|
|
4
|
+
export declare function main(d: D): Promise<void>;
|
|
5
|
+
export declare function selectTasks(d: Pick<D, "simplifyPath">, herebyfile: Herebyfile, herebyfilePath: string, taskNames: string[]): Promise<Task[]>;
|
package/dist/cli/runner.js
CHANGED
|
@@ -2,9 +2,9 @@ import assert from "node:assert";
|
|
|
2
2
|
import pc from "picocolors";
|
|
3
3
|
export class Runner {
|
|
4
4
|
constructor(d) {
|
|
5
|
-
this._addedTasks = new
|
|
5
|
+
this._addedTasks = new Map();
|
|
6
6
|
this._errored = false;
|
|
7
|
-
this._startTimes = new
|
|
7
|
+
this._startTimes = new Map();
|
|
8
8
|
this._d = d;
|
|
9
9
|
}
|
|
10
10
|
async runTasks(...tasks) {
|
|
@@ -68,7 +68,7 @@ export class Runner {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
function checkDefined(value) {
|
|
71
|
-
assert(value);
|
|
71
|
+
assert(value !== undefined);
|
|
72
72
|
return value;
|
|
73
73
|
}
|
|
74
74
|
//# sourceMappingURL=runner.js.map
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
* A hereby Task. To get an instance, call `test`.
|
|
3
3
|
*/
|
|
4
4
|
export class Task {
|
|
5
|
-
/* @internal */
|
|
6
|
-
get options() {
|
|
7
|
-
return this._options;
|
|
8
|
-
}
|
|
9
5
|
/* @internal */
|
|
10
6
|
static create(options) {
|
|
11
7
|
return new Task(options);
|
|
12
8
|
}
|
|
9
|
+
// Note: private such that "private constructor();" is emitted in the d.ts files,
|
|
10
|
+
// which prevents extending or direct instantiation.
|
|
13
11
|
constructor(options) {
|
|
14
12
|
// Runtime typecheck; consumers of hereby may not have enabled
|
|
15
13
|
// typechecking, so this is helpful.
|
|
@@ -41,9 +39,9 @@ export class Task {
|
|
|
41
39
|
throw new Error('Task name must not start with "-".');
|
|
42
40
|
}
|
|
43
41
|
if (!((_a = options.dependencies) === null || _a === void 0 ? void 0 : _a.length) && !options.run) {
|
|
44
|
-
throw new Error("Task must have
|
|
42
|
+
throw new Error("Task must have a run function or dependencies.");
|
|
45
43
|
}
|
|
46
|
-
this.
|
|
44
|
+
this.options = options;
|
|
47
45
|
}
|
|
48
46
|
}
|
|
49
47
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hereby",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.5",
|
|
4
4
|
"description": "A simple task runner",
|
|
5
5
|
"repository": "github:jakebailey/hereby",
|
|
6
6
|
"type": "module",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
-
"
|
|
13
|
-
"
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js"
|
|
14
14
|
},
|
|
15
15
|
"./cli": "./dist/cli.js",
|
|
16
16
|
"./package.json": "./package.json"
|
|
@@ -40,44 +40,41 @@
|
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"command-line-usage": "^6.1.3",
|
|
42
42
|
"fastest-levenshtein": "^1.0.16",
|
|
43
|
-
"import-meta-resolve": "^2.2.
|
|
44
|
-
"minimist": "^1.2.
|
|
43
|
+
"import-meta-resolve": "^2.2.2",
|
|
44
|
+
"minimist": "^1.2.8",
|
|
45
45
|
"picocolors": "^1.0.0",
|
|
46
46
|
"pretty-ms": "^8.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@ava/typescript": "^3.0.1",
|
|
50
|
-
"@tsconfig/node12": "^1.0
|
|
50
|
+
"@tsconfig/node12": "^12.1.0",
|
|
51
51
|
"@types/command-line-usage": "^5.0.2",
|
|
52
52
|
"@types/minimist": "^1.2.2",
|
|
53
|
-
"@types/node": "^14.18.
|
|
53
|
+
"@types/node": "^14.18.54",
|
|
54
54
|
"@types/tmp": "^0.2.3",
|
|
55
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
56
|
-
"@typescript-eslint/parser": "^
|
|
55
|
+
"@typescript-eslint/eslint-plugin": "^6.2.1",
|
|
56
|
+
"@typescript-eslint/parser": "^6.2.1",
|
|
57
57
|
"ava": "~5.0.1",
|
|
58
|
-
"c8": "^
|
|
59
|
-
"dprint": "^0.
|
|
60
|
-
"eslint": "^8.
|
|
58
|
+
"c8": "^8.0.1",
|
|
59
|
+
"dprint": "^0.40.2",
|
|
60
|
+
"eslint": "^8.46.0",
|
|
61
61
|
"eslint-plugin-ava": "^14.0.0",
|
|
62
|
-
"eslint-plugin-simple-import-sort": "^
|
|
63
|
-
"eslint-plugin-unicorn": "^
|
|
62
|
+
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
63
|
+
"eslint-plugin-unicorn": "^48.0.1",
|
|
64
64
|
"execa": "^6.1.0",
|
|
65
|
-
"moq.ts": "^
|
|
66
|
-
"rimraf": "^
|
|
65
|
+
"moq.ts": "^10.0.6",
|
|
66
|
+
"rimraf": "^5.0.1",
|
|
67
67
|
"tmp": "^0.2.1",
|
|
68
|
-
"typescript": "
|
|
68
|
+
"typescript": "^5.1.6"
|
|
69
69
|
},
|
|
70
70
|
"overrides": {
|
|
71
71
|
"ava": {
|
|
72
72
|
"emittery": "1.0.0"
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
|
-
"packageManager": "npm@8.
|
|
76
|
-
"volta": {
|
|
77
|
-
"node": "14.20.0",
|
|
78
|
-
"npm": "8.17.0"
|
|
79
|
-
},
|
|
75
|
+
"packageManager": "npm@8.19.4",
|
|
80
76
|
"scripts": {
|
|
77
|
+
"ci": "npm ci",
|
|
81
78
|
"build": "tsc",
|
|
82
79
|
"watch": "tsc --watch",
|
|
83
80
|
"test": "ava",
|
|
@@ -105,6 +102,9 @@
|
|
|
105
102
|
]
|
|
106
103
|
},
|
|
107
104
|
"release-it": {
|
|
105
|
+
"npm": {
|
|
106
|
+
"publish": false
|
|
107
|
+
},
|
|
108
108
|
"git": {
|
|
109
109
|
"commitMessage": "Release v${version}",
|
|
110
110
|
"tagName": "v${version}"
|