@releasekit/release 0.8.1 → 0.10.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/README.md +8 -8
- package/dist/cli.js +90 -68
- package/dist/dispatcher.js +90 -68
- package/dist/index.js +90 -68
- package/docs/ci-setup.md +26 -10
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -220,9 +220,9 @@ The `ci` section controls automation behavior:
|
|
|
220
220
|
"stable": "release:stable",
|
|
221
221
|
"prerelease": "release:prerelease",
|
|
222
222
|
"skip": "release:skip",
|
|
223
|
-
"major": "
|
|
224
|
-
"minor": "
|
|
225
|
-
"patch": "
|
|
223
|
+
"major": "bump:major",
|
|
224
|
+
"minor": "bump:minor",
|
|
225
|
+
"patch": "bump:patch"
|
|
226
226
|
},
|
|
227
227
|
|
|
228
228
|
// Map PR labels to package filters for scoped releases
|
|
@@ -237,11 +237,11 @@ The `ci` section controls automation behavior:
|
|
|
237
237
|
|
|
238
238
|
#### Release Trigger
|
|
239
239
|
|
|
240
|
-
**`label`** (default) — A PR label (`
|
|
240
|
+
**`label`** (default) — A PR label (`bump:patch`, `bump:minor`, or `bump:major`) is required to trigger a release. The label determines the bump type. PRs without a release label will not trigger a release when merged.
|
|
241
241
|
|
|
242
|
-
**`commit`** — Conventional commits drive the bump type automatically. Every merge can trigger a release. Use the `release:skip` label to prevent a release, or `
|
|
242
|
+
**`commit`** — Conventional commits drive the bump type automatically. Every merge can trigger a release. Use the `release:skip` label to prevent a release, or `bump:major` to override the commit-derived bump to major.
|
|
243
243
|
|
|
244
|
-
Both modes support `release:stable` and `release:prerelease` as modifiers.
|
|
244
|
+
Both modes support `release:stable` and `release:prerelease` as channel modifiers. `release:stable` alone promotes a prerelease to stable without requiring a bump label. `release:prerelease` must be combined with a `bump:*` label — alone, it does not trigger a release.
|
|
245
245
|
|
|
246
246
|
#### Release Strategy
|
|
247
247
|
|
|
@@ -278,7 +278,7 @@ When a PR has a matching scope label, only packages matching the pattern are inc
|
|
|
278
278
|
| `defaultScope` | Fallback scope to use when no scope label is found (must reference a key in `scopeLabels`) |
|
|
279
279
|
|
|
280
280
|
**Usage:**
|
|
281
|
-
- `scope:shared` + `
|
|
281
|
+
- `scope:shared` + `bump:minor` → Release only `@myorg/shared-*` packages with minor bump
|
|
282
282
|
- `scope:shared` + `scope:ui` → Release both matching scope groups
|
|
283
283
|
- `scope:shared` (no release label) → Release only shared packages, bump determined by conventional commits
|
|
284
284
|
- No scope label but `defaultScope` configured → Use default scope pattern
|
|
@@ -288,7 +288,7 @@ Multiple scope labels are combined with OR logic. Without a `release:*` label, c
|
|
|
288
288
|
**Label conflicts:**
|
|
289
289
|
|
|
290
290
|
In label trigger mode, conflicting labels will block the release and post a comment explaining the issue:
|
|
291
|
-
- Multiple bump labels (`
|
|
291
|
+
- Multiple bump labels (`bump:major` + `bump:minor` + `bump:patch`) → blocked
|
|
292
292
|
- Conflicting release type (`release:stable` + `release:prerelease`) → blocked (both modes)
|
|
293
293
|
|
|
294
294
|
**How it works:**
|
package/dist/cli.js
CHANGED
|
@@ -14508,7 +14508,7 @@ var init_baseError_DQHIJACF = __esm({
|
|
|
14508
14508
|
}
|
|
14509
14509
|
});
|
|
14510
14510
|
|
|
14511
|
-
// ../version/dist/chunk-
|
|
14511
|
+
// ../version/dist/chunk-5UIOLBFW.js
|
|
14512
14512
|
import * as fs9 from "fs";
|
|
14513
14513
|
import * as path12 from "path";
|
|
14514
14514
|
import * as TOML2 from "smol-toml";
|
|
@@ -15148,6 +15148,10 @@ function bumpVersion(currentVersion, bumpType, prereleaseIdentifier) {
|
|
|
15148
15148
|
if (!parsed) {
|
|
15149
15149
|
return import_semver5.default.inc(currentVersion, bumpType) || "";
|
|
15150
15150
|
}
|
|
15151
|
+
if (prereleaseIdentifier) {
|
|
15152
|
+
log4(`Incrementing prerelease for ${currentVersion} using 'prerelease'`, "debug");
|
|
15153
|
+
return import_semver5.default.inc(currentVersion, "prerelease", prereleaseIdentifier) || "";
|
|
15154
|
+
}
|
|
15151
15155
|
if (bumpType === "major" && parsed.minor === 0 && parsed.patch === 0 || bumpType === "minor" && parsed.patch === 0 || bumpType === "patch") {
|
|
15152
15156
|
log4(`Cleaning prerelease identifier from ${currentVersion} for ${bumpType} bump`, "debug");
|
|
15153
15157
|
return `${parsed.major}.${parsed.minor}.${parsed.patch}`;
|
|
@@ -16111,7 +16115,7 @@ function createAsyncStrategy(config) {
|
|
|
16111
16115
|
let packagesToProcess = packages.packages;
|
|
16112
16116
|
if (targets.length > 0) {
|
|
16113
16117
|
const beforeCount = packagesToProcess.length;
|
|
16114
|
-
packagesToProcess = packagesToProcess.filter((pkg) =>
|
|
16118
|
+
packagesToProcess = packagesToProcess.filter((pkg) => shouldMatchPackageTargets(pkg.packageJson.name, targets));
|
|
16115
16119
|
log4(
|
|
16116
16120
|
`Runtime targets filter: ${beforeCount} \u2192 ${packagesToProcess.length} packages (${targets.join(", ")})`,
|
|
16117
16121
|
"info"
|
|
@@ -16297,8 +16301,8 @@ function createVersionCommand() {
|
|
|
16297
16301
|
});
|
|
16298
16302
|
}
|
|
16299
16303
|
var import_semver3, import_semver4, import_semver5, ConfigError2, MAX_JSONC_LENGTH2, GitConfigSchema2, MonorepoConfigSchema2, BranchPatternSchema2, VersionCargoConfigSchema2, VersionConfigSchema2, NpmConfigSchema2, CargoPublishConfigSchema2, PublishGitConfigSchema2, GitHubReleaseConfigSchema2, VerifyRegistryConfigSchema2, VerifyConfigSchema2, PublishConfigSchema2, TemplateConfigSchema2, LocationModeSchema2, ChangelogConfigSchema2, LLMOptionsSchema2, LLMRetryConfigSchema2, LLMTasksConfigSchema2, LLMCategorySchema2, ScopeRulesSchema2, ScopeConfigSchema2, LLMPromptOverridesSchema2, LLMPromptsConfigSchema2, LLMConfigSchema2, ReleaseNotesConfigSchema2, NotesInputConfigSchema2, NotesConfigSchema2, CILabelsConfigSchema2, CIConfigSchema2, ReleaseCIConfigSchema2, ReleaseConfigSchema2, ReleaseKitConfigSchema2, MAX_INPUT_LENGTH2, SOLE_REFERENCE_PATTERN2, AUTH_DIR2, AUTH_FILE2, CONFIG_FILE2, VersionError, VersionErrorCode, _jsonOutputMode, _pendingWrites, _jsonData, STANDARD_BUMP_TYPES, VersionMismatchError, CONVENTIONAL_COMMIT_REGEX, BREAKING_CHANGE_REGEX, PackageProcessor, GitError, VersionEngine;
|
|
16300
|
-
var
|
|
16301
|
-
"../version/dist/chunk-
|
|
16304
|
+
var init_chunk_5UIOLBFW = __esm({
|
|
16305
|
+
"../version/dist/chunk-5UIOLBFW.js"() {
|
|
16302
16306
|
"use strict";
|
|
16303
16307
|
init_chunk_Q3FHZORY();
|
|
16304
16308
|
init_chunk_LMPZV35Z();
|
|
@@ -16560,9 +16564,9 @@ var init_chunk_GHCENMVA = __esm({
|
|
|
16560
16564
|
stable: z3.string().default("release:stable"),
|
|
16561
16565
|
prerelease: z3.string().default("release:prerelease"),
|
|
16562
16566
|
skip: z3.string().default("release:skip"),
|
|
16563
|
-
major: z3.string().default("
|
|
16564
|
-
minor: z3.string().default("
|
|
16565
|
-
patch: z3.string().default("
|
|
16567
|
+
major: z3.string().default("bump:major"),
|
|
16568
|
+
minor: z3.string().default("bump:minor"),
|
|
16569
|
+
patch: z3.string().default("bump:patch")
|
|
16566
16570
|
});
|
|
16567
16571
|
CIConfigSchema2 = z3.object({
|
|
16568
16572
|
releaseStrategy: z3.enum(["manual", "direct", "standing-pr", "scheduled"]).default("direct"),
|
|
@@ -16581,9 +16585,9 @@ var init_chunk_GHCENMVA = __esm({
|
|
|
16581
16585
|
stable: "release:stable",
|
|
16582
16586
|
prerelease: "release:prerelease",
|
|
16583
16587
|
skip: "release:skip",
|
|
16584
|
-
major: "
|
|
16585
|
-
minor: "
|
|
16586
|
-
patch: "
|
|
16588
|
+
major: "bump:major",
|
|
16589
|
+
minor: "bump:minor",
|
|
16590
|
+
patch: "bump:patch"
|
|
16587
16591
|
}),
|
|
16588
16592
|
/**
|
|
16589
16593
|
* Map of scope labels to package patterns.
|
|
@@ -17050,7 +17054,7 @@ __export(dist_exports3, {
|
|
|
17050
17054
|
var init_dist13 = __esm({
|
|
17051
17055
|
"../version/dist/index.js"() {
|
|
17052
17056
|
"use strict";
|
|
17053
|
-
|
|
17057
|
+
init_chunk_5UIOLBFW();
|
|
17054
17058
|
init_chunk_Q3FHZORY();
|
|
17055
17059
|
init_chunk_LMPZV35Z();
|
|
17056
17060
|
}
|
|
@@ -41929,7 +41933,7 @@ var init_aggregator_IUQUAVJC = __esm({
|
|
|
41929
41933
|
}
|
|
41930
41934
|
});
|
|
41931
41935
|
|
|
41932
|
-
// ../notes/dist/chunk-
|
|
41936
|
+
// ../notes/dist/chunk-R6IWJNYC.js
|
|
41933
41937
|
import * as TOML3 from "smol-toml";
|
|
41934
41938
|
import * as fs33 from "fs";
|
|
41935
41939
|
import * as path33 from "path";
|
|
@@ -43261,8 +43265,8 @@ function handleError(err) {
|
|
|
43261
43265
|
process.exit(EXIT_CODES2.GENERAL_ERROR);
|
|
43262
43266
|
}
|
|
43263
43267
|
var import_handlebars, ConfigError3, MAX_JSONC_LENGTH3, GitConfigSchema3, MonorepoConfigSchema3, BranchPatternSchema3, VersionCargoConfigSchema3, VersionConfigSchema3, NpmConfigSchema3, CargoPublishConfigSchema3, PublishGitConfigSchema3, GitHubReleaseConfigSchema3, VerifyRegistryConfigSchema3, VerifyConfigSchema3, PublishConfigSchema3, TemplateConfigSchema3, LocationModeSchema3, ChangelogConfigSchema3, LLMOptionsSchema3, LLMRetryConfigSchema3, LLMTasksConfigSchema3, LLMCategorySchema3, ScopeRulesSchema3, ScopeConfigSchema3, LLMPromptOverridesSchema3, LLMPromptsConfigSchema3, LLMConfigSchema3, ReleaseNotesConfigSchema3, NotesInputConfigSchema3, NotesConfigSchema3, CILabelsConfigSchema3, CIConfigSchema3, ReleaseCIConfigSchema3, ReleaseConfigSchema3, ReleaseKitConfigSchema3, MAX_INPUT_LENGTH3, SOLE_REFERENCE_PATTERN3, AUTH_DIR3, AUTH_FILE3, CONFIG_FILE3, NotesError, InputParseError, TemplateError, LLMError, GitHubError, ConfigError22, LLM_DEFAULTS, BaseLLMProvider, AnthropicProvider, OllamaProvider, OpenAIProvider, OpenAICompatibleProvider, DEFAULT_CATEGORIZE_PROMPT, DEFAULT_ENHANCE_PROMPT, DEFAULT_RELEASE_NOTES_PROMPT, DEFAULT_SUMMARIZE_PROMPT;
|
|
43264
|
-
var
|
|
43265
|
-
"../notes/dist/chunk-
|
|
43268
|
+
var init_chunk_R6IWJNYC = __esm({
|
|
43269
|
+
"../notes/dist/chunk-R6IWJNYC.js"() {
|
|
43266
43270
|
"use strict";
|
|
43267
43271
|
init_chunk_7TJSPQPW();
|
|
43268
43272
|
init_sdk();
|
|
@@ -43520,9 +43524,9 @@ var init_chunk_5B2RYLOK = __esm({
|
|
|
43520
43524
|
stable: z4.string().default("release:stable"),
|
|
43521
43525
|
prerelease: z4.string().default("release:prerelease"),
|
|
43522
43526
|
skip: z4.string().default("release:skip"),
|
|
43523
|
-
major: z4.string().default("
|
|
43524
|
-
minor: z4.string().default("
|
|
43525
|
-
patch: z4.string().default("
|
|
43527
|
+
major: z4.string().default("bump:major"),
|
|
43528
|
+
minor: z4.string().default("bump:minor"),
|
|
43529
|
+
patch: z4.string().default("bump:patch")
|
|
43526
43530
|
});
|
|
43527
43531
|
CIConfigSchema3 = z4.object({
|
|
43528
43532
|
releaseStrategy: z4.enum(["manual", "direct", "standing-pr", "scheduled"]).default("direct"),
|
|
@@ -43541,9 +43545,9 @@ var init_chunk_5B2RYLOK = __esm({
|
|
|
43541
43545
|
stable: "release:stable",
|
|
43542
43546
|
prerelease: "release:prerelease",
|
|
43543
43547
|
skip: "release:skip",
|
|
43544
|
-
major: "
|
|
43545
|
-
minor: "
|
|
43546
|
-
patch: "
|
|
43548
|
+
major: "bump:major",
|
|
43549
|
+
minor: "bump:minor",
|
|
43550
|
+
patch: "bump:patch"
|
|
43547
43551
|
}),
|
|
43548
43552
|
/**
|
|
43549
43553
|
* Map of scope labels to package patterns.
|
|
@@ -43937,13 +43941,13 @@ function writeJson(outputPath, contexts, dryRun) {
|
|
|
43937
43941
|
var init_dist14 = __esm({
|
|
43938
43942
|
"../notes/dist/index.js"() {
|
|
43939
43943
|
"use strict";
|
|
43940
|
-
|
|
43944
|
+
init_chunk_R6IWJNYC();
|
|
43941
43945
|
init_chunk_F7MUVHZ2();
|
|
43942
43946
|
init_chunk_7TJSPQPW();
|
|
43943
43947
|
}
|
|
43944
43948
|
});
|
|
43945
43949
|
|
|
43946
|
-
// ../publish/dist/chunk-
|
|
43950
|
+
// ../publish/dist/chunk-ZTUEJDI7.js
|
|
43947
43951
|
import chalk5 from "chalk";
|
|
43948
43952
|
import * as fs25 from "fs";
|
|
43949
43953
|
import * as TOML4 from "smol-toml";
|
|
@@ -45480,8 +45484,8 @@ function createPublishCommand() {
|
|
|
45480
45484
|
});
|
|
45481
45485
|
}
|
|
45482
45486
|
var import_semver6, LOG_LEVELS4, PREFIXES4, COLORS4, currentLevel4, quietMode4, ReleaseKitError4, EXIT_CODES3, ConfigError4, MAX_JSONC_LENGTH4, GitConfigSchema4, MonorepoConfigSchema4, BranchPatternSchema4, VersionCargoConfigSchema4, VersionConfigSchema4, NpmConfigSchema4, CargoPublishConfigSchema4, PublishGitConfigSchema4, GitHubReleaseConfigSchema4, VerifyRegistryConfigSchema4, VerifyConfigSchema4, PublishConfigSchema4, TemplateConfigSchema4, LocationModeSchema4, ChangelogConfigSchema4, LLMOptionsSchema4, LLMRetryConfigSchema4, LLMTasksConfigSchema4, LLMCategorySchema4, ScopeRulesSchema4, ScopeConfigSchema4, LLMPromptOverridesSchema4, LLMPromptsConfigSchema4, LLMConfigSchema4, ReleaseNotesConfigSchema4, NotesInputConfigSchema4, NotesConfigSchema4, CILabelsConfigSchema4, CIConfigSchema4, ReleaseCIConfigSchema4, ReleaseConfigSchema4, ReleaseKitConfigSchema4, MAX_INPUT_LENGTH4, SOLE_REFERENCE_PATTERN4, AUTH_DIR4, AUTH_FILE4, CONFIG_FILE4, BasePublishError, PublishError, PipelineError, PublishErrorCode, VersionChangelogEntrySchema, VersionPackageChangelogSchema, VersionPackageUpdateSchema, VersionOutputSchema;
|
|
45483
|
-
var
|
|
45484
|
-
"../publish/dist/chunk-
|
|
45487
|
+
var init_chunk_ZTUEJDI7 = __esm({
|
|
45488
|
+
"../publish/dist/chunk-ZTUEJDI7.js"() {
|
|
45485
45489
|
"use strict";
|
|
45486
45490
|
import_semver6 = __toESM(require_semver2(), 1);
|
|
45487
45491
|
LOG_LEVELS4 = {
|
|
@@ -45786,9 +45790,9 @@ var init_chunk_UARK5H2F = __esm({
|
|
|
45786
45790
|
stable: z5.string().default("release:stable"),
|
|
45787
45791
|
prerelease: z5.string().default("release:prerelease"),
|
|
45788
45792
|
skip: z5.string().default("release:skip"),
|
|
45789
|
-
major: z5.string().default("
|
|
45790
|
-
minor: z5.string().default("
|
|
45791
|
-
patch: z5.string().default("
|
|
45793
|
+
major: z5.string().default("bump:major"),
|
|
45794
|
+
minor: z5.string().default("bump:minor"),
|
|
45795
|
+
patch: z5.string().default("bump:patch")
|
|
45792
45796
|
});
|
|
45793
45797
|
CIConfigSchema4 = z5.object({
|
|
45794
45798
|
releaseStrategy: z5.enum(["manual", "direct", "standing-pr", "scheduled"]).default("direct"),
|
|
@@ -45807,9 +45811,9 @@ var init_chunk_UARK5H2F = __esm({
|
|
|
45807
45811
|
stable: "release:stable",
|
|
45808
45812
|
prerelease: "release:prerelease",
|
|
45809
45813
|
skip: "release:skip",
|
|
45810
|
-
major: "
|
|
45811
|
-
minor: "
|
|
45812
|
-
patch: "
|
|
45814
|
+
major: "bump:major",
|
|
45815
|
+
minor: "bump:minor",
|
|
45816
|
+
patch: "bump:patch"
|
|
45813
45817
|
}),
|
|
45814
45818
|
/**
|
|
45815
45819
|
* Map of scope labels to package patterns.
|
|
@@ -45954,7 +45958,7 @@ __export(dist_exports5, {
|
|
|
45954
45958
|
var init_dist15 = __esm({
|
|
45955
45959
|
"../publish/dist/index.js"() {
|
|
45956
45960
|
"use strict";
|
|
45957
|
-
|
|
45961
|
+
init_chunk_ZTUEJDI7();
|
|
45958
45962
|
}
|
|
45959
45963
|
});
|
|
45960
45964
|
|
|
@@ -46336,9 +46340,9 @@ var CILabelsConfigSchema = z.object({
|
|
|
46336
46340
|
stable: z.string().default("release:stable"),
|
|
46337
46341
|
prerelease: z.string().default("release:prerelease"),
|
|
46338
46342
|
skip: z.string().default("release:skip"),
|
|
46339
|
-
major: z.string().default("
|
|
46340
|
-
minor: z.string().default("
|
|
46341
|
-
patch: z.string().default("
|
|
46343
|
+
major: z.string().default("bump:major"),
|
|
46344
|
+
minor: z.string().default("bump:minor"),
|
|
46345
|
+
patch: z.string().default("bump:patch")
|
|
46342
46346
|
});
|
|
46343
46347
|
var CIConfigSchema = z.object({
|
|
46344
46348
|
releaseStrategy: z.enum(["manual", "direct", "standing-pr", "scheduled"]).default("direct"),
|
|
@@ -46357,9 +46361,9 @@ var CIConfigSchema = z.object({
|
|
|
46357
46361
|
stable: "release:stable",
|
|
46358
46362
|
prerelease: "release:prerelease",
|
|
46359
46363
|
skip: "release:skip",
|
|
46360
|
-
major: "
|
|
46361
|
-
minor: "
|
|
46362
|
-
patch: "
|
|
46364
|
+
major: "bump:major",
|
|
46365
|
+
minor: "bump:minor",
|
|
46366
|
+
patch: "bump:patch"
|
|
46363
46367
|
}),
|
|
46364
46368
|
/**
|
|
46365
46369
|
* Map of scope labels to package patterns.
|
|
@@ -46479,9 +46483,9 @@ var DEFAULT_LABELS = {
|
|
|
46479
46483
|
stable: "release:stable",
|
|
46480
46484
|
prerelease: "release:prerelease",
|
|
46481
46485
|
skip: "release:skip",
|
|
46482
|
-
major: "
|
|
46483
|
-
minor: "
|
|
46484
|
-
patch: "
|
|
46486
|
+
major: "bump:major",
|
|
46487
|
+
minor: "bump:minor",
|
|
46488
|
+
patch: "bump:patch"
|
|
46485
46489
|
};
|
|
46486
46490
|
function detectLabelConflicts(prLabels, labels = DEFAULT_LABELS) {
|
|
46487
46491
|
const bumpLabelsPresent = [
|
|
@@ -46646,7 +46650,7 @@ function getLabelBanner(labelContext) {
|
|
|
46646
46650
|
if (labelContext.trigger === "label") {
|
|
46647
46651
|
if (labelContext.bumpConflict) {
|
|
46648
46652
|
const labels = labelContext.labels;
|
|
46649
|
-
const labelExamples = labels ? `\`${labels.patch}\`, \`${labels.minor}\`, or \`${labels.major}\`` : "a
|
|
46653
|
+
const labelExamples = labels ? `\`${labels.patch}\`, \`${labels.minor}\`, or \`${labels.major}\`` : "a bump label (e.g., `bump:patch`, `bump:minor`, `bump:major`)";
|
|
46650
46654
|
lines.push(
|
|
46651
46655
|
"> **Error:** Conflicting bump labels detected.",
|
|
46652
46656
|
`> **Note:** Please use only one release label at a time. Use ${labelExamples}.`,
|
|
@@ -46656,12 +46660,28 @@ function getLabelBanner(labelContext) {
|
|
|
46656
46660
|
}
|
|
46657
46661
|
if (labelContext.noBumpLabel) {
|
|
46658
46662
|
const labels = labelContext.labels;
|
|
46659
|
-
const labelExamples = labels ? `\`${labels.patch}\`, \`${labels.minor}\`, or \`${labels.major}\`` : "a
|
|
46660
|
-
lines.push("> No
|
|
46663
|
+
const labelExamples = labels ? `\`${labels.patch}\`, \`${labels.minor}\`, or \`${labels.major}\`` : "a bump label (e.g., `bump:patch`, `bump:minor`, `bump:major`)";
|
|
46664
|
+
lines.push("> No bump label detected.", `> **Note:** Add ${labelExamples} to trigger a release.`, "");
|
|
46661
46665
|
return lines;
|
|
46662
46666
|
}
|
|
46663
46667
|
if (labelContext.bumpLabel) {
|
|
46664
|
-
|
|
46668
|
+
const parts = [labelContext.bumpLabel];
|
|
46669
|
+
if (labelContext.prerelease) {
|
|
46670
|
+
parts.push("prerelease");
|
|
46671
|
+
}
|
|
46672
|
+
if (labelContext.stable) {
|
|
46673
|
+
parts.push("stable");
|
|
46674
|
+
}
|
|
46675
|
+
const labelText = parts.join(" ");
|
|
46676
|
+
lines.push(`> This PR is labeled for a **${labelText}** release.`, "");
|
|
46677
|
+
return lines;
|
|
46678
|
+
}
|
|
46679
|
+
if (labelContext.stable) {
|
|
46680
|
+
lines.push("> This PR is labeled for a **stable** release (graduation from prerelease).", "");
|
|
46681
|
+
return lines;
|
|
46682
|
+
}
|
|
46683
|
+
if (labelContext.prerelease) {
|
|
46684
|
+
lines.push("> This PR is labeled for a **prerelease** release (bump from conventional commits).", "");
|
|
46665
46685
|
return lines;
|
|
46666
46686
|
}
|
|
46667
46687
|
}
|
|
@@ -46867,16 +46887,22 @@ async function applyScopeLabelsFromPR(ciConfig, options) {
|
|
|
46867
46887
|
const allLabels = [];
|
|
46868
46888
|
const perPRLabels = /* @__PURE__ */ new Map();
|
|
46869
46889
|
for (const prNumber of prNumbers) {
|
|
46870
|
-
const
|
|
46871
|
-
allLabels.push(...
|
|
46872
|
-
perPRLabels.set(prNumber,
|
|
46890
|
+
const labels2 = await fetchPRLabels(octokit, githubContext.owner, githubContext.repo, prNumber);
|
|
46891
|
+
allLabels.push(...labels2);
|
|
46892
|
+
perPRLabels.set(prNumber, labels2);
|
|
46873
46893
|
}
|
|
46874
|
-
|
|
46875
|
-
|
|
46894
|
+
const labels = ciConfig?.labels ?? DEFAULT_LABELS;
|
|
46895
|
+
for (const [prNumber, prLabels] of perPRLabels) {
|
|
46896
|
+
const conflict = detectLabelConflicts(prLabels, labels);
|
|
46897
|
+
if ((ciConfig?.releaseTrigger ?? "label") === "commit" && prLabels.includes(labels.skip)) {
|
|
46898
|
+
info(`PR #${prNumber} has "${labels.skip}" label \u2014 skipping release`);
|
|
46899
|
+
return { target: options.target, scopeLabels: [], labels: [], skipped: true };
|
|
46900
|
+
}
|
|
46901
|
+
if (prLabels.includes(labels.skip)) {
|
|
46902
|
+
warn(`PR #${prNumber} has "${labels.skip}" label \u2014 this has no effect in label trigger mode`);
|
|
46903
|
+
}
|
|
46876
46904
|
if (conflict.prereleaseConflict) {
|
|
46877
|
-
warn(
|
|
46878
|
-
`PR #${prNumber} has conflicting labels "${ciConfig?.labels?.stable ?? "release:stable"}" and "${ciConfig?.labels?.prerelease ?? "release:prerelease"}" \u2014 release blocked`
|
|
46879
|
-
);
|
|
46905
|
+
warn(`PR #${prNumber} has conflicting labels "${labels.stable}" and "${labels.prerelease}" \u2014 release blocked`);
|
|
46880
46906
|
return { target: options.target, scopeLabels: [], labels: [], blocked: true };
|
|
46881
46907
|
}
|
|
46882
46908
|
if (conflict.bumpConflict && (ciConfig?.releaseTrigger ?? "label") === "label") {
|
|
@@ -46928,19 +46954,14 @@ async function runRelease(inputOptions) {
|
|
|
46928
46954
|
}
|
|
46929
46955
|
const releaseConfig = releaseKitConfig.release;
|
|
46930
46956
|
const ciConfig = loadCIConfig({ cwd: options.projectDir, configPath: options.config });
|
|
46931
|
-
if (!options.dryRun) {
|
|
46957
|
+
if (!options.dryRun || ciConfig?.scopeLabels) {
|
|
46932
46958
|
const scopeResult = await applyScopeLabelsFromPR(ciConfig, options);
|
|
46933
46959
|
if (scopeResult.blocked) {
|
|
46934
46960
|
info("Release blocked due to conflicting PR labels");
|
|
46935
46961
|
return null;
|
|
46936
46962
|
}
|
|
46937
|
-
if (scopeResult.
|
|
46938
|
-
|
|
46939
|
-
}
|
|
46940
|
-
} else if (ciConfig?.scopeLabels) {
|
|
46941
|
-
const scopeResult = await applyScopeLabelsFromPR(ciConfig, options);
|
|
46942
|
-
if (scopeResult.blocked) {
|
|
46943
|
-
info("Release blocked due to conflicting PR labels");
|
|
46963
|
+
if (scopeResult.skipped) {
|
|
46964
|
+
info("Release skipped due to release:skip label");
|
|
46944
46965
|
return null;
|
|
46945
46966
|
}
|
|
46946
46967
|
if (scopeResult.target !== options.target) {
|
|
@@ -47095,7 +47116,7 @@ async function runPreview(options) {
|
|
|
47095
47116
|
const { options: effectiveOptions, labelContext } = await applyLabelOverrides(options, ciConfig, context, octokit);
|
|
47096
47117
|
const strategy = ciConfig?.releaseStrategy ?? "direct";
|
|
47097
47118
|
let result = null;
|
|
47098
|
-
if (!labelContext.noBumpLabel) {
|
|
47119
|
+
if (!labelContext.skip && !labelContext.noBumpLabel) {
|
|
47099
47120
|
const releaseConfig = loadConfig({ cwd: effectiveOptions.projectDir, configPath: effectiveOptions.config });
|
|
47100
47121
|
const prereleaseFlag = resolvePrerelease(
|
|
47101
47122
|
effectiveOptions,
|
|
@@ -47236,25 +47257,26 @@ async function applyLabelOverrides(options, ciConfig, context, existingOctokit)
|
|
|
47236
47257
|
labelContext.bumpLabel = "patch";
|
|
47237
47258
|
result.bump = "patch";
|
|
47238
47259
|
} else if (matchedScopePatterns.length === 0) {
|
|
47239
|
-
|
|
47240
|
-
if (!hasStableOrPrerelease) {
|
|
47260
|
+
if (!conflict.hasStable) {
|
|
47241
47261
|
labelContext.noBumpLabel = true;
|
|
47242
47262
|
}
|
|
47243
47263
|
}
|
|
47264
|
+
if (prLabels.includes(labels.skip)) {
|
|
47265
|
+
warn(
|
|
47266
|
+
`PR label "${labels.skip}" has no effect in label trigger mode \u2014 skipping is controlled by not adding bump labels`
|
|
47267
|
+
);
|
|
47268
|
+
}
|
|
47244
47269
|
}
|
|
47245
47270
|
if (!options.stable && options.prerelease === void 0) {
|
|
47246
47271
|
if (conflict.hasStable && conflict.hasPrerelease) {
|
|
47247
47272
|
} else if (conflict.hasStable) {
|
|
47248
47273
|
info(`PR label "${labels.stable}" detected \u2014 using stable release preview`);
|
|
47249
47274
|
result.stable = true;
|
|
47275
|
+
labelContext.stable = true;
|
|
47250
47276
|
} else if (conflict.hasPrerelease) {
|
|
47251
47277
|
info(`PR label "${labels.prerelease}" detected \u2014 using prerelease preview`);
|
|
47252
47278
|
result.prerelease = true;
|
|
47253
|
-
|
|
47254
|
-
info("No bump label found \u2014 defaulting to patch bump for prerelease release");
|
|
47255
|
-
result.bump = "patch";
|
|
47256
|
-
labelContext.bumpLabel = "patch";
|
|
47257
|
-
}
|
|
47279
|
+
labelContext.prerelease = true;
|
|
47258
47280
|
}
|
|
47259
47281
|
}
|
|
47260
47282
|
return { options: result, labelContext: { ...labelContext, labels } };
|
package/dist/dispatcher.js
CHANGED
|
@@ -24913,7 +24913,7 @@ var init_aggregator_IUQUAVJC = __esm({
|
|
|
24913
24913
|
}
|
|
24914
24914
|
});
|
|
24915
24915
|
|
|
24916
|
-
// ../notes/dist/chunk-
|
|
24916
|
+
// ../notes/dist/chunk-R6IWJNYC.js
|
|
24917
24917
|
import * as TOML from "smol-toml";
|
|
24918
24918
|
import * as fs32 from "fs";
|
|
24919
24919
|
import * as path32 from "path";
|
|
@@ -26245,8 +26245,8 @@ function handleError(err) {
|
|
|
26245
26245
|
process.exit(EXIT_CODES2.GENERAL_ERROR);
|
|
26246
26246
|
}
|
|
26247
26247
|
var import_handlebars, ConfigError, MAX_JSONC_LENGTH, GitConfigSchema, MonorepoConfigSchema, BranchPatternSchema, VersionCargoConfigSchema, VersionConfigSchema, NpmConfigSchema, CargoPublishConfigSchema, PublishGitConfigSchema, GitHubReleaseConfigSchema, VerifyRegistryConfigSchema, VerifyConfigSchema, PublishConfigSchema, TemplateConfigSchema, LocationModeSchema, ChangelogConfigSchema, LLMOptionsSchema, LLMRetryConfigSchema, LLMTasksConfigSchema, LLMCategorySchema, ScopeRulesSchema, ScopeConfigSchema, LLMPromptOverridesSchema, LLMPromptsConfigSchema, LLMConfigSchema, ReleaseNotesConfigSchema, NotesInputConfigSchema, NotesConfigSchema, CILabelsConfigSchema, CIConfigSchema, ReleaseCIConfigSchema, ReleaseConfigSchema, ReleaseKitConfigSchema, MAX_INPUT_LENGTH, SOLE_REFERENCE_PATTERN, AUTH_DIR, AUTH_FILE, CONFIG_FILE, NotesError, InputParseError, TemplateError, LLMError, GitHubError, ConfigError2, LLM_DEFAULTS, BaseLLMProvider, AnthropicProvider, OllamaProvider, OpenAIProvider, OpenAICompatibleProvider, DEFAULT_CATEGORIZE_PROMPT, DEFAULT_ENHANCE_PROMPT, DEFAULT_RELEASE_NOTES_PROMPT, DEFAULT_SUMMARIZE_PROMPT;
|
|
26248
|
-
var
|
|
26249
|
-
"../notes/dist/chunk-
|
|
26248
|
+
var init_chunk_R6IWJNYC = __esm({
|
|
26249
|
+
"../notes/dist/chunk-R6IWJNYC.js"() {
|
|
26250
26250
|
"use strict";
|
|
26251
26251
|
init_chunk_7TJSPQPW();
|
|
26252
26252
|
init_sdk();
|
|
@@ -26504,9 +26504,9 @@ var init_chunk_5B2RYLOK = __esm({
|
|
|
26504
26504
|
stable: z.string().default("release:stable"),
|
|
26505
26505
|
prerelease: z.string().default("release:prerelease"),
|
|
26506
26506
|
skip: z.string().default("release:skip"),
|
|
26507
|
-
major: z.string().default("
|
|
26508
|
-
minor: z.string().default("
|
|
26509
|
-
patch: z.string().default("
|
|
26507
|
+
major: z.string().default("bump:major"),
|
|
26508
|
+
minor: z.string().default("bump:minor"),
|
|
26509
|
+
patch: z.string().default("bump:patch")
|
|
26510
26510
|
});
|
|
26511
26511
|
CIConfigSchema = z.object({
|
|
26512
26512
|
releaseStrategy: z.enum(["manual", "direct", "standing-pr", "scheduled"]).default("direct"),
|
|
@@ -26525,9 +26525,9 @@ var init_chunk_5B2RYLOK = __esm({
|
|
|
26525
26525
|
stable: "release:stable",
|
|
26526
26526
|
prerelease: "release:prerelease",
|
|
26527
26527
|
skip: "release:skip",
|
|
26528
|
-
major: "
|
|
26529
|
-
minor: "
|
|
26530
|
-
patch: "
|
|
26528
|
+
major: "bump:major",
|
|
26529
|
+
minor: "bump:minor",
|
|
26530
|
+
patch: "bump:patch"
|
|
26531
26531
|
}),
|
|
26532
26532
|
/**
|
|
26533
26533
|
* Map of scope labels to package patterns.
|
|
@@ -26921,7 +26921,7 @@ function writeJson(outputPath, contexts, dryRun) {
|
|
|
26921
26921
|
var init_dist = __esm({
|
|
26922
26922
|
"../notes/dist/index.js"() {
|
|
26923
26923
|
"use strict";
|
|
26924
|
-
|
|
26924
|
+
init_chunk_R6IWJNYC();
|
|
26925
26925
|
init_chunk_F7MUVHZ2();
|
|
26926
26926
|
init_chunk_7TJSPQPW();
|
|
26927
26927
|
}
|
|
@@ -28857,7 +28857,7 @@ var require_semver2 = __commonJS({
|
|
|
28857
28857
|
}
|
|
28858
28858
|
});
|
|
28859
28859
|
|
|
28860
|
-
// ../publish/dist/chunk-
|
|
28860
|
+
// ../publish/dist/chunk-ZTUEJDI7.js
|
|
28861
28861
|
import chalk3 from "chalk";
|
|
28862
28862
|
import * as fs23 from "fs";
|
|
28863
28863
|
import * as TOML2 from "smol-toml";
|
|
@@ -30394,8 +30394,8 @@ function createPublishCommand() {
|
|
|
30394
30394
|
});
|
|
30395
30395
|
}
|
|
30396
30396
|
var import_semver, LOG_LEVELS3, PREFIXES3, COLORS3, currentLevel3, quietMode3, ReleaseKitError3, EXIT_CODES3, ConfigError3, MAX_JSONC_LENGTH2, GitConfigSchema2, MonorepoConfigSchema2, BranchPatternSchema2, VersionCargoConfigSchema2, VersionConfigSchema2, NpmConfigSchema2, CargoPublishConfigSchema2, PublishGitConfigSchema2, GitHubReleaseConfigSchema2, VerifyRegistryConfigSchema2, VerifyConfigSchema2, PublishConfigSchema2, TemplateConfigSchema2, LocationModeSchema2, ChangelogConfigSchema2, LLMOptionsSchema2, LLMRetryConfigSchema2, LLMTasksConfigSchema2, LLMCategorySchema2, ScopeRulesSchema2, ScopeConfigSchema2, LLMPromptOverridesSchema2, LLMPromptsConfigSchema2, LLMConfigSchema2, ReleaseNotesConfigSchema2, NotesInputConfigSchema2, NotesConfigSchema2, CILabelsConfigSchema2, CIConfigSchema2, ReleaseCIConfigSchema2, ReleaseConfigSchema2, ReleaseKitConfigSchema2, MAX_INPUT_LENGTH2, SOLE_REFERENCE_PATTERN2, AUTH_DIR2, AUTH_FILE2, CONFIG_FILE2, BasePublishError, PublishError, PipelineError, PublishErrorCode, VersionChangelogEntrySchema, VersionPackageChangelogSchema, VersionPackageUpdateSchema, VersionOutputSchema;
|
|
30397
|
-
var
|
|
30398
|
-
"../publish/dist/chunk-
|
|
30397
|
+
var init_chunk_ZTUEJDI7 = __esm({
|
|
30398
|
+
"../publish/dist/chunk-ZTUEJDI7.js"() {
|
|
30399
30399
|
"use strict";
|
|
30400
30400
|
import_semver = __toESM(require_semver2(), 1);
|
|
30401
30401
|
LOG_LEVELS3 = {
|
|
@@ -30700,9 +30700,9 @@ var init_chunk_UARK5H2F = __esm({
|
|
|
30700
30700
|
stable: z3.string().default("release:stable"),
|
|
30701
30701
|
prerelease: z3.string().default("release:prerelease"),
|
|
30702
30702
|
skip: z3.string().default("release:skip"),
|
|
30703
|
-
major: z3.string().default("
|
|
30704
|
-
minor: z3.string().default("
|
|
30705
|
-
patch: z3.string().default("
|
|
30703
|
+
major: z3.string().default("bump:major"),
|
|
30704
|
+
minor: z3.string().default("bump:minor"),
|
|
30705
|
+
patch: z3.string().default("bump:patch")
|
|
30706
30706
|
});
|
|
30707
30707
|
CIConfigSchema2 = z3.object({
|
|
30708
30708
|
releaseStrategy: z3.enum(["manual", "direct", "standing-pr", "scheduled"]).default("direct"),
|
|
@@ -30721,9 +30721,9 @@ var init_chunk_UARK5H2F = __esm({
|
|
|
30721
30721
|
stable: "release:stable",
|
|
30722
30722
|
prerelease: "release:prerelease",
|
|
30723
30723
|
skip: "release:skip",
|
|
30724
|
-
major: "
|
|
30725
|
-
minor: "
|
|
30726
|
-
patch: "
|
|
30724
|
+
major: "bump:major",
|
|
30725
|
+
minor: "bump:minor",
|
|
30726
|
+
patch: "bump:patch"
|
|
30727
30727
|
}),
|
|
30728
30728
|
/**
|
|
30729
30729
|
* Map of scope labels to package patterns.
|
|
@@ -30868,7 +30868,7 @@ __export(dist_exports2, {
|
|
|
30868
30868
|
var init_dist2 = __esm({
|
|
30869
30869
|
"../publish/dist/index.js"() {
|
|
30870
30870
|
"use strict";
|
|
30871
|
-
|
|
30871
|
+
init_chunk_ZTUEJDI7();
|
|
30872
30872
|
}
|
|
30873
30873
|
});
|
|
30874
30874
|
|
|
@@ -43410,7 +43410,7 @@ var init_baseError_DQHIJACF = __esm({
|
|
|
43410
43410
|
}
|
|
43411
43411
|
});
|
|
43412
43412
|
|
|
43413
|
-
// ../version/dist/chunk-
|
|
43413
|
+
// ../version/dist/chunk-5UIOLBFW.js
|
|
43414
43414
|
import * as fs15 from "fs";
|
|
43415
43415
|
import * as path17 from "path";
|
|
43416
43416
|
import * as TOML3 from "smol-toml";
|
|
@@ -44050,6 +44050,10 @@ function bumpVersion(currentVersion, bumpType, prereleaseIdentifier) {
|
|
|
44050
44050
|
if (!parsed) {
|
|
44051
44051
|
return import_semver6.default.inc(currentVersion, bumpType) || "";
|
|
44052
44052
|
}
|
|
44053
|
+
if (prereleaseIdentifier) {
|
|
44054
|
+
log6(`Incrementing prerelease for ${currentVersion} using 'prerelease'`, "debug");
|
|
44055
|
+
return import_semver6.default.inc(currentVersion, "prerelease", prereleaseIdentifier) || "";
|
|
44056
|
+
}
|
|
44053
44057
|
if (bumpType === "major" && parsed.minor === 0 && parsed.patch === 0 || bumpType === "minor" && parsed.patch === 0 || bumpType === "patch") {
|
|
44054
44058
|
log6(`Cleaning prerelease identifier from ${currentVersion} for ${bumpType} bump`, "debug");
|
|
44055
44059
|
return `${parsed.major}.${parsed.minor}.${parsed.patch}`;
|
|
@@ -45013,7 +45017,7 @@ function createAsyncStrategy(config) {
|
|
|
45013
45017
|
let packagesToProcess = packages.packages;
|
|
45014
45018
|
if (targets.length > 0) {
|
|
45015
45019
|
const beforeCount = packagesToProcess.length;
|
|
45016
|
-
packagesToProcess = packagesToProcess.filter((pkg) =>
|
|
45020
|
+
packagesToProcess = packagesToProcess.filter((pkg) => shouldMatchPackageTargets(pkg.packageJson.name, targets));
|
|
45017
45021
|
log6(
|
|
45018
45022
|
`Runtime targets filter: ${beforeCount} \u2192 ${packagesToProcess.length} packages (${targets.join(", ")})`,
|
|
45019
45023
|
"info"
|
|
@@ -45199,8 +45203,8 @@ function createVersionCommand() {
|
|
|
45199
45203
|
});
|
|
45200
45204
|
}
|
|
45201
45205
|
var import_semver4, import_semver5, import_semver6, ConfigError4, MAX_JSONC_LENGTH3, GitConfigSchema3, MonorepoConfigSchema3, BranchPatternSchema3, VersionCargoConfigSchema3, VersionConfigSchema3, NpmConfigSchema3, CargoPublishConfigSchema3, PublishGitConfigSchema3, GitHubReleaseConfigSchema3, VerifyRegistryConfigSchema3, VerifyConfigSchema3, PublishConfigSchema3, TemplateConfigSchema3, LocationModeSchema3, ChangelogConfigSchema3, LLMOptionsSchema3, LLMRetryConfigSchema3, LLMTasksConfigSchema3, LLMCategorySchema3, ScopeRulesSchema3, ScopeConfigSchema3, LLMPromptOverridesSchema3, LLMPromptsConfigSchema3, LLMConfigSchema3, ReleaseNotesConfigSchema3, NotesInputConfigSchema3, NotesConfigSchema3, CILabelsConfigSchema3, CIConfigSchema3, ReleaseCIConfigSchema3, ReleaseConfigSchema3, ReleaseKitConfigSchema3, MAX_INPUT_LENGTH3, SOLE_REFERENCE_PATTERN3, AUTH_DIR3, AUTH_FILE3, CONFIG_FILE3, VersionError, VersionErrorCode, _jsonOutputMode, _pendingWrites, _jsonData, STANDARD_BUMP_TYPES, VersionMismatchError, CONVENTIONAL_COMMIT_REGEX, BREAKING_CHANGE_REGEX, PackageProcessor, GitError, VersionEngine;
|
|
45202
|
-
var
|
|
45203
|
-
"../version/dist/chunk-
|
|
45206
|
+
var init_chunk_5UIOLBFW = __esm({
|
|
45207
|
+
"../version/dist/chunk-5UIOLBFW.js"() {
|
|
45204
45208
|
"use strict";
|
|
45205
45209
|
init_chunk_Q3FHZORY();
|
|
45206
45210
|
init_chunk_LMPZV35Z();
|
|
@@ -45462,9 +45466,9 @@ var init_chunk_GHCENMVA = __esm({
|
|
|
45462
45466
|
stable: z4.string().default("release:stable"),
|
|
45463
45467
|
prerelease: z4.string().default("release:prerelease"),
|
|
45464
45468
|
skip: z4.string().default("release:skip"),
|
|
45465
|
-
major: z4.string().default("
|
|
45466
|
-
minor: z4.string().default("
|
|
45467
|
-
patch: z4.string().default("
|
|
45469
|
+
major: z4.string().default("bump:major"),
|
|
45470
|
+
minor: z4.string().default("bump:minor"),
|
|
45471
|
+
patch: z4.string().default("bump:patch")
|
|
45468
45472
|
});
|
|
45469
45473
|
CIConfigSchema3 = z4.object({
|
|
45470
45474
|
releaseStrategy: z4.enum(["manual", "direct", "standing-pr", "scheduled"]).default("direct"),
|
|
@@ -45483,9 +45487,9 @@ var init_chunk_GHCENMVA = __esm({
|
|
|
45483
45487
|
stable: "release:stable",
|
|
45484
45488
|
prerelease: "release:prerelease",
|
|
45485
45489
|
skip: "release:skip",
|
|
45486
|
-
major: "
|
|
45487
|
-
minor: "
|
|
45488
|
-
patch: "
|
|
45490
|
+
major: "bump:major",
|
|
45491
|
+
minor: "bump:minor",
|
|
45492
|
+
patch: "bump:patch"
|
|
45489
45493
|
}),
|
|
45490
45494
|
/**
|
|
45491
45495
|
* Map of scope labels to package patterns.
|
|
@@ -45952,7 +45956,7 @@ __export(dist_exports5, {
|
|
|
45952
45956
|
var init_dist15 = __esm({
|
|
45953
45957
|
"../version/dist/index.js"() {
|
|
45954
45958
|
"use strict";
|
|
45955
|
-
|
|
45959
|
+
init_chunk_5UIOLBFW();
|
|
45956
45960
|
init_chunk_Q3FHZORY();
|
|
45957
45961
|
init_chunk_LMPZV35Z();
|
|
45958
45962
|
}
|
|
@@ -46388,9 +46392,9 @@ var CILabelsConfigSchema4 = z5.object({
|
|
|
46388
46392
|
stable: z5.string().default("release:stable"),
|
|
46389
46393
|
prerelease: z5.string().default("release:prerelease"),
|
|
46390
46394
|
skip: z5.string().default("release:skip"),
|
|
46391
|
-
major: z5.string().default("
|
|
46392
|
-
minor: z5.string().default("
|
|
46393
|
-
patch: z5.string().default("
|
|
46395
|
+
major: z5.string().default("bump:major"),
|
|
46396
|
+
minor: z5.string().default("bump:minor"),
|
|
46397
|
+
patch: z5.string().default("bump:patch")
|
|
46394
46398
|
});
|
|
46395
46399
|
var CIConfigSchema4 = z5.object({
|
|
46396
46400
|
releaseStrategy: z5.enum(["manual", "direct", "standing-pr", "scheduled"]).default("direct"),
|
|
@@ -46409,9 +46413,9 @@ var CIConfigSchema4 = z5.object({
|
|
|
46409
46413
|
stable: "release:stable",
|
|
46410
46414
|
prerelease: "release:prerelease",
|
|
46411
46415
|
skip: "release:skip",
|
|
46412
|
-
major: "
|
|
46413
|
-
minor: "
|
|
46414
|
-
patch: "
|
|
46416
|
+
major: "bump:major",
|
|
46417
|
+
minor: "bump:minor",
|
|
46418
|
+
patch: "bump:patch"
|
|
46415
46419
|
}),
|
|
46416
46420
|
/**
|
|
46417
46421
|
* Map of scope labels to package patterns.
|
|
@@ -46531,9 +46535,9 @@ var DEFAULT_LABELS = {
|
|
|
46531
46535
|
stable: "release:stable",
|
|
46532
46536
|
prerelease: "release:prerelease",
|
|
46533
46537
|
skip: "release:skip",
|
|
46534
|
-
major: "
|
|
46535
|
-
minor: "
|
|
46536
|
-
patch: "
|
|
46538
|
+
major: "bump:major",
|
|
46539
|
+
minor: "bump:minor",
|
|
46540
|
+
patch: "bump:patch"
|
|
46537
46541
|
};
|
|
46538
46542
|
function detectLabelConflicts(prLabels, labels = DEFAULT_LABELS) {
|
|
46539
46543
|
const bumpLabelsPresent = [
|
|
@@ -46698,7 +46702,7 @@ function getLabelBanner(labelContext) {
|
|
|
46698
46702
|
if (labelContext.trigger === "label") {
|
|
46699
46703
|
if (labelContext.bumpConflict) {
|
|
46700
46704
|
const labels = labelContext.labels;
|
|
46701
|
-
const labelExamples = labels ? `\`${labels.patch}\`, \`${labels.minor}\`, or \`${labels.major}\`` : "a
|
|
46705
|
+
const labelExamples = labels ? `\`${labels.patch}\`, \`${labels.minor}\`, or \`${labels.major}\`` : "a bump label (e.g., `bump:patch`, `bump:minor`, `bump:major`)";
|
|
46702
46706
|
lines.push(
|
|
46703
46707
|
"> **Error:** Conflicting bump labels detected.",
|
|
46704
46708
|
`> **Note:** Please use only one release label at a time. Use ${labelExamples}.`,
|
|
@@ -46708,12 +46712,28 @@ function getLabelBanner(labelContext) {
|
|
|
46708
46712
|
}
|
|
46709
46713
|
if (labelContext.noBumpLabel) {
|
|
46710
46714
|
const labels = labelContext.labels;
|
|
46711
|
-
const labelExamples = labels ? `\`${labels.patch}\`, \`${labels.minor}\`, or \`${labels.major}\`` : "a
|
|
46712
|
-
lines.push("> No
|
|
46715
|
+
const labelExamples = labels ? `\`${labels.patch}\`, \`${labels.minor}\`, or \`${labels.major}\`` : "a bump label (e.g., `bump:patch`, `bump:minor`, `bump:major`)";
|
|
46716
|
+
lines.push("> No bump label detected.", `> **Note:** Add ${labelExamples} to trigger a release.`, "");
|
|
46713
46717
|
return lines;
|
|
46714
46718
|
}
|
|
46715
46719
|
if (labelContext.bumpLabel) {
|
|
46716
|
-
|
|
46720
|
+
const parts = [labelContext.bumpLabel];
|
|
46721
|
+
if (labelContext.prerelease) {
|
|
46722
|
+
parts.push("prerelease");
|
|
46723
|
+
}
|
|
46724
|
+
if (labelContext.stable) {
|
|
46725
|
+
parts.push("stable");
|
|
46726
|
+
}
|
|
46727
|
+
const labelText = parts.join(" ");
|
|
46728
|
+
lines.push(`> This PR is labeled for a **${labelText}** release.`, "");
|
|
46729
|
+
return lines;
|
|
46730
|
+
}
|
|
46731
|
+
if (labelContext.stable) {
|
|
46732
|
+
lines.push("> This PR is labeled for a **stable** release (graduation from prerelease).", "");
|
|
46733
|
+
return lines;
|
|
46734
|
+
}
|
|
46735
|
+
if (labelContext.prerelease) {
|
|
46736
|
+
lines.push("> This PR is labeled for a **prerelease** release (bump from conventional commits).", "");
|
|
46717
46737
|
return lines;
|
|
46718
46738
|
}
|
|
46719
46739
|
}
|
|
@@ -46919,16 +46939,22 @@ async function applyScopeLabelsFromPR(ciConfig, options) {
|
|
|
46919
46939
|
const allLabels = [];
|
|
46920
46940
|
const perPRLabels = /* @__PURE__ */ new Map();
|
|
46921
46941
|
for (const prNumber of prNumbers) {
|
|
46922
|
-
const
|
|
46923
|
-
allLabels.push(...
|
|
46924
|
-
perPRLabels.set(prNumber,
|
|
46942
|
+
const labels2 = await fetchPRLabels(octokit, githubContext.owner, githubContext.repo, prNumber);
|
|
46943
|
+
allLabels.push(...labels2);
|
|
46944
|
+
perPRLabels.set(prNumber, labels2);
|
|
46925
46945
|
}
|
|
46926
|
-
|
|
46927
|
-
|
|
46946
|
+
const labels = ciConfig?.labels ?? DEFAULT_LABELS;
|
|
46947
|
+
for (const [prNumber, prLabels] of perPRLabels) {
|
|
46948
|
+
const conflict = detectLabelConflicts(prLabels, labels);
|
|
46949
|
+
if ((ciConfig?.releaseTrigger ?? "label") === "commit" && prLabels.includes(labels.skip)) {
|
|
46950
|
+
info(`PR #${prNumber} has "${labels.skip}" label \u2014 skipping release`);
|
|
46951
|
+
return { target: options.target, scopeLabels: [], labels: [], skipped: true };
|
|
46952
|
+
}
|
|
46953
|
+
if (prLabels.includes(labels.skip)) {
|
|
46954
|
+
warn(`PR #${prNumber} has "${labels.skip}" label \u2014 this has no effect in label trigger mode`);
|
|
46955
|
+
}
|
|
46928
46956
|
if (conflict.prereleaseConflict) {
|
|
46929
|
-
warn(
|
|
46930
|
-
`PR #${prNumber} has conflicting labels "${ciConfig?.labels?.stable ?? "release:stable"}" and "${ciConfig?.labels?.prerelease ?? "release:prerelease"}" \u2014 release blocked`
|
|
46931
|
-
);
|
|
46957
|
+
warn(`PR #${prNumber} has conflicting labels "${labels.stable}" and "${labels.prerelease}" \u2014 release blocked`);
|
|
46932
46958
|
return { target: options.target, scopeLabels: [], labels: [], blocked: true };
|
|
46933
46959
|
}
|
|
46934
46960
|
if (conflict.bumpConflict && (ciConfig?.releaseTrigger ?? "label") === "label") {
|
|
@@ -46980,19 +47006,14 @@ async function runRelease(inputOptions) {
|
|
|
46980
47006
|
}
|
|
46981
47007
|
const releaseConfig = releaseKitConfig.release;
|
|
46982
47008
|
const ciConfig = loadCIConfig({ cwd: options.projectDir, configPath: options.config });
|
|
46983
|
-
if (!options.dryRun) {
|
|
47009
|
+
if (!options.dryRun || ciConfig?.scopeLabels) {
|
|
46984
47010
|
const scopeResult = await applyScopeLabelsFromPR(ciConfig, options);
|
|
46985
47011
|
if (scopeResult.blocked) {
|
|
46986
47012
|
info("Release blocked due to conflicting PR labels");
|
|
46987
47013
|
return null;
|
|
46988
47014
|
}
|
|
46989
|
-
if (scopeResult.
|
|
46990
|
-
|
|
46991
|
-
}
|
|
46992
|
-
} else if (ciConfig?.scopeLabels) {
|
|
46993
|
-
const scopeResult = await applyScopeLabelsFromPR(ciConfig, options);
|
|
46994
|
-
if (scopeResult.blocked) {
|
|
46995
|
-
info("Release blocked due to conflicting PR labels");
|
|
47015
|
+
if (scopeResult.skipped) {
|
|
47016
|
+
info("Release skipped due to release:skip label");
|
|
46996
47017
|
return null;
|
|
46997
47018
|
}
|
|
46998
47019
|
if (scopeResult.target !== options.target) {
|
|
@@ -47147,7 +47168,7 @@ async function runPreview(options) {
|
|
|
47147
47168
|
const { options: effectiveOptions, labelContext } = await applyLabelOverrides(options, ciConfig, context, octokit);
|
|
47148
47169
|
const strategy = ciConfig?.releaseStrategy ?? "direct";
|
|
47149
47170
|
let result = null;
|
|
47150
|
-
if (!labelContext.noBumpLabel) {
|
|
47171
|
+
if (!labelContext.skip && !labelContext.noBumpLabel) {
|
|
47151
47172
|
const releaseConfig = loadConfig5({ cwd: effectiveOptions.projectDir, configPath: effectiveOptions.config });
|
|
47152
47173
|
const prereleaseFlag = resolvePrerelease(
|
|
47153
47174
|
effectiveOptions,
|
|
@@ -47288,25 +47309,26 @@ async function applyLabelOverrides(options, ciConfig, context, existingOctokit)
|
|
|
47288
47309
|
labelContext.bumpLabel = "patch";
|
|
47289
47310
|
result.bump = "patch";
|
|
47290
47311
|
} else if (matchedScopePatterns.length === 0) {
|
|
47291
|
-
|
|
47292
|
-
if (!hasStableOrPrerelease) {
|
|
47312
|
+
if (!conflict.hasStable) {
|
|
47293
47313
|
labelContext.noBumpLabel = true;
|
|
47294
47314
|
}
|
|
47295
47315
|
}
|
|
47316
|
+
if (prLabels.includes(labels.skip)) {
|
|
47317
|
+
warn(
|
|
47318
|
+
`PR label "${labels.skip}" has no effect in label trigger mode \u2014 skipping is controlled by not adding bump labels`
|
|
47319
|
+
);
|
|
47320
|
+
}
|
|
47296
47321
|
}
|
|
47297
47322
|
if (!options.stable && options.prerelease === void 0) {
|
|
47298
47323
|
if (conflict.hasStable && conflict.hasPrerelease) {
|
|
47299
47324
|
} else if (conflict.hasStable) {
|
|
47300
47325
|
info(`PR label "${labels.stable}" detected \u2014 using stable release preview`);
|
|
47301
47326
|
result.stable = true;
|
|
47327
|
+
labelContext.stable = true;
|
|
47302
47328
|
} else if (conflict.hasPrerelease) {
|
|
47303
47329
|
info(`PR label "${labels.prerelease}" detected \u2014 using prerelease preview`);
|
|
47304
47330
|
result.prerelease = true;
|
|
47305
|
-
|
|
47306
|
-
info("No bump label found \u2014 defaulting to patch bump for prerelease release");
|
|
47307
|
-
result.bump = "patch";
|
|
47308
|
-
labelContext.bumpLabel = "patch";
|
|
47309
|
-
}
|
|
47331
|
+
labelContext.prerelease = true;
|
|
47310
47332
|
}
|
|
47311
47333
|
}
|
|
47312
47334
|
return { options: result, labelContext: { ...labelContext, labels } };
|
package/dist/index.js
CHANGED
|
@@ -14507,7 +14507,7 @@ var init_baseError_DQHIJACF = __esm({
|
|
|
14507
14507
|
}
|
|
14508
14508
|
});
|
|
14509
14509
|
|
|
14510
|
-
// ../version/dist/chunk-
|
|
14510
|
+
// ../version/dist/chunk-5UIOLBFW.js
|
|
14511
14511
|
import * as fs8 from "fs";
|
|
14512
14512
|
import * as path11 from "path";
|
|
14513
14513
|
import * as TOML2 from "smol-toml";
|
|
@@ -15147,6 +15147,10 @@ function bumpVersion(currentVersion, bumpType, prereleaseIdentifier) {
|
|
|
15147
15147
|
if (!parsed) {
|
|
15148
15148
|
return import_semver5.default.inc(currentVersion, bumpType) || "";
|
|
15149
15149
|
}
|
|
15150
|
+
if (prereleaseIdentifier) {
|
|
15151
|
+
log4(`Incrementing prerelease for ${currentVersion} using 'prerelease'`, "debug");
|
|
15152
|
+
return import_semver5.default.inc(currentVersion, "prerelease", prereleaseIdentifier) || "";
|
|
15153
|
+
}
|
|
15150
15154
|
if (bumpType === "major" && parsed.minor === 0 && parsed.patch === 0 || bumpType === "minor" && parsed.patch === 0 || bumpType === "patch") {
|
|
15151
15155
|
log4(`Cleaning prerelease identifier from ${currentVersion} for ${bumpType} bump`, "debug");
|
|
15152
15156
|
return `${parsed.major}.${parsed.minor}.${parsed.patch}`;
|
|
@@ -16110,7 +16114,7 @@ function createAsyncStrategy(config) {
|
|
|
16110
16114
|
let packagesToProcess = packages.packages;
|
|
16111
16115
|
if (targets.length > 0) {
|
|
16112
16116
|
const beforeCount = packagesToProcess.length;
|
|
16113
|
-
packagesToProcess = packagesToProcess.filter((pkg) =>
|
|
16117
|
+
packagesToProcess = packagesToProcess.filter((pkg) => shouldMatchPackageTargets(pkg.packageJson.name, targets));
|
|
16114
16118
|
log4(
|
|
16115
16119
|
`Runtime targets filter: ${beforeCount} \u2192 ${packagesToProcess.length} packages (${targets.join(", ")})`,
|
|
16116
16120
|
"info"
|
|
@@ -16296,8 +16300,8 @@ function createVersionCommand() {
|
|
|
16296
16300
|
});
|
|
16297
16301
|
}
|
|
16298
16302
|
var import_semver3, import_semver4, import_semver5, ConfigError2, MAX_JSONC_LENGTH2, GitConfigSchema2, MonorepoConfigSchema2, BranchPatternSchema2, VersionCargoConfigSchema2, VersionConfigSchema2, NpmConfigSchema2, CargoPublishConfigSchema2, PublishGitConfigSchema2, GitHubReleaseConfigSchema2, VerifyRegistryConfigSchema2, VerifyConfigSchema2, PublishConfigSchema2, TemplateConfigSchema2, LocationModeSchema2, ChangelogConfigSchema2, LLMOptionsSchema2, LLMRetryConfigSchema2, LLMTasksConfigSchema2, LLMCategorySchema2, ScopeRulesSchema2, ScopeConfigSchema2, LLMPromptOverridesSchema2, LLMPromptsConfigSchema2, LLMConfigSchema2, ReleaseNotesConfigSchema2, NotesInputConfigSchema2, NotesConfigSchema2, CILabelsConfigSchema2, CIConfigSchema2, ReleaseCIConfigSchema2, ReleaseConfigSchema2, ReleaseKitConfigSchema2, MAX_INPUT_LENGTH2, SOLE_REFERENCE_PATTERN2, AUTH_DIR2, AUTH_FILE2, CONFIG_FILE2, VersionError, VersionErrorCode, _jsonOutputMode, _pendingWrites, _jsonData, STANDARD_BUMP_TYPES, VersionMismatchError, CONVENTIONAL_COMMIT_REGEX, BREAKING_CHANGE_REGEX, PackageProcessor, GitError, VersionEngine;
|
|
16299
|
-
var
|
|
16300
|
-
"../version/dist/chunk-
|
|
16303
|
+
var init_chunk_5UIOLBFW = __esm({
|
|
16304
|
+
"../version/dist/chunk-5UIOLBFW.js"() {
|
|
16301
16305
|
"use strict";
|
|
16302
16306
|
init_chunk_Q3FHZORY();
|
|
16303
16307
|
init_chunk_LMPZV35Z();
|
|
@@ -16559,9 +16563,9 @@ var init_chunk_GHCENMVA = __esm({
|
|
|
16559
16563
|
stable: z3.string().default("release:stable"),
|
|
16560
16564
|
prerelease: z3.string().default("release:prerelease"),
|
|
16561
16565
|
skip: z3.string().default("release:skip"),
|
|
16562
|
-
major: z3.string().default("
|
|
16563
|
-
minor: z3.string().default("
|
|
16564
|
-
patch: z3.string().default("
|
|
16566
|
+
major: z3.string().default("bump:major"),
|
|
16567
|
+
minor: z3.string().default("bump:minor"),
|
|
16568
|
+
patch: z3.string().default("bump:patch")
|
|
16565
16569
|
});
|
|
16566
16570
|
CIConfigSchema2 = z3.object({
|
|
16567
16571
|
releaseStrategy: z3.enum(["manual", "direct", "standing-pr", "scheduled"]).default("direct"),
|
|
@@ -16580,9 +16584,9 @@ var init_chunk_GHCENMVA = __esm({
|
|
|
16580
16584
|
stable: "release:stable",
|
|
16581
16585
|
prerelease: "release:prerelease",
|
|
16582
16586
|
skip: "release:skip",
|
|
16583
|
-
major: "
|
|
16584
|
-
minor: "
|
|
16585
|
-
patch: "
|
|
16587
|
+
major: "bump:major",
|
|
16588
|
+
minor: "bump:minor",
|
|
16589
|
+
patch: "bump:patch"
|
|
16586
16590
|
}),
|
|
16587
16591
|
/**
|
|
16588
16592
|
* Map of scope labels to package patterns.
|
|
@@ -17049,7 +17053,7 @@ __export(dist_exports3, {
|
|
|
17049
17053
|
var init_dist13 = __esm({
|
|
17050
17054
|
"../version/dist/index.js"() {
|
|
17051
17055
|
"use strict";
|
|
17052
|
-
|
|
17056
|
+
init_chunk_5UIOLBFW();
|
|
17053
17057
|
init_chunk_Q3FHZORY();
|
|
17054
17058
|
init_chunk_LMPZV35Z();
|
|
17055
17059
|
}
|
|
@@ -41928,7 +41932,7 @@ var init_aggregator_IUQUAVJC = __esm({
|
|
|
41928
41932
|
}
|
|
41929
41933
|
});
|
|
41930
41934
|
|
|
41931
|
-
// ../notes/dist/chunk-
|
|
41935
|
+
// ../notes/dist/chunk-R6IWJNYC.js
|
|
41932
41936
|
import * as TOML3 from "smol-toml";
|
|
41933
41937
|
import * as fs33 from "fs";
|
|
41934
41938
|
import * as path33 from "path";
|
|
@@ -43260,8 +43264,8 @@ function handleError(err) {
|
|
|
43260
43264
|
process.exit(EXIT_CODES.GENERAL_ERROR);
|
|
43261
43265
|
}
|
|
43262
43266
|
var import_handlebars, ConfigError3, MAX_JSONC_LENGTH3, GitConfigSchema3, MonorepoConfigSchema3, BranchPatternSchema3, VersionCargoConfigSchema3, VersionConfigSchema3, NpmConfigSchema3, CargoPublishConfigSchema3, PublishGitConfigSchema3, GitHubReleaseConfigSchema3, VerifyRegistryConfigSchema3, VerifyConfigSchema3, PublishConfigSchema3, TemplateConfigSchema3, LocationModeSchema3, ChangelogConfigSchema3, LLMOptionsSchema3, LLMRetryConfigSchema3, LLMTasksConfigSchema3, LLMCategorySchema3, ScopeRulesSchema3, ScopeConfigSchema3, LLMPromptOverridesSchema3, LLMPromptsConfigSchema3, LLMConfigSchema3, ReleaseNotesConfigSchema3, NotesInputConfigSchema3, NotesConfigSchema3, CILabelsConfigSchema3, CIConfigSchema3, ReleaseCIConfigSchema3, ReleaseConfigSchema3, ReleaseKitConfigSchema3, MAX_INPUT_LENGTH3, SOLE_REFERENCE_PATTERN3, AUTH_DIR3, AUTH_FILE3, CONFIG_FILE3, NotesError, InputParseError, TemplateError, LLMError, GitHubError, ConfigError22, LLM_DEFAULTS, BaseLLMProvider, AnthropicProvider, OllamaProvider, OpenAIProvider, OpenAICompatibleProvider, DEFAULT_CATEGORIZE_PROMPT, DEFAULT_ENHANCE_PROMPT, DEFAULT_RELEASE_NOTES_PROMPT, DEFAULT_SUMMARIZE_PROMPT;
|
|
43263
|
-
var
|
|
43264
|
-
"../notes/dist/chunk-
|
|
43267
|
+
var init_chunk_R6IWJNYC = __esm({
|
|
43268
|
+
"../notes/dist/chunk-R6IWJNYC.js"() {
|
|
43265
43269
|
"use strict";
|
|
43266
43270
|
init_chunk_7TJSPQPW();
|
|
43267
43271
|
init_sdk();
|
|
@@ -43519,9 +43523,9 @@ var init_chunk_5B2RYLOK = __esm({
|
|
|
43519
43523
|
stable: z4.string().default("release:stable"),
|
|
43520
43524
|
prerelease: z4.string().default("release:prerelease"),
|
|
43521
43525
|
skip: z4.string().default("release:skip"),
|
|
43522
|
-
major: z4.string().default("
|
|
43523
|
-
minor: z4.string().default("
|
|
43524
|
-
patch: z4.string().default("
|
|
43526
|
+
major: z4.string().default("bump:major"),
|
|
43527
|
+
minor: z4.string().default("bump:minor"),
|
|
43528
|
+
patch: z4.string().default("bump:patch")
|
|
43525
43529
|
});
|
|
43526
43530
|
CIConfigSchema3 = z4.object({
|
|
43527
43531
|
releaseStrategy: z4.enum(["manual", "direct", "standing-pr", "scheduled"]).default("direct"),
|
|
@@ -43540,9 +43544,9 @@ var init_chunk_5B2RYLOK = __esm({
|
|
|
43540
43544
|
stable: "release:stable",
|
|
43541
43545
|
prerelease: "release:prerelease",
|
|
43542
43546
|
skip: "release:skip",
|
|
43543
|
-
major: "
|
|
43544
|
-
minor: "
|
|
43545
|
-
patch: "
|
|
43547
|
+
major: "bump:major",
|
|
43548
|
+
minor: "bump:minor",
|
|
43549
|
+
patch: "bump:patch"
|
|
43546
43550
|
}),
|
|
43547
43551
|
/**
|
|
43548
43552
|
* Map of scope labels to package patterns.
|
|
@@ -43936,13 +43940,13 @@ function writeJson(outputPath, contexts, dryRun) {
|
|
|
43936
43940
|
var init_dist14 = __esm({
|
|
43937
43941
|
"../notes/dist/index.js"() {
|
|
43938
43942
|
"use strict";
|
|
43939
|
-
|
|
43943
|
+
init_chunk_R6IWJNYC();
|
|
43940
43944
|
init_chunk_F7MUVHZ2();
|
|
43941
43945
|
init_chunk_7TJSPQPW();
|
|
43942
43946
|
}
|
|
43943
43947
|
});
|
|
43944
43948
|
|
|
43945
|
-
// ../publish/dist/chunk-
|
|
43949
|
+
// ../publish/dist/chunk-ZTUEJDI7.js
|
|
43946
43950
|
import chalk5 from "chalk";
|
|
43947
43951
|
import * as fs25 from "fs";
|
|
43948
43952
|
import * as TOML4 from "smol-toml";
|
|
@@ -45479,8 +45483,8 @@ function createPublishCommand() {
|
|
|
45479
45483
|
});
|
|
45480
45484
|
}
|
|
45481
45485
|
var import_semver6, LOG_LEVELS4, PREFIXES4, COLORS4, currentLevel4, quietMode4, ReleaseKitError4, EXIT_CODES2, ConfigError4, MAX_JSONC_LENGTH4, GitConfigSchema4, MonorepoConfigSchema4, BranchPatternSchema4, VersionCargoConfigSchema4, VersionConfigSchema4, NpmConfigSchema4, CargoPublishConfigSchema4, PublishGitConfigSchema4, GitHubReleaseConfigSchema4, VerifyRegistryConfigSchema4, VerifyConfigSchema4, PublishConfigSchema4, TemplateConfigSchema4, LocationModeSchema4, ChangelogConfigSchema4, LLMOptionsSchema4, LLMRetryConfigSchema4, LLMTasksConfigSchema4, LLMCategorySchema4, ScopeRulesSchema4, ScopeConfigSchema4, LLMPromptOverridesSchema4, LLMPromptsConfigSchema4, LLMConfigSchema4, ReleaseNotesConfigSchema4, NotesInputConfigSchema4, NotesConfigSchema4, CILabelsConfigSchema4, CIConfigSchema4, ReleaseCIConfigSchema4, ReleaseConfigSchema4, ReleaseKitConfigSchema4, MAX_INPUT_LENGTH4, SOLE_REFERENCE_PATTERN4, AUTH_DIR4, AUTH_FILE4, CONFIG_FILE4, BasePublishError, PublishError, PipelineError, PublishErrorCode, VersionChangelogEntrySchema, VersionPackageChangelogSchema, VersionPackageUpdateSchema, VersionOutputSchema;
|
|
45482
|
-
var
|
|
45483
|
-
"../publish/dist/chunk-
|
|
45486
|
+
var init_chunk_ZTUEJDI7 = __esm({
|
|
45487
|
+
"../publish/dist/chunk-ZTUEJDI7.js"() {
|
|
45484
45488
|
"use strict";
|
|
45485
45489
|
import_semver6 = __toESM(require_semver2(), 1);
|
|
45486
45490
|
LOG_LEVELS4 = {
|
|
@@ -45785,9 +45789,9 @@ var init_chunk_UARK5H2F = __esm({
|
|
|
45785
45789
|
stable: z5.string().default("release:stable"),
|
|
45786
45790
|
prerelease: z5.string().default("release:prerelease"),
|
|
45787
45791
|
skip: z5.string().default("release:skip"),
|
|
45788
|
-
major: z5.string().default("
|
|
45789
|
-
minor: z5.string().default("
|
|
45790
|
-
patch: z5.string().default("
|
|
45792
|
+
major: z5.string().default("bump:major"),
|
|
45793
|
+
minor: z5.string().default("bump:minor"),
|
|
45794
|
+
patch: z5.string().default("bump:patch")
|
|
45791
45795
|
});
|
|
45792
45796
|
CIConfigSchema4 = z5.object({
|
|
45793
45797
|
releaseStrategy: z5.enum(["manual", "direct", "standing-pr", "scheduled"]).default("direct"),
|
|
@@ -45806,9 +45810,9 @@ var init_chunk_UARK5H2F = __esm({
|
|
|
45806
45810
|
stable: "release:stable",
|
|
45807
45811
|
prerelease: "release:prerelease",
|
|
45808
45812
|
skip: "release:skip",
|
|
45809
|
-
major: "
|
|
45810
|
-
minor: "
|
|
45811
|
-
patch: "
|
|
45813
|
+
major: "bump:major",
|
|
45814
|
+
minor: "bump:minor",
|
|
45815
|
+
patch: "bump:patch"
|
|
45812
45816
|
}),
|
|
45813
45817
|
/**
|
|
45814
45818
|
* Map of scope labels to package patterns.
|
|
@@ -45953,7 +45957,7 @@ __export(dist_exports5, {
|
|
|
45953
45957
|
var init_dist15 = __esm({
|
|
45954
45958
|
"../publish/dist/index.js"() {
|
|
45955
45959
|
"use strict";
|
|
45956
|
-
|
|
45960
|
+
init_chunk_ZTUEJDI7();
|
|
45957
45961
|
}
|
|
45958
45962
|
});
|
|
45959
45963
|
|
|
@@ -46302,9 +46306,9 @@ var CILabelsConfigSchema = z.object({
|
|
|
46302
46306
|
stable: z.string().default("release:stable"),
|
|
46303
46307
|
prerelease: z.string().default("release:prerelease"),
|
|
46304
46308
|
skip: z.string().default("release:skip"),
|
|
46305
|
-
major: z.string().default("
|
|
46306
|
-
minor: z.string().default("
|
|
46307
|
-
patch: z.string().default("
|
|
46309
|
+
major: z.string().default("bump:major"),
|
|
46310
|
+
minor: z.string().default("bump:minor"),
|
|
46311
|
+
patch: z.string().default("bump:patch")
|
|
46308
46312
|
});
|
|
46309
46313
|
var CIConfigSchema = z.object({
|
|
46310
46314
|
releaseStrategy: z.enum(["manual", "direct", "standing-pr", "scheduled"]).default("direct"),
|
|
@@ -46323,9 +46327,9 @@ var CIConfigSchema = z.object({
|
|
|
46323
46327
|
stable: "release:stable",
|
|
46324
46328
|
prerelease: "release:prerelease",
|
|
46325
46329
|
skip: "release:skip",
|
|
46326
|
-
major: "
|
|
46327
|
-
minor: "
|
|
46328
|
-
patch: "
|
|
46330
|
+
major: "bump:major",
|
|
46331
|
+
minor: "bump:minor",
|
|
46332
|
+
patch: "bump:patch"
|
|
46329
46333
|
}),
|
|
46330
46334
|
/**
|
|
46331
46335
|
* Map of scope labels to package patterns.
|
|
@@ -46445,9 +46449,9 @@ var DEFAULT_LABELS = {
|
|
|
46445
46449
|
stable: "release:stable",
|
|
46446
46450
|
prerelease: "release:prerelease",
|
|
46447
46451
|
skip: "release:skip",
|
|
46448
|
-
major: "
|
|
46449
|
-
minor: "
|
|
46450
|
-
patch: "
|
|
46452
|
+
major: "bump:major",
|
|
46453
|
+
minor: "bump:minor",
|
|
46454
|
+
patch: "bump:patch"
|
|
46451
46455
|
};
|
|
46452
46456
|
function detectLabelConflicts(prLabels, labels = DEFAULT_LABELS) {
|
|
46453
46457
|
const bumpLabelsPresent = [
|
|
@@ -46612,7 +46616,7 @@ function getLabelBanner(labelContext) {
|
|
|
46612
46616
|
if (labelContext.trigger === "label") {
|
|
46613
46617
|
if (labelContext.bumpConflict) {
|
|
46614
46618
|
const labels = labelContext.labels;
|
|
46615
|
-
const labelExamples = labels ? `\`${labels.patch}\`, \`${labels.minor}\`, or \`${labels.major}\`` : "a
|
|
46619
|
+
const labelExamples = labels ? `\`${labels.patch}\`, \`${labels.minor}\`, or \`${labels.major}\`` : "a bump label (e.g., `bump:patch`, `bump:minor`, `bump:major`)";
|
|
46616
46620
|
lines.push(
|
|
46617
46621
|
"> **Error:** Conflicting bump labels detected.",
|
|
46618
46622
|
`> **Note:** Please use only one release label at a time. Use ${labelExamples}.`,
|
|
@@ -46622,12 +46626,28 @@ function getLabelBanner(labelContext) {
|
|
|
46622
46626
|
}
|
|
46623
46627
|
if (labelContext.noBumpLabel) {
|
|
46624
46628
|
const labels = labelContext.labels;
|
|
46625
|
-
const labelExamples = labels ? `\`${labels.patch}\`, \`${labels.minor}\`, or \`${labels.major}\`` : "a
|
|
46626
|
-
lines.push("> No
|
|
46629
|
+
const labelExamples = labels ? `\`${labels.patch}\`, \`${labels.minor}\`, or \`${labels.major}\`` : "a bump label (e.g., `bump:patch`, `bump:minor`, `bump:major`)";
|
|
46630
|
+
lines.push("> No bump label detected.", `> **Note:** Add ${labelExamples} to trigger a release.`, "");
|
|
46627
46631
|
return lines;
|
|
46628
46632
|
}
|
|
46629
46633
|
if (labelContext.bumpLabel) {
|
|
46630
|
-
|
|
46634
|
+
const parts = [labelContext.bumpLabel];
|
|
46635
|
+
if (labelContext.prerelease) {
|
|
46636
|
+
parts.push("prerelease");
|
|
46637
|
+
}
|
|
46638
|
+
if (labelContext.stable) {
|
|
46639
|
+
parts.push("stable");
|
|
46640
|
+
}
|
|
46641
|
+
const labelText = parts.join(" ");
|
|
46642
|
+
lines.push(`> This PR is labeled for a **${labelText}** release.`, "");
|
|
46643
|
+
return lines;
|
|
46644
|
+
}
|
|
46645
|
+
if (labelContext.stable) {
|
|
46646
|
+
lines.push("> This PR is labeled for a **stable** release (graduation from prerelease).", "");
|
|
46647
|
+
return lines;
|
|
46648
|
+
}
|
|
46649
|
+
if (labelContext.prerelease) {
|
|
46650
|
+
lines.push("> This PR is labeled for a **prerelease** release (bump from conventional commits).", "");
|
|
46631
46651
|
return lines;
|
|
46632
46652
|
}
|
|
46633
46653
|
}
|
|
@@ -46833,16 +46853,22 @@ async function applyScopeLabelsFromPR(ciConfig, options) {
|
|
|
46833
46853
|
const allLabels = [];
|
|
46834
46854
|
const perPRLabels = /* @__PURE__ */ new Map();
|
|
46835
46855
|
for (const prNumber of prNumbers) {
|
|
46836
|
-
const
|
|
46837
|
-
allLabels.push(...
|
|
46838
|
-
perPRLabels.set(prNumber,
|
|
46856
|
+
const labels2 = await fetchPRLabels(octokit, githubContext.owner, githubContext.repo, prNumber);
|
|
46857
|
+
allLabels.push(...labels2);
|
|
46858
|
+
perPRLabels.set(prNumber, labels2);
|
|
46839
46859
|
}
|
|
46840
|
-
|
|
46841
|
-
|
|
46860
|
+
const labels = ciConfig?.labels ?? DEFAULT_LABELS;
|
|
46861
|
+
for (const [prNumber, prLabels] of perPRLabels) {
|
|
46862
|
+
const conflict = detectLabelConflicts(prLabels, labels);
|
|
46863
|
+
if ((ciConfig?.releaseTrigger ?? "label") === "commit" && prLabels.includes(labels.skip)) {
|
|
46864
|
+
info(`PR #${prNumber} has "${labels.skip}" label \u2014 skipping release`);
|
|
46865
|
+
return { target: options.target, scopeLabels: [], labels: [], skipped: true };
|
|
46866
|
+
}
|
|
46867
|
+
if (prLabels.includes(labels.skip)) {
|
|
46868
|
+
warn(`PR #${prNumber} has "${labels.skip}" label \u2014 this has no effect in label trigger mode`);
|
|
46869
|
+
}
|
|
46842
46870
|
if (conflict.prereleaseConflict) {
|
|
46843
|
-
warn(
|
|
46844
|
-
`PR #${prNumber} has conflicting labels "${ciConfig?.labels?.stable ?? "release:stable"}" and "${ciConfig?.labels?.prerelease ?? "release:prerelease"}" \u2014 release blocked`
|
|
46845
|
-
);
|
|
46871
|
+
warn(`PR #${prNumber} has conflicting labels "${labels.stable}" and "${labels.prerelease}" \u2014 release blocked`);
|
|
46846
46872
|
return { target: options.target, scopeLabels: [], labels: [], blocked: true };
|
|
46847
46873
|
}
|
|
46848
46874
|
if (conflict.bumpConflict && (ciConfig?.releaseTrigger ?? "label") === "label") {
|
|
@@ -46894,19 +46920,14 @@ async function runRelease(inputOptions) {
|
|
|
46894
46920
|
}
|
|
46895
46921
|
const releaseConfig = releaseKitConfig.release;
|
|
46896
46922
|
const ciConfig = loadCIConfig({ cwd: options.projectDir, configPath: options.config });
|
|
46897
|
-
if (!options.dryRun) {
|
|
46923
|
+
if (!options.dryRun || ciConfig?.scopeLabels) {
|
|
46898
46924
|
const scopeResult = await applyScopeLabelsFromPR(ciConfig, options);
|
|
46899
46925
|
if (scopeResult.blocked) {
|
|
46900
46926
|
info("Release blocked due to conflicting PR labels");
|
|
46901
46927
|
return null;
|
|
46902
46928
|
}
|
|
46903
|
-
if (scopeResult.
|
|
46904
|
-
|
|
46905
|
-
}
|
|
46906
|
-
} else if (ciConfig?.scopeLabels) {
|
|
46907
|
-
const scopeResult = await applyScopeLabelsFromPR(ciConfig, options);
|
|
46908
|
-
if (scopeResult.blocked) {
|
|
46909
|
-
info("Release blocked due to conflicting PR labels");
|
|
46929
|
+
if (scopeResult.skipped) {
|
|
46930
|
+
info("Release skipped due to release:skip label");
|
|
46910
46931
|
return null;
|
|
46911
46932
|
}
|
|
46912
46933
|
if (scopeResult.target !== options.target) {
|
|
@@ -47061,7 +47082,7 @@ async function runPreview(options) {
|
|
|
47061
47082
|
const { options: effectiveOptions, labelContext } = await applyLabelOverrides(options, ciConfig, context, octokit);
|
|
47062
47083
|
const strategy = ciConfig?.releaseStrategy ?? "direct";
|
|
47063
47084
|
let result = null;
|
|
47064
|
-
if (!labelContext.noBumpLabel) {
|
|
47085
|
+
if (!labelContext.skip && !labelContext.noBumpLabel) {
|
|
47065
47086
|
const releaseConfig = loadConfig({ cwd: effectiveOptions.projectDir, configPath: effectiveOptions.config });
|
|
47066
47087
|
const prereleaseFlag = resolvePrerelease(
|
|
47067
47088
|
effectiveOptions,
|
|
@@ -47202,25 +47223,26 @@ async function applyLabelOverrides(options, ciConfig, context, existingOctokit)
|
|
|
47202
47223
|
labelContext.bumpLabel = "patch";
|
|
47203
47224
|
result.bump = "patch";
|
|
47204
47225
|
} else if (matchedScopePatterns.length === 0) {
|
|
47205
|
-
|
|
47206
|
-
if (!hasStableOrPrerelease) {
|
|
47226
|
+
if (!conflict.hasStable) {
|
|
47207
47227
|
labelContext.noBumpLabel = true;
|
|
47208
47228
|
}
|
|
47209
47229
|
}
|
|
47230
|
+
if (prLabels.includes(labels.skip)) {
|
|
47231
|
+
warn(
|
|
47232
|
+
`PR label "${labels.skip}" has no effect in label trigger mode \u2014 skipping is controlled by not adding bump labels`
|
|
47233
|
+
);
|
|
47234
|
+
}
|
|
47210
47235
|
}
|
|
47211
47236
|
if (!options.stable && options.prerelease === void 0) {
|
|
47212
47237
|
if (conflict.hasStable && conflict.hasPrerelease) {
|
|
47213
47238
|
} else if (conflict.hasStable) {
|
|
47214
47239
|
info(`PR label "${labels.stable}" detected \u2014 using stable release preview`);
|
|
47215
47240
|
result.stable = true;
|
|
47241
|
+
labelContext.stable = true;
|
|
47216
47242
|
} else if (conflict.hasPrerelease) {
|
|
47217
47243
|
info(`PR label "${labels.prerelease}" detected \u2014 using prerelease preview`);
|
|
47218
47244
|
result.prerelease = true;
|
|
47219
|
-
|
|
47220
|
-
info("No bump label found \u2014 defaulting to patch bump for prerelease release");
|
|
47221
|
-
result.bump = "patch";
|
|
47222
|
-
labelContext.bumpLabel = "patch";
|
|
47223
|
-
}
|
|
47245
|
+
labelContext.prerelease = true;
|
|
47224
47246
|
}
|
|
47225
47247
|
}
|
|
47226
47248
|
return { options: result, labelContext: { ...labelContext, labels } };
|
package/docs/ci-setup.md
CHANGED
|
@@ -60,12 +60,28 @@ Only release when a PR is merged with a release label. Conventional commits dete
|
|
|
60
60
|
|
|
61
61
|
| Label | Effect |
|
|
62
62
|
|-------|--------|
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
66
|
-
| `release:stable` |
|
|
67
|
-
| `release:prerelease` |
|
|
68
|
-
| `release:skip` | Suppress release on this PR |
|
|
63
|
+
| `bump:patch` | Bump patch version |
|
|
64
|
+
| `bump:minor` | Bump minor version |
|
|
65
|
+
| `bump:major` | Bump major version |
|
|
66
|
+
| `release:stable` | Promote a prerelease to stable (e.g. `1.0.0-next.6` → `1.0.0`). Can be used alone — no bump label needed. Has no effect on stable versions. |
|
|
67
|
+
| `release:prerelease` | Channel modifier — must be combined with a `bump:*` label. Alone, no release is triggered. |
|
|
68
|
+
| `release:skip` | Suppress release on this PR (commit trigger mode only) |
|
|
69
|
+
|
|
70
|
+
#### Label combinations
|
|
71
|
+
|
|
72
|
+
| Labels | Current version | Result |
|
|
73
|
+
|--------|-----------------|--------|
|
|
74
|
+
| `bump:patch` | `1.0.0` | `1.0.1` |
|
|
75
|
+
| `bump:minor` | `1.0.0` | `1.1.0` |
|
|
76
|
+
| `bump:major` | `1.0.0` | `2.0.0` |
|
|
77
|
+
| `release:prerelease` + `bump:patch` | `1.0.0` | `1.0.1-next.0` |
|
|
78
|
+
| `release:prerelease` + `bump:minor` | `1.0.0` | `1.1.0-next.0` |
|
|
79
|
+
| `release:prerelease` + `bump:major` | `1.0.0` | `2.0.0-next.0` |
|
|
80
|
+
| `release:prerelease` + `bump:patch` | `1.0.0-next.6` | `1.0.0-next.7` |
|
|
81
|
+
| `release:prerelease` alone | any | No release — add a `bump:*` label |
|
|
82
|
+
| `release:stable` alone | `1.0.0-next.6` | `1.0.0` |
|
|
83
|
+
| `release:stable` alone | `1.0.0` | No prerelease effect — bump (if any) from conventional commits |
|
|
84
|
+
| `release:stable` + any `bump:*` | `1.0.0-next.6` | `1.0.0` — bump label is ignored during stable promotion |
|
|
69
85
|
|
|
70
86
|
```yaml
|
|
71
87
|
# .github/workflows/release.yml
|
|
@@ -107,16 +123,16 @@ Configure the trigger in `releasekit.config.json`:
|
|
|
107
123
|
"ci": {
|
|
108
124
|
"releaseTrigger": "label",
|
|
109
125
|
"labels": {
|
|
110
|
-
"major": "
|
|
111
|
-
"minor": "
|
|
112
|
-
"patch": "
|
|
126
|
+
"major": "bump:major",
|
|
127
|
+
"minor": "bump:minor",
|
|
128
|
+
"patch": "bump:patch",
|
|
113
129
|
"skip": "release:skip"
|
|
114
130
|
}
|
|
115
131
|
}
|
|
116
132
|
}
|
|
117
133
|
```
|
|
118
134
|
|
|
119
|
-
Without a `
|
|
135
|
+
Without a `bump:patch/minor/major` label on the merged PR, no release is triggered. The `labels` block shown above reflects the defaults — omit it if your repository already uses those label names.
|
|
120
136
|
|
|
121
137
|
See [@releasekit/release — CI Configuration](../README.md#ci-configuration) for all `ci.*` options.
|
|
122
138
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@releasekit/release",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Unified release pipeline: version, changelog, and publish in a single command",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"conventional-changelog-conventionalcommits": "^9.3.0",
|
|
51
51
|
"smol-toml": "^1.6.1",
|
|
52
52
|
"zod": "^4.3.6",
|
|
53
|
-
"@releasekit/
|
|
54
|
-
"@releasekit/
|
|
55
|
-
"@releasekit/
|
|
53
|
+
"@releasekit/notes": "0.10.0",
|
|
54
|
+
"@releasekit/publish": "0.10.0",
|
|
55
|
+
"@releasekit/version": "0.10.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@biomejs/biome": "^2.4.10",
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
"tsup": "^8.5.1",
|
|
63
63
|
"typescript": "^5.9.3",
|
|
64
64
|
"vitest": "^4.1.2",
|
|
65
|
-
"@releasekit/
|
|
66
|
-
"@releasekit/
|
|
65
|
+
"@releasekit/config": "0.0.0",
|
|
66
|
+
"@releasekit/core": "0.0.0"
|
|
67
67
|
},
|
|
68
68
|
"engines": {
|
|
69
69
|
"node": ">=20"
|