@r5n/sisyphus 0.9.0 → 0.10.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
@@ -98,13 +98,17 @@ sisyphus roll --resume
98
98
  - `--noCommit` — skip the release commit (also disables tags, push, and provider release)
99
99
  - `--preview` — write changelogs, show them, then offer to revert
100
100
  - `--publishOnly` — publish from `currentRelease` recorded by `actions release-pr`, without touching files
101
+ - `-j, --json` — print a machine-readable release report on stdout instead of the interactive output; the report carries a required `warnings` string array listing ignore exclusions, cycle-order caveats, and channel problems
101
102
  - `--resume` — reconcile and continue the active incomplete release
103
+ - `--abort` — abandon the incomplete release if nothing external has started; releases with external progress must use `--resume`
102
104
  - `-d, --dryRun`, `-y, --yes`
103
105
 
104
106
  Provider releases require tags to be pushed to the same repository first, so normal releases must enable `--tags --push --createRelease`; publish-only releases require `--tags --createRelease` and push those exact tags before creating releases.
105
107
 
106
108
  Publishing builds each public package, rewrites its `package.json` to a clean publish manifest, and packs an immutable tarball before any package is uploaded. `workspace:` specifiers are resolved against actual workspace versions (`workspace:*` pins the exact version and `workspace:^`/`workspace:~` become ranges), `catalog:` specifiers are resolved from the root `catalog`/`catalogs`, and `devDependencies` are stripped. The source manifest is restored after packing, even if preparation fails. Private packages (`"private": true`) are skipped.
107
109
 
110
+ Publication defaults to public access and honours `publishConfig.access: "restricted"` from the immutable package manifest. Invalid access values fail before publication.
111
+
108
112
  For releases with external operations, Sisyphus stores the plan, immutable artifacts, exact Git refs, and per-operation progress below Git's worktree-specific administrative directory. `--resume` verifies an ambiguous npm upload by SHA-512 integrity, verifies an ambiguous push from exact remote refs, and verifies provider releases by tag, title, and notes. If the external system cannot confirm the expected state, resume stops rather than repeating the operation.
109
113
 
110
114
  Npm publication requires a release commit, so it cannot be combined with `--noCommit`. Publish-only releases verify the source hash recorded by `actions release-pr`, the exact package versions, and the complete archived-stone set before creating tags or artifacts.
@@ -125,6 +129,10 @@ Convert an existing `.changeset/` directory to stones and map supported changese
125
129
 
126
130
  CI integration. `actions init` detects your provider (GitHub Actions or GitLab CI) and installs workflow templates: a create-stone workflow that turns merged PRs into stones and maintains a release PR, and a release workflow that publishes when the release PR merges (`--all`, `--createStone`, `--release`, `-d`, `-y`). `actions release-pr` creates or updates the `sisyphus/release` branch and PR from pending stones, archives the stones to `.sisyphus/released/<timestamp>/`, and records `currentRelease` in the config for a later `roll --publishOnly`.
127
131
 
132
+ Run `actions release-pr` from a clean working tree; commit or stash local changes first. It returns to the original branch after preparing or previewing the release PR.
133
+
134
+ The generated GitLab workflows require `GITLAB_TOKEN` with API access and repository write permission; `SIS_PUSH_TOKEN` can supply a separate repository write credential. They configure a credential-free origin URL and a credential helper for both stone and release-branch pushes. Automatic MR detection expects GitLab's standard merge commit title and `See merge request <project>!<number>` footer. Use merge commits for release merge requests; squash, rebase and custom commit messages require adapting the rules or running the release job manually.
135
+
128
136
  ### `sisyphus init`
129
137
 
130
138
  Create or edit `.sisyphus/config.json`. Flag-driven when invoked directly (the interactive form lives in the `sis -i` menu); every form field has a matching flag (`--single`, `--tag`, `--npm`, `--tags`, `--push`, `--createRelease`, `--changelog`, `--rootChangelog`, `--commitAuthor`, `--commitEmail`, `--commitMessage`). `--default` resets to defaults, `--force` overwrites non-interactively. Also records the current HEAD as `lastStone`, the baseline for `version --fromCommits`.
