Skip to content

Commit

Permalink
fix: change to use stream.ToArray
Browse files Browse the repository at this point in the history
According to issue semantic-release#50 in the `sindresorhus/get-stream` array,
there are issues with using get-stream when using node versions
>= 18.14.0 and >=19.5.0. The method now used is taken directly
from the `get-stream` readme, and makes sense in this relatively
simple scenario.
  • Loading branch information
andrew-welker committed Jun 21, 2023
1 parent 86bd8e5 commit 6872990
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,13 @@ export async function generateNotes(pluginConfig, context) {
debug("issue: %o", changelogContext.issue);
debug("commit: %o", changelogContext.commit);

return getStream(intoStream.object(parsedCommits).pipe(writer(changelogContext, writerOpts)));
const stream = intoStream.object(parsedCommits).pipe(writer(changelogContext, writerOpts));

debug("stream: %o", stream);

const changeLogContent = await stream.toArray();

return changeLogContent.join('');

// return getStream(intoStream.object(parsedCommits).pipe(writer(changelogContext, writerOpts)));
}

0 comments on commit 6872990

Please sign in to comment.