@releasekit/notes 0.2.0-next.9 → 0.3.0-next.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/index.d.cts CHANGED
@@ -70,6 +70,32 @@ interface LLMOptions {
70
70
  maxTokens?: number;
71
71
  temperature?: number;
72
72
  }
73
+ interface ScopeRules {
74
+ allowed?: string[];
75
+ caseSensitive?: boolean;
76
+ invalidScopeAction?: 'remove' | 'keep' | 'fallback';
77
+ fallbackScope?: string;
78
+ }
79
+ interface ScopeConfig {
80
+ mode?: 'restricted' | 'packages' | 'none' | 'unrestricted';
81
+ rules?: ScopeRules;
82
+ }
83
+ interface LLMPromptOverrides {
84
+ enhance?: string;
85
+ categorize?: string;
86
+ enhanceAndCategorize?: string;
87
+ summarize?: string;
88
+ releaseNotes?: string;
89
+ }
90
+ interface LLMPromptsConfig {
91
+ instructions?: LLMPromptOverrides;
92
+ templates?: LLMPromptOverrides;
93
+ }
94
+ interface LLMCategory {
95
+ name: string;
96
+ description: string;
97
+ scopes?: string[];
98
+ }
73
99
  interface LLMConfig {
74
100
  provider: string;
75
101
  model: string;
@@ -84,17 +110,17 @@ interface LLMConfig {
84
110
  categorize?: boolean;
85
111
  releaseNotes?: boolean;
86
112
  };
87
- categories?: Array<{
88
- name: string;
89
- description: string;
90
- }>;
113
+ categories?: LLMCategory[];
91
114
  style?: string;
115
+ scopes?: ScopeConfig;
116
+ prompts?: LLMPromptsConfig;
92
117
  }
93
118
  type OutputFormat = 'markdown' | 'github-release' | 'json';
94
119
  interface OutputConfig {
95
120
  format: OutputFormat;
96
121
  file?: string;
97
122
  options?: Record<string, unknown>;
123
+ templates?: TemplateConfig;
98
124
  }
99
125
  type MonorepoMode = 'root' | 'packages' | 'both';
