diff options
author | Anna Henningsen <anna@addaleax.net> | 2019-09-19 00:50:49 +0200 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-09-24 21:50:59 -0700 |
commit | f9d026dbb76aea1417e8bdffaf4f1f2e535bc79d (patch) | |
tree | 03b7e4c1177c298124c9a8e9ab9166c094b945df /tools | |
parent | 7899a96e66a2f9bb836ca80d8264954848633a3d (diff) | |
download | android-node-v8-f9d026dbb76aea1417e8bdffaf4f1f2e535bc79d.tar.gz android-node-v8-f9d026dbb76aea1417e8bdffaf4f1f2e535bc79d.tar.bz2 android-node-v8-f9d026dbb76aea1417e8bdffaf4f1f2e535bc79d.zip |
tools: make mailmap processing for author list case-insensitive
This is to accommodate Myles Borins otherwise ending up with
multiple entries due to different casing in the email 🙂
PR-URL: https://github.com/nodejs/node/pull/29608
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/update-authors.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/update-authors.js b/tools/update-authors.js index 3d7fcb14b2..312f253c48 100755 --- a/tools/update-authors.js +++ b/tools/update-authors.js @@ -7,6 +7,13 @@ const path = require('path'); const fs = require('fs'); const readline = require('readline'); +class CaseIndifferentMap { + _map = new Map(); + + get(key) { return this._map.get(key.toLowerCase()); } + set(key, value) { return this._map.set(key.toLowerCase(), value); } +} + const log = spawn( 'git', // Inspect author name/email and body. @@ -23,7 +30,7 @@ else output.write('# Authors ordered by first contribution.\n\n'); -const mailmap = new Map(); +const mailmap = new CaseIndifferentMap(); { const lines = fs.readFileSync(path.resolve(__dirname, '../', '.mailmap'), { encoding: 'utf8' }).split('\n'); |