@releasekit/notes 0.24.0 → 0.26.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/{chunk-3UY2G62A.js → chunk-E63A2Q5L.js} +51 -8
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +6 -5
|
@@ -19,6 +19,7 @@ import * as TOML from "smol-toml";
|
|
|
19
19
|
import * as fs3 from "fs";
|
|
20
20
|
import * as path3 from "path";
|
|
21
21
|
import { z as z2 } from "zod";
|
|
22
|
+
import { parse as parse2, printParseErrorCode } from "jsonc-parser";
|
|
22
23
|
import { z } from "zod";
|
|
23
24
|
import * as fs2 from "fs";
|
|
24
25
|
import * as os from "os";
|
|
@@ -36,17 +37,21 @@ var ConfigError = class extends ReleaseKitError {
|
|
|
36
37
|
];
|
|
37
38
|
}
|
|
38
39
|
};
|
|
39
|
-
var MAX_JSONC_LENGTH = 1e5;
|
|
40
40
|
function parseJsonc(content) {
|
|
41
|
-
if (content.length > MAX_JSONC_LENGTH) {
|
|
42
|
-
throw new Error(`JSONC content too long: ${content.length} characters (max ${MAX_JSONC_LENGTH})`);
|
|
43
|
-
}
|
|
44
41
|
try {
|
|
45
42
|
return JSON.parse(content);
|
|
46
43
|
} catch {
|
|
47
|
-
const cleaned = content.replace(/\/\/[^\r\n]{0,10000}$/gm, "").replace(/\/\*[\s\S]{0,50000}?\*\//g, "").trim();
|
|
48
|
-
return JSON.parse(cleaned);
|
|
49
44
|
}
|
|
45
|
+
const errors = [];
|
|
46
|
+
const result = parse2(content, errors, { allowTrailingComma: true });
|
|
47
|
+
if (errors.length > 0) {
|
|
48
|
+
const { error: error2, offset } = errors[0];
|
|
49
|
+
throw new SyntaxError(`Invalid JSONC: ${printParseErrorCode(error2)} at position ${offset}`);
|
|
50
|
+
}
|
|
51
|
+
if (result === void 0) {
|
|
52
|
+
throw new SyntaxError("Invalid JSONC: no value found");
|
|
53
|
+
}
|
|
54
|
+
return result;
|
|
50
55
|
}
|
|
51
56
|
var GitConfigSchema = z.object({
|
|
52
57
|
remote: z.string().default("origin"),
|
|
@@ -74,6 +79,16 @@ var VersionCargoConfigSchema = z.object({
|
|
|
74
79
|
enabled: z.boolean().default(true),
|
|
75
80
|
paths: z.array(z.string()).optional()
|
|
76
81
|
});
|
|
82
|
+
var VersionGroupSchema = z.object({
|
|
83
|
+
/**
|
|
84
|
+
* Package patterns (exact names, `@scope/*`, or globs) whose matched packages form this group.
|
|
85
|
+
* The same matching rules as `version.packages` apply.
|
|
86
|
+
*/
|
|
87
|
+
packages: z.array(z.string()).min(1),
|
|
88
|
+
/** `fixed`: all members release together at the group version. `linked`: only changed members
|
|
89
|
+
* release, all at the same version. See the version.groups reference for the full semantics. */
|
|
90
|
+
sync: z.enum(["fixed", "linked"])
|
|
91
|
+
});
|
|
77
92
|
var VersionConfigSchema = z.object({
|
|
78
93
|
tagTemplate: z.string().default("v{version}"),
|
|
79
94
|
/**
|
|
@@ -95,7 +110,21 @@ var VersionConfigSchema = z.object({
|
|
|
95
110
|
}).optional(),
|
|
96
111
|
packageSpecificTags: z.boolean().default(false),
|
|
97
112
|
preset: z.string().default("conventional"),
|
|
113
|
+
/**
|
|
114
|
+
* Global lockstep versioning. `true` is sugar for one implicit `fixed` group of every package
|
|
115
|
+
* (all packages version together) — it shares the exact same mechanism as `version.groups`.
|
|
116
|
+
* When `version.groups` is set, `sync` should be `false`; an explicit `sync: true` alongside
|
|
117
|
+
* groups is treated as the implicit all-packages fixed group taking precedence and is reported
|
|
118
|
+
* as a config conflict.
|
|
119
|
+
*/
|
|
98
120
|
sync: z.boolean().default(true),
|
|
121
|
+
/**
|
|
122
|
+
* Named version groups, each binding a set of package patterns to a `fixed` or `linked` sync
|
|
123
|
+
* mode. Packages not matched by any group version independently (per-package). A package may
|
|
124
|
+
* belong to at most one group; overlapping patterns that assign a package to two groups are a
|
|
125
|
+
* config error. See the `version.groups` reference for fixed vs linked semantics.
|
|
126
|
+
*/
|
|
127
|
+
groups: z.record(z.string(), VersionGroupSchema).optional(),
|
|
99
128
|
packages: z.array(z.string()).default([]),
|
|
100
129
|
mainPackage: z.string().optional(),
|
|
101
130
|
updateInternalDependencies: z.enum(["major", "minor", "patch", "no-internal-update"]).default("minor"),
|
|
@@ -108,6 +137,8 @@ var VersionConfigSchema = z.object({
|
|
|
108
137
|
versionPrefix: z.string().default(""),
|
|
109
138
|
prereleaseIdentifier: z.string().optional(),
|
|
110
139
|
strictReachable: z.boolean().default(false),
|
|
140
|
+
/** Pre-1.0 inferred-breaking bump policy ('spec' | 'strict'). See docs/configuration.md#versionzeromajor. */
|
|
141
|
+
zeroMajor: z.enum(["spec", "strict"]).default("spec"),
|
|
111
142
|
cargo: VersionCargoConfigSchema.optional()
|
|
112
143
|
});
|
|
113
144
|
var NpmConfigSchema = z.object({
|
|
@@ -329,6 +360,8 @@ var CILabelsConfigSchema = z.object({
|
|
|
329
360
|
skip: z.string().default("release:skip"),
|
|
330
361
|
/** Bypass the standing PR for one merge — triggers a direct release. Standing-pr mode only. */
|
|
331
362
|
immediate: z.string().default("release:immediate"),
|
|
363
|
+
/** Retry a failed publish by re-applying it to a merged standing PR. Standing-pr mode only. */
|
|
364
|
+
retry: z.string().default("release:retry"),
|
|
332
365
|
major: z.string().default("bump:major"),
|
|
333
366
|
minor: z.string().default("bump:minor"),
|
|
334
367
|
patch: z.string().default("bump:patch")
|
|
@@ -373,6 +406,7 @@ var CIConfigSchema = z.object({
|
|
|
373
406
|
prerelease: "channel:prerelease",
|
|
374
407
|
skip: "release:skip",
|
|
375
408
|
immediate: "release:immediate",
|
|
409
|
+
retry: "release:retry",
|
|
376
410
|
major: "bump:major",
|
|
377
411
|
minor: "bump:minor",
|
|
378
412
|
patch: "bump:patch"
|
|
@@ -473,7 +507,16 @@ function saveAuth(provider, apiKey) {
|
|
|
473
507
|
existing[provider] = apiKey;
|
|
474
508
|
fs2.writeFileSync(AUTH_FILE, JSON.stringify(existing, null, 2), { encoding: "utf-8", mode: 384 });
|
|
475
509
|
}
|
|
476
|
-
var
|
|
510
|
+
var CONFIG_FILES = ["releasekit.config.json", "releasekit.config.jsonc"];
|
|
511
|
+
function resolveConfigPath(cwd) {
|
|
512
|
+
for (const file of CONFIG_FILES) {
|
|
513
|
+
const candidate = path3.join(cwd, file);
|
|
514
|
+
if (fs3.existsSync(candidate)) {
|
|
515
|
+
return candidate;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
return path3.join(cwd, CONFIG_FILES[0]);
|
|
519
|
+
}
|
|
477
520
|
function loadConfigFile(configPath) {
|
|
478
521
|
if (!fs3.existsSync(configPath)) {
|
|
479
522
|
return {};
|
|
@@ -497,7 +540,7 @@ ${issues}`);
|
|
|
497
540
|
}
|
|
498
541
|
function loadConfig(options) {
|
|
499
542
|
const cwd = options?.cwd ?? process.cwd();
|
|
500
|
-
const configPath = options?.configPath ??
|
|
543
|
+
const configPath = options?.configPath ?? resolveConfigPath(cwd);
|
|
501
544
|
return loadConfigFile(configPath);
|
|
502
545
|
}
|
|
503
546
|
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@releasekit/notes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.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,23 +47,24 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@anthropic-ai/sdk": "^0.
|
|
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",
|
|
54
54
|
"commander": "^14.0.3",
|
|
55
55
|
"ejs": "^4.0.1",
|
|
56
56
|
"handlebars": "^4.7.9",
|
|
57
|
+
"jsonc-parser": "^3.3.1",
|
|
57
58
|
"liquidjs": "^10.27.0",
|
|
58
59
|
"minimatch": "^10.0.0",
|
|
59
|
-
"openai": "^6.
|
|
60
|
+
"openai": "^6.42.0",
|
|
60
61
|
"smol-toml": "^1.6.1",
|
|
61
62
|
"zod": "^4.4.3"
|
|
62
63
|
},
|
|
63
64
|
"devDependencies": {
|
|
64
65
|
"@biomejs/biome": "^2.4.16",
|
|
65
66
|
"@types/ejs": "^3.1.5",
|
|
66
|
-
"@types/node": "^22.19.
|
|
67
|
+
"@types/node": "^22.19.20",
|
|
67
68
|
"@vitest/coverage-v8": "^4.1.8",
|
|
68
69
|
"tsup": "^8.5.1",
|
|
69
70
|
"typescript": "^5.9.3",
|
|
@@ -72,7 +73,7 @@
|
|
|
72
73
|
"@releasekit/core": "0.0.0"
|
|
73
74
|
},
|
|
74
75
|
"engines": {
|
|
75
|
-
"node": ">=
|
|
76
|
+
"node": ">=22"
|
|
76
77
|
},
|
|
77
78
|
"scripts": {
|
|
78
79
|
"build": "tsup",
|