@osdlc/repo-cleaner 0.17.1 → 0.18.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/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # @osdlc/repo-cleaner
2
2
 
3
+ ## 0.18.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 25ccd9e: **Breaking:** a new command line and library, with no aliases for the old names, and worktrees with submodules can now be cleaned up.
8
+
9
+ Command line. `repo-cleaner [target...]` is the report (`status` is gone; a directory named `status` is now a target). `apply` is `clean`. `summary` and `--commands` are `--format summary` and `--format commands`; `--output json` is `--format json`; the report's `--keep` is `--all`. `--row` is `--pick`, and `--keep` is `--spare`, which now takes a row of any kind (a spared remote branch is still tip-checked, and sparing a worktree spares its branch). `--remotes` is `--remote`, `--no-fetch` is `--offline`, `--measure-remote` is `--against`, and `--remote-url <url>` is a remote URL given as a target (a local bare repository as `file:///…`). `--repo-root` is gone: sweep or plan only the repository a row is in. `--only` takes `worktree`, `branch`, `remote`. Rows are named `worktree:<path>`, `branch:<name>`, `remote:<remote>/<name>`, or by a bare name when only one row has it. Verdicts are `delete`, `review`, `keep` and the new `blocked` (shown as `review` before). Every command takes `--help --extended` for the full reference. Combinations that contradict themselves, or with an option that would have no effect (`--yes --dry-run`, `--offline` or `--provider` without `--remote`, the same row picked and spared, and the rest in the README's "Refused combinations"), are refused with exit 2 before anything is deleted, most of them before anything is swept.
10
+
11
+ Library. The exports are `sweep(targets, opts)`, `plan(sweep)`, `check(plan, { pick, spare, allow })`, `run(preview)`, `inspectWorktree(path)`, `readPlan`, `writePlan`, `render`, `defaultProcessProbe`, `providers` and `RepoCleanerError` (with a `code`), and their types. `sweepRepo`, `sweepRepos`, `applyPlan`, `planRepo`, `holdFreedBranches`, the gather and classify functions, the command builders and the other helpers are no longer exported. A row is a `WorktreeRow`, `BranchRow` or `RemoteRow` with `verdict`, `action` (null when it can never be deleted), `why`, `risks`, `blockers`, `commands`, `notes`, and typed camelCase `evidence` in place of the `facts` bag. `annotate` is a `sweep`, `check` and `run` option, and the sweep holds a held-back worktree's branch itself. Plans are version 2 and receipts version 2, both camelCase; a version 1 plan is refused.
12
+
13
+ Submodules. Plain `git worktree remove` refuses any worktree with a checked-out submodule, or with a submodule git dir a `git submodule deinit` left behind, so the old `apply` failed on every such worktree. The sweep now reads each submodule, nested ones included, and each left-over submodule git dir. A worktree whose submodules are clean and pushed is `delete`, with a `git worktree remove --force` command (`evidence.forcedForSubmodules`), and just before that remove `clean` checks the worktree's own files and every submodule again, since `--force` skips git's own check. A linked worktree's submodules keep their history in the worktree's own git dir, so a submodule's commits and stashes that no remote has carry `abandon-unmerged`, and its modified files carry `discard-changes`: one `--allow` on the worktree row covers its submodules. A submodule that cannot be read is the new `submodule-unreadable` blocker. A worktree whose directory is gone is now removed by its own record (`git worktree remove <path>`) rather than by a repository-wide `git worktree prune`; one whose directory is left without its `.git` still needs that prune, so it runs last and only while every other gone worktree the prune would drop goes in the same run (otherwise it is dropped as `blocked`). A run no longer ends with a repository-wide prune, so it never drops the record of a gone worktree it did not select, a spared one included. Submodule state is part of the plan fingerprint.
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [25ccd9e]
18
+ - @osdlc/typed-git@0.13.0
19
+ - @osdlc/typed-gh@0.16.1
20
+
21
+ ## 0.17.2
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies [25c1c72]
26
+ - Updated dependencies [51efdb6]
27
+ - @osdlc/cli-tool@0.17.0
28
+ - @osdlc/typed-gh@0.16.0
29
+
3
30
  ## 0.17.1
4
31
 
5
32
  ### Patch Changes