100
126
  interface MonorepoConfig {
@@ -126,8 +152,14 @@ interface CompleteOptions {
126
152
  }
127
153
 
128
154
  declare function createTemplateContext(pkg: PackageChangelog): TemplateContext;
129
- declare function runPipeline(input: ChangelogInput, config: Config, dryRun: boolean): Promise<void>;
130
- declare function processInput(inputJson: string, config: Config, dryRun: boolean): Promise<void>;
155
+ interface PipelineResult {
156
+ /** Per-package rendered markdown keyed by package name. */
157
+ packageNotes: Record<string, string>;
158
+ /** File paths that were written to disk. */
159
+ files: string[];
160
+ }
161
+ declare function runPipeline(input: ChangelogInput, config: Config, dryRun: boolean): Promise<PipelineResult>;
162
+ declare function processInput(inputJson: string, config: Config, dryRun: boolean): Promise<PipelineResult>;
131
163
 
132
164
  declare abstract class NotesError extends ReleaseKitError {
133
165
  }
@@ -167,7 +199,7 @@ declare function aggregateToRoot(contexts: TemplateContext[]): TemplateContext;
167
199
 
168
200
  declare function writeMonorepoChangelogs(contexts: TemplateContext[], options: MonorepoOptions, config: {
169
201
  updateStrategy?: 'prepend' | 'regenerate';
170
- }, dryRun: boolean): void;
202
+ }, dryRun: boolean): string[];
171
203
  declare function detectMonorepo(cwd: string): {
172
204
  isMonorepo: boolean;
173
205
  packagesPath: string;
@@ -176,7 +208,8 @@ declare function detectMonorepo(cwd: string): {
176
208
  declare function renderJson(contexts: TemplateContext[]): string;
177
209
  declare function writeJson(outputPath: string, contexts: TemplateContext[], dryRun: boolean): void;
178
210
 
211
+ declare function formatVersion(context: TemplateContext): string;
179
212
  declare function renderMarkdown(contexts: TemplateContext[]): string;
180
213
  declare function writeMarkdown(outputPath: string, contexts: TemplateContext[], config: Config, dryRun: boolean): void;
181
214
 
182
- export { NotesError as ChangelogCreatorError, type ChangelogEntry, type ChangelogInput, type ChangelogType, type CompleteOptions, type Config, ConfigError, type DocumentContext, type EnhancedData, GitHubError, InputParseError, type InputSource, type LLMConfig, LLMError, type LLMOptions, type MonorepoConfig, type MonorepoMode, NotesError, type OutputConfig, type OutputFormat, type PackageChangelog, type RetryOptions, type TemplateConfig, type TemplateContext, type TemplateEngine, TemplateError, type UpdateStrategy, aggregateToRoot, createTemplateContext, detectMonorepo, getDefaultConfig, getExitCode, loadConfig, parsePackageVersioner, parsePackageVersionerFile, parsePackageVersionerStdin, processInput, renderJson, renderMarkdown, runPipeline, writeJson, writeMarkdown, writeMonorepoChangelogs };
215
+ export { NotesError as ChangelogCreatorError, type ChangelogEntry, type ChangelogInput, type ChangelogType, type CompleteOptions, type Config, ConfigError, type DocumentContext, type EnhancedData, GitHubError, InputParseError, type InputSource, type LLMCategory, type LLMConfig, LLMError, type LLMOptions, type LLMPromptOverrides, type LLMPromptsConfig, type MonorepoConfig, type MonorepoMode, NotesError, type OutputConfig, type OutputFormat, type PackageChangelog, type PipelineResult, type RetryOptions, type ScopeConfig, type ScopeRules, type TemplateConfig, type TemplateContext, type TemplateEngine, TemplateError, type UpdateStrategy, aggregateToRoot, createTemplateContext, detectMonorepo, formatVersion, getDefaultConfig, getExitCode, loadConfig, parsePackageVersioner, parsePackageVersionerFile, parsePackageVersionerStdin, processInput, renderJson, renderMarkdown, runPipeline, writeJson, writeMarkdown, writeMonorepoChangelogs };
package/dist/index.d.ts CHANGED
@@ -70,6 +70,32 @@ interface LLMOptions {
70
70
  maxTokens?: number;
71
71
  temperature?: number;
72
72
  }
73
+ interface ScopeRules {
74
+ allowed?: string[];
75
+ caseSensitive?: boolean;
76
+ invalidScopeAction?: 'remove' | 'keep' | 'fallback';
77
+ fallbackScope?: string;
78
+ }
79
+ interface ScopeConfig {
80
+ mode?: 'restricted' | 'packages' | 'none' | 'unrestricted';
81
+ rules?: ScopeRules;
82
+ }
83
+ interface LLMPromptOverrides {
84
+ enhance?: string;
85
+ categorize?: string;
86
+ enhanceAndCategorize?: string;
87
+ summarize?: string;
88
+ releaseNotes?: string;
89
+ }
90
+ interface LLMPromptsConfig {
91
+ instructions?: LLMPromptOverrides;
92
+ templates?: LLMPromptOverrides;
93
+ }
94
+ interface LLMCategory {
95
+ name: string;
96
+ description: string;
97
+ scopes?: string[];
98
+ }
73
99
  interface LLMConfig {
74
100
  provider: string;
75
101
  model: string;
@@ -84,17 +110,17 @@ interface LLMConfig {
84
110
  categorize?: boolean;
85
111
  releaseNotes?: boolean;
86
112
  };
87
- categories?: Array<{
88
- name: string;
89
- description: string;
90
- }>;
113
+ categories?: LLMCategory[];
91
114
  style?: string;
115
+ scopes?: ScopeConfig;
116
+ prompts?: LLMPromptsConfig;
92
117
  }
93
118
  type OutputFormat = 'markdown' | 'github-release' | 'json';
94
119
  interface OutputConfig {
95
120
  format: OutputFormat;
96
121
  file?: string;
97
122
  options?: Record<string, unknown>;
123
+ templates?: TemplateConfig;
98
124
  }
99
125
  type MonorepoMode = 'root' | 'packages' | 'both';
100
126
  interface MonorepoConfig {
@@ -126,8 +152,14 @@ interface CompleteOptions {
126
152
  }
127
153
 
128
154
  declare function createTemplateContext(pkg: PackageChangelog): TemplateContext;
129
- declare function runPipeline(input: ChangelogInput, config: Config, dryRun: boolean): Promise<void>;
130
- declare function processInput(inputJson: string, config: Config, dryRun: boolean): Promise<void>;
155
+ interface PipelineResult {
156
+ /** Per-package rendered markdown keyed by package name. */
157
+ packageNotes: Record<string, string>;
158
+ /** File paths that were written to disk. */
159
+ files: string[];
160
+ }
161
+ declare function runPipeline(input: ChangelogInput, config: Config, dryRun: boolean): Promise<PipelineResult>;
162
+ declare function processInput(inputJson: string, config: Config, dryRun: boolean): Promise<PipelineResult>;
131
163
 
132
164
  declare abstract class NotesError extends ReleaseKitError {
133
165
  }
@@ -167,7 +199,7 @@ declare function aggregateToRoot(contexts: TemplateContext[]): TemplateContext;
167
199
 
168
200
  declare function writeMonorepoChangelogs(contexts: TemplateContext[], options: MonorepoOptions, config: {
169
201
  updateStrategy?: 'prepend' | 'regenerate';
170
- }, dryRun: boolean): void;
202
+ }, dryRun: boolean): string[];
171
203
  declare function detectMonorepo(cwd: string): {
172
204
  isMonorepo: boolean;
173
205
  packagesPath: string;
@@ -176,7 +208,8 @@ declare function detectMonorepo(cwd: string): {
176
208
  declare function renderJson(contexts: TemplateContext[]): string;
177
209
  declare function writeJson(outputPath: string, contexts: TemplateContext[], dryRun: boolean): void;
178
210
 
211
+ declare function formatVersion(context: TemplateContext): string;
179
212
  declare function renderMarkdown(contexts: TemplateContext[]): string;
180
213
  declare function writeMarkdown(outputPath: string, contexts: TemplateContext[], config: Config, dryRun: boolean): void;
181
214
 
182
- export { NotesError as ChangelogCreatorError, type ChangelogEntry, type ChangelogInput, type ChangelogType, type CompleteOptions, type Config, ConfigError, type DocumentContext, type EnhancedData, GitHubError, InputParseError, type InputSource, type LLMConfig, LLMError, type LLMOptions, type MonorepoConfig, type MonorepoMode, NotesError, type OutputConfig, type OutputFormat, type PackageChangelog, type RetryOptions, type TemplateConfig, type TemplateContext, type TemplateEngine, TemplateError, type UpdateStrategy, aggregateToRoot, createTemplateContext, detectMonorepo, getDefaultConfig, getExitCode, loadConfig, parsePackageVersioner, parsePackageVersionerFile, parsePackageVersionerStdin, processInput, renderJson, renderMarkdown, runPipeline, writeJson, writeMarkdown, writeMonorepoChangelogs };
215
+ export { NotesError as ChangelogCreatorError, type ChangelogEntry, type ChangelogInput, type ChangelogType, type CompleteOptions, type Config, ConfigError, type DocumentContext, type EnhancedData, GitHubError, InputParseError, type InputSource, type LLMCategory, type LLMConfig, LLMError, type LLMOptions, type LLMPromptOverrides, type LLMPromptsConfig, type MonorepoConfig, type MonorepoMode, NotesError, type OutputConfig, type OutputFormat, type PackageChangelog, type PipelineResult, type RetryOptions, type ScopeConfig, type ScopeRules, type TemplateConfig, type TemplateContext, type TemplateEngine, TemplateError, type UpdateStrategy, aggregateToRoot, createTemplateContext, detectMonorepo, formatVersion, getDefaultConfig, getExitCode, loadConfig, parsePackageVersioner, parsePackageVersionerFile, parsePackageVersionerStdin, processInput, renderJson, renderMarkdown, runPipeline, writeJson, writeMarkdown, writeMonorepoChangelogs };
package/dist/index.js CHANGED
@@ -6,9 +6,7 @@ import {
6
6
  LLMError,
7
7
  NotesError,
8
8
  TemplateError,
9
- aggregateToRoot,
10
9
  createTemplateContext,
11
- detectMonorepo,
12
10
  getDefaultConfig,
13
11
  getExitCode,
14
12
  loadAuth,
@@ -18,13 +16,20 @@ import {
18
16
  parsePackageVersionerStdin,
19
17
  processInput,
20
18
  renderJson,
21
- renderMarkdown,
22
19
  runPipeline,
23
20
  saveAuth,
24
- writeJson,
25
- writeMarkdown,
21
+ writeJson
22
+ } from "./chunk-X4LY5WGG.js";
23
+ import {
24
+ aggregateToRoot,
25
+ detectMonorepo,
26
26
  writeMonorepoChangelogs
27
- } from "./chunk-BLWJTLRD.js";
27
+ } from "./chunk-O4VCGEZT.js";
28
+ import {
29
+ formatVersion,
30
+ renderMarkdown,
31
+ writeMarkdown
32
+ } from "./chunk-H7G2HRHI.js";
28
33
  export {
29
34
  NotesError as ChangelogCreatorError,
30
35
  ConfigError,
@@ -37,6 +42,7 @@ export {
37
42
  aggregateToRoot,
38
43
  createTemplateContext,
39
44
  detectMonorepo,
45
+ formatVersion,
40
46
  getDefaultConfig,
41
47
  getExitCode,
42
48
  loadAuth,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@releasekit/notes",
3
- "version": "0.2.0-next.9",
4
- "description": "Changelog generation with LLM-powered enhancement and flexible templating",
3
+ "version": "0.3.0-next.0",
4
+ "description": "Release notes and changelog generation with LLM-powered enhancement and flexible templating",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
@@ -21,17 +21,13 @@
21
21
  "bin": {
22
22
  "releasekit-notes": "dist/cli.js"
23
23
  },
24
- "scripts": {
25
- "build": "tsup src/index.ts src/cli.ts --format esm,cjs --dts",
26
- "dev": "tsup src/index.ts src/cli.ts --format esm,cjs --watch --dts",
27
- "clean": "rm -rf dist coverage .turbo",
28
- "test": "vitest run",
29
- "test:unit": "vitest run --coverage",
30
- "test:coverage": "vitest run --coverage",
31
- "lint": "biome check .",
32
- "typecheck": "tsc --noEmit"
33
- },
34
- "keywords": ["changelog", "release-notes", "llm", "template", "cli"],
24
+ "keywords": [
25
+ "changelog",
26
+ "release-notes",
27
+ "llm",
28
+ "template",
29
+ "cli"
30
+ ],
35
31
  "author": "Sam Maister <goosewobbler@protonmail.com>",
36
32
  "license": "MIT",
37
33
  "repository": {
@@ -39,33 +35,48 @@
39
35
  "url": "git+https://github.com/goosewobbler/releasekit.git",
40
36
  "directory": "packages/notes"
41
37
  },
42
- "files": ["dist", "templates", "README.md", "LICENSE"],
38
+ "files": [
39
+ "dist",
40
+ "templates",
41
+ "README.md",
42
+ "LICENSE"
43
+ ],
43
44
  "publishConfig": {
44
45
  "access": "public"
45
46
  },
46
47
  "dependencies": {
47
- "@anthropic-ai/sdk": "^0.39.0",
48
- "@octokit/rest": "^21.1.1",
49
- "@releasekit/config": "workspace:*",
50
- "@releasekit/core": "workspace:*",
51
- "chalk": "catalog:",
52
- "commander": "catalog:",
53
- "ejs": "^3.1.10",
48
+ "@anthropic-ai/sdk": "^0.78.0",
49
+ "@octokit/rest": "^22.0.1",
50
+ "chalk": "^5.6.2",
51
+ "commander": "^14.0.3",
52
+ "ejs": "^4.0.1",
54
53
  "handlebars": "^4.7.8",
55
- "liquidjs": "^10.21.0",
56
- "openai": "^4.87.0",
57
- "zod": "catalog:"
54
+ "liquidjs": "^10.25.0",
55
+ "openai": "^6.27.0",
56
+ "zod": "^4.3.6",
57
+ "@releasekit/config": "0.1.0",
58
+ "@releasekit/core": "0.1.0"
58
59
  },
59
60
  "devDependencies": {
60
- "@biomejs/biome": "catalog:",
61
+ "@biomejs/biome": "^2.4.6",
61
62
  "@types/ejs": "^3.1.5",
62
- "@types/node": "catalog:",
63
- "@vitest/coverage-v8": "catalog:",
64
- "tsup": "catalog:",
65
- "typescript": "catalog:",
66
- "vitest": "catalog:"
63
+ "@types/node": "^22.19.15",
64
+ "@vitest/coverage-v8": "^4.1.0",
65
+ "tsup": "^8.5.1",
66
+ "typescript": "^5.9.3",
67
+ "vitest": "^4.1.0"
67
68
  },
68
69
  "engines": {
69
70
  "node": ">=20"
71
+ },
72
+ "scripts": {
73
+ "build": "tsup src/index.ts src/cli.ts --format esm,cjs --dts",
74
+ "dev": "tsup src/index.ts src/cli.ts --format esm,cjs --watch --dts",
75
+ "clean": "rm -rf dist coverage .turbo",
76
+ "test": "vitest run",
77
+ "test:unit": "vitest run --coverage",
78
+ "test:coverage": "vitest run --coverage",
79
+ "lint": "biome check .",
80
+ "typecheck": "tsc --noEmit"
70
81
  }
71
- }
82
+ }