Skip to content

Commit

Permalink
Update dev dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Dec 29, 2020
1 parent 56de27f commit 98d3529
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
22 changes: 11 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,20 @@ class Ora {
return this[TEXT];
}

set text(value) {
this[TEXT] = value;
this.updateLineCount();
}

get prefixText() {
return this[PREFIX_TEXT];
}

set prefixText(value) {
this[PREFIX_TEXT] = value;
this.updateLineCount();
}

get isSpinning() {
return this.id !== undefined;
}
Expand All @@ -210,16 +220,6 @@ class Ora {
}
}

set text(value) {
this[TEXT] = value;
this.updateLineCount();
}

set prefixText(value) {
this[PREFIX_TEXT] = value;
this.updateLineCount();
}

get isEnabled() {
return this._isEnabled && !this.isSilent;
}
Expand Down Expand Up @@ -398,7 +398,7 @@ module.exports.promise = (action, options) => {
try {
await action;
spinner.succeed();
} catch (_) {
} catch {
spinner.fail();
}
})();
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@
"bl": "^4.0.3",
"chalk": "^4.1.0",
"cli-cursor": "^3.1.0",
"cli-spinners": "^2.4.0",
"cli-spinners": "^2.5.0",
"is-interactive": "^1.0.0",
"log-symbols": "^4.0.0",
"strip-ansi": "^6.0.0",
"wcwidth": "^1.0.1"
},
"devDependencies": {
"@types/node": "^14.0.27",
"@types/node": "^14.14.16",
"ava": "^2.4.0",
"get-stream": "^5.1.0",
"tsd": "^0.13.1",
"xo": "^0.25.0"
"get-stream": "^6.0.0",
"tsd": "^0.14.0",
"xo": "^0.36.1"
}
}
18 changes: 9 additions & 9 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,27 +88,27 @@ test('chain call to `.start()` with constructor', t => {

test('.succeed()', macro, spinner => {
spinner.succeed();
}, /(?:|) foo\n$/);
}, /[] foo\n$/);

test('.succeed() - with new text', macro, spinner => {
spinner.succeed('fooed');
}, /(?:|) fooed\n$/);
}, /[] fooed\n$/);

test('.fail()', macro, spinner => {
spinner.fail();
}, /(?:|×) foo\n$/);
}, /[×] foo\n$/);

test('.fail() - with new text', macro, spinner => {
spinner.fail('failed to foo');
}, /(?:|×) failed to foo\n$/);
}, /[×] failed to foo\n$/);

test('.warn()', macro, spinner => {
spinner.warn();
}, /(?:|) foo\n$/);
}, /[] foo\n$/);

test('.info()', macro, spinner => {
spinner.info();
}, /(?:|i) foo\n$/);
}, /[i] foo\n$/);

test('.stopAndPersist() - with new text', macro, spinner => {
spinner.stopAndPersist({text: 'all done'});
Expand Down Expand Up @@ -159,7 +159,7 @@ test('.promise() - resolves', async t => {
await resolves;
stream.end();

t.regex(stripAnsi(await output), /(?:|) foo\n$/);
t.regex(stripAnsi(await output), /[] foo\n$/);
});

test('.promise() - rejects', async t => {
Expand All @@ -176,11 +176,11 @@ test('.promise() - rejects', async t => {

try {
await rejects;
} catch (_) {}
} catch {}

stream.end();

t.regex(stripAnsi(await output), /(?:|×) foo\n$/);
t.regex(stripAnsi(await output), /[×] foo\n$/);
});

test('erases wrapped lines', t => {
Expand Down

0 comments on commit 98d3529

Please sign in to comment.