@releasekit/notes 0.25.0 → 0.27.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/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  createNotesCommand
4
- } from "./chunk-NSKMI5F2.js";
4
+ } from "./chunk-RASPVTWN.js";
5
5
  import {
6
6
  readPackageVersion
7
7
  } from "./chunk-QCJ545PJ.js";
package/dist/index.js CHANGED
@@ -18,7 +18,7 @@ import {
18
18
  runPipeline,
19
19
  saveAuth,
20
20
  versionOutputToChangelogInput
21
- } from "./chunk-NSKMI5F2.js";
21
+ } from "./chunk-RASPVTWN.js";
22
22
  import {
23
23
  aggregateToRoot,
24
24
  detectMonorepo,
@@ -97,26 +97,36 @@ Controls release notes generation. Release notes are a separate output from the
97
97
 
98
98
  Set to `false` to explicitly disable when it has been enabled via config inheritance.
99
99
 
100
- When an object with a `mode` or `file` property, release notes are written to a file. When only `llm` is present (no `mode`/`file`), the LLM runs but no file is written — the generated content is passed to the publish step for use as a GitHub release body.
100
+ Release notes are **not** a changelog. By default they have no file — the generated content is passed to the publish step for the GitHub release body. In-repo file output is opt-in via `file.dir`.
101
101
 
102
- ### `notes.releaseNotes.mode`
102
+ ### `notes.releaseNotes.file`
103
103
 
104
- | Value | Behaviour |
105
- |-------|-----------|
106
- | `"root"` | Write `RELEASE_NOTES.md` at the repo root |
107
- | `"packages"` | Write one release notes file per package |
108
- | `"both"` | Write both root and per-package files |
104
+ Optional in-repo file output. Omit to keep release notes only on the GitHub release body (the default). When set, writes one **immutable file per version** under `dir`:
109
105
 
110
- ### `notes.releaseNotes.file`
106
+ | Layout | Path |
107
+ |--------|------|
108
+ | Monorepo | `release-notes/<package>/<version>.md` |
109
+ | Single-package repo | `release-notes/<version>.md` |
111
110
 
112
- Override the release notes file name.
111
+ Each release writes a new file keyed by version, so prior releases are never overwritten — a browsable, provider-independent per-release history (the primary target for non-GitHub projects).
113
112
 
114
- **Type:** `string`
115
- **Default:** `"RELEASE_NOTES.md"`
113
+ | Option | Type | Default |
114
+ |--------|------|---------|
115
+ | `dir` | `string` | `"release-notes"` |
116
+
117
+ ```json
118
+ {
119
+ "notes": {
120
+ "releaseNotes": {
121
+ "file": { "dir": "release-notes" }
122
+ }
123
+ }
124
+ }
125
+ ```
116
126
 
117
127
  ### `notes.releaseNotes.templates`
118
128
 
119
- Same structure as `notes.changelog.templates`. See the [templates guide](./templates.md).
129
+ Same structure as `notes.changelog.templates`. Renders each release's notes; for versioned files it's also the hook for docs-site frontmatter. Takes precedence over LLM prose and the default formatted section. See the [templates guide](./templates.md).
120
130
 
121
131
  ### `notes.releaseNotes.llm`
122
132
 
@@ -22,7 +22,7 @@ Add an `llm` block under `notes.releaseNotes` in `releasekit.config.json`:
22
22
  }
23
23
  ```
24
24
 
25
- > Without a `mode` or `file` property on `releaseNotes`, no file is written — the generated content is passed directly to the publish step (e.g. as a GitHub release body). Add `"mode": "root"` to also write a `RELEASE_NOTES.md` file.
25
+ > By default no file is written — the generated content is passed directly to the publish step (e.g. as a GitHub release body). Add a `file` property (`"file": { "dir": "release-notes" }`) to also write an immutable per-version file under that directory.
26
26
 
27
27
  ---
28
28
 
package/docs/monorepo.md CHANGED
@@ -1,26 +1,34 @@
1
1
  # Monorepo Support
2
2
 
3
- `@releasekit/notes` can write changelogs and release notes at the repo root, inside each package directory, or both — controlled independently for changelog and release notes output.
3
+ `@releasekit/notes` writes the **changelog** at the repo root, inside each package directory, or both. **Release notes** are a separate artifact: they default to the GitHub release body, with opt-in per-version files that nest by package in a monorepo.
4
4
 
5
- ## Output Modes
5
+ ## Changelog Modes
6
6
 
7
- | Mode | Changelog written to | Release notes written to |
8
- |------|---------------------|--------------------------|
9
- | `"root"` | `<repo-root>/CHANGELOG.md` | `<repo-root>/RELEASE_NOTES.md` |
10
- | `"packages"` | `packages/<name>/CHANGELOG.md` (each package) | `packages/<name>/RELEASE_NOTES.md` |
11
- | `"both"` | Both root and per-package | Both root and per-package |
7
+ | Mode | Changelog written to |
8
+ |------|----------------------|
9
+ | `"root"` | `<repo-root>/CHANGELOG.md` |
10
+ | `"packages"` | `packages/<name>/CHANGELOG.md` (each package) |
11
+ | `"both"` | Both root and per-package |
12
12
 
13
- Set `mode` on `changelog` and `releaseNotes` independently:
13
+ ## Release Notes Files
14
+
15
+ Release notes don't use changelog modes. They go to the GitHub release body by default; set `releaseNotes.file.dir` for opt-in in-repo files, written one **per version** and nested by package:
14
16
 
15
17
  ```json
