@theholocron/astromech 5.0.0-alpha.456 → 5.0.0-alpha.458

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 CHANGED
@@ -132,9 +132,9 @@ export default defineConfig({
132
132
  `loadTasksConfig(cwd)` resolves the manifest: the `tasks` key of
133
133
  `holocron.config.*` (a bare item array), then a dedicated
134
134
  `astromech.config.*` merged on top (dedicated wins; arrays concatenate).
135
- `mergeTasksLayers(parentTasks, dedicated)` is that merge step on its own,
136
- for callers that load the two sources some other way (Sentinel reads them
137
- through the GitHub API).
135
+ A caller that loads the two sources some other way (Sentinel reads them
136
+ through the GitHub API) layers them with datapad's `loadLayeredFromContent()`
137
+ and `coerceTasks` from this entry.
138
138
 
139
139
  | `TaskEntry` field | Effect |
140
140
  | ------------------------ | ----------------------------------------------------------- |
@@ -15,18 +15,6 @@ import { Loaded } from "@theholocron/datapad";
15
15
  */
16
16
  /** Normalise a `TaskConfigItem` to a full {@link TaskEntry} with defaults applied. */
17
17
  export declare function normalizeTaskEntry(item: TaskConfigItem): Required<Pick<TaskEntry, "name" | "ci" | "local">> & TaskEntry;
18
- /**
19
- * Typed identity helper for `astromech.config.ts`:
20
- *
21
- * ```ts
22
- * import { defineConfig } from "@theholocron/astromech/config";
23
- *
24
- * export default defineConfig({
25
- * tasks: ["typecheck", { name: "test", required: true }],
26
- * });
27
- * ```
28
- */
29
- export declare const defineConfig: <C extends TasksConfig>(config: C) => C;
30
18
  /**
31
19
  * The `tasks` value in each source. A dedicated `astromech.config.*`
32
20
  * default-exports the full {@link TasksConfig} object; the `tasks` key of
@@ -56,14 +44,20 @@ interface LoadTasksConfigOptions {
56
44
  * `options.holocron` so it is not found and loaded again.
57
45
  */
58
46
  export declare function loadTasksConfig(cwd: string, options?: LoadTasksConfigOptions): Promise<TasksConfig>;
47
+ /** A bare item array is shorthand for `{ tasks: [...] }`. */
48
+ export declare function coerceTasks(value: TasksInput | undefined): TasksConfig | undefined;
59
49
  /**
60
- * The same layering as {@link loadTasksConfig}, for callers that load the two
61
- * sources some other way (Sentinel reads them from the GitHub API, not
62
- * from disk, holocron#916): `holocron.config.*`'s `tasks` value first,
63
- * then a dedicated `astromech.config.*`'s default export merged on top.
64
- * Either may be `undefined` (source absent); returns `{}` when both are.
50
+ * Typed identity helper for `astromech.config.ts`:
51
+ *
52
+ * ```ts
53
+ * import { defineConfig } from "@theholocron/astromech/config";
54
+ *
55
+ * export default defineConfig({
56
+ * tasks: ["typecheck", { name: "test", required: true }],
57
+ * });
58
+ * ```
65
59
  */
66
- export declare function mergeTasksLayers(parentTasks: TasksInput | undefined, dedicated: TasksInput | undefined): TasksConfig;
60
+ export declare const defineConfig: <C extends TasksConfig>(config: C) => C;
67
61
  /**
68
62
  * The version groups a repo releases on their own: the folder names listed under `groups`
69
63
  * in its `delivery.publish` task. This is what the generated publish workflow reads, so a
@@ -71,4 +65,4 @@ export declare function mergeTasksLayers(parentTasks: TasksInput | undefined, de
71
65
  * `[]` for a repo that releases as one.
72
66
  */
73
67
  export declare function releaseGroups(config: Pick<TasksConfig, "tasks">): string[];
74
- export type { TaskConfigItem, TaskEntry, TasksConfig };
68
+ export type { TaskConfigItem, TaskEntry, TasksConfig, TasksInput };
@@ -1,5 +1,5 @@
1
1
  import { n as coerceTasks, r as isTask, t as loadTasksConfig, u as normalizeTaskEntry } from "../load-PgZbUPyW.mjs";
2
- import { createDefineConfig, mergeLayers } from "@theholocron/datapad";
2
+ import { createDefineConfig } from "@theholocron/datapad";
3
3
  // src/config/define/define.ts
4
4
  /**
5
5
  * Typed identity helper for `astromech.config.ts`:
@@ -13,17 +13,6 @@ import { createDefineConfig, mergeLayers } from "@theholocron/datapad";
13
13
  * ```
14
14
  */
15
15
  const defineConfig = createDefineConfig();
16
- // src/config/merge-tasks-layers/merge-tasks-layers.ts
17
- /**
18
- * The same layering as {@link loadTasksConfig}, for callers that load the two
19
- * sources some other way (Sentinel reads them from the GitHub API, not
20
- * from disk, holocron#916): `holocron.config.*`'s `tasks` value first,
21
- * then a dedicated `astromech.config.*`'s default export merged on top.
22
- * Either may be `undefined` (source absent); returns `{}` when both are.
23
- */
24
- function mergeTasksLayers(parentTasks, dedicated) {
25
- return mergeLayers([coerceTasks(parentTasks), coerceTasks(dedicated)]) ?? {};
26
- }
27
16
  // src/config/release-groups/release-groups.ts
28
17
  /**
29
18
  * The version groups a repo releases on their own: the folder names listed under `groups`
@@ -39,4 +28,4 @@ function releaseGroups(config) {
39
28
  return typeof name === "string" ? [name] : [];
40
29
  });
41
30
  }
42
- export { defineConfig, loadTasksConfig, mergeTasksLayers, normalizeTaskEntry, releaseGroups };
31
+ export { coerceTasks, defineConfig, loadTasksConfig, normalizeTaskEntry, releaseGroups };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/astromech",
3
- "version": "5.0.0-alpha.456",
3
+ "version": "5.0.0-alpha.458",
4
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",
@@ -55,11 +55,11 @@
55
55
  "@commitlint/lint": "^21.2.3",
56
56
  "@commitlint/load": "^21.2.3",
57
57
  "@commitlint/types": "^21.2.3",
58
- "@theholocron/json-utils": "^1.17.0-alpha.4",
58
+ "@theholocron/datapad": "5.0.0-alpha.458",
59
59
  "@theholocron/fs-utils": "^1.17.0-alpha.4",
60
- "@theholocron/misc-utils": "^1.17.0-alpha.4",
61
- "@theholocron/datapad": "5.0.0-alpha.456",
62
- "@theholocron/pkg-utils": "^1.17.0-alpha.4"
60
+ "@theholocron/json-utils": "^1.17.0-alpha.4",
61
+ "@theholocron/pkg-utils": "^1.17.0-alpha.4",
62
+ "@theholocron/misc-utils": "^1.17.0-alpha.4"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@commitlint/config-conventional": "^21.2.3",
@@ -73,11 +73,11 @@
73
73
  "tsdown": "^0.23.7",
74
74
  "typescript": "^5.9.3",
75
75
  "vitest": "^5.1.0",
76
- "@theholocron/commitlint-config": "^8.9.0-alpha.18",
77
76
  "@theholocron/ci": "1.0.0",
78
- "@theholocron/eslint-config": "^8.9.0-alpha.18",
79
77
  "@theholocron/rollup-plugin-transform-template": "^8.9.0-alpha.18",
80
78
  "@theholocron/tsconfig": "^8.9.0-alpha.18",
79
+ "@theholocron/commitlint-config": "^8.9.0-alpha.18",
80
+ "@theholocron/eslint-config": "^8.9.0-alpha.18",
81
81
  "@theholocron/tsdown-config": "^8.9.0-alpha.18",
82
82
  "@theholocron/vitest-config": "^8.9.0-alpha.18"
83
83
  },