passsy / write-changelogsr2
Writing Changelogs
PublicWrite a changelog for its reader: categorized, linked entries listing every changed symbol for developers, and short news headlines about benefits for app users.
tests, run by the registry9 passed · slowest 1.2 ms
- The advice links to github.com
✓fires1.2 ms
fires when the agent writes CHANGELOG
write CHANGELOGfired: the file
# Changelog
## 1.1.0
- **New** `UserService.batch()` for bulk operations✓fires1.1 ms
fires when the agent writes CHANGELOG.md
write CHANGELOG.mdfired: the file
Changelog
1.1.0
New UserService.batch() for bulk operations✓fires1.1 ms
fires when the agent writes CHANGELOG.txt
write CHANGELOG.txtfired: the file
# Changelog
## 1.1.0
- **New** `UserService.batch()` for bulk operations✓fires1.0 ms
fires when the agent writes changelog.md
write changelog.mdfired: the file
Changelog
1.1.0
New UserService.batch() for bulk operations✓fires1.1 ms
fires when the agent writes CHANGELOG.rst
write CHANGELOG.rstfired: the file
# Changelog
## 1.1.0
- **New** `UserService.batch()` for bulk operations✓fires1.1 ms
points at the file on an edit
write packages/api/CHANGELOG.md · wrote lines 3, 4, 5fired: the file
Changelog
1.1.0
New UserService.batch() for bulk operations✓quiet1.1 ms
stays quiet on a file that merely contains the word
write MY_CHANGELOG.mdstayed quiet
Changelog
1.1.0
New UserService.batch() for bulk operations✓skips0.0 ms
stays quiet when the agent only reads the changelog
read CHANGELOG.mdno handler of the detector wants this event
Changelog
1.1.0
New UserService.batch() for bulk operations✓skips0.0 ms
stays quiet when the user only mentions a changelog
promptno handler of the detector wants this event
Please update CHANGELOG.mddetector.test.tseach detect() call runs the real detectorEdit
import { expect, test } from "vitest";
import { detect, edit, prompt, read, source, write } from "@wellactually/sdk/v3/test";
const changelog = source`
# Changelog
## 1.1.0
- **New** \`UserService.batch()\` for bulk operations
`;
test.each(["CHANGELOG", "CHANGELOG.md", "CHANGELOG.txt", "changelog.md", "CHANGELOG.rst"])("fires when the agent writes %s", (name) => {
expect(detect(write(name, changelog))).toEqual([{}]);
});
test("points at the file on an edit", () => {
expect(detect(edit("packages/api/CHANGELOG.md", changelog, { written: "## 1.1.0\n\n- **New** `UserService.batch()` for bulk operations" }))).toEqual([{}]);
});
test("stays quiet on a file that merely contains the word", () => {
expect(detect(write("MY_CHANGELOG.md", changelog))).toEqual([]);
});
test("stays quiet when the agent only reads the changelog", () => {
expect(detect(read("CHANGELOG.md", changelog))).toEqual([]);
});
test("stays quiet when the user only mentions a changelog", () => {
expect(detect(prompt("Please update CHANGELOG.md"))).toEqual([]);
});