diff options
author | Rebecca Turner <me@re-becca.org> | 2018-03-23 04:23:24 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2018-03-23 13:46:36 +0300 |
commit | 6d1aac42482a5fee7a38310ee2689050f95de056 (patch) | |
tree | 2edb3cdab3876945d2c25bdc922bf2a451c5560e /scripts | |
parent | c8146858d6e51411650ad4dc3bc5e294068ed1dc (diff) |
standardize
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/changelog.js | 10 | ||||
-rwxr-xr-x | scripts/index-build.js | 8 | ||||
-rwxr-xr-x | scripts/maketest | 3 |
3 files changed, 10 insertions, 11 deletions
diff --git a/scripts/changelog.js b/scripts/changelog.js index 07c8eef94..ff6e43e38 100644 --- a/scripts/changelog.js +++ b/scripts/changelog.js @@ -29,7 +29,7 @@ function shortname (url) { } } -function print_commit (c) { +function printCommit (c) { console.log(`* [\`${c.shortid}\`](https://github.com/npm/npm/commit/${c.fullid})`) if (c.fixes) { let label = shortname(c.fixes) @@ -51,10 +51,10 @@ function print_commit (c) { .replace(/^[-a-z]+: /, '') .replace(/^/mg, ' ') .replace(/\n$/, '') - // backtickify package@version + // backtickify package@version .replace(/^(\s*[^@\s]+@\d+[.]\d+[.]\d+)(\s*\S)/g, '$1:$2') .replace(/\b([^@\s]+@\d+[.]\d+[.]\d+)\b/g, '`$1`') - // linkify commitids + // 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)') console.log(msg) @@ -71,9 +71,9 @@ function main () { let commit log.forEach(function (line) { let m - /*eslint no-cond-assign:0*/ + /* eslint no-cond-assign:0 */ if (/^---$/.test(line)) { - print_commit(commit) + printCommit(commit) } else if (m = line.match(/^([a-f0-9]{7,9}) ([a-f0-9]+) (?:[(]([^)]+)[)] )?(.*?) [(](.*?)[)]/)) { commit = { shortid: m[1], diff --git a/scripts/index-build.js b/scripts/index-build.js index 058bc7401..e782716d7 100755 --- a/scripts/index-build.js +++ b/scripts/index-build.js @@ -18,10 +18,10 @@ glob(root + '/{README.md,doc/*/*.md}', function (er, files) { return f }).sort(function (a, b) { return (a[0] === b[0]) - ? (path.basename(a[1]) === 'npm.md' ? -1 - : path.basename(b[1]) === 'npm.md' ? 1 - : a[1] > b[1] ? 1 : -1) - : a[0] - b[0] + ? (path.basename(a[1]) === 'npm.md' ? -1 + : path.basename(b[1]) === 'npm.md' ? 1 + : a[1] > b[1] ? 1 : -1) + : a[0] - b[0] })) }) diff --git a/scripts/maketest b/scripts/maketest index e3105b5c0..118eb5fbc 100755 --- a/scripts/maketest +++ b/scripts/maketest @@ -29,7 +29,6 @@ const Tacks = require('tacks') const File = Tacks.File const Symlink = Tacks.Symlink const Dir = Tacks.Dir -const extend = Object.assign || require('util')._extend const common = require('../common-tap.js') const basedir = path.join(__dirname, path.basename(__filename, '.js')) @@ -40,7 +39,7 @@ const tmpdir = path.join(basedir, 'tmp') const conf = { cwd: testdir, - env: extend(extend({}, process.env), { + env: Object.assign({}, process.env, { npm_config_cache: cachedir, npm_config_tmp: tmpdir, npm_config_prefix: globaldir, |