@theholocron/astromech 5.0.0-alpha.249 → 5.0.0-alpha.250

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/index.d.mts CHANGED
@@ -26,7 +26,7 @@ export declare function ensureIfNotFound(yaml: string): string;
26
26
  export declare function mergeCodecovComponents(existing: string, packages: WorkspacePackage$1[]): string;
27
27
  /**
28
28
  * Every package the repo's `pnpm-workspace.yaml` declares (the default roots
29
- * when it declares none), sorted by slug -- the folder name. Every one needs a
29
+ * when it declares none), sorted by location, so each group folder (`cli/`, `plugins/`, ...) stays together. Every one needs a
30
30
  * codecov component so `codecov/patch/<slug>` actually posts for each. A
31
31
  * package at `<root>/<slug>` carries `dir: <root>`; one that is itself a
32
32
  * workspace folder (`observability`) or sits deeper (`docs/theme`) carries its
package/dist/index.mjs CHANGED
@@ -152,15 +152,26 @@ function scaffoldHeader() {
152
152
  ``
153
153
  ].join("\n");
154
154
  }
155
+ function location({ slug, dir, path }) {
156
+ return path ?? `${dir ?? "packages"}/${slug}`;
157
+ }
155
158
  function codecovComponentBlock(packages) {
156
159
  if (packages.length === 0) return "\n []\n";
157
- return "\n" + packages.flatMap(({ slug, dir, path }) => [
158
- ` - component_id: ${slug}`,
159
- ` name: "${slug}"`,
160
- ` paths:`,
161
- ` - ${path ?? `${dir ?? "packages"}/${slug}`}/**`,
162
- ``
163
- ]).join("\n");
160
+ let group;
161
+ return "\n" + packages.flatMap((pkg) => {
162
+ const where = location(pkg);
163
+ const root = where.split("/")[0];
164
+ const heading = root === group ? [] : [` # ${root}`];
165
+ group = root;
166
+ return [
167
+ ...heading,
168
+ ` - component_id: ${pkg.slug}`,
169
+ ` name: "${pkg.slug}"`,
170
+ ` paths:`,
171
+ ` - ${where}/**`,
172
+ ``
173
+ ];
174
+ }).join("\n");
164
175
  }
165
176
  /**
166
177
  * Ensure every codecov status default carries `if_not_found: success`, so an
@@ -204,7 +215,7 @@ function mergeCodecovComponents(existing, packages) {
204
215
  }
205
216
  /**
206
217
  * Every package the repo's `pnpm-workspace.yaml` declares (the default roots
207
- * when it declares none), sorted by slug -- the folder name. Every one needs a
218
+ * when it declares none), sorted by location, so each group folder (`cli/`, `plugins/`, ...) stays together. Every one needs a
208
219
  * codecov component so `codecov/patch/<slug>` actually posts for each. A
209
220
  * package at `<root>/<slug>` carries `dir: <root>`; one that is itself a
210
221
  * workspace folder (`observability`) or sits deeper (`docs/theme`) carries its
@@ -234,7 +245,7 @@ function readWorkspacePackages(repoRoot) {
234
245
  name,
235
246
  path: relativeDir
236
247
  };
237
- }).sort((a, b) => a.slug.localeCompare(b.slug));
248
+ }).sort((a, b) => location(a).localeCompare(location(b)));
238
249
  }
239
250
  /** A brand-new `codecov.yml` — the scaffold header + the base template + this repo's component list. */
240
251
  function createCodecovConfig(packages) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/astromech",
3
- "version": "5.0.0-alpha.249",
3
+ "version": "5.0.0-alpha.250",
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",
@@ -53,7 +53,7 @@
53
53
  "@theholocron/fs-utils": "^1.16.0",
54
54
  "@theholocron/json-utils": "^1.16.0",
55
55
  "@theholocron/pkg-utils": "^1.16.0",
56
- "@theholocron/datapad": "5.0.0-alpha.249"
56
+ "@theholocron/datapad": "5.0.0-alpha.250"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@commitlint/config-conventional": "^21.2.3",