Skip to content

Commit b0b348c

Browse files
authored
Fix release (#535)
* fix aggregate * added changelog github
1 parent be9afda commit b0b348c

File tree

2 files changed

+35
-34
lines changed

2 files changed

+35
-34
lines changed

.changeset/aggregate.mjs

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,50 @@ import fs from "node:fs/promises";
22
import path from "node:path";
33
import { execSync } from "node:child_process";
44

5-
const THANKLESS_COMMITTERS = ["thdxr", "fwang", "jayair"];
5+
const THANKLESS_COMMITTERS = ["thdxr", "fwang", "jayair", "conico974"];
66

77
const { version } = JSON.parse(
88
await fs.readFile("./packages/open-next/package.json"),
99
);
1010

11-
const changesets = JSON.parse(await fs.readFile(".changeset/config.json"));
12-
const packages = changesets.fixed[0];
13-
1411
const changes = new Set();
15-
for (const pkg of packages) {
16-
const changelog = path.join(
17-
"packages",
18-
pkg.split("/").at(-1),
19-
"CHANGELOG.md",
20-
);
21-
const lines = (await fs.readFile(changelog)).toString().split("\n");
22-
let start = false;
23-
for (let line of lines) {
24-
if (!start) {
25-
if (line === `## ${version}`) {
26-
start = true;
27-
continue;
28-
}
12+
13+
// We only need to look for changes in packages/open-next
14+
const changelog = path.join(
15+
"packages",
16+
"open-next",
17+
"CHANGELOG.md",
18+
);
19+
const lines = (await fs.readFile(changelog)).toString().split("\n");
20+
let start = false;
21+
for (let line of lines) {
22+
if (!start) {
23+
if (line === `## ${version}`) {
24+
start = true;
25+
continue;
2926
}
27+
}
3028

31-
if (start) {
32-
if (line.startsWith("-") || line.startsWith("*")) {
33-
if (line.includes("Updated dependencies")) continue;
34-
if (line.includes("@serverless-stack/")) continue;
35-
36-
for (const user of THANKLESS_COMMITTERS) {
37-
line = line.replace(
38-
`Thanks [@${user}](https://github.com/${user})! `,
39-
"",
40-
);
41-
}
42-
changes.add(line);
43-
continue;
44-
}
29+
if (start) {
30+
if (line.startsWith("-") || line.startsWith("*")) {
31+
if (line.includes("Updated dependencies")) continue;
32+
if (line.includes("@serverless-stack/")) continue;
4533

46-
if (line.startsWith("## ")) break;
34+
for (const user of THANKLESS_COMMITTERS) {
35+
line = line.replace(
36+
`Thanks [@${user}](https://github.com/${user})! `,
37+
"",
38+
);
39+
}
40+
changes.add(line);
41+
continue;
4742
}
43+
44+
if (line.startsWith("## ")) break;
4845
}
4946
}
5047

48+
5149
const notes = ["#### Changes", ...changes];
5250
console.log(notes.join("\n"));
5351
console.log(`::set-output name=notes::${notes.join("%0A")}`);

.changeset/config.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3-
"changelog": "@changesets/cli/changelog",
3+
"changelog": [
4+
"@changesets/changelog-github",
5+
{ "repo": "opennextjs/opennextjs-aws" }
6+
],
47
"commit": false,
58
"fixed": [["@opennextjs/aws"]],
69
"linked": [],

0 commit comments

Comments
 (0)