@releasekit/notes 0.3.0-next.4 → 0.3.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 DELETED
@@ -1,219 +0,0 @@
1
- import { NotesConfig } from '@releasekit/config';
2
- export { loadAuth, saveAuth } from '@releasekit/config';
3
- import { ReleaseKitError } from '@releasekit/core';
4
- export { EXIT_CODES } from '@releasekit/core';
5
-
6
- declare function loadConfig(projectDir?: string, configFile?: string): NotesConfig;
7
- declare function getDefaultConfig(): NotesConfig;
8
-
9
- interface RetryOptions {
10
- maxAttempts?: number;
11
- initialDelay?: number;
12
- maxDelay?: number;
13
- backoffFactor?: number;
14
- }
15
-
16
- type ChangelogType = 'added' | 'changed' | 'deprecated' | 'removed' | 'fixed' | 'security';
17
- interface ChangelogEntry {
18
- type: ChangelogType;
19
- description: string;
20
- issueIds?: string[];
21
- scope?: string;
22
- originalType?: string;
23
- breaking?: boolean;
24
- }
25
- interface PackageChangelog {
26
- packageName: string;
27
- version: string;
28
- previousVersion: string | null;
29
- revisionRange: string;
30
- repoUrl: string | null;
31
- date: string;
32
- entries: ChangelogEntry[];
33
- }
34
- type InputSource = 'package-versioner' | 'conventional-changelog' | 'git-log' | 'manual';
35
- interface ChangelogInput {
36
- source: InputSource;
37
- packages: PackageChangelog[];
38
- metadata?: {
39
- repoUrl?: string;
40
- defaultBranch?: string;
41
- };
42
- }
43
- interface EnhancedData {
44
- entries: ChangelogEntry[];
45
- summary?: string;
46
- categories?: Record<string, ChangelogEntry[]>;
47
- releaseNotes?: string;
48
- }
49
- interface TemplateContext {
50
- packageName: string;
51
- version: string;
52
- previousVersion: string | null;
53
- date: string;
54
- repoUrl: string | null;
55
- entries: ChangelogEntry[];
56
- compareUrl?: string;
57
- enhanced?: EnhancedData;
58
- }
59
- interface DocumentContext {
60
- project: {
61
- name: string;
62
- repoUrl?: string;
63
- };
64
- versions: TemplateContext[];
65
- unreleased?: TemplateContext;
66
- compareUrls?: Record<string, string>;
67
- }
68
- interface LLMOptions {
69
- timeout?: number;
70
- maxTokens?: number;
71
- temperature?: number;
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
- }
99
- interface LLMConfig {
100
- provider: string;
101
- model: string;
102
- baseURL?: string;
103
- apiKey?: string;
104
- options?: LLMOptions;
105
- concurrency?: number;
106
- retry?: RetryOptions;
107
- tasks?: {
108
- summarize?: boolean;
109
- enhance?: boolean;
110
- categorize?: boolean;
111
- releaseNotes?: boolean;
112
- };
113
- categories?: LLMCategory[];
114
- style?: string;
115
- scopes?: ScopeConfig;
116
- prompts?: LLMPromptsConfig;
117
- }
118
- type OutputFormat = 'markdown' | 'github-release' | 'json';
119
- interface OutputConfig {
120
- format: OutputFormat;
121
- file?: string;
122
- options?: Record<string, unknown>;
123
- templates?: TemplateConfig;
124
- }
125
- type MonorepoMode = 'root' | 'packages' | 'both';
126
- interface MonorepoConfig {
127
- mode?: MonorepoMode;
128
- rootPath?: string;
129
- packagesPath?: string;
130
- }
131
- type UpdateStrategy = 'prepend' | 'regenerate';
132
- type TemplateEngine = 'handlebars' | 'liquid' | 'ejs';
133
- interface TemplateConfig {
134
- path?: string;
135
- engine?: TemplateEngine;
136
- }
137
- interface Config {
138
- input?: {
139
- source?: string;
140
- file?: string;
141
- };
142
- output: OutputConfig[];
143
- monorepo?: MonorepoConfig;
144
- templates?: TemplateConfig;
145
- llm?: LLMConfig;
146
- updateStrategy?: UpdateStrategy;
147
- }
148
- interface CompleteOptions {
149
- maxTokens?: number;
150
- temperature?: number;
151
- timeout?: number;
152
- }
153
-
154
- declare function createTemplateContext(pkg: PackageChangelog): TemplateContext;
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>;
163
-
164
- declare abstract class NotesError extends ReleaseKitError {
165
- }
166
-
167
- declare class InputParseError extends NotesError {
168
- readonly code = "INPUT_PARSE_ERROR";
169
- readonly suggestions: string[];
170
- }
171
- declare class TemplateError extends NotesError {
172
- readonly code = "TEMPLATE_ERROR";
173
- readonly suggestions: string[];
174
- }
175
- declare class LLMError extends NotesError {
176
- readonly code = "LLM_ERROR";
177
- readonly suggestions: string[];
178
- }
179
- declare class GitHubError extends NotesError {
180
- readonly code = "GITHUB_ERROR";
181
- readonly suggestions: string[];
182
- }
183
- declare class ConfigError extends NotesError {
184
- readonly code = "CONFIG_ERROR";
185
- readonly suggestions: string[];
186
- }
187
- declare function getExitCode(error: NotesError): number;
188
-
189
- declare function parsePackageVersioner(json: string): ChangelogInput;
190
- declare function parsePackageVersionerFile(filePath: string): ChangelogInput;
191
- declare function parsePackageVersionerStdin(): Promise<ChangelogInput>;
192
-
193
- interface MonorepoOptions {
194
- rootPath: string;
195
- packagesPath: string;
196
- mode: 'root' | 'packages' | 'both';
197
- }
198
- declare function aggregateToRoot(contexts: TemplateContext[]): TemplateContext;
199
-
200
- declare function writeMonorepoChangelogs(contexts: TemplateContext[], options: MonorepoOptions, config: {
201
- updateStrategy?: 'prepend' | 'regenerate';
202
- }, dryRun: boolean): string[];
203
- declare function detectMonorepo(cwd: string): {
204
- isMonorepo: boolean;
205
- packagesPath: string;
206
- };
207
-
208
- declare function renderJson(contexts: TemplateContext[]): string;
209
- declare function writeJson(outputPath: string, contexts: TemplateContext[], dryRun: boolean): void;
210
-
211
- interface FormatVersionOptions {
212
- /** Include the package name in the version header (e.g. `## [pkg@1.0.0]`). */
213
- includePackageName?: boolean;
214
- }
215
- declare function formatVersion(context: TemplateContext, options?: FormatVersionOptions): string;
216
- declare function renderMarkdown(contexts: TemplateContext[], options?: FormatVersionOptions): string;
217
- declare function writeMarkdown(outputPath: string, contexts: TemplateContext[], config: Config, dryRun: boolean): void;
218
-
219
- 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 DELETED
@@ -1,219 +0,0 @@
1
- import { NotesConfig } from '@releasekit/config';
2
- export { loadAuth, saveAuth } from '@releasekit/config';
3
- import { ReleaseKitError } from '@releasekit/core';
4
- export { EXIT_CODES } from '@releasekit/core';
5
-
6
- declare function loadConfig(projectDir?: string, configFile?: string): NotesConfig;
7
- declare function getDefaultConfig(): NotesConfig;
8
-
9
- interface RetryOptions {
10
- maxAttempts?: number;
11
- initialDelay?: number;
12
- maxDelay?: number;
13
- backoffFactor?: number;
14
- }
15
-
16
- type ChangelogType = 'added' | 'changed' | 'deprecated' | 'removed' | 'fixed' | 'security';
17
- interface ChangelogEntry {
18
- type: ChangelogType;
19
- description: string;
20
- issueIds?: string[];
21
- scope?: string;
22
- originalType?: string;
23
- breaking?: boolean;
24
- }
25
- interface PackageChangelog {
26
- packageName: string;
27
- version: string;
28
- previousVersion: string | null;
29
- revisionRange: string;
30
- repoUrl: string | null;
31
- date: string;
32
- entries: ChangelogEntry[];
33
- }
34
- type InputSource = 'package-versioner' | 'conventional-changelog' | 'git-log' | 'manual';
35
- interface ChangelogInput {
36
- source: InputSource;
37
- packages: PackageChangelog[];
38
- metadata?: {
39
- repoUrl?: string;
40
- defaultBranch?: string;
41
- };
42
- }
43
- interface EnhancedData {
44
- entries: ChangelogEntry[];
45
- summary?: string;
46
- categories?: Record<string, ChangelogEntry[]>;
47
- releaseNotes?: string;
48
- }
49
- interface TemplateContext {
50
- packageName: string;
51
- version: string;
52
- previousVersion: string | null;
53
- date: string;
54
- repoUrl: string | null;
55
- entries: ChangelogEntry[];
56
- compareUrl?: string;
57
- enhanced?: EnhancedData;
58
- }
59
- interface DocumentContext {
60
- project: {
61
- name: string;
62
- repoUrl?: string;
63
- };
64
- versions: TemplateContext[];
65
- unreleased?: TemplateContext;
66
- compareUrls?: Record<string, string>;
67
- }
68
- interface LLMOptions {
69
- timeout?: number;
70
- maxTokens?: number;
71
- temperature?: number;
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
- }
99
- interface LLMConfig {
100
- provider: string;
101
- model: string;
102
- baseURL?: string;
103
- apiKey?: string;
104
- options?: LLMOptions;
105
- concurrency?: number;
106
- retry?: RetryOptions;
107
- tasks?: {
108
- summarize?: boolean;
109
- enhance?: boolean;
110
- categorize?: boolean;
111
- releaseNotes?: boolean;
112
- };
113
- categories?: LLMCategory[];
114
- style?: string;
115
- scopes?: ScopeConfig;
116
- prompts?: LLMPromptsConfig;
117
- }
118
- type OutputFormat = 'markdown' | 'github-release' | 'json';
119
- interface OutputConfig {
120
- format: OutputFormat;
121
- file?: string;
122
- options?: Record<string, unknown>;
123
- templates?: TemplateConfig;
124
- }
125
- type MonorepoMode = 'root' | 'packages' | 'both';
126
- interface MonorepoConfig {
127
- mode?: MonorepoMode;
128
- rootPath?: string;
129
- packagesPath?: string;
130
- }
131
- type UpdateStrategy = 'prepend' | 'regenerate';
132
- type TemplateEngine = 'handlebars' | 'liquid' | 'ejs';
133
- interface TemplateConfig {
134
- path?: string;
135
- engine?: TemplateEngine;
136
- }
137
- interface Config {
138
- input?: {
139
- source?: string;
140
- file?: string;
141
- };
142
- output: OutputConfig[];
143
- monorepo?: MonorepoConfig;
144
- templates?: TemplateConfig;
145
- llm?: LLMConfig;
146
- updateStrategy?: UpdateStrategy;
147
- }
148
- interface CompleteOptions {
149
- maxTokens?: number;
150
- temperature?: number;
151
- timeout?: number;
152
- }
153
-
154
- declare function createTemplateContext(pkg: PackageChangelog): TemplateContext;
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>;
163
-
164
- declare abstract class NotesError extends ReleaseKitError {
165
- }
166
-
167
- declare class InputParseError extends NotesError {
168
- readonly code = "INPUT_PARSE_ERROR";
169
- readonly suggestions: string[];
170
- }
171
- declare class TemplateError extends NotesError {
172
- readonly code = "TEMPLATE_ERROR";
173
- readonly suggestions: string[];
174
- }
175
- declare class LLMError extends NotesError {
176
- readonly code = "LLM_ERROR";
177
- readonly suggestions: string[];
178
- }
179
- declare class GitHubError extends NotesError {
180
- readonly code = "GITHUB_ERROR";
181
- readonly suggestions: string[];
182
- }
183
- declare class ConfigError extends NotesError {
184
- readonly code = "CONFIG_ERROR";
185
- readonly suggestions: string[];
186
- }
187
- declare function getExitCode(error: NotesError): number;
188
-
189
- declare function parsePackageVersioner(json: string): ChangelogInput;
190
- declare function parsePackageVersionerFile(filePath: string): ChangelogInput;
191
- declare function parsePackageVersionerStdin(): Promise<ChangelogInput>;
192
-
193
- interface MonorepoOptions {
194
- rootPath: string;
195
- packagesPath: string;
196
- mode: 'root' | 'packages' | 'both';
197
- }
198
- declare function aggregateToRoot(contexts: TemplateContext[]): TemplateContext;
199
-
200
- declare function writeMonorepoChangelogs(contexts: TemplateContext[], options: MonorepoOptions, config: {
201
- updateStrategy?: 'prepend' | 'regenerate';
202
- }, dryRun: boolean): string[];
203
- declare function detectMonorepo(cwd: string): {
204
- isMonorepo: boolean;
205
- packagesPath: string;
206
- };
207
-
208
- declare function renderJson(contexts: TemplateContext[]): string;
209
- declare function writeJson(outputPath: string, contexts: TemplateContext[], dryRun: boolean): void;
210
-
211
- interface FormatVersionOptions {
212
- /** Include the package name in the version header (e.g. `## [pkg@1.0.0]`). */
213
- includePackageName?: boolean;
214
- }
215
- declare function formatVersion(context: TemplateContext, options?: FormatVersionOptions): string;
216
- declare function renderMarkdown(contexts: TemplateContext[], options?: FormatVersionOptions): string;
217
- declare function writeMarkdown(outputPath: string, contexts: TemplateContext[], config: Config, dryRun: boolean): void;
218
-
219
- 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 DELETED
@@ -1,61 +0,0 @@
1
- import {
2
- ConfigError,
3
- EXIT_CODES,
4
- GitHubError,
5
- InputParseError,
6
- LLMError,
7
- NotesError,
8
- TemplateError,
9
- createTemplateContext,
10
- getDefaultConfig,
11
- getExitCode,
12
- loadAuth,
13
- loadConfig,
14
- parsePackageVersioner,
15
- parsePackageVersionerFile,
16
- parsePackageVersionerStdin,
17
- processInput,
18
- renderJson,
19
- runPipeline,
20
- saveAuth,
21
- writeJson
22
- } from "./chunk-QUBVC5LF.js";
23
- import {
24
- aggregateToRoot,
25
- detectMonorepo,
26
- writeMonorepoChangelogs
27
- } from "./chunk-TSLTZ26C.js";
28
- import {
29
- formatVersion,
30
- renderMarkdown,
31
- writeMarkdown
32
- } from "./chunk-QCF6V2IY.js";
33
- export {
34
- NotesError as ChangelogCreatorError,
35
- ConfigError,
36
- EXIT_CODES,
37
- GitHubError,
38
- InputParseError,
39
- LLMError,
40
- NotesError,
41
- TemplateError,
42
- aggregateToRoot,
43
- createTemplateContext,
44
- detectMonorepo,
45
- formatVersion,
46
- getDefaultConfig,
47
- getExitCode,
48
- loadAuth,
49
- loadConfig,
50
- parsePackageVersioner,
51
- parsePackageVersionerFile,
52
- parsePackageVersionerStdin,
53
- processInput,
54
- renderJson,
55
- renderMarkdown,
56
- runPipeline,
57
- saveAuth,
58
- writeJson,
59
- writeMarkdown,
60
- writeMonorepoChangelogs
61
- };