From 68729901bfb59eb3d839633c5e8399a12ba9dd50 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Wed, 21 Jun 2023 08:59:28 -0600 Subject: [PATCH 1/2] fix: change to use `stream.ToArray` According to issue #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. --- index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index f2e4b717..56624cb5 100644 --- a/index.js +++ b/index.js @@ -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))); } From 525e5577fbfb300fb3749e8bd82d381416332f96 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Wed, 21 Jun 2023 09:04:46 -0600 Subject: [PATCH 2/2] chore: remove debug statement --- index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/index.js b/index.js index 56624cb5..fe03aa03 100644 --- a/index.js +++ b/index.js @@ -88,9 +88,7 @@ export async function generateNotes(pluginConfig, context) { debug("issue: %o", changelogContext.issue); debug("commit: %o", changelogContext.commit); - const stream = intoStream.object(parsedCommits).pipe(writer(changelogContext, writerOpts)); - - debug("stream: %o", stream); + const stream = intoStream.object(parsedCommits).pipe(writer(changelogContext, writerOpts)); const changeLogContent = await stream.toArray();