16
18
  {
17
19
  "notes": {
18
20
  "changelog": { "mode": "packages" },
19
- "releaseNotes": { "mode": "root" }
21
+ "releaseNotes": { "file": { "dir": "release-notes" } }
20
22
  }
21
23
  }
22
24
  ```
23
25
 
26
+ ```
27
+ release-notes/
28
+ @myorg/core/2.0.0.md
29
+ utils/1.1.0.md
30
+ ```
31
+
24
32
  ---
25
33
 
26
34
  ## Root Changelog (aggregated)
@@ -65,7 +73,7 @@ Custom file name applies to all packages:
65
73
 
66
74
  ## CLI Flags
67
75
 
68
- Use `--changelog-mode` / `--release-notes-mode` to override config:
76
+ Use `--changelog-mode` to override the changelog location, and `--release-notes-dir` to write per-version release-notes files:
69
77
 
70
78
  ```bash
71
79
  # Root changelog only
@@ -74,14 +82,17 @@ releasekit-notes --changelog-mode root
74
82
  # Per-package changelogs
75
83
  releasekit-notes --changelog-mode packages
76
84
 
77
- # Both outputs
85
+ # Both
78
86
  releasekit-notes --changelog-mode both
79
87
 
80
- # Use --monorepo as a shorthand (applies to both outputs)
88
+ # Use --monorepo as a shorthand for the changelog mode
81
89
  releasekit-notes --monorepo packages
90
+
91
+ # Per-version release-notes files
92
+ releasekit-notes --release-notes-dir release-notes
82
93
  ```
83
94
 
84
- When `--monorepo` is set, it applies to both `changelog` and `releaseNotes` modes. Explicit `--changelog-mode` or `--release-notes-mode` flags take priority over `--monorepo` when both are present.
95
+ `--monorepo` sets the changelog mode (release notes use a per-version directory, not modes). An explicit `--changelog-mode` takes priority over `--monorepo` when both are present.
85
96
 
86
97
  ---
87
98
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@releasekit/notes",
3
- "version": "0.25.0",
3
+ "version": "0.27.0",
4
4
  "description": "Release notes and changelog generation with LLM-powered enhancement and flexible templating",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",
@@ -47,7 +47,7 @@
47
47
  "access": "public"
48
48
  },
49
49
  "dependencies": {
50
- "@anthropic-ai/sdk": "^0.100.1",
50
+ "@anthropic-ai/sdk": "^0.102.0",
51
51
  "@octokit/request-error": "^7.1.0",
52
52
  "@octokit/rest": "^22.0.1",
53
53
  "chalk": "^5.6.2",
@@ -57,14 +57,15 @@
57
57
  "jsonc-parser": "^3.3.1",
58
58
  "liquidjs": "^10.27.0",
59
59
  "minimatch": "^10.0.0",
60
- "openai": "^6.39.1",
60
+ "openai": "^6.42.0",
61
61
  "smol-toml": "^1.6.1",
62
+ "yaml": "^2.8.3",
62
63
  "zod": "^4.4.3"
63
64
  },
64
65
  "devDependencies": {
65
66
  "@biomejs/biome": "^2.4.16",
66
67
  "@types/ejs": "^3.1.5",
67
- "@types/node": "^22.19.19",
68
+ "@types/node": "^22.19.20",
68
69
  "@vitest/coverage-v8": "^4.1.8",
69
70
  "tsup": "^8.5.1",
70
71
  "typescript": "^5.9.3",
@@ -73,7 +74,7 @@
73
74
  "@releasekit/core": "0.0.0"
74
75
  },
75
76
  "engines": {
76
- "node": ">=20"
77
+ "node": ">=22"
77
78
  },
78
79
  "scripts": {
79
80
  "build": "tsup",