@releasekit/release 0.7.12 → 0.7.14

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.
@@ -1,14 +0,0 @@
1
- import {
2
- execAsync,
3
- execSync
4
- } from "./chunk-TC44YA6X.js";
5
- import {
6
- init_esm_shims
7
- } from "./chunk-NOZSTVTV.js";
8
-
9
- // ../version/dist/commandExecutor-E44ID5U4.js
10
- init_esm_shims();
11
- export {
12
- execAsync,
13
- execSync
14
- };
@@ -1,42 +0,0 @@
1
- import {
2
- BasePublishError,
3
- PipelineError,
4
- PublishError,
5
- PublishErrorCode,
6
- createPublishCommand,
7
- createPublishError,
8
- detectNpmAuth,
9
- detectPackageManager,
10
- extractPathDeps,
11
- getDefaultConfig2,
12
- getDistTag,
13
- hasCargoAuth,
14
- isPrerelease,
15
- loadConfig2,
16
- parseCargoToml,
17
- parseInput,
18
- runPipeline,
19
- updateCargoVersion
20
- } from "./chunk-YG3UFSB6.js";
21
- import "./chunk-QDGNHERK.js";
22
- import "./chunk-NOZSTVTV.js";
23
- export {
24
- BasePublishError,
25
- PipelineError,
26
- PublishError,
27
- PublishErrorCode,
28
- createPublishCommand,
29
- createPublishError,
30
- detectNpmAuth,
31
- detectPackageManager,
32
- extractPathDeps,
33
- getDefaultConfig2 as getDefaultConfig,
34
- getDistTag,
35
- hasCargoAuth,
36
- isPrerelease,
37
- loadConfig2 as loadConfig,
38
- parseCargoToml,
39
- parseInput,
40
- runPipeline,
41
- updateCargoVersion
42
- };
@@ -1,37 +0,0 @@
1
- import {
2
- PackageProcessor,
3
- VersionEngine,
4
- VersionErrorCode,
5
- calculateVersion,
6
- createAsyncStrategy,
7
- createSingleStrategy,
8
- createSyncStrategy,
9
- createVersionCommand,
10
- createVersionError,
11
- enableJsonOutput,
12
- flushPendingWrites,
13
- getJsonData,
14
- loadConfig2
15
- } from "./chunk-TJ2FXMEO.js";
16
- import "./chunk-QDGNHERK.js";
17
- import "./chunk-TC44YA6X.js";
18
- import {
19
- BaseVersionError
20
- } from "./chunk-3AKDKIIQ.js";
21
- import "./chunk-NOZSTVTV.js";
22
- export {
23
- BaseVersionError,
24
- PackageProcessor,
25
- VersionEngine,
26
- VersionErrorCode,
27
- calculateVersion,
28
- createAsyncStrategy,
29
- createSingleStrategy,
30
- createSyncStrategy,
31
- createVersionCommand,
32
- createVersionError,
33
- enableJsonOutput,
34
- flushPendingWrites,
35
- getJsonData,
36
- loadConfig2 as loadConfig
37
- };
@@ -1,59 +0,0 @@
1
- import {
2
- ConfigError2,
3
- GitHubError,
4
- InputParseError,
5
- LLMError,
6
- NotesError,
7
- TemplateError,
8
- createNotesCommand,
9
- createTemplateContext,
10
- getDefaultConfig,
11
- getExitCode,
12
- loadAuth,
13
- loadConfig2,
14
- parseVersionOutput,
15
- parseVersionOutputFile,
16
- parseVersionOutputStdin,
17
- processInput,
18
- renderJson,
19
- runPipeline,
20
- saveAuth,
21
- writeJson
22
- } from "./chunk-QUY54CTL.js";
23
- import {
24
- aggregateToRoot,
25
- detectMonorepo,
26
- formatVersion,
27
- renderMarkdown,
28
- writeMarkdown,
29
- writeMonorepoChangelogs
30
- } from "./chunk-275AVVZE.js";
31
- import "./chunk-NOZSTVTV.js";
32
- export {
33
- ConfigError2 as ConfigError,
34
- GitHubError,
35
- InputParseError,
36
- LLMError,
37
- NotesError,
38
- TemplateError,
39
- aggregateToRoot,
40
- createNotesCommand,
41
- createTemplateContext,
42
- detectMonorepo,
43
- formatVersion,
44
- getDefaultConfig,
45
- getExitCode,
46
- loadAuth,
47
- loadConfig2 as loadConfig,
48
- parseVersionOutput,
49
- parseVersionOutputFile,
50
- parseVersionOutputStdin,
51
- processInput,
52
- renderJson,
53
- renderMarkdown,
54
- runPipeline,
55
- saveAuth,
56
- writeJson,
57
- writeMarkdown,
58
- writeMonorepoChangelogs
59
- };
@@ -1,114 +0,0 @@
1
- import {
2
- init_esm_shims
3
- } from "./chunk-NOZSTVTV.js";
4
-
5
- // ../../node_modules/.pnpm/conventional-commits-filter@5.0.0/node_modules/conventional-commits-filter/dist/index.js
6
- init_esm_shims();
7
-
8
- // ../../node_modules/.pnpm/conventional-commits-filter@5.0.0/node_modules/conventional-commits-filter/dist/RevertedCommitsFilter.js
9
- init_esm_shims();
10
-
11
- // ../../node_modules/.pnpm/conventional-commits-filter@5.0.0/node_modules/conventional-commits-filter/dist/utils.js
12
- init_esm_shims();
13
- function isMatch(object, source) {
14
- let aValue;
15
- let bValue;
16
- for (const key in source) {
17
- aValue = object[key];
18
- bValue = source[key];
19
- if (typeof aValue === "string") {
20
- aValue = aValue.trim();
21
- }
22
- if (typeof bValue === "string") {
23
- bValue = bValue.trim();
24
- }
25
- if (aValue !== bValue) {
26
- return false;
27
- }
28
- }
29
- return true;
30
- }
31
- function findRevertCommit(commit, reverts) {
32
- if (!reverts.size) {
33
- return null;
34
- }
35
- const rawCommit = commit.raw || commit;
36
- for (const revertCommit of reverts) {
37
- if (revertCommit.revert && isMatch(rawCommit, revertCommit.revert)) {
38
- return revertCommit;
39
- }
40
- }
41
- return null;
42
- }
43
-
44
- // ../../node_modules/.pnpm/conventional-commits-filter@5.0.0/node_modules/conventional-commits-filter/dist/RevertedCommitsFilter.js
45
- var RevertedCommitsFilter = class {
46
- hold = /* @__PURE__ */ new Set();
47
- holdRevertsCount = 0;
48
- /**
49
- * Process commit to filter reverted commits
50
- * @param commit
51
- * @yields Commit
52
- */
53
- *process(commit) {
54
- const { hold } = this;
55
- const revertCommit = findRevertCommit(commit, hold);
56
- if (revertCommit) {
57
- hold.delete(revertCommit);
58
- this.holdRevertsCount--;
59
- return;
60
- }
61
- if (commit.revert) {
62
- hold.add(commit);
63
- this.holdRevertsCount++;
64
- return;
65
- }
66
- if (this.holdRevertsCount > 0) {
67
- hold.add(commit);
68
- } else {
69
- if (hold.size) {
70
- yield* hold;
71
- hold.clear();
72
- }
73
- yield commit;
74
- }
75
- }
76
- /**
77
- * Flush all held commits
78
- * @yields Held commits
79
- */
80
- *flush() {
81
- const { hold } = this;
82
- if (hold.size) {
83
- yield* hold;
84
- hold.clear();
85
- }
86
- }
87
- };
88
-
89
- // ../../node_modules/.pnpm/conventional-commits-filter@5.0.0/node_modules/conventional-commits-filter/dist/filters.js
90
- init_esm_shims();
91
- import { Transform } from "stream";
92
- async function* filterRevertedCommits(commits) {
93
- const filter = new RevertedCommitsFilter();
94
- for await (const commit of commits) {
95
- yield* filter.process(commit);
96
- }
97
- yield* filter.flush();
98
- }
99
- function* filterRevertedCommitsSync(commits) {
100
- const filter = new RevertedCommitsFilter();
101
- for (const commit of commits) {
102
- yield* filter.process(commit);
103
- }
104
- yield* filter.flush();
105
- }
106
- function filterRevertedCommitsStream() {
107
- return Transform.from(filterRevertedCommits);
108
- }
109
- export {
110
- RevertedCommitsFilter,
111
- filterRevertedCommits,
112
- filterRevertedCommitsStream,
113
- filterRevertedCommitsSync
114
- };
@@ -1,448 +0,0 @@
1
- import {
2
- init_esm_shims
3
- } from "./chunk-NOZSTVTV.js";
4
-
5
- // ../../node_modules/.pnpm/conventional-commits-parser@6.2.1/node_modules/conventional-commits-parser/dist/index.js
6
- init_esm_shims();
7
-
8
- // ../../node_modules/.pnpm/conventional-commits-parser@6.2.1/node_modules/conventional-commits-parser/dist/types.js
9
- init_esm_shims();
10
-
11
- // ../../node_modules/.pnpm/conventional-commits-parser@6.2.1/node_modules/conventional-commits-parser/dist/CommitParser.js
12
- init_esm_shims();
13
-
14
- // ../../node_modules/.pnpm/conventional-commits-parser@6.2.1/node_modules/conventional-commits-parser/dist/regex.js
15
- init_esm_shims();
16
- var nomatchRegex = /(?!.*)/;
17
- function join(parts, joiner) {
18
- return parts.map((val) => val.trim()).filter(Boolean).join(joiner);
19
- }
20
- function getNotesRegex(noteKeywords, notesPattern) {
21
- if (!noteKeywords) {
22
- return nomatchRegex;
23
- }
24
- const noteKeywordsSelection = join(noteKeywords, "|");
25
- if (!notesPattern) {
26
- return new RegExp(`^[\\s|*]*(${noteKeywordsSelection})[:\\s]+(.*)`, "i");
27
- }
28
- return notesPattern(noteKeywordsSelection);
29
- }
30
- function getReferencePartsRegex(issuePrefixes, issuePrefixesCaseSensitive) {
31
- if (!issuePrefixes) {
32
- return nomatchRegex;
33
- }
34
- const flags = issuePrefixesCaseSensitive ? "g" : "gi";
35
- return new RegExp(`(?:.*?)??\\s*([\\w-\\.\\/]*?)??(${join(issuePrefixes, "|")})([\\w-]+)(?=\\s|$|[,;)\\]])`, flags);
36
- }
37
- function getReferencesRegex(referenceActions) {
38
- if (!referenceActions) {
39
- return /()(.+)/gi;
40
- }
41
- const joinedKeywords = join(referenceActions, "|");
42
- return new RegExp(`(${joinedKeywords})(?:\\s+(.*?))(?=(?:${joinedKeywords})|$)`, "gi");
43
- }
44
- function getParserRegexes(options = {}) {
45
- const notes = getNotesRegex(options.noteKeywords, options.notesPattern);
46
- const referenceParts = getReferencePartsRegex(options.issuePrefixes, options.issuePrefixesCaseSensitive);
47
- const references = getReferencesRegex(options.referenceActions);
48
- return {
49
- notes,
50
- referenceParts,
51
- references,
52
- mentions: /@([\w-]+)/g,
53
- url: /\b(?:https?):\/\/(?:www\.)?([-a-zA-Z0-9@:%_+.~#?&//=])+\b/
54
- };
55
- }
56
-
57
- // ../../node_modules/.pnpm/conventional-commits-parser@6.2.1/node_modules/conventional-commits-parser/dist/utils.js
58
- init_esm_shims();
59
- var SCISSOR = "------------------------ >8 ------------------------";
60
- function trimNewLines(input) {
61
- const matches = input.match(/[^\r\n]/);
62
- if (typeof matches?.index !== "number") {
63
- return "";
64
- }
65
- const firstIndex = matches.index;
66
- let lastIndex = input.length - 1;
67
- while (input[lastIndex] === "\r" || input[lastIndex] === "\n") {
68
- lastIndex--;
69
- }
70
- return input.substring(firstIndex, lastIndex + 1);
71
- }
72
- function appendLine(src, line) {
73
- return src ? `${src}
74
- ${line || ""}` : line || "";
75
- }
76
- function getCommentFilter(char) {
77
- return char ? (line) => !line.startsWith(char) : () => true;
78
- }
79
- function truncateToScissor(lines, commentChar) {
80
- const scissorIndex = lines.indexOf(`${commentChar} ${SCISSOR}`);
81
- if (scissorIndex === -1) {
82
- return lines;
83
- }
84
- return lines.slice(0, scissorIndex);
85
- }
86
- function gpgFilter(line) {
87
- return !line.match(/^\s*gpg:/);
88
- }
89
- function assignMatchedCorrespondence(target, matches, correspondence) {
90
- const { groups } = matches;
91
- for (let i = 0, len = correspondence.length, key; i < len; i++) {
92
- key = correspondence[i];
93
- target[key] = (groups ? groups[key] : matches[i + 1]) || null;
94
- }
95
- return target;
96
- }
97
-
98
- // ../../node_modules/.pnpm/conventional-commits-parser@6.2.1/node_modules/conventional-commits-parser/dist/options.js
99
- init_esm_shims();
100
- var defaultOptions = {
101
- noteKeywords: ["BREAKING CHANGE", "BREAKING-CHANGE"],
102
- issuePrefixes: ["#"],
103
- referenceActions: [
104
- "close",
105
- "closes",
106
- "closed",
107
- "fix",
108
- "fixes",
109
- "fixed",
110
- "resolve",
111
- "resolves",
112
- "resolved"
113
- ],
114
- headerPattern: /^(\w*)(?:\(([\w$@.\-*/ ]*)\))?: (.*)$/,
115
- headerCorrespondence: [
116
- "type",
117
- "scope",
118
- "subject"
119
- ],
120
- revertPattern: /^Revert\s"([\s\S]*)"\s*This reverts commit (\w*)\./,
121
- revertCorrespondence: ["header", "hash"],
122
- fieldPattern: /^-(.*?)-$/
123
- };
124
-
125
- // ../../node_modules/.pnpm/conventional-commits-parser@6.2.1/node_modules/conventional-commits-parser/dist/CommitParser.js
126
- function createCommitObject(initialData = {}) {
127
- return {
128
- merge: null,
129
- revert: null,
130
- header: null,
131
- body: null,
132
- footer: null,
133
- notes: [],
134
- mentions: [],
135
- references: [],
136
- ...initialData
137
- };
138
- }
139
- var CommitParser = class {
140
- options;
141
- regexes;
142
- lines = [];
143
- lineIndex = 0;
144
- commit = createCommitObject();
145
- constructor(options = {}) {
146
- this.options = {
147
- ...defaultOptions,
148
- ...options
149
- };
150
- this.regexes = getParserRegexes(this.options);
151
- }
152
- currentLine() {
153
- return this.lines[this.lineIndex];
154
- }
155
- nextLine() {
156
- return this.lines[this.lineIndex++];
157
- }
158
- isLineAvailable() {
159
- return this.lineIndex < this.lines.length;
160
- }
161
- parseReference(input, action) {
162
- const { regexes } = this;
163
- if (regexes.url.test(input)) {
164
- return null;
165
- }
166
- const matches = regexes.referenceParts.exec(input);
167
- if (!matches) {
168
- return null;
169
- }
170
- let [raw, repository = null, prefix, issue] = matches;
171
- let owner = null;
172
- if (repository) {
173
- const slashIndex = repository.indexOf("/");
174
- if (slashIndex !== -1) {
175
- owner = repository.slice(0, slashIndex);
176
- repository = repository.slice(slashIndex + 1);
177
- }
178
- }
179
- return {
180
- raw,
181
- action,
182
- owner,
183
- repository,
184
- prefix,
185
- issue
186
- };
187
- }
188
- parseReferences(input) {
189
- const { regexes } = this;
190
- const regex = input.match(regexes.references) ? regexes.references : /()(.+)/gi;
191
- const references = [];
192
- let matches;
193
- let action;
194
- let sentence;
195
- let reference;
196
- while (true) {
197
- matches = regex.exec(input);
198
- if (!matches) {
199
- break;
200
- }
201
- action = matches[1] || null;
202
- sentence = matches[2] || "";
203
- while (true) {
204
- reference = this.parseReference(sentence, action);
205
- if (!reference) {
206
- break;
207
- }
208
- references.push(reference);
209
- }
210
- }
211
- return references;
212
- }
213
- skipEmptyLines() {
214
- let line = this.currentLine();
215
- while (line !== void 0 && !line.trim()) {
216
- this.nextLine();
217
- line = this.currentLine();
218
- }
219
- }
220
- parseMerge() {
221
- const { commit, options } = this;
222
- const correspondence = options.mergeCorrespondence || [];
223
- const merge = this.currentLine();
224
- const matches = merge && options.mergePattern ? merge.match(options.mergePattern) : null;
225
- if (matches) {
226
- this.nextLine();
227
- commit.merge = matches[0] || null;
228
- assignMatchedCorrespondence(commit, matches, correspondence);
229
- return true;
230
- }
231
- return false;
232
- }
233
- parseHeader(isMergeCommit) {
234
- if (isMergeCommit) {
235
- this.skipEmptyLines();
236
- }
237
- const { commit, options } = this;
238
- const correspondence = options.headerCorrespondence || [];
239
- const header = commit.header ?? this.nextLine();
240
- let matches = null;
241
- if (header) {
242
- if (options.breakingHeaderPattern) {
243
- matches = header.match(options.breakingHeaderPattern);
244
- }
245
- if (!matches && options.headerPattern) {
246
- matches = header.match(options.headerPattern);
247
- }
248
- }
249
- if (header) {
250
- commit.header = header;
251
- }
252
- if (matches) {
253
- assignMatchedCorrespondence(commit, matches, correspondence);
254
- }
255
- }
256
- parseMeta() {
257
- const { options, commit } = this;
258
- if (!options.fieldPattern || !this.isLineAvailable()) {
259
- return false;
260
- }
261
- let matches;
262
- let field = null;
263
- let parsed = false;
264
- while (this.isLineAvailable()) {
265
- matches = this.currentLine().match(options.fieldPattern);
266
- if (matches) {
267
- field = matches[1] || null;
268
- this.nextLine();
269
- continue;
270
- }
271
- if (field) {
272
- parsed = true;
273
- commit[field] = appendLine(commit[field], this.currentLine());
274
- this.nextLine();
275
- } else {
276
- break;
277
- }
278
- }
279
- return parsed;
280
- }
281
- parseNotes() {
282
- const { regexes, commit } = this;
283
- if (!this.isLineAvailable()) {
284
- return false;
285
- }
286
- const matches = this.currentLine().match(regexes.notes);
287
- let references = [];
288
- if (matches) {
289
- const note = {
290
- title: matches[1],
291
- text: matches[2]
292
- };
293
- commit.notes.push(note);
294
- commit.footer = appendLine(commit.footer, this.currentLine());
295
- this.nextLine();
296
- while (this.isLineAvailable()) {
297
- if (this.parseMeta()) {
298
- return true;
299
- }
300
- if (this.parseNotes()) {
301
- return true;
302
- }
303
- references = this.parseReferences(this.currentLine());
304
- if (references.length) {
305
- commit.references.push(...references);
306
- } else {
307
- note.text = appendLine(note.text, this.currentLine());
308
- }
309
- commit.footer = appendLine(commit.footer, this.currentLine());
310
- this.nextLine();
311
- if (references.length) {
312
- break;
313
- }
314
- }
315
- return true;
316
- }
317
- return false;
318
- }
319
- parseBodyAndFooter(isBody) {
320
- const { commit } = this;
321
- if (!this.isLineAvailable()) {
322
- return isBody;
323
- }
324
- const references = this.parseReferences(this.currentLine());
325
- const isStillBody = !references.length && isBody;
326
- if (isStillBody) {
327
- commit.body = appendLine(commit.body, this.currentLine());
328
- } else {
329
- commit.references.push(...references);
330
- commit.footer = appendLine(commit.footer, this.currentLine());
331
- }
332
- this.nextLine();
333
- return isStillBody;
334
- }
335
- parseBreakingHeader() {
336
- const { commit, options } = this;
337
- if (!options.breakingHeaderPattern || commit.notes.length || !commit.header) {
338
- return;
339
- }
340
- const matches = commit.header.match(options.breakingHeaderPattern);
341
- if (matches) {
342
- commit.notes.push({
343
- title: "BREAKING CHANGE",
344
- text: matches[3]
345
- });
346
- }
347
- }
348
- parseMentions(input) {
349
- const { commit, regexes } = this;
350
- let matches;
351
- for (; ; ) {
352
- matches = regexes.mentions.exec(input);
353
- if (!matches) {
354
- break;
355
- }
356
- commit.mentions.push(matches[1]);
357
- }
358
- }
359
- parseRevert(input) {
360
- const { commit, options } = this;
361
- const correspondence = options.revertCorrespondence || [];
362
- const matches = options.revertPattern ? input.match(options.revertPattern) : null;
363
- if (matches) {
364
- commit.revert = assignMatchedCorrespondence({}, matches, correspondence);
365
- }
366
- }
367
- cleanupCommit() {
368
- const { commit } = this;
369
- if (commit.body) {
370
- commit.body = trimNewLines(commit.body);
371
- }
372
- if (commit.footer) {
373
- commit.footer = trimNewLines(commit.footer);
374
- }
375
- commit.notes.forEach((note) => {
376
- note.text = trimNewLines(note.text);
377
- });
378
- }
379
- /**
380
- * Parse commit message string into an object.
381
- * @param input - Commit message string.
382
- * @returns Commit object.
383
- */
384
- parse(input) {
385
- if (!input.trim()) {
386
- throw new TypeError("Expected a raw commit");
387
- }
388
- const { commentChar } = this.options;
389
- const commentFilter = getCommentFilter(commentChar);
390
- const rawLines = trimNewLines(input).split(/\r?\n/);
391
- const lines = commentChar ? truncateToScissor(rawLines, commentChar).filter((line) => commentFilter(line) && gpgFilter(line)) : rawLines.filter((line) => gpgFilter(line));
392
- const commit = createCommitObject();
393
- this.lines = lines;
394
- this.lineIndex = 0;
395
- this.commit = commit;
396
- const isMergeCommit = this.parseMerge();
397
- this.parseHeader(isMergeCommit);
398
- if (commit.header) {
399
- commit.references = this.parseReferences(commit.header);
400
- }
401
- let isBody = true;
402
- while (this.isLineAvailable()) {
403
- this.parseMeta();
404
- if (this.parseNotes()) {
405
- isBody = false;
406
- }
407
- if (!this.parseBodyAndFooter(isBody)) {
408
- isBody = false;
409
- }
410
- }
411
- this.parseBreakingHeader();
412
- this.parseMentions(input);
413
- this.parseRevert(input);
414
- this.cleanupCommit();
415
- return commit;
416
- }
417
- };
418
-
419
- // ../../node_modules/.pnpm/conventional-commits-parser@6.2.1/node_modules/conventional-commits-parser/dist/stream.js
420
- init_esm_shims();
421
- import { Transform } from "stream";
422
- function parseCommits(options = {}) {
423
- const warnOption = options.warn;
424
- const warn = warnOption === true ? (err) => {
425
- throw err;
426
- } : warnOption ? (err) => warnOption(err.toString()) : () => {
427
- };
428
- return async function* parse(rawCommits) {
429
- const parser = new CommitParser(options);
430
- let rawCommit;
431
- for await (rawCommit of rawCommits) {
432
- try {
433
- yield parser.parse(rawCommit.toString());
434
- } catch (err) {
435
- warn(err);
436
- }
437
- }
438
- };
439
- }
440
- function parseCommitsStream(options = {}) {
441
- return Transform.from(parseCommits(options));
442
- }
443
- export {
444
- CommitParser,
445
- createCommitObject,
446
- parseCommits,
447
- parseCommitsStream
448
- };