diff options
author | Kat Marchán <kzm@zkat.tech> | 2018-08-29 12:03:09 -0700 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-09-02 12:51:59 +0200 |
commit | 78f5685acc8fa574c32ed60d07de6273c60639b9 (patch) | |
tree | c3381e90e1c734763d98f079aad5d5f45438ca6d /deps/npm/scripts | |
parent | 1287e524eeba4632decce231da161426efb8fc34 (diff) | |
download | android-node-v8-78f5685acc8fa574c32ed60d07de6273c60639b9.tar.gz android-node-v8-78f5685acc8fa574c32ed60d07de6273c60639b9.tar.bz2 android-node-v8-78f5685acc8fa574c32ed60d07de6273c60639b9.zip |
deps: upgrade npm to 6.4.1
PR-URL: https://github.com/nodejs/node/pull/22591
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'deps/npm/scripts')
-rw-r--r-- | deps/npm/scripts/changelog.js | 18 | ||||
-rwxr-xr-x | deps/npm/scripts/install.sh | 2 |
2 files changed, 11 insertions, 9 deletions
diff --git a/deps/npm/scripts/changelog.js b/deps/npm/scripts/changelog.js index ff6e43e385..c770b4ac40 100644 --- a/deps/npm/scripts/changelog.js +++ b/deps/npm/scripts/changelog.js @@ -18,11 +18,12 @@ const log = execSync(`git log --reverse --pretty='format:%h %H%d %s (%aN)%n%b%n- main() function shortname (url) { - let matched = url.match(/https:\/\/github.com\/([^/]+\/[^/]+)\/(?:pull|issues)\/(\d+)/) + let matched = url.match(/https:\/\/github\.com\/([^/]+\/[^/]+)\/(?:pull|issues)\/(\d+)/) || + url.match(/https:\/\/(npm\.community)\/t\/(?:[^/]+\/)(\d+)/) if (!matched) return false let repo = matched[1] let id = matched[2] - if (repo !== 'npm/npm') { + if (repo !== 'npm/cli') { return `${repo}#${id}` } else { return `#${id}` @@ -30,13 +31,13 @@ function shortname (url) { } function printCommit (c) { - console.log(`* [\`${c.shortid}\`](https://github.com/npm/npm/commit/${c.fullid})`) + console.log(`* [\`${c.shortid}\`](https://github.com/npm/cli/commit/${c.fullid})`) if (c.fixes) { let label = shortname(c.fixes) if (label) { console.log(` [${label}](${c.fixes})`) } else { - console.log(` [#${c.fixes}](https://github.com/npm/npm/issues/${c.fixes})`) + console.log(` [npm.community#${c.fixes}](https://npm.community/t/${c.fixes})`) } } else if (c.prurl) { let label = shortname(c.prurl) @@ -55,8 +56,8 @@ function printCommit (c) { .replace(/^(\s*[^@\s]+@\d+[.]\d+[.]\d+)(\s*\S)/g, '$1:$2') .replace(/\b([^@\s]+@\d+[.]\d+[.]\d+)\b/g, '`$1`') // linkify commitids - .replace(/\b([a-f0-9]{7,8})\b/g, '[`$1`](https://github.com/npm/npm/commit/$1)') - .replace(/\b#(\d+)\b/g, '[#$1](https://github.com/npm/npm/issues/$1)') + .replace(/\b([a-f0-9]{7,8})\b/g, '[`$1`](https://github.com/npm/cli/commit/$1)') + .replace(/\b#(\d+)\b/g, '[#$1](https://npm.community/t/$1)') console.log(msg) if (c.credit) { c.credit.forEach(function (credit) { @@ -70,11 +71,12 @@ function printCommit (c) { function main () { let commit log.forEach(function (line) { + line = line.replace(/\r/g, '') let m /* eslint no-cond-assign:0 */ if (/^---$/.test(line)) { printCommit(commit) - } else if (m = line.match(/^([a-f0-9]{7,9}) ([a-f0-9]+) (?:[(]([^)]+)[)] )?(.*?) [(](.*?)[)]/)) { + } else if (m = line.match(/^([a-f0-9]{7,10}) ([a-f0-9]+) (?:[(]([^)]+)[)] )?(.*?) [(](.*?)[)]/)) { commit = { shortid: m[1], fullid: m[2], @@ -90,7 +92,7 @@ function main () { } else if (m = line.match(/^Credit: @(.*)/)) { if (!commit.credit) commit.credit = [] commit.credit.push(m[1]) - } else if (m = line.match(/^Fixes: #?(.*?)/)) { + } else if (m = line.match(/^Fixes: #?(.*)/)) { commit.fixes = m[1] } else if (m = line.match(/^Reviewed-By: @(.*)/)) { commit.reviewed = m[1] diff --git a/deps/npm/scripts/install.sh b/deps/npm/scripts/install.sh index 041c74e0fe..e352e55caf 100755 --- a/deps/npm/scripts/install.sh +++ b/deps/npm/scripts/install.sh @@ -8,7 +8,7 @@ # shell living at /bin/sh. # # See this helpful document on writing portable shell scripts: -# http://www.gnu.org/s/hello/manual/autoconf/Portable-Shell.html +# https://www.gnu.org/s/hello/manual/autoconf/Portable-Shell.html # # The only shell it won't ever work on is cmd.exe. |