@aklinker1/zero-changelog 0.1.3 → 0.1.5

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 throw Error("TODO");
8
- for (const artifact of options.artifacts ?? []) {
9
- console.log(`Uploading ${styleText("cyan", artifact)}...`);
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) {
@@ -29,7 +23,7 @@ async function createRelease(options) {
29
23
  tag_name: options.tag,
30
24
  name: options.name,
31
25
  body: options.body,
32
- make_latest: options.latest,
26
+ make_latest: String(options.latest),
33
27
  prerelease: options.prerelease
34
28
  })
35
29
  });
@@ -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...");
package/dist/release.mjs CHANGED
@@ -92,14 +92,20 @@ async function release(options) {
92
92
  cwd: path,
93
93
  cmd
94
94
  });
95
+ const commit = template(commitTemplate, {
96
+ version,
97
+ path,
98
+ dirname
99
+ });
95
100
  await run({
96
101
  dryRun,
97
102
  cwd: path,
98
- cmd: `git commit -am "${template(commitTemplate, {
99
- version,
100
- path,
101
- dirname
102
- })}"`
103
+ cmd: `git add CHANGELOG.md`
104
+ });
105
+ await run({
106
+ dryRun,
107
+ cwd: path,
108
+ cmd: `git commit -am "${commit}"`
103
109
  });
104
110
  await run({
105
111
  dryRun,
@@ -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...");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aklinker1/zero-changelog",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Zero-dependency, conventional commit release and changelog generator with monorepo support",
5
5
  "keywords": [
6
6
  "changelog",