Skip to content

Commit 33666e1

Browse files
authored
chore: update dependencies (#371)
Most semver-major bumps are for dropping Node.js 6 support.
1 parent cd7318d commit 33666e1

24 files changed

Lines changed: 177 additions & 171 deletions

‎bin/ncu-ci‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ const argv = yargs
127127
.argv;
128128

129129
const commandToType = {
130-
'commit': COMMIT,
131-
'pr': PR,
132-
'benchmark': BENCHMARK
130+
commit: COMMIT,
131+
pr: PR,
132+
benchmark: BENCHMARK
133133
};
134134

135135
class CICommand {
@@ -203,7 +203,7 @@ class CICommand {
203203
if (this.markdown) {
204204
clipboardy.writeSync(this.markdown);
205205
cli.separator('');
206-
cli.log(`Written markdown to clipboard`);
206+
cli.log('Written markdown to clipboard');
207207
} else {
208208
cli.error('No markdown generated');
209209
}
@@ -289,7 +289,7 @@ class JobCommand extends CICommand {
289289
class URLCommand extends CICommand {
290290
async initialize() {
291291
const { argv, cli, request, queue } = this;
292-
let parsed = parseJobFromURL(argv.url);
292+
const parsed = parseJobFromURL(argv.url);
293293
if (parsed) {
294294
queue.push({
295295
type: parsed.type,
@@ -357,6 +357,6 @@ async function main(command, argv) {
357357
}
358358

359359
function handler(argv) {
360-
const [ command ] = argv._;
360+
const [command] = argv._;
361361
runPromise(main(command, argv));
362362
}

‎bin/ncu-team‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,13 @@ async function main(argv) {
5353
});
5454
const request = new Request(credentials);
5555

56-
const [ command ] = argv._;
56+
const [command] = argv._;
5757
switch (command) {
58-
case 'list':
58+
case 'list': {
5959
const info = new TeamInfo(cli, request, argv.org, argv.team);
6060
await info.listMembers();
6161
break;
62+
}
6263
case 'sync':
6364
await TeamInfo.syncFile(cli, request, argv.file);
6465
break;

‎lib/auth.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ async function auth(
8080
}
8181

8282
if (options.jenkins) {
83-
let { username, jenkins_token } = getMergedConfig();
83+
const { username, jenkins_token } = getMergedConfig();
8484
if (!username || !jenkins_token) {
8585
process.stdout.write(
8686
'Get your Jenkins API token in https://ci.nodejs.org/me/configure ' +

‎lib/backport_session.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ class BackportSession extends Session {
179179
const cherries = commits.map(i => i.sha).reverse();
180180
const pendingCommands = [
181181
`git cherry-pick ${cherries.join(' ')}`,
182-
`git push -u <your-fork-remote> <your-branch-name>`
182+
'git push -u <your-fork-remote> <your-branch-name>'
183183
];
184184
const shouldPick = await cli.prompt(
185185
'Do you want to cherry-pick the commits?');

‎lib/cache.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class Cache {
9191
}
9292

9393
wrap(Class, identities) {
94-
for (let method of Object.keys(identities)) {
94+
for (const method of Object.keys(identities)) {
9595
const original = Class.prototype[method];
9696
const identity = identities[method];
9797
this.originals[method] = original;

‎lib/ci/ci_result_parser.js‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ class TestBuild extends Job {
324324
const builtOn = failure.builtOn ? `On ${failure.builtOn}: ` : '';
325325
output += `\n\n${builtOn}${failure.reason}\n`;
326326
} else {
327-
output += `\n\n`;
327+
output += '\n\n';
328328
const builtOn = failure.builtOn ? ` on ${failure.builtOn}:` : '';
329329
output += fold(`See failures${builtOn}`, failure.reason) + '\n\n';
330330
}
@@ -378,7 +378,7 @@ function pad(any, length) {
378378
return (any + '').padEnd(length);
379379
}
380380

381-
const kHealthKeys = [ 'success', 'pending', 'aborted', 'failed', 'unstable' ];
381+
const kHealthKeys = ['success', 'pending', 'aborted', 'failed', 'unstable'];
382382
class Health {
383383
constructor(builds) {
384384
for (const key of kHealthKeys) {
@@ -450,7 +450,7 @@ class FailureAggregator {
450450
.value();
451451
const data = [];
452452
for (const item of groupedByReason) {
453-
const [ reason, failures ] = item;
453+
const [reason, failures] = item;
454454
// Uncomment this and redirect stderr away to see matched highlights
455455
// console.log('HIGHLIGHT', reason);
456456

@@ -490,8 +490,8 @@ class FailureAggregator {
490490
let output = 'Failures in ';
491491
output += `[${jobName}/${first.jobid}](${first.link}) to `;
492492
output += `[${jobName}/${last.jobid}](${last.link}) `;
493-
output += `that failed more than 2 PRs\n`;
494-
output += `(Generated with \`ncu-ci `;
493+
output += 'that failed more than 2 PRs\n';
494+
output += '(Generated with `ncu-ci ';
495495
output += `${process.argv.slice(2).join(' ')}\`)\n\n`;
496496

497497
output += this.health.formatAsMarkdown() + '\n';
@@ -736,7 +736,7 @@ function filterBuild(builds, type) {
736736
async function listBuilds(cli, request, type) {
737737
// assert(type === COMMIT || type === PR)
738738
const { jobName } = CI_TYPES.get(type);
739-
const tree = `builds[url,result]`;
739+
const tree = 'builds[url,result]';
740740
const url = `https://${CI_DOMAIN}/job/${jobName}/api/json?tree=${qs.escape(tree)}`;
741741

742742
cli.startSpinner(`Querying ${url}`);
@@ -998,10 +998,10 @@ class BenchmarkRun extends Job {
998998
for (const line of results) {
999999
const star = line.indexOf('*');
10001000
const name = line.slice(0, star).trim();
1001-
const [ file, ...config ] = name.split(' ');
1001+
const [file, ...config] = name.split(' ');
10021002
const confidence = line.match(/(\*+)/)[1];
10031003
const lastStar = line.lastIndexOf('*');
1004-
const [ improvement, ...accuracy ] =
1004+
const [improvement, ...accuracy] =
10051005
line.slice(lastStar + 1).split(/\s*%/).map(i => i.trim() + '%');
10061006
accuracy.pop(); // remove the last empty item
10071007
json.push({

‎lib/ci/ci_type_parser.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ function parseJobFromURL(url) {
119119
return undefined;
120120
}
121121

122-
for (let [ type, info ] of CI_TYPES) {
122+
for (const [type, info] of CI_TYPES) {
123123
const match = url.match(info.pattern);
124124
if (match) {
125125
return {

‎lib/config.js‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,15 @@ exports.getConfigPath = function(configType, dir) {
3838
switch (configType) {
3939
case GLOBAL_CONFIG:
4040
return getNcurcPath();
41-
case PROJECT_CONFIG:
41+
case PROJECT_CONFIG: {
4242
const projectRcPath = path.join(dir || process.cwd(), '.ncurc');
4343
return projectRcPath;
44-
case LOCAL_CONFIG:
44+
}
45+
case LOCAL_CONFIG: {
4546
const ncuDir = exports.getNcuDir(dir);
4647
const configPath = path.join(ncuDir, 'config');
4748
return configPath;
49+
}
4850
default:
4951
throw Error('Invalid configType');
5052
}

‎lib/github/tree.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class GitHubTree {
7676
}
7777
const base = 'https://raw.githubusercontent.com';
7878
const { owner, repo, lastCommit, path } = this;
79-
let prefix = `${base}/${owner}/${repo}/${lastCommit}`;
79+
const prefix = `${base}/${owner}/${repo}/${lastCommit}`;
8080
if (assetPath.startsWith('/')) { // absolute
8181
return `${prefix}/${assetPath}`;
8282
} else {

‎lib/landing_session.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class LandingSession extends Session {
119119
cli.log(`There are ${subjects.length} commits in the PR`);
120120
cli.log('Please run the following commands to complete landing\n\n' +
121121
`$ ${suggestion}\n` +
122-
`$ git node land --continue`);
122+
'$ git node land --continue');
123123
}
124124

125125
async apply() {
@@ -241,11 +241,11 @@ class LandingSession extends Session {
241241
async continue() {
242242
const { cli } = this;
243243
if (this.readyToFinal()) {
244-
cli.log(`Running \`final\`..`);
244+
cli.log('Running `final`..');
245245
return this.final();
246246
}
247247
if (this.readyToAmend()) {
248-
cli.log(`Running \`amend\`..`);
248+
cli.log('Running `amend`..');
249249
return this.amend();
250250
}
251251
if (this.isApplying()) {
@@ -260,7 +260,7 @@ class LandingSession extends Session {
260260
return;
261261
}
262262
if (this.hasStarted()) {
263-
cli.log(`Running \`apply\`..`);
263+
cli.log('Running `apply`..');
264264
return this.apply();
265265
}
266266
cli.log(

0 commit comments

Comments
 (0)