@theholocron/astromech 5.0.0-alpha.26 → 5.0.0-alpha.260
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/README.md +76 -32
- package/dist/config/index.d.mts +45 -8
- package/dist/config/index.mjs +13 -24
- package/dist/editorconfig-checker-HPpphHhI.mjs +39 -0
- package/dist/index.d.mts +560 -410
- package/dist/index.mjs +2731 -1206
- package/dist/lint/index.d.mts +81 -0
- package/dist/lint/index.mjs +136 -0
- package/dist/load-C1uY2yBv.mjs +35 -0
- package/dist/release/index.d.mts +128 -0
- package/dist/release/index.mjs +230 -0
- package/dist/schema-CalPyBNd.mjs +18 -0
- package/dist/{schema-D01VYg43.d.mts → schema.type-C-3fZESa.d.mts} +30 -19
- package/package.json +51 -13
- package/dist/schema-Cf5dfaDO.mjs +0 -11
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
//#region src/config/schema.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* The `tasks` config shape — the single manifest of what a repo runs.
|
|
4
|
-
* Read from a dedicated `astromech.config.*` file or the `tasks` key of
|
|
5
|
-
* `holocron.config.*` (see {@link loadTasksConfig}).
|
|
6
|
-
*
|
|
7
|
-
* Runtime validation is the loader's job, not this type's — the type only
|
|
8
|
-
* describes what an author writes.
|
|
9
|
-
*/
|
|
10
1
|
interface TaskEntry {
|
|
11
2
|
/** Registry task name — `verification.unitTests`, `sourceQuality.staticAnalysis`, `delivery.build`, … */
|
|
12
3
|
name: string;
|
|
13
4
|
/**
|
|
14
5
|
* Emit a `.github/workflows/<name>.yml` thin caller and include the task
|
|
15
|
-
* in `holocron ci`. Default `true`.
|
|
6
|
+
* in `holocron run ci`. Default `true`.
|
|
16
7
|
*/
|
|
17
8
|
ci?: boolean;
|
|
18
9
|
/**
|
|
@@ -24,11 +15,17 @@ interface TaskEntry {
|
|
|
24
15
|
/**
|
|
25
16
|
* The task's CI check context (from `WORKFLOW_CHECK_CONTEXTS`) is a
|
|
26
17
|
* required status check in branch protection (`astromech.requiredChecks()`)
|
|
27
|
-
* and part of `holocron ci`'s default run.
|
|
18
|
+
* and part of `holocron run ci`'s default run.
|
|
28
19
|
*/
|
|
29
20
|
required?: boolean;
|
|
30
21
|
/** Per-repo overrides on the same channel the reusable workflow reads. */
|
|
31
22
|
with?: Record<string, unknown>;
|
|
23
|
+
/**
|
|
24
|
+
* Switch individual sub-jobs of a task off for this repo (`false`), by their registry key or alias:
|
|
25
|
+
* `{ name: "platform.repoValidation", jobs: { docsEnforcement: false } }`. A job left out runs. The job's CI
|
|
26
|
+
* check still reports (green, "off in this repo's config"), so a required check never goes missing.
|
|
27
|
+
*/
|
|
28
|
+
jobs?: Record<string, boolean>;
|
|
32
29
|
/** Extra `on.push.paths` entries for the generated CI workflow. */
|
|
33
30
|
paths?: string[];
|
|
34
31
|
/**
|
|
@@ -40,6 +37,23 @@ interface TaskEntry {
|
|
|
40
37
|
turbo?: {
|
|
41
38
|
/** Extra env vars turbo hashes into this task's cache key, appended to the registry default (empty when the task has none). */
|
|
42
39
|
passThroughEnv?: string[];
|
|
40
|
+
/**
|
|
41
|
+
* Extra input globs appended to the registry default's `inputs`
|
|
42
|
+
* (holocron#845) — for a package whose layout the registry's
|
|
43
|
+
* `"src/**"` default doesn't cover (e.g. a flat-layout package with
|
|
44
|
+
* no `src/` directory at all). Appended, not replaced: the
|
|
45
|
+
* registry's other inputs (`package.json`, `tsdown.config.ts`, …)
|
|
46
|
+
* stay tracked without needing to be repeated here.
|
|
47
|
+
*/
|
|
48
|
+
inputs?: string[];
|
|
49
|
+
/**
|
|
50
|
+
* Extra tasks this one waits for, appended to the registry default's
|
|
51
|
+
* `dependsOn` — for a build the package does not list as a dependency
|
|
52
|
+
* but its task loads anyway (e.g. `staticAnalysis` loading the root
|
|
53
|
+
* ESLint config, which imports a package of the workspace). Turbo
|
|
54
|
+
* syntax: `"<package>#<task>"`, `"^<task>"`.
|
|
55
|
+
*/
|
|
56
|
+
dependsOn?: string[];
|
|
43
57
|
};
|
|
44
58
|
}
|
|
45
59
|
/** A task is either its bare name (all defaults) or an entry object. */
|
|
@@ -52,18 +66,18 @@ interface TasksConfig {
|
|
|
52
66
|
/**
|
|
53
67
|
* The command the synced `"holocron"` `package.json` script runs. Default
|
|
54
68
|
* `"holocron"` (the installed bin). The source repo overrides it to run
|
|
55
|
-
* its own build, e.g. `"node
|
|
69
|
+
* its own build, e.g. `"node cli/cli/dist/cli.mjs"`.
|
|
56
70
|
*/
|
|
57
71
|
holocronScript?: string;
|
|
58
72
|
/**
|
|
59
73
|
* Required status-check contexts not backed by a task — codecov gates,
|
|
60
74
|
* a bundle-build check, … Appended to `astromech.requiredChecks()` after the
|
|
61
|
-
* `required`-task contexts. (`DCO` is prepended by `holocron setup` itself.)
|
|
75
|
+
* `required`-task contexts. (`DCO` is prepended by `holocron repo setup` itself.)
|
|
62
76
|
*/
|
|
63
77
|
extraRequiredChecks?: string[];
|
|
64
78
|
/**
|
|
65
|
-
* Git hooks `holocron setup` installs. `true` / `{ prePush: true }` writes
|
|
66
|
-
* `.husky/pre-push` (runs `holocron ci`); `false` / `{ prePush: false }`
|
|
79
|
+
* Git hooks `holocron repo setup` installs. `true` / `{ prePush: true }` writes
|
|
80
|
+
* `.husky/pre-push` (runs `holocron run ci`); `false` / `{ prePush: false }`
|
|
67
81
|
* opts out. Omitted → on for `protection: "strict"` repos, off otherwise.
|
|
68
82
|
* When enabled, `packageScripts()` also emits `prepare: "husky"`.
|
|
69
83
|
*/
|
|
@@ -71,7 +85,4 @@ interface TasksConfig {
|
|
|
71
85
|
prePush?: boolean;
|
|
72
86
|
};
|
|
73
87
|
}
|
|
74
|
-
|
|
75
|
-
declare function normalizeTaskEntry(item: TaskConfigItem): Required<Pick<TaskEntry, "name" | "ci" | "local">> & TaskEntry;
|
|
76
|
-
//#endregion
|
|
77
|
-
export { normalizeTaskEntry as i, TaskEntry as n, TasksConfig as r, TaskConfigItem as t };
|
|
88
|
+
export { TaskEntry as n, TasksConfig as r, TaskConfigItem as t };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/astromech",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
4
|
-
"description": "The Holocron task runner — one task manifest drives `holocron run`, `holocron ci`, the CI workflows, package.json scripts, linters, and required checks.",
|
|
3
|
+
"version": "5.0.0-alpha.260",
|
|
4
|
+
"description": "The Holocron task runner — one task manifest drives `holocron run`, `holocron run ci`, the CI workflows, package.json scripts, linters, and required checks.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ci",
|
|
7
7
|
"holocron",
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
"theholocron",
|
|
11
11
|
"turbo"
|
|
12
12
|
],
|
|
13
|
-
"homepage": "https://github.com/theholocron/holocron/tree/main/
|
|
13
|
+
"homepage": "https://github.com/theholocron/holocron/tree/main/cli/astromech#readme",
|
|
14
14
|
"bugs": "https://github.com/theholocron/holocron/issues",
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
17
17
|
"url": "git+https://github.com/theholocron/holocron.git",
|
|
18
|
-
"directory": "
|
|
18
|
+
"directory": "cli/astromech"
|
|
19
19
|
},
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"author": "Newton Koumantzelis",
|
|
@@ -31,29 +31,67 @@
|
|
|
31
31
|
"types": "./dist/config/index.d.mts",
|
|
32
32
|
"import": "./dist/config/index.mjs",
|
|
33
33
|
"default": "./dist/config/index.mjs"
|
|
34
|
+
},
|
|
35
|
+
"./lint": {
|
|
36
|
+
"types": "./dist/lint/index.d.mts",
|
|
37
|
+
"import": "./dist/lint/index.mjs",
|
|
38
|
+
"default": "./dist/lint/index.mjs"
|
|
39
|
+
},
|
|
40
|
+
"./release": {
|
|
41
|
+
"types": "./dist/release/index.d.mts",
|
|
42
|
+
"import": "./dist/release/index.mjs",
|
|
43
|
+
"default": "./dist/release/index.mjs"
|
|
34
44
|
}
|
|
35
45
|
},
|
|
36
46
|
"files": [
|
|
37
47
|
"dist"
|
|
38
48
|
],
|
|
39
49
|
"dependencies": {
|
|
40
|
-
"@
|
|
50
|
+
"@commitlint/lint": "^21.2.3",
|
|
51
|
+
"@commitlint/load": "^21.2.3",
|
|
52
|
+
"@commitlint/types": "^21.2.3",
|
|
53
|
+
"@theholocron/datapad": "5.0.0-alpha.260",
|
|
54
|
+
"@theholocron/fs-utils": "^1.16.1-alpha.1",
|
|
55
|
+
"@theholocron/json-utils": "^1.16.1-alpha.1",
|
|
56
|
+
"@theholocron/pkg-utils": "^1.16.1-alpha.1"
|
|
41
57
|
},
|
|
42
58
|
"devDependencies": {
|
|
43
|
-
"@
|
|
44
|
-
"@
|
|
45
|
-
"@
|
|
46
|
-
"@theholocron/vitest-config": "^8.0.0",
|
|
59
|
+
"@commitlint/config-conventional": "^21.2.3",
|
|
60
|
+
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
61
|
+
"@semantic-release/release-notes-generator": "^14.1.1",
|
|
47
62
|
"@types/node": "^26",
|
|
48
|
-
"@vitest/coverage-v8": "^
|
|
63
|
+
"@vitest/coverage-v8": "^5.0.5",
|
|
49
64
|
"@vitest/eslint-plugin": "^1.6.27",
|
|
50
65
|
"eslint": "^10.8.1",
|
|
51
66
|
"eslint-plugin-n": "^18.3.0",
|
|
52
67
|
"globals": "^17.11.0",
|
|
53
|
-
"
|
|
68
|
+
"prettier": "^3.9.6",
|
|
69
|
+
"tsdown": "^0.23.3",
|
|
54
70
|
"typescript": "^5.9.3",
|
|
55
|
-
"vitest": "^
|
|
56
|
-
"@theholocron/
|
|
71
|
+
"vitest": "^5.0.5",
|
|
72
|
+
"@theholocron/commitlint-config": "^8.9.0-alpha.3",
|
|
73
|
+
"@theholocron/semantic-release-config": "^8.9.0-alpha.3",
|
|
74
|
+
"@theholocron/eslint-config": "^8.9.0-alpha.3",
|
|
75
|
+
"@theholocron/tsdown-config": "^8.9.0-alpha.3",
|
|
76
|
+
"@theholocron/rollup-plugin-transform-template": "^8.9.0-alpha.3",
|
|
77
|
+
"@theholocron/vitest-config": "^8.9.0-alpha.3",
|
|
78
|
+
"@theholocron/tsconfig": "^8.9.0-alpha.3"
|
|
79
|
+
},
|
|
80
|
+
"peerDependencies": {
|
|
81
|
+
"@semantic-release/commit-analyzer": "^13",
|
|
82
|
+
"@semantic-release/release-notes-generator": "^14",
|
|
83
|
+
"@theholocron/semantic-release-config": ">=8.8.2"
|
|
84
|
+
},
|
|
85
|
+
"peerDependenciesMeta": {
|
|
86
|
+
"@semantic-release/commit-analyzer": {
|
|
87
|
+
"optional": true
|
|
88
|
+
},
|
|
89
|
+
"@semantic-release/release-notes-generator": {
|
|
90
|
+
"optional": true
|
|
91
|
+
},
|
|
92
|
+
"@theholocron/semantic-release-config": {
|
|
93
|
+
"optional": true
|
|
94
|
+
}
|
|
57
95
|
},
|
|
58
96
|
"engines": {
|
|
59
97
|
"node": ">=22"
|
package/dist/schema-Cf5dfaDO.mjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//#region src/config/schema.ts
|
|
2
|
-
/** Normalise a `TaskConfigItem` to a full {@link TaskEntry} with defaults applied. */
|
|
3
|
-
function normalizeTaskEntry(item) {
|
|
4
|
-
return {
|
|
5
|
-
ci: true,
|
|
6
|
-
local: true,
|
|
7
|
-
...typeof item === "string" ? { name: item } : item
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
//#endregion
|
|
11
|
-
export { normalizeTaskEntry as t };
|