diff --git a/.changeset/aggregate.mjs b/.changeset/aggregate.mjs index 2e1cbec5d..be064e7b6 100644 --- a/.changeset/aggregate.mjs +++ b/.changeset/aggregate.mjs @@ -2,52 +2,50 @@ import fs from "node:fs/promises"; import path from "node:path"; import { execSync } from "node:child_process"; -const THANKLESS_COMMITTERS = ["thdxr", "fwang", "jayair"]; +const THANKLESS_COMMITTERS = ["thdxr", "fwang", "jayair", "conico974"]; const { version } = JSON.parse( await fs.readFile("./packages/open-next/package.json"), ); -const changesets = JSON.parse(await fs.readFile(".changeset/config.json")); -const packages = changesets.fixed[0]; - const changes = new Set(); -for (const pkg of packages) { - const changelog = path.join( - "packages", - pkg.split("/").at(-1), - "CHANGELOG.md", - ); - const lines = (await fs.readFile(changelog)).toString().split("\n"); - let start = false; - for (let line of lines) { - if (!start) { - if (line === `## ${version}`) { - start = true; - continue; - } + +// We only need to look for changes in packages/open-next +const changelog = path.join( + "packages", + "open-next", + "CHANGELOG.md", +); +const lines = (await fs.readFile(changelog)).toString().split("\n"); +let start = false; +for (let line of lines) { + if (!start) { + if (line === `## ${version}`) { + start = true; + continue; } + } - if (start) { - if (line.startsWith("-") || line.startsWith("*")) { - if (line.includes("Updated dependencies")) continue; - if (line.includes("@serverless-stack/")) continue; - - for (const user of THANKLESS_COMMITTERS) { - line = line.replace( - `Thanks [@${user}](https://github.com/${user})! `, - "", - ); - } - changes.add(line); - continue; - } + if (start) { + if (line.startsWith("-") || line.startsWith("*")) { + if (line.includes("Updated dependencies")) continue; + if (line.includes("@serverless-stack/")) continue; - if (line.startsWith("## ")) break; + for (const user of THANKLESS_COMMITTERS) { + line = line.replace( + `Thanks [@${user}](https://github.com/${user})! `, + "", + ); + } + changes.add(line); + continue; } + + if (line.startsWith("## ")) break; } } + const notes = ["#### Changes", ...changes]; console.log(notes.join("\n")); console.log(`::set-output name=notes::${notes.join("%0A")}`); diff --git a/.changeset/config.json b/.changeset/config.json index e89ac5ef7..07d8fe620 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -1,6 +1,9 @@ { "$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", - "changelog": "@changesets/cli/changelog", + "changelog": [ + "@changesets/changelog-github", + { "repo": "opennextjs/opennextjs-aws" } + ], "commit": false, "fixed": [["@opennextjs/aws"]], "linked": [],