Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Karrys <luke@lukekarrys.com>2022-04-14 03:12:27 +0300
committerLuke Karrys <luke@lukekarrys.com>2022-04-14 03:12:27 +0300
commit6b5c7dfd206a933e8d5215ee77d77327d7c542eb (patch)
tree88cf2ba9ef4d8aeb028c2a25289296e1f8514203 /scripts
parent42dc0b03d60dc27602dab26a2f8cbfc17bf4ab40 (diff)
chore: fix reading latest release from changelog
Diffstat (limited to 'scripts')
-rw-r--r--scripts/changelog.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/changelog.js b/scripts/changelog.js
index 3db16d6ca..f91e28d5a 100644
--- a/scripts/changelog.js
+++ b/scripts/changelog.js
@@ -177,13 +177,13 @@ const findRelease = (args, version) => {
RELEASE.heading,
v ? escRegExp(v) : RELEASE.versionRe,
' ',
- escRegExp(RELEASE.date()).replace(/\d/g, '\\d'),
+ escRegExp(RELEASE.date(today())).replace(/\d/g, '\\d'),
'$',
].join('')
const releaseSrc = [
'(',
- titleSrc(RELEASE.version(version)),
+ titleSrc(version && RELEASE.version(version)),
'[\\s\\S]*?',
RELEASE.sep,
')',
@@ -366,11 +366,11 @@ const main = async (argv) => {
if (args.read) {
// this reads the release notes for that version
- let { release } = findRelease(args, args.endTag || args.startTag)
+ let { release } = findRelease(args, args.tag)
if (args.type === 'gh') {
// changelog was written in markdown so convert user links to gh release style
// XXX: this needs to be changed if the `generateRelease` format changes
- release = release.replace(/\(\[(@[a-z\d-]+)\]\(https:\/\/github.com\/[a-z\d-]+\)\)/g, '($1)')
+ release = release.replace(/\(\[(@[a-z\d-]+)\]\(https:\/\/github.com\/[a-z\d-]+\)\)/gi, '($1)')
}
return console.log(release)
}