@sacho/sacho 0.1.0-dev.13 → 0.1.0-dev.16

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
@@ -1,6 +1,27 @@
1
1
  Sacho: an opinionated changelog manager
2
2
  =======================================
3
3
 
4
+ [![GitHub Releases][GitHub Releases badge]][GitHub Releases]
5
+ [![crates.io][crates.io badge]][crates.io]
6
+ [![npm][npm badge]][npm]
7
+ [![GitHub Actions][GitHub Actions badge]][GitHub Actions]
8
+ [![License: GPL-3.0-only][GPL-3.0 badge]][GPL-3.0]
9
+ [![GitHub Sponsors][GitHub Sponsors badge]][GitHub Sponsors]
10
+
11
+ [GitHub Releases badge]: https://img.shields.io/github/v/release/dahlia/sacho?logo=github
12
+ [GitHub Releases]: https://github.com/dahlia/sacho/releases
13
+ [crates.io badge]: https://img.shields.io/crates/v/sacho?logo=rust
14
+ [crates.io]: https://crates.io/crates/sacho
15
+ [npm badge]: https://img.shields.io/npm/v/@sacho/sacho?logo=npm
16
+ [npm]: https://www.npmjs.com/package/@sacho/sacho
17
+ [GitHub Actions badge]: https://github.com/dahlia/sacho/actions/workflows/main.yaml/badge.svg
18
+ [GitHub Actions]: https://github.com/dahlia/sacho/actions/workflows/main.yaml
19
+ [GPL-3.0 badge]: https://img.shields.io/github/license/dahlia/sacho
20
+ [GPL-3.0]: https://www.gnu.org/licenses/gpl-3.0.html
21
+ [GitHub Sponsors badge]: https://img.shields.io/github/sponsors/dahlia?logo=githubsponsors
22
+ [GitHub Sponsors]: https://github.com/sponsors/dahlia
23
+
24
+
4
25
  Motivation
5
26
  ----------
6
27
 
@@ -52,7 +73,6 @@ Without mise, npm, or Cargo, download the archive for your platform from
52
73
  *sacho* (*sacho.exe* on Windows) into a directory on your `PATH`.
53
74
 
54
75
  [mise]: https://mise.jdx.dev/
55
- [GitHub Releases]: https://github.com/dahlia/sacho/releases
56
76
 
57
77
 
58
78
  Agent Skill
@@ -127,21 +147,37 @@ state that never shipped.
127
147
  Basic workflow
128
148
  --------------
129
149
 
130
- With `sacho` on your `PATH`, initialize it at the repository root and choose
131
- the version you are preparing:
150
+ With `sacho` on your `PATH`, initialize it at the repository root:
132
151
 
133
152
  ~~~~ sh
134
153
  sacho init
135
- sacho next 1.2.0
136
154
  ~~~~
137
155
 
138
156
  Initialization creates *sacho.toml*, *changes.d/*, and *CHANGES.md*. It also
139
157
  sets up the merge integration supported by the detected version-control
140
158
  system. The interactive setup can infer an issue-link template from the
141
- repository URL and offer to install a Git pre-commit hook. Repository
159
+ repository URL, offer headings found across an existing changelog as section
160
+ configuration, and offer to install a Git pre-commit hook. Repository
142
161
  integrations use the executable that ran `init`; pass
143
162
  `--integration-executable PATH` to use another executable.
144
163
 
164
+ If an existing *CHANGES.md* already has entries under `Unreleased` or
165
+ `Version X`, import them before creating new fragments:
166
+
167
+ ~~~~ sh
168
+ sacho import-unreleased
169
+ ~~~~
170
+
171
+ Sacho shows any normalization diff before writing. The import creates one root
172
+ fragment, or one fragment per populated configured section, records `X` as the
173
+ next version when present, and leaves every released section unchanged.
174
+
175
+ If the import did not infer a version, choose the version you are preparing:
176
+
177
+ ~~~~ sh
178
+ sacho next 1.2.0
179
+ ~~~~
180
+
145
181
  Create one fragment for each user-visible change, then edit the path printed by
146
182
  the command:
147
183
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sacho/sacho",
3
- "version": "0.1.0-dev.13+e6331b9",
3
+ "version": "0.1.0-dev.16+dc223de",
4
4
  "description": "An opinionated changelog manager",
5
5
  "license": "GPL-3.0-only",
6
6
  "author": "Hong Minhee <hong@minhee.org>",
@@ -24,12 +24,12 @@
24
24
  "node": ">=18"
25
25
  },
26
26
  "optionalDependencies": {
27
- "@sacho/sacho-aarch64-apple-darwin": "0.1.0-dev.13+e6331b9",
28
- "@sacho/sacho-aarch64-pc-windows-msvc": "0.1.0-dev.13+e6331b9",
29
- "@sacho/sacho-aarch64-unknown-linux-musl": "0.1.0-dev.13+e6331b9",
30
- "@sacho/sacho-x86_64-apple-darwin": "0.1.0-dev.13+e6331b9",
31
- "@sacho/sacho-x86_64-pc-windows-msvc": "0.1.0-dev.13+e6331b9",
32
- "@sacho/sacho-x86_64-unknown-linux-musl": "0.1.0-dev.13+e6331b9"
27
+ "@sacho/sacho-aarch64-apple-darwin": "0.1.0-dev.16+dc223de",
28
+ "@sacho/sacho-aarch64-pc-windows-msvc": "0.1.0-dev.16+dc223de",
29
+ "@sacho/sacho-aarch64-unknown-linux-musl": "0.1.0-dev.16+dc223de",
30
+ "@sacho/sacho-x86_64-apple-darwin": "0.1.0-dev.16+dc223de",
31
+ "@sacho/sacho-x86_64-pc-windows-msvc": "0.1.0-dev.16+dc223de",
32
+ "@sacho/sacho-x86_64-unknown-linux-musl": "0.1.0-dev.16+dc223de"
33
33
  },
34
34
  "publishConfig": {
35
35
  "access": "public",
@@ -89,13 +89,18 @@ Adopting Sacho in a project
89
89
  Run `sacho init` from the repository root. It creates `sacho.toml`,
90
90
  `changes.d/`, and `CHANGES.md`, and in a Git repository registers the merge
91
91
  drivers. Interactive setup infers issue-link templates from the remote and can
92
- install commit hooks; `sacho init --interactive` forces the questions and
93
- `--no-interactive` suppresses them.
94
-
95
- Adoption needs no migration. Sacho never rewrites existing released sections, so
96
- leave the old `CHANGES.md` history exactly as it is and start using fragments
97
- for the next version. Set that version with `sacho next 1.2.0` so the unreleased
98
- heading and `release` know what is being prepared.
92
+ install commit hooks. When an existing changelog is present, it also offers
93
+ level-three headings found across the changelog as section candidates and
94
+ suggests directories and source path globs. `sacho init --interactive` forces
95
+ the questions and `--no-interactive` suppresses them.
96
+
97
+ Leave old released sections exactly as they are. If the current `Unreleased` or
98
+ `Version X` region contains entries, run `sacho import-unreleased` before
99
+ creating fragments. Inspect and confirm its normalization diff; in a
100
+ noninteractive workflow, review the diff from the refused run before using
101
+ `--force`. The command creates deterministic *imported-unreleased.md* fragments
102
+ and infers the next version from `Version X`. If there are no current entries,
103
+ skip the import and set the version with `sacho next 1.2.0`.
99
104
 
100
105
  Two configuration decisions matter early, both covered in
101
106
  `reference/configuration.md`: whether to enforce fragment coverage