@releasekit/notes 0.11.0 → 0.12.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/{aggregator-IUQUAVJC.js → aggregator-X5ZBSP3Z.js} +2 -2
- package/dist/{chunk-KLSAU45H.js → chunk-6KQ57EBZ.js} +22 -20
- package/dist/{chunk-F7MUVHZ2.js → chunk-HKHK3ITZ.js} +1 -1
- package/dist/{chunk-7TJSPQPW.js → chunk-XVW2MFE6.js} +1 -0
- package/dist/cli.js +2 -2
- package/dist/index.js +3 -3
- package/package.json +9 -8
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
success,
|
|
11
11
|
warn,
|
|
12
12
|
writeMarkdown
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-XVW2MFE6.js";
|
|
14
14
|
|
|
15
15
|
// ../config/dist/index.js
|
|
16
16
|
import * as fs from "fs";
|
|
@@ -23,6 +23,8 @@ import { z } from "zod";
|
|
|
23
23
|
import * as fs2 from "fs";
|
|
24
24
|
import * as os from "os";
|
|
25
25
|
import * as path2 from "path";
|
|
26
|
+
import path4 from "path";
|
|
27
|
+
import { minimatch } from "minimatch";
|
|
26
28
|
var ConfigError = class extends ReleaseKitError {
|
|
27
29
|
code = "CONFIG_ERROR";
|
|
28
30
|
suggestions;
|
|
@@ -583,7 +585,7 @@ function getDefaultConfig() {
|
|
|
583
585
|
|
|
584
586
|
// src/core/pipeline.ts
|
|
585
587
|
import * as fs9 from "fs";
|
|
586
|
-
import * as
|
|
588
|
+
import * as path8 from "path";
|
|
587
589
|
|
|
588
590
|
// src/llm/defaults.ts
|
|
589
591
|
var LLM_DEFAULTS = {
|
|
@@ -1245,7 +1247,7 @@ function renderEjsFile(filePath, context) {
|
|
|
1245
1247
|
|
|
1246
1248
|
// src/templates/handlebars.ts
|
|
1247
1249
|
import * as fs6 from "fs";
|
|
1248
|
-
import * as
|
|
1250
|
+
import * as path5 from "path";
|
|
1249
1251
|
import Handlebars from "handlebars";
|
|
1250
1252
|
function registerHandlebarsHelpers() {
|
|
1251
1253
|
Handlebars.registerHelper("capitalize", (str) => {
|
|
@@ -1279,9 +1281,9 @@ function renderHandlebarsFile(filePath, context) {
|
|
|
1279
1281
|
}
|
|
1280
1282
|
function renderHandlebarsComposable(templateDir, context) {
|
|
1281
1283
|
registerHandlebarsHelpers();
|
|
1282
|
-
const versionPath =
|
|
1283
|
-
const entryPath =
|
|
1284
|
-
const documentPath =
|
|
1284
|
+
const versionPath = path5.join(templateDir, "version.hbs");
|
|
1285
|
+
const entryPath = path5.join(templateDir, "entry.hbs");
|
|
1286
|
+
const documentPath = path5.join(templateDir, "document.hbs");
|
|
1285
1287
|
if (!fs6.existsSync(documentPath)) {
|
|
1286
1288
|
throw new TemplateError(`Document template not found: ${documentPath}`);
|
|
1287
1289
|
}
|
|
@@ -1301,7 +1303,7 @@ function renderHandlebarsComposable(templateDir, context) {
|
|
|
1301
1303
|
|
|
1302
1304
|
// src/templates/liquid.ts
|
|
1303
1305
|
import * as fs7 from "fs";
|
|
1304
|
-
import * as
|
|
1306
|
+
import * as path6 from "path";
|
|
1305
1307
|
import { Liquid } from "liquidjs";
|
|
1306
1308
|
function createLiquidEngine(root) {
|
|
1307
1309
|
return new Liquid({
|
|
@@ -1326,7 +1328,7 @@ function renderLiquidFile(filePath, context) {
|
|
|
1326
1328
|
return renderLiquid(template, context);
|
|
1327
1329
|
}
|
|
1328
1330
|
function renderLiquidComposable(templateDir, context) {
|
|
1329
|
-
const documentPath =
|
|
1331
|
+
const documentPath = path6.join(templateDir, "document.liquid");
|
|
1330
1332
|
if (!fs7.existsSync(documentPath)) {
|
|
1331
1333
|
throw new TemplateError(`Document template not found: ${documentPath}`);
|
|
1332
1334
|
}
|
|
@@ -1340,9 +1342,9 @@ function renderLiquidComposable(templateDir, context) {
|
|
|
1340
1342
|
|
|
1341
1343
|
// src/templates/loader.ts
|
|
1342
1344
|
import * as fs8 from "fs";
|
|
1343
|
-
import * as
|
|
1345
|
+
import * as path7 from "path";
|
|
1344
1346
|
function getEngineFromFile(filePath) {
|
|
1345
|
-
const ext =
|
|
1347
|
+
const ext = path7.extname(filePath).toLowerCase();
|
|
1346
1348
|
switch (ext) {
|
|
1347
1349
|
case ".liquid":
|
|
1348
1350
|
return "liquid";
|
|
@@ -1420,12 +1422,12 @@ function renderComposable(templateDir, context, engine) {
|
|
|
1420
1422
|
return { content: renderHandlebarsComposable(templateDir, context), engine: resolvedEngine };
|
|
1421
1423
|
}
|
|
1422
1424
|
const expectedFiles = engineMap[resolvedEngine];
|
|
1423
|
-
const documentPath =
|
|
1425
|
+
const documentPath = path7.join(templateDir, expectedFiles.document);
|
|
1424
1426
|
if (!fs8.existsSync(documentPath)) {
|
|
1425
1427
|
throw new TemplateError(`Document template not found: ${expectedFiles.document}`);
|
|
1426
1428
|
}
|
|
1427
|
-
const versionPath =
|
|
1428
|
-
const entryPath =
|
|
1429
|
+
const versionPath = path7.join(templateDir, expectedFiles.version);
|
|
1430
|
+
const entryPath = path7.join(templateDir, expectedFiles.entry);
|
|
1429
1431
|
const render = getRenderFn(resolvedEngine);
|
|
1430
1432
|
const entryTemplate = fs8.existsSync(entryPath) ? fs8.readFileSync(entryPath, "utf-8") : null;
|
|
1431
1433
|
const versionTemplate = fs8.existsSync(versionPath) ? fs8.readFileSync(versionPath, "utf-8") : null;
|
|
@@ -1646,17 +1648,17 @@ function getBuiltinTemplatePath(style) {
|
|
|
1646
1648
|
let packageRoot;
|
|
1647
1649
|
try {
|
|
1648
1650
|
const currentUrl = import.meta.url;
|
|
1649
|
-
packageRoot =
|
|
1650
|
-
packageRoot =
|
|
1651
|
+
packageRoot = path8.dirname(new URL(currentUrl).pathname);
|
|
1652
|
+
packageRoot = path8.join(packageRoot, "..", "..");
|
|
1651
1653
|
} catch {
|
|
1652
1654
|
packageRoot = __dirname;
|
|
1653
1655
|
}
|
|
1654
|
-
return
|
|
1656
|
+
return path8.join(packageRoot, "templates", style);
|
|
1655
1657
|
}
|
|
1656
1658
|
async function generateWithTemplate(contexts, templatesConfig, outputPath, repoUrl, dryRun) {
|
|
1657
1659
|
let templatePath;
|
|
1658
1660
|
if (templatesConfig?.path) {
|
|
1659
|
-
templatePath =
|
|
1661
|
+
templatePath = path8.resolve(templatesConfig.path);
|
|
1660
1662
|
} else {
|
|
1661
1663
|
templatePath = getBuiltinTemplatePath("keep-a-changelog");
|
|
1662
1664
|
}
|
|
@@ -1671,7 +1673,7 @@ async function generateWithTemplate(contexts, templatesConfig, outputPath, repoU
|
|
|
1671
1673
|
process.stdout.write(result.content);
|
|
1672
1674
|
return;
|
|
1673
1675
|
}
|
|
1674
|
-
const dir =
|
|
1676
|
+
const dir = path8.dirname(outputPath);
|
|
1675
1677
|
if (!fs9.existsSync(dir)) {
|
|
1676
1678
|
fs9.mkdirSync(dir, { recursive: true });
|
|
1677
1679
|
}
|
|
@@ -1761,7 +1763,7 @@ async function runPipeline(input, config, dryRun) {
|
|
|
1761
1763
|
} else if (releaseNotesConfig) {
|
|
1762
1764
|
if (releaseNotesConfig.templates?.path) {
|
|
1763
1765
|
try {
|
|
1764
|
-
const templatePath =
|
|
1766
|
+
const templatePath = path8.resolve(releaseNotesConfig.templates.path);
|
|
1765
1767
|
const docCtx = { ...createDocumentContext([ctx], void 0), perPackage: true };
|
|
1766
1768
|
const rendered = renderTemplate(
|
|
1767
1769
|
templatePath,
|
|
@@ -1794,7 +1796,7 @@ async function processInput(inputJson, config, dryRun) {
|
|
|
1794
1796
|
return runPipeline(input, config, dryRun);
|
|
1795
1797
|
}
|
|
1796
1798
|
async function writeMonorepoFiles(contexts, config, dryRun, fileName) {
|
|
1797
|
-
const { detectMonorepo, writeMonorepoChangelogs } = await import("./aggregator-
|
|
1799
|
+
const { detectMonorepo, writeMonorepoChangelogs } = await import("./aggregator-X5ZBSP3Z.js");
|
|
1798
1800
|
const cwd = process.cwd();
|
|
1799
1801
|
const detected = detectMonorepo(cwd);
|
|
1800
1802
|
if (!detected.isMonorepo) return [];
|
|
@@ -3,6 +3,7 @@ import * as fs from "fs";
|
|
|
3
3
|
import * as path from "path";
|
|
4
4
|
import { fileURLToPath } from "url";
|
|
5
5
|
import chalk from "chalk";
|
|
6
|
+
import { minimatch } from "minimatch";
|
|
6
7
|
function readPackageVersion(importMetaUrl) {
|
|
7
8
|
try {
|
|
8
9
|
const dir = path.dirname(fileURLToPath(importMetaUrl));
|
package/dist/cli.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
createNotesCommand
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6KQ57EBZ.js";
|
|
5
5
|
import {
|
|
6
6
|
readPackageVersion
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XVW2MFE6.js";
|
|
8
8
|
|
|
9
9
|
// src/cli.ts
|
|
10
10
|
import * as fs from "fs";
|
package/dist/index.js
CHANGED
|
@@ -18,12 +18,12 @@ import {
|
|
|
18
18
|
runPipeline,
|
|
19
19
|
saveAuth,
|
|
20
20
|
versionOutputToChangelogInput
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-6KQ57EBZ.js";
|
|
22
22
|
import {
|
|
23
23
|
aggregateToRoot,
|
|
24
24
|
detectMonorepo,
|
|
25
25
|
writeMonorepoChangelogs
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-HKHK3ITZ.js";
|
|
27
27
|
import {
|
|
28
28
|
debug,
|
|
29
29
|
formatVersion,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
renderMarkdown,
|
|
32
32
|
success,
|
|
33
33
|
writeMarkdown
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-XVW2MFE6.js";
|
|
35
35
|
|
|
36
36
|
// src/output/json.ts
|
|
37
37
|
import * as fs from "fs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@releasekit/notes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.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,13 +47,14 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@anthropic-ai/sdk": "^0.
|
|
50
|
+
"@anthropic-ai/sdk": "^0.86.0",
|
|
51
51
|
"@octokit/rest": "^22.0.1",
|
|
52
52
|
"chalk": "^5.6.2",
|
|
53
53
|
"commander": "^14.0.3",
|
|
54
54
|
"ejs": "^4.0.1",
|
|
55
55
|
"handlebars": "^4.7.9",
|
|
56
|
-
"liquidjs": "^10.25.
|
|
56
|
+
"liquidjs": "^10.25.5",
|
|
57
|
+
"minimatch": "^10.0.0",
|
|
57
58
|
"openai": "^6.33.0",
|
|
58
59
|
"smol-toml": "^1.6.1",
|
|
59
60
|
"zod": "^4.3.6"
|
|
@@ -61,13 +62,13 @@
|
|
|
61
62
|
"devDependencies": {
|
|
62
63
|
"@biomejs/biome": "^2.4.10",
|
|
63
64
|
"@types/ejs": "^3.1.5",
|
|
64
|
-
"@types/node": "^22.19.
|
|
65
|
-
"@vitest/coverage-v8": "^4.1.
|
|
65
|
+
"@types/node": "^22.19.17",
|
|
66
|
+
"@vitest/coverage-v8": "^4.1.3",
|
|
66
67
|
"tsup": "^8.5.1",
|
|
67
68
|
"typescript": "^5.9.3",
|
|
68
|
-
"vitest": "^4.1.
|
|
69
|
-
"@releasekit/
|
|
70
|
-
"@releasekit/
|
|
69
|
+
"vitest": "^4.1.3",
|
|
70
|
+
"@releasekit/config": "0.0.0",
|
|
71
|
+
"@releasekit/core": "0.0.0"
|
|
71
72
|
},
|
|
72
73
|
"engines": {
|
|
73
74
|
"node": ">=20"
|