@aklinker1/zero-changelog 0.1.2 → 0.1.4
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,18 +1,12 @@
|
|
|
1
1
|
import { createReadStream } from "node:fs";
|
|
2
|
-
import { styleText } from "node:util";
|
|
3
2
|
//#region src/create-github-release.ts
|
|
4
3
|
async function createGithubRelease(options) {
|
|
5
4
|
console.log("Creating GitHub release...");
|
|
5
|
+
const artifactStreams = await getArtifactStreams(options.artifacts ?? []);
|
|
6
6
|
if (options.dryRun) console.log(" -> Skipping, dry run");
|
|
7
|
-
else
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
if (options.dryRun) console.log(" -> Skipping, dry run");
|
|
11
|
-
else {
|
|
12
|
-
const artifactStreams = options.artifacts?.length ? await getArtifactStreams(options.artifacts) : void 0;
|
|
13
|
-
await createRelease(options);
|
|
14
|
-
if (artifactStreams) await uploadArtifacts(options, artifactStreams);
|
|
15
|
-
}
|
|
7
|
+
else {
|
|
8
|
+
await createRelease(options);
|
|
9
|
+
if (artifactStreams) await uploadArtifacts(options, artifactStreams);
|
|
16
10
|
}
|
|
17
11
|
}
|
|
18
12
|
async function getArtifactStreams(artifacts) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as getVersionRegexFor } from "./version-regex-qeo3bsOW.mjs";
|
|
2
|
-
import { styleText } from "node:util";
|
|
3
2
|
import { readFile } from "node:fs/promises";
|
|
4
3
|
import { join, relative } from "node:path";
|
|
4
|
+
import { styleText } from "node:util";
|
|
5
5
|
//#region src/get-current-version.ts
|
|
6
6
|
async function getCurrentVersion(path, versionFiles) {
|
|
7
7
|
console.log("Getting current version...");
|
|
@@ -23,7 +23,7 @@ function getReleaseNotes(conventionalCommits, since, tag, repo) {
|
|
|
23
23
|
const authors = conventionalCommits.flatMap((commit) => commit.authors);
|
|
24
24
|
if (authors.length) {
|
|
25
25
|
const emailNameMap = authors.reduce((acc, author) => {
|
|
26
|
-
acc[author.
|
|
26
|
+
acc[author.email] ??= author.name;
|
|
27
27
|
return acc;
|
|
28
28
|
}, {});
|
|
29
29
|
const emails = new Set(conventionalCommits.flatMap((commit) => commit.authors).map((author) => author.email));
|
package/dist/release.mjs
CHANGED
|
@@ -59,7 +59,7 @@ async function release(options) {
|
|
|
59
59
|
});
|
|
60
60
|
console.log("Commits:", commits.length);
|
|
61
61
|
const conventionalCommits = parseCommits(commits);
|
|
62
|
-
console.log("Conventional commits:", conventionalCommits.length
|
|
62
|
+
console.log("Conventional commits:", conventionalCommits.length);
|
|
63
63
|
const bump = (options.bump?.trim() || void 0) ?? detectVersionBump(conventionalCommits, throwOnNoChanges);
|
|
64
64
|
console.log("Bump:", bump);
|
|
65
65
|
const version = currentVersion.bump(bump);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as getVersionRegexFor } from "./version-regex-qeo3bsOW.mjs";
|
|
2
2
|
import { t as replaceRegexGroup } from "./utils-BLItnE1t.mjs";
|
|
3
|
-
import { styleText } from "node:util";
|
|
4
3
|
import { readFile, writeFile } from "node:fs/promises";
|
|
5
4
|
import { join, relative } from "node:path";
|
|
5
|
+
import { styleText } from "node:util";
|
|
6
6
|
//#region src/update-version-files.ts
|
|
7
7
|
async function updateVersionFiles(path, versionFiles, newVersion) {
|
|
8
8
|
console.log("Updating version...");
|