@theholocron/cli 4.10.3 → 4.12.0

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
@@ -133,6 +133,29 @@ Writes `"holocron": "<holocronScript ?? 'holocron'>"` plus one
133
133
  `"<task>": "holocron run <task>"` per runnable task. `syncScripts: false`
134
134
  opts out entirely.
135
135
 
136
+ ### `holocron run`
137
+
138
+ ```bash
139
+ holocron run <task> [job] [--required] [--filter <pkg>] [--dry-run] [-- <passthrough>]
140
+ ```
141
+
142
+ Runs one task locally — resolving turbo vs the package manager vs the tool
143
+ itself. A `job` argument targets a sub-job of tasks that have them: `holocron
144
+ run audit performance` runs Lighthouse CI, `holocron run audit knip` runs Knip,
145
+ `holocron run audit` (no job) runs every audit sub-job in declared order. A
146
+ sub-job whose tool isn't installed, or that has no local equivalent
147
+ (`bundle-size`), is skipped with a note — `--required` makes that a failure. For
148
+ a task with no sub-jobs the `job` slot is the first passthrough arg
149
+ (`holocron run build src/`).
150
+
151
+ **CI runs the identical command.** The reusable `typecheck` / `test` / `audit`
152
+ workflows call the `holocron` composite action
153
+ (`theholocron/.github/.github/actions/holocron@main`), whose body is
154
+ `holocron run <task> [job]`. So `holocron run test` locally and the `Test` CI
155
+ job execute the same thing — at a turbo root both are
156
+ `turbo run test -- --coverage` (the registry's org-default flags flow through
157
+ turbo's `--`).
158
+
136
159
  ### `holocron ci`
137
160
 
138
161
  ```bash
@@ -146,7 +169,9 @@ first failure — the "will my PR be green?" pre-flight, and what the
146
169
  `--all` forces the full set; `--filter` is a `turbo --filter=` passthrough.
147
170
  Order comes from the `CI_ORDER` constant in `@theholocron/astromech`
148
171
  (`typecheck → lint → test → build → …`). Tasks with no local equivalent
149
- (`audit`, `codeql`, `deploy`) are reported as enforced-in-CI, never failures.
172
+ (`codeql`, `deploy`) are reported as enforced-in-CI, never failures; `audit`
173
+ expands into its sub-jobs (each under its own `audit / …` check context)
174
+ unless the repo ships its own `"audit"` script.
150
175
 
151
176
  ### Lint parity
152
177
 
package/dist/cli.mjs CHANGED
@@ -6935,10 +6935,13 @@ try {
6935
6935
  },
6936
6936
  ...argv.steps && argv.steps.length > 0 ? { steps: argv.steps } : {}
6937
6937
  })).summary.fail > 0) process.exitCode = 1;
6938
- }).command("run <task> [passthrough..]", "Run a task locally (test, typecheck, lint, build) — figures out turbo / the tool / the package manager", (y) => y.positional("task", {
6938
+ }).command("run <task> [job] [passthrough..]", "Run a task locally (test, typecheck, lint, build, audit) — figures out turbo / the tool / the package manager", (y) => y.positional("task", {
6939
6939
  type: "string",
6940
6940
  demandOption: true,
6941
- describe: "Task name (test, typecheck, lint, build). See `holocron run --help`."
6941
+ describe: "Task name (test, typecheck, lint, build, audit). See `holocron run --help`."
6942
+ }).positional("job", {
6943
+ type: "string",
6944
+ describe: "Sub-job within the task (e.g. `holocron run audit performance`). Omit to run every job. Only `audit` has jobs today."
6942
6945
  }).positional("passthrough", {
6943
6946
  type: "string",
6944
6947
  array: true,
@@ -6958,6 +6961,7 @@ try {
6958
6961
  logger,
6959
6962
  config
6960
6963
  }).run(argv.task, {
6964
+ ...argv.job !== void 0 ? { job: argv.job } : {},
6961
6965
  passthrough: argv.passthrough ?? [],
6962
6966
  dryRun: argv.dryRun,
6963
6967
  required: argv.required,
@@ -7376,8 +7380,8 @@ try {
7376
7380
  let extra = [];
7377
7381
  try {
7378
7382
  const raw = readFileSync(join(argv.cwd, "holocron.config.json"), "utf8");
7379
- const upgradeNode = JSON.parse(raw).upgrade?.node;
7380
- if (Array.isArray(upgradeNode?.extra)) extra = upgradeNode.extra;
7383
+ const extraRaw = JSON.parse(raw).upgrade?.node?.extra;
7384
+ if (Array.isArray(extraRaw)) extra = extraRaw;
7381
7385
  } catch {}
7382
7386
  const report = await runUpgradeNode({
7383
7387
  to: argv.to,