@@ -179,7 +187,9 @@ Create or edit `.sisyphus/config.json`. Flag-driven when invoked directly (the i
179
187
  - `commit` — release commit author/email and message template; `{message}` and `{packages}` are substituted; a valid `email` is required whenever `author` is set
180
188
  - `changelog` — `sections` maps conventional commit types (`feat`, `fix`, `breaking`, ...) to headings; `root` adds a combined root changelog; `packageHeader`/`rootHeader` support `{emoji}`, `{version}`, `{date}`, `{packages}`
181
189
  - `commits.skip` / `pr.skip` — filters for `version --fromCommits` and `pr`
182
- - `release` — defaults for the corresponding `roll` flags
190
+ - `release` — defaults for the corresponding `roll` flags, plus `release.build` (see below)
191
+ - `dependents` — which manifest sections pull a dependent into a release (`kinds`) and whether dependents are always released or only when their published range no longer admits the new version (`updateInternal`)
192
+ - `ignore` — package names or globs that are never released; they are skipped when selecting packages, never pulled in as dependents, and never traversed through
183
193
  - `sisyphusDir` / `stonesPath` — relocate the config directory or stone storage
184
194
  - `lastStone`, `stones`, `currentRelease` — managed by the CLI; don't edit by hand
185
195
 
@@ -198,7 +208,55 @@ Each stone is a JSON file at `.sisyphus/stones/<id>.json`, safe to commit and re
198
208
  }
199
209
  ```
200
210
 
201
- Stones may also carry a `tag` (prerelease) and the `commits` they were generated from. `roll` merges every pending stone, keeping the highest bump per package.
211
+ Stones may also carry a `tag` (prerelease) and the `commits` they were generated from. `roll` merges every pending stone, keeping the highest bump per package. Every pending stone must agree on the prerelease tag, and a package cannot be both a snapshot and a normal release in one roll.
212
+
213
+ ## Dependents
214
+
215
+ Selecting a package pulls in everything that depends on it, transitively, as a `dependency` bump. Propagation follows only `workspace:` protocol specifiers — a dependency declared with a plain version range is never treated as an internal edge, even when its name matches a workspace package. Edges come from the manifest sections listed in `dependents.kinds`; the default includes `devDependencies` because bundled packages inline their workspace dependencies at build time. Drop it when only the published manifest matters:
216
+
217
+ ```json
218
+ {
219
+ "dependents": {
220
+ "kinds": ["dependencies", "optionalDependencies", "peerDependencies"],
221
+ "updateInternal": "always"
222
+ }
223
+ }
224
+ ```
225
+
226
+ `updateInternal: "outOfRange"` releases a dependent only when its published range would no longer admit the new version — `workspace:*` is always invalidated, `workspace:^` survives a minor bump above 0.x, `workspace:~` survives a patch, and a literal `workspace:<range>` is never rewritten so it never triggers a release. Releases are ordered so a dependency is tagged and published before the dependent that pins it. Publication order follows runtime, optional and peer dependencies; development dependencies are removed from the published manifest and do not constrain that order.
227
+
228
+ When an untagged release graduates a prerelease package, selected prerelease dependents connected through the sections in `dependents.kinds` graduate with it. Excluded sections cannot cause a dependent to leave its prerelease channel.
229
+
230
+ ## Prereleases
231
+
232
+ Pass `--tag` to `version` to open a prerelease channel. The base version is bumped first, so the prerelease always sorts above the last stable release:
233
+
234
+ | current | stone | result |
235
+ | --- | --- | --- |
236
+ | `1.0.0` | minor + `--tag beta` | `1.1.0-beta.0` |
237
+ | `1.1.0-beta.0` | patch + `--tag beta` | `1.1.0-beta.1` |
238
+ | `1.1.0-beta.1` | major + `--tag beta` | `2.0.0-beta.0` |
239
+ | `1.1.0-beta.1` | patch, no tag | `1.1.0` |
240
+
241
+ Omitting `--tag` leaves the channel and lands on the accumulated stable target. The npm dist-tag follows the channel, so prereleases never publish as `latest`. A single roll cannot publish stable and prerelease packages to npm together — the dist-tag applies to the whole release — so such a mix fails closed before anything is published. In practice, graduate the prerelease packages first or roll the two channels separately.
242
+
243
+ ## Build
244
+
245
+ `roll` builds each package before packing it. By default that is `bun run build` in the package directory:
246
+
247
+ ```json
248
+ {
249
+ "release": {
250
+ "build": {
251
+ "command": ["bun", "run", "build"],
252
+ "root": [["bun", "run", "build:dts"]],
253
+ "outputs": ["packages/*/dist/**"]
254
+ }
255
+ }
256
+ }
257
+ ```
258
+
259
+ `root` runs once at the repository root before the first package is packed — for declarations or bundles generated centrally. `command: []` disables the per-package build. `outputs` declares the gitignored paths the build writes: they are removed before the build and exempted from the guards that otherwise reject untracked and ignored files, while everything else stays rejected. A declared output that Git tracks is refused before any build runs. Commands are executed directly, never through a shell.
202
260
 
203
261
  ## GitHub Actions
204
262