Skip to content

Commit

Permalink
Remove the repeating dependency
Browse files Browse the repository at this point in the history
No longer needed.
  • Loading branch information
sindresorhus committed Feb 2, 2017
1 parent 751d2a8 commit ca016c0
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 9 deletions.
3 changes: 1 addition & 2 deletions lib/reporters/mini.js
Expand Up @@ -8,7 +8,6 @@ const spinners = require('cli-spinners');
const chalk = require('chalk');
const cliTruncate = require('cli-truncate');
const cross = require('figures').cross;
const repeating = require('repeating');
const indentString = require('indent-string');
const formatAssertError = require('../format-assert-error');
const extractStack = require('../extract-stack');
Expand Down Expand Up @@ -244,7 +243,7 @@ class MiniReporter {
return status + '\n\n';
}
section() {
return '\n' + chalk.gray.dim(repeating('\u2500', process.stdout.columns || 80));
return '\n' + chalk.gray.dim('\u2500'.repeat(process.stdout.columns || 80));
}
clear() {
return '';
Expand Down
3 changes: 1 addition & 2 deletions lib/reporters/verbose.js
Expand Up @@ -5,7 +5,6 @@ const prettyMs = require('pretty-ms');
const figures = require('figures');
const chalk = require('chalk');
const plur = require('plur');
const repeating = require('repeating');
const formatAssertError = require('../format-assert-error');
const extractStack = require('../extract-stack');
const codeExcerpt = require('../code-excerpt');
Expand Down Expand Up @@ -139,7 +138,7 @@ class VerboseReporter {
return output + '\n';
}
section() {
return chalk.gray.dim(repeating('\u2500', process.stdout.columns || 80));
return chalk.gray.dim('\u2500'.repeat(process.stdout.columns || 80));
}
write(str) {
console.error(str);
Expand Down
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -150,7 +150,6 @@
"pkg-conf": "^2.0.0",
"plur": "^2.0.0",
"pretty-ms": "^2.0.0",
"repeating": "^2.0.0",
"require-precompiled": "^0.1.0",
"resolve-cwd": "^1.0.0",
"slash": "^1.0.0",
Expand Down
3 changes: 1 addition & 2 deletions test/reporters/mini.js
Expand Up @@ -8,7 +8,6 @@ const sinon = require('sinon');
const test = require('tap').test;
const cross = require('figures').cross;
const lolex = require('lolex');
const repeating = require('repeating');
const AvaError = require('../../lib/ava-error');
const MiniReporter = require('../../lib/reporters/mini');
const beautifyStack = require('../../lib/beautify-stack');
Expand All @@ -25,7 +24,7 @@ const stackLineRegex = /.+ \(.+:[0-9]+:[0-9]+\)/;
// Needed because tap doesn't emulate a tty environment and thus this is
// `undefined`, making `cli-truncate` append '...' to test titles
process.stdout.columns = 5000;
const fullWidthLine = chalk.gray.dim(repeating('\u2500', 5000));
const fullWidthLine = chalk.gray.dim('\u2500'.repeat(5000));

function miniReporter(options) {
const reporter = new MiniReporter(options);
Expand Down
3 changes: 1 addition & 2 deletions test/reporters/verbose.js
Expand Up @@ -8,7 +8,6 @@ const chalk = require('chalk');
const sinon = require('sinon');
const test = require('tap').test;
const lolex = require('lolex');
const repeating = require('repeating');
const beautifyStack = require('../../lib/beautify-stack');
const colors = require('../../lib/colors');
const VerboseReporter = require('../../lib/reporters/verbose');
Expand Down Expand Up @@ -710,7 +709,7 @@ test('full-width line when sectioning', t => {
const output = reporter.section();
process.stdout.columns = prevColumns;

t.is(output, chalk.gray.dim(repeating('\u2500', 80)));
t.is(output, chalk.gray.dim('\u2500'.repeat(80)));
t.end();
});

Expand Down

0 comments on commit ca016c0

Please sign in to comment.