| 6 | } from "@changesets/types"; |
| 7 | |
| 8 | const getReleaseLine = async ( |
| 9 | changeset: NewChangesetWithCommit, |
| 10 | _type: VersionType |
| 11 | ) => { |
| 12 | const [firstLine, ...futureLines] = changeset.summary |
| 13 | .split("\n") |
| 14 | .map((l) => l.trimEnd()); |
| 15 | |
| 16 | let returnVal = `- ${ |
| 17 | changeset.commit ? `${changeset.commit.slice(0, 7)}: ` : "" |
| 18 | }${firstLine}`; |
| 19 | |
| 20 | if (futureLines.length > 0) { |
| 21 | returnVal += `\n${futureLines.map((l) => ` ${l}`).join("\n")}`; |
| 22 | } |
| 23 | |
| 24 | return returnVal; |
| 25 | }; |
| 26 | |
| 27 | const getDependencyReleaseLine = async ( |
| 28 | changesets: NewChangesetWithCommit[], |