hereby 1.8.0 → 1.8.1
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/runner.js +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -6
- package/package.json +13 -13
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.1",
|
|
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"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"command-line-usage": "^6.1.3",
|
|
42
42
|
"fastest-levenshtein": "^1.0.16",
|
|
43
43
|
"import-meta-resolve": "^2.2.1",
|
|
44
|
-
"minimist": "^1.2.
|
|
44
|
+
"minimist": "^1.2.8",
|
|
45
45
|
"picocolors": "^1.0.0",
|
|
46
46
|
"pretty-ms": "^8.0.0"
|
|
47
47
|
},
|
|
@@ -50,22 +50,22 @@
|
|
|
50
50
|
"@tsconfig/node12": "^1.0.11",
|
|
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.37",
|
|
54
54
|
"@types/tmp": "^0.2.3",
|
|
55
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
56
|
-
"@typescript-eslint/parser": "^5.
|
|
55
|
+
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
|
56
|
+
"@typescript-eslint/parser": "^5.54.0",
|
|
57
57
|
"ava": "~5.0.1",
|
|
58
|
-
"c8": "^7.
|
|
59
|
-
"dprint": "^0.34.
|
|
60
|
-
"eslint": "^8.
|
|
58
|
+
"c8": "^7.13.0",
|
|
59
|
+
"dprint": "^0.34.5",
|
|
60
|
+
"eslint": "^8.35.0",
|
|
61
61
|
"eslint-plugin-ava": "^14.0.0",
|
|
62
|
-
"eslint-plugin-simple-import-sort": "^
|
|
62
|
+
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
63
63
|
"eslint-plugin-unicorn": "^45.0.2",
|
|
64
64
|
"execa": "^6.1.0",
|
|
65
65
|
"moq.ts": "^9.0.2",
|
|
66
|
-
"rimraf": "^4.1.
|
|
66
|
+
"rimraf": "^4.1.3",
|
|
67
67
|
"tmp": "^0.2.1",
|
|
68
|
-
"typescript": "~4.9.
|
|
68
|
+
"typescript": "~4.9.5"
|
|
69
69
|
},
|
|
70
70
|
"overrides": {
|
|
71
71
|
"ava": {
|