@sous-io/sous 0.2.12 → 0.2.13

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.
@@ -207,7 +207,8 @@ and `git config user.email`), because it commits and cuts annotated tags. Takes
207
207
  - `--no-bump`: raise nothing; a changed recipe that was never raised is then an error.
208
208
  - `--include-unchanged`: release every recipe in scope, changed or not.
209
209
  - `--tag`, `--push`: tag even on a non-default branch, and push the commit and this run's tags.
210
- - `--check`: only validate, and fail when the committed index is out of date.
210
+ - `--check`: only validate. It fails on a problem the release would refuse, and reports, without failing, how
211
+ merging would rewrite the committed index.
211
212
  - `--ci`: the merge preset. Never bump, never ask, and fail on anything unbumped. It still needs `--yes` to
212
213
  accept the plan it prints, so a merge job runs `sous repo release --ci --yes --push`.
213
214
 
@@ -195,8 +195,9 @@ third case is what a merge looks like to continuous integration: the bump is don
195
195
 
196
196
  `--namespace <ns>` and `--recipe <ns/name>` narrow the run and both repeat; `--bump <level>` is `patch` (the
197
197
  default), `minor`, `major` or `prerelease`; `--no-bump` raises nothing; `--include-unchanged` releases every
198
- recipe in scope, changed or not; `--check` only reads, validating and failing when the committed index is stale;
199
- and `--ci` is the merge preset: never bump, accept the plan, never ask, fail on anything unbumped. Every flag
198
+ recipe in scope, changed or not; `--check` only reads, validating, failing on any problem the release would
199
+ refuse, and reporting how merging would rewrite the committed index without failing on it, since that index is
200
+ the release's output; and `--ci` is the merge preset: never bump, accept the plan, never ask, fail on anything unbumped. Every flag
200
201
  this command takes, `--tag`, `--push` and `--non-interactive` among them, is in the
201
202
  [command reference](commands.md#sous-repo-release).
202
203
 
@@ -244,7 +245,8 @@ give that identity to the account a continuous integration job runs as (the scaf
244
245
  `sous repo init` writes `.github/workflows/sous-release.yml`, which runs the same command in its two presets,
245
246
  calling the CLI from npm so nothing is installed into the repository. On a **pull request** it runs
246
247
  `npx --yes @sous-io/sous repo release --check`, which only reads, so it is safe on an untrusted branch and
247
- fails the pull request when a manifest is wrong or the committed index is stale. On a **push to `main`** it
248
+ fails the pull request when a manifest is wrong or a published version changed, and notes how the merge will
249
+ rewrite the index. On a **push to `main`** it
248
250
  runs `npx --yes @sous-io/sous repo release --ci --push --yes`; edit the workflow's `branches` list if your
249
251
  default branch has another name. `--ci` accepts the plan on its own, the redundant `--yes` keeping the file
250
252
  working with an older published sous. Both jobs check out with `fetch-depth: 0`, so existing tags are visible
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sous-io/sous",
3
- "version": "0.2.12",
3
+ "version": "0.2.13",
4
4
  "description": "Compiles AI coding agent configuration (CLAUDE.md, skills, memories) from LiquidJS templates",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -11,7 +11,7 @@ formatVersion: 1
11
11
 
12
12
  namespace: core
13
13
  name: sous-skills
14
- version: 0.2.12
14
+ version: 0.2.13
15
15
 
16
16
  description: >-
17
17
  The skills that teach an agent what sous is and how it works: which files sous
@@ -40,12 +40,15 @@ import {
40
40
  type ValidationProblem,
41
41
  } from "../../lib/repos/release/index.js";
42
42
  import {
43
+ BULLET,
43
44
  blankLine,
44
45
  displayErrorBlock,
45
46
  dryRunNotice,
46
47
  footer,
47
48
  header,
48
49
  log,
50
+ note,
51
+ paragraph,
49
52
  section,
50
53
  showCommandVars,
51
54
  showVariables,
@@ -373,23 +376,22 @@ export default class RepoRelease extends Command {
373
376
  reportProblems(result.problems);
374
377
  if (hasErrors(result.problems)) return this.stopForErrors(result.problems);
375
378
 
376
- if (!result.stale) {
379
+ // The index is the release's output, not the author's: the release that
380
+ // runs after a merge rewrites it before tagging. So drift here is reported
381
+ // as what merging will change, never as a failure; only the problems the
382
+ // index build raises above stop a check.
383
+ if (result.stale) {
384
+ note(`Merging rewrites the committed ${INDEX_FILENAME}, because:`);
385
+ for (const line of describeIndexDrift(existing, result.index)) {
386
+ paragraph(`${BULLET} ${line}`, { indent: 4, hangingIndent: 2 });
387
+ }
388
+ blankLine();
389
+ } else {
377
390
  log(` The committed ${INDEX_FILENAME} is current, and so are the dependencies it`);
378
391
  log(" records for every version it publishes.");
379
- reportPending(result, "These versions have no tag yet; they publish when this merges:");
380
- footer();
381
- return;
382
392
  }
383
-
384
- const lines = [
385
- `The committed ${INDEX_FILENAME} is out of date:`,
386
- "",
387
- ...describeIndexDrift(existing, result.index).map((line) => ` ${line}`),
388
- "",
389
- "Run 'sous repo release' to regenerate it, and commit what it writes.",
390
- ];
391
- displayErrorBlock(lines.join("\n"));
392
- this.exit(1);
393
+ reportPending(result, "These versions have no tag yet; they publish when this merges:");
394
+ footer();
393
395
  }
394
396
 
395
397
  // --- Output ---------------------------------------------------------------------------------
@@ -327,10 +327,10 @@ export function buildReleaseWorkflow(): string {
327
327
  # installed into this repository:
328
328
  #
329
329
  # 'sous repo release --check' validates every manifest, confirms each recipe
330
- # folder matches what the repo manifest lists, and confirms the committed
331
- # index agrees with the versions and dependencies the recipe manifests
332
- # declare. It only reads; it never writes, commits or tags. That makes it the
333
- # right thing to run on a pull request.
330
+ # folder matches what the repo manifest lists, and reports how merging would
331
+ # rewrite the committed index, which the release after a merge regenerates.
332
+ # It only reads; it never writes, commits or tags. That makes it the right
333
+ # thing to run on a pull request.
334
334
  #
335
335
  # 'sous repo release --ci --push --yes' does the same validation and then
336
336
  # publishes. '--ci' raises no versions, accepts the plan it prints, and asks