@releasekit/notes 0.35.0 → 0.37.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-KOMXAK6Y.js → aggregator-BYOHELNX.js} +2 -2
- package/dist/{chunk-UDVQUE2N.js → chunk-4ABTRCZA.js} +1 -1
- package/dist/{chunk-IC4SXXRM.js → chunk-AUIBJ4MF.js} +17 -15
- package/dist/{chunk-AWGBVBT2.js → chunk-MZKMCO2M.js} +16 -4
- package/dist/cli.js +2 -2
- package/dist/index.js +3 -3
- package/package.json +2 -2
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
// ../core/dist/index.js
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import fs from "fs";
|
|
3
|
+
import path from "path";
|
|
4
|
+
import * as fs2 from "fs";
|
|
5
|
+
import * as path2 from "path";
|
|
4
6
|
import { fileURLToPath } from "url";
|
|
5
7
|
import chalk from "chalk";
|
|
6
8
|
import { minimatch } from "minimatch";
|
|
7
9
|
function readPackageVersion(importMetaUrl) {
|
|
8
10
|
try {
|
|
9
|
-
const dir =
|
|
10
|
-
const packageJsonPath =
|
|
11
|
-
const packageJson = JSON.parse(
|
|
11
|
+
const dir = path2.dirname(fileURLToPath(importMetaUrl));
|
|
12
|
+
const packageJsonPath = path2.resolve(dir, "../package.json");
|
|
13
|
+
const packageJson = JSON.parse(fs2.readFileSync(packageJsonPath, "utf-8"));
|
|
12
14
|
return packageJson.version ?? "0.0.0";
|
|
13
15
|
} catch {
|
|
14
16
|
return "0.0.0";
|
|
@@ -106,8 +108,8 @@ var EXIT_CODES = {
|
|
|
106
108
|
};
|
|
107
109
|
|
|
108
110
|
// src/output/markdown.ts
|
|
109
|
-
import * as
|
|
110
|
-
import * as
|
|
111
|
+
import * as fs3 from "fs";
|
|
112
|
+
import * as path3 from "path";
|
|
111
113
|
var DEFAULT_FIRST_RELEASE_TEXT = "_First release of ${packageName}._";
|
|
112
114
|
function firstReleaseLine(context, config) {
|
|
113
115
|
if (!context.isFirstRelease || config === false) return void 0;
|
|
@@ -353,8 +355,8 @@ function renderMarkdown(contexts, options) {
|
|
|
353
355
|
}
|
|
354
356
|
function prependVersion(existingPath, context, options) {
|
|
355
357
|
let existing = "";
|
|
356
|
-
if (
|
|
357
|
-
existing =
|
|
358
|
+
if (fs3.existsSync(existingPath)) {
|
|
359
|
+
existing = fs3.readFileSync(existingPath, "utf-8");
|
|
358
360
|
const headerEnd = existing.indexOf("\n## ");
|
|
359
361
|
if (headerEnd >= 0) {
|
|
360
362
|
const header = existing.slice(0, headerEnd);
|
|
@@ -376,22 +378,22 @@ function writeMarkdown(outputPath, contexts, config, dryRun, options) {
|
|
|
376
378
|
info(content);
|
|
377
379
|
return;
|
|
378
380
|
}
|
|
379
|
-
const dir =
|
|
380
|
-
if (!
|
|
381
|
-
|
|
381
|
+
const dir = path3.dirname(outputPath);
|
|
382
|
+
if (!fs3.existsSync(dir)) {
|
|
383
|
+
fs3.mkdirSync(dir, { recursive: true });
|
|
382
384
|
}
|
|
383
385
|
if (outputPath === "-") {
|
|
384
386
|
process.stdout.write(content);
|
|
385
387
|
return;
|
|
386
388
|
}
|
|
387
|
-
if (config.updateStrategy !== "regenerate" &&
|
|
389
|
+
if (config.updateStrategy !== "regenerate" && fs3.existsSync(outputPath) && contexts.length === 1) {
|
|
388
390
|
const firstContext = contexts[0];
|
|
389
391
|
if (firstContext) {
|
|
390
392
|
const updated = prependVersion(outputPath, firstContext, options);
|
|
391
|
-
|
|
393
|
+
fs3.writeFileSync(outputPath, updated, "utf-8");
|
|
392
394
|
}
|
|
393
395
|
} else {
|
|
394
|
-
|
|
396
|
+
fs3.writeFileSync(outputPath, content, "utf-8");
|
|
395
397
|
}
|
|
396
398
|
success(`${label} written to ${outputPath}`);
|
|
397
399
|
}
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
success,
|
|
11
11
|
warn,
|
|
12
12
|
writeMarkdown
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AUIBJ4MF.js";
|
|
14
14
|
|
|
15
15
|
// ../config/dist/index.js
|
|
16
16
|
import * as fs from "fs";
|
|
@@ -115,7 +115,12 @@ var VersionConfigSchema = z.object({
|
|
|
115
115
|
`How the "Project-wide changes" block is bounded in package-specific-tag mode. "union" (default): repo-level commits accrue from the union of the releasing packages' ranges, floored by the OLDEST unreleased baseline \u2014 so a genuinely-global commit recurs in every release until the oldest-baselined package is released past it. "sinceLastRelease": floor the block by the single nearest tag reachable across the repo, so global commits already shown by the most recent release don't recur (recommended for per-package-tag monorepos). No effect in sync mode, where one shared tag already consumes repo-level commits on each release.`
|
|
116
116
|
),
|
|
117
117
|
mainPackage: z.string().optional().describe("Package to use for version determination"),
|
|
118
|
-
skip: z.array(z.string()).optional().describe(
|
|
118
|
+
skip: z.array(z.string()).optional().describe(
|
|
119
|
+
'Packages to exclude from versioning (glob patterns or exact names). Private packages ("private": true) are skipped automatically \u2014 see includePrivate \u2014 so they do not need to be listed here.'
|
|
120
|
+
),
|
|
121
|
+
includePrivate: z.boolean().default(false).describe(
|
|
122
|
+
'Include npm packages marked "private": true (in package.json) in the release flow. Default false: private packages are skipped at discovery \u2014 they cannot be published to any registry, mirroring the Cargo `publish = false` and pub `publish_to: none` skips already applied during discovery. Set true to version a private package for internal tracking. Packages explicitly named in version.packages are always included regardless of this setting.'
|
|
123
|
+
),
|
|
119
124
|
commitMessage: z.string().optional().describe("Template for release commit messages"),
|
|
120
125
|
mismatchStrategy: z.enum(["error", "warn", "ignore", "prefer-package", "prefer-git"]).default("warn").describe("How to handle version mismatches"),
|
|
121
126
|
versionPrefix: z.string().default("").describe("Prefix for version tags"),
|
|
@@ -408,6 +413,9 @@ var CILabelsConfigSchema = z.object({
|
|
|
408
413
|
graduate: z.string().default("release:graduate").describe(
|
|
409
414
|
"Label that graduates a prerelease to its stable base version (e.g. 1.0.0-next.6 \u2192 1.0.0). A standalone release trigger in label/direct mode; in standing-pr mode it sets the next merge to graduate."
|
|
410
415
|
),
|
|
416
|
+
graduatePackagePrefix: z.string().default("graduate:").describe(
|
|
417
|
+
"Prefix for per-package graduate labels on the standing PR. A `graduate:<package>` label graduates just that prerelease package (and, atomically, any fixed/linked group it belongs to) to its stable base version on the next update, while other prerelease packages stay on their line. The whole-batch `graduate` label still graduates everything. Standing-pr mode only."
|
|
418
|
+
),
|
|
411
419
|
prerelease: z.string().default("channel:prerelease").describe("Label to create a prerelease"),
|
|
412
420
|
skip: z.string().default("release:skip").describe("Label to suppress a release on this PR"),
|
|
413
421
|
immediate: z.string().default("release:immediate").describe("Label to bypass the standing PR for one merge \u2014 triggers a direct release. Standing-pr mode only."),
|
|
@@ -462,6 +470,9 @@ var StandingPrConfigSchema = z.object({
|
|
|
462
470
|
),
|
|
463
471
|
selection: z.enum(["streamlined", "granular"]).default("streamlined").describe(
|
|
464
472
|
"How the selection list renders when primaryPackages is set. streamlined: one checkbox per primary, coupled members shown read-only in a collapsed pane, and a held-back primary cascades to its unit. granular: every package keeps its own checkbox, nested under its primary, with no cascade. No effect when primaryPackages is empty."
|
|
473
|
+
),
|
|
474
|
+
combinedChangelogFooter: z.boolean().default(true).describe(
|
|
475
|
+
"Append the de-duplicated combined-changelog footer to the standing PR: every change listed once, flat across packages and grouped by change type (Added/Fixed/Changed). It complements the per-row changelogs co-located with each releasable row. Set false to suppress this redundant per-package summary \u2014 the per-row changelogs remain, project-wide (shared) changes are still shown in their own block, and sync releases (which have no per-row changelogs) always show the combined changelog regardless of this setting."
|
|
465
476
|
)
|
|
466
477
|
});
|
|
467
478
|
var CIConfigSchema = z.object({
|
|
@@ -486,6 +497,7 @@ var CIConfigSchema = z.object({
|
|
|
486
497
|
),
|
|
487
498
|
labels: CILabelsConfigSchema.default({
|
|
488
499
|
graduate: "release:graduate",
|
|
500
|
+
graduatePackagePrefix: "graduate:",
|
|
489
501
|
prerelease: "channel:prerelease",
|
|
490
502
|
skip: "release:skip",
|
|
491
503
|
immediate: "release:immediate",
|
|
@@ -2927,7 +2939,7 @@ async function runPipeline(input, config, dryRun, pipelineOptions) {
|
|
|
2927
2939
|
const dir = releaseNotesConfig.file.dir;
|
|
2928
2940
|
info(`Generating release notes \u2192 ${dir}`);
|
|
2929
2941
|
try {
|
|
2930
|
-
const { detectMonorepo } = await import("./aggregator-
|
|
2942
|
+
const { detectMonorepo } = await import("./aggregator-BYOHELNX.js");
|
|
2931
2943
|
const nested = detectMonorepo(process.cwd()).isMonorepo || contexts.length > 1;
|
|
2932
2944
|
const renderContent = (ctx) => {
|
|
2933
2945
|
if (releaseNotesConfig.templates?.path) {
|
|
@@ -2989,7 +3001,7 @@ async function processInput(inputJson, config, dryRun, pipelineOptions) {
|
|
|
2989
3001
|
return runPipeline(input, config, dryRun, pipelineOptions);
|
|
2990
3002
|
}
|
|
2991
3003
|
async function writeMonorepoFiles(contexts, config, dryRun, fileName) {
|
|
2992
|
-
const { detectMonorepo, writeMonorepoChangelogs } = await import("./aggregator-
|
|
3004
|
+
const { detectMonorepo, writeMonorepoChangelogs } = await import("./aggregator-BYOHELNX.js");
|
|
2993
3005
|
const cwd = process.cwd();
|
|
2994
3006
|
const detected = detectMonorepo(cwd);
|
|
2995
3007
|
if (!detected.isMonorepo) return [];
|
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-MZKMCO2M.js";
|
|
5
5
|
import {
|
|
6
6
|
readPackageVersion
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AUIBJ4MF.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-MZKMCO2M.js";
|
|
22
22
|
import {
|
|
23
23
|
aggregateToRoot,
|
|
24
24
|
detectMonorepo,
|
|
25
25
|
writeMonorepoChangelogs
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-4ABTRCZA.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-AUIBJ4MF.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.37.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",
|
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
"tsup": "^8.5.1",
|
|
70
70
|
"typescript": "^5.9.3",
|
|
71
71
|
"vitest": "^4.1.9",
|
|
72
|
+
"@releasekit/config": "0.0.0",
|
|
72
73
|
"@releasekit/core": "0.0.0",
|
|
73
74
|
"@releasekit/forge": "0.0.0",
|
|
74
|
-
"@releasekit/config": "0.0.0",
|
|
75
75
|
"@releasekit/git": "0.0.0"
|
|
76
76
|
},
|
|
77
77
|
"engines": {
|