From 49f6213a81da5ed4ed782f92afdf9177f2d9dc66 Mon Sep 17 00:00:00 2001 From: flakey5 <73616808+flakey5@users.noreply.github.com> Date: Sat, 31 May 2025 15:38:10 -0700 Subject: [PATCH] fix: allow for relative paths for changelog file Re https://github.com/nodejs/node/pull/57343#issuecomment-2917116402 Signed-off-by: flakey5 <73616808+flakey5@users.noreply.github.com> --- src/releases.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/releases.mjs b/src/releases.mjs index b80f1a15..bb795dae 100644 --- a/src/releases.mjs +++ b/src/releases.mjs @@ -35,11 +35,11 @@ const getChangelogFromFileSystem = async changelogUrl => * @param {string} changelogPath The given URL to the Node.js CHANGELOG.md file */ const createNodeReleases = changelogPath => { - const changelogUrl = new URL(changelogPath); + const changelogUrl = URL.parse(changelogPath); const changelogStrategy = - changelogUrl.protocol === 'file:' - ? getChangelogFromFileSystem(changelogUrl) + !changelogUrl || changelogUrl.protocol === 'file:' + ? getChangelogFromFileSystem(changelogUrl ?? changelogPath) : getChangelogFromNetwork(changelogUrl